Skip to content

feat(decompiler): worker-side v1 codecs for the configuration/graph commands (#34-6b)#223

Merged
CryptoJones merged 1 commit into
masterfrom
feat/34-6b-config-codec
Jun 1, 2026
Merged

feat(decompiler): worker-side v1 codecs for the configuration/graph commands (#34-6b)#223
CryptoJones merged 1 commit into
masterfrom
feat/34-6b-config-codec

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

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-only schema/ipc_config_codec.h. The program-lifecycle trio landed in #34-6a.

What this adds

  • Native request/response views and the full encode/decode round-trip for each of the three commands, under the same contract as the lifecycle codec: worker production directions decode_*_request() / encode_*_response(); host directions included for testability; generic Finish/GetRoot/VerifyBuffer roots (none is the schema root_type); verify-before-read on every decode, returning false and leaving the out-param untouched on a null/unverifiable buffer.
  • The control-flow <block> document, the SetAction root-action/print-config selectors, and the SetOptions <optionslist> stay opaque strings to match the legacy wire.

Test plan

  • New auto-globbed testipc_config_codec.cc — 11 cases covering each command's request/response round-trip, the success bool schema default (SetAction), empty-string handling, and the null/garbage/truncated rejection contract.
  • scripts/local-precheck.sh --full green locally: 677/677 datatests; full C++ unit suite 302/302.

With #34-6a + #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.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

…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>
@CryptoJones CryptoJones merged commit cb1b1b7 into master Jun 1, 2026
16 checks passed
@CryptoJones CryptoJones deleted the feat/34-6b-config-codec branch June 1, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rec 34 #34-6b: worker-side v1 codecs for the configuration/graph commands

1 participant