Skip to content

claude: protocol: drop null/ipv4/ipv6 schemas#69

Merged
Liam-DeVoe merged 4 commits intomainfrom
drop-null-ipv4-ipv6-schemas
Apr 30, 2026
Merged

claude: protocol: drop null/ipv4/ipv6 schemas#69
Liam-DeVoe merged 4 commits intomainfrom
drop-null-ipv4-ipv6-schemas

Conversation

@Liam-DeVoe
Copy link
Copy Markdown
Member

Claude-written description

Update the JSON schemas the C++ client emits to match the latest hegel-core protocol:

  • optional now emits {"type": "constant", "value": null} for its null branch (replacing {"type": "null"})
  • ip_addresses now emits {"type": "ip_addresses", "version": N} (replacing {"type": "ipv4"} / {"type": "ipv6"})

The C++ client never emitted a sampled_from schema — it already lowers sampled_from to an integer-index draw — so there is no source change for that issue.

Coordinated with the hegel-core protocol cleanup:

Expected CI failures

The conformance / integration tests run against the installed hegel binary and will fail until the coordinated hegel-core PR merges and publishes a release. Unit tests, build, and format checks pass.

Self-review notes

The code-reviewer subagent flagged three points; addressing each:

  • Bump pinned hegel-core==0.4.0 in tests/conformance/pyproject.toml — this file is not consumed by just check-conformance (which calls uv run --with hegel-core unpinned), so the pin is silently dead. Out of scope for this coordinated protocol PR; can be cleaned up separately.
  • Consider RELEASE_TYPE: minor over patch — the task spec for this coordinated update directs patch since there is no public C++ API change. The wire-format compatibility break is what motivates the simultaneous landing across hegel-core + clients, so the patch level matches the rest of the cohort.
  • Add unit tests asserting the literal JSON shapes — the codebase has no existing wire-shape assertions for any schema (only schema().has_value() checks); adding them just here would be inconsistent. Better tackled as a follow-up that covers all schemas at once.

Update the JSON schemas the C++ client emits to match the latest
hegel-core protocol:

- `optional` now emits `{"type": "constant", "value": null}` instead
  of `{"type": "null"}` for its null branch.
- `ip_addresses` now emits `{"type": "ip_addresses", "version": N}`
  instead of `{"type": "ipv4"}` / `{"type": "ipv6"}`.

The "either" version case in `ip_addresses(...)` is unchanged — it
still composes a `one_of` of two single-version `IpGenerator`s, which
each pick up the new schema.

Coordinated with hegeldev/hegel-core issues #77, #78, #82.
The wire schema type string is now singular `ip_address` to match the
naming convention of the other protocol schema types. No change to the
public C++ `ip_addresses()` function.
@Liam-DeVoe Liam-DeVoe enabled auto-merge April 30, 2026 18:29
@Liam-DeVoe Liam-DeVoe merged commit 721fa13 into main Apr 30, 2026
12 checks passed
@Liam-DeVoe Liam-DeVoe deleted the drop-null-ipv4-ipv6-schemas branch April 30, 2026 18:32
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