claude: adopt indexed one_of wire format and bump hegel-core to 0.5.0#68
Merged
Liam-DeVoe merged 3 commits intomainfrom Apr 29, 2026
Merged
claude: adopt indexed one_of wire format and bump hegel-core to 0.5.0#68Liam-DeVoe merged 3 commits intomainfrom
Liam-DeVoe merged 3 commits intomainfrom
Conversation
The protocol now guarantees `one_of` responses arrive as
`[index, value]`, so we no longer need to wrap each branch in
a per-branch tagged tuple in the schema. The schema sent to the
server is now a flat `{type: one_of, generators: [...]}`, and
the client-side parser uses the index to dispatch to the right
per-branch transform.
f827ec4 to
6801070
Compare
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.
Claude-written description
Combines #67 (the auto-generated
hegel-core0.5.0 bump) with the matching client-side wire-format change. Each half fails CI on its own — the bump alone leaves the client emitting tagged tuples that the new server doesn't understand, and the wire-format change alone runs against an olderhegelthat still expects the tagged-tuple shape.Wire-format change (commit 1):
OneOfGenerator,VariantGenerator,OptionalGeneratornow emit a flat{type: "one_of", generators: [...]}schema instead of wrapping each branch in atuple(constant(i), child)tagged tuple.[index, value]reply:indexselects the branch's parser (which still carries any per-branch.map()transforms),valueis fed to it.OptionalGeneratorparses[0, _]asnulloptand[1, value]as the inner value.tests/test_one_of_schema.cppcovering schema shape and parse dispatch for all three.Bump (commit 2, cherry-picked verbatim from #67):
hegel-coreto 0.5.0.0.11.nix/flake.lockandnix/flake.nixupdated to match.After this lands, #67 becomes redundant — its content is in commit 2 here.