Skip to content

claude: adopt indexed one_of wire format and bump hegel-core to 0.5.0#68

Merged
Liam-DeVoe merged 3 commits intomainfrom
sortie/f649b73e/hegel-cpp
Apr 29, 2026
Merged

claude: adopt indexed one_of wire format and bump hegel-core to 0.5.0#68
Liam-DeVoe merged 3 commits intomainfrom
sortie/f649b73e/hegel-cpp

Conversation

@Liam-DeVoe
Copy link
Copy Markdown
Member

Claude-written description

Combines #67 (the auto-generated hegel-core 0.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 older hegel that still expects the tagged-tuple shape.

Wire-format change (commit 1):

  • OneOfGenerator, VariantGenerator, OptionalGenerator now emit a flat {type: "one_of", generators: [...]} schema instead of wrapping each branch in a tuple(constant(i), child) tagged tuple.
  • The client-side parser dispatches on the [index, value] reply: index selects the branch's parser (which still carries any per-branch .map() transforms), value is fed to it.
  • OptionalGenerator parses [0, _] as nullopt and [1, value] as the inner value.
  • Adds tests/test_one_of_schema.cpp covering schema shape and parse dispatch for all three.

Bump (commit 2, cherry-picked verbatim from #67):

  • Pins hegel-core to 0.5.0.
  • Bumps the supported protocol version range to 0.11.
  • nix/flake.lock and nix/flake.nix updated to match.

After this lands, #67 becomes redundant — its content is in commit 2 here.

Liam-DeVoe and others added 2 commits April 29, 2026 14:53
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.
@Liam-DeVoe Liam-DeVoe force-pushed the sortie/f649b73e/hegel-cpp branch from f827ec4 to 6801070 Compare April 29, 2026 18:53
@Liam-DeVoe Liam-DeVoe enabled auto-merge April 29, 2026 19:00
@Liam-DeVoe Liam-DeVoe merged commit ca27e1c into main Apr 29, 2026
14 checks passed
@Liam-DeVoe Liam-DeVoe deleted the sortie/f649b73e/hegel-cpp branch April 29, 2026 19:03
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.

1 participant