feat(decompiler): worker-side v1 codecs for the configuration/graph commands (#34-6b)#223
Merged
Merged
Conversation
…ommands (#34-6b) Completes #34-6 — and with it the worker-side v1 codec for every command in the schema — with the remaining trio in a new header-only schema/ipc_config_codec.h: StructureGraph, SetAction, and SetOptions. Each command gets its native request/response views and the full encode/decode round-trip, under the same contract as the lifecycle codec (#34-6a): on the worker the production directions are decode_*_request() / encode_*_response(); the opposite (host) directions are provided too, solely so each command round-trips in isolation under test. None of these tables is the schema root_type, so the generic FlatBufferBuilder::Finish / GetRoot / Verifier::VerifyBuffer API roots them, and every decode verifies before reading and returns false (leaving its out-param untouched) on a null or unverifiable buffer. The StructureGraph control-flow <block> document, the SetAction root_action/print_config selectors, and the SetOptions <optionslist> are all carried as opaque strings to match the legacy wire (decompile.fbs); structuring them is out of scope. A new auto-globbed unit test (testipc_config_codec.cc) pins each command's request/response round-trip, the success bool schema default (SetAction), empty-string handling, and the null/garbage/truncated rejection contract — 11 cases, 302 unit tests total. With #34-6a and #34-6b landed, the worker-side request-decode / response-encode codec is complete for all seven commands. Test-only and inert, like the rest of #34-4..#34-6: nothing in the production decompiler includes the codec yet — the command-loop wiring is the end-to-end-only change deferred per DD-0005. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #222.
Completes
#34-6— and with it the worker-side v1 codec for every command in the schema — with the remaining trio (StructureGraph,SetAction,SetOptions) in a new header-onlyschema/ipc_config_codec.h. The program-lifecycle trio landed in#34-6a.What this adds
decode_*_request()/encode_*_response(); host directions included for testability; genericFinish/GetRoot/VerifyBufferroots (none is the schemaroot_type); verify-before-read on everydecode, returning false and leaving the out-param untouched on a null/unverifiable buffer.<block>document, theSetActionroot-action/print-config selectors, and theSetOptions<optionslist>stay opaque strings to match the legacy wire.Test plan
testipc_config_codec.cc— 11 cases covering each command's request/response round-trip, thesuccessbool schema default (SetAction), empty-string handling, and the null/garbage/truncated rejection contract.scripts/local-precheck.sh --fullgreen locally: 677/677 datatests; full C++ unit suite 302/302.With
#34-6a+#34-6blanded, the worker-side request-decode / response-encode codec is complete for all seven commands. Test-only and inert, like the rest of#34-4..#34-6: nothing in the production decompiler includes the codec yet — the command-loop wiring is the end-to-end-only change deferred per DD-0005.Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/