From c29a68e30ffcd8105f94f4bfd83f9becff3b9b3c Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Thu, 30 Apr 2026 01:27:30 -0400 Subject: [PATCH 1/4] claude: drop null/ipv4/ipv6 wire schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- RELEASE.md | 8 ++++++++ include/hegel/generators/combinators.h | 3 ++- src/generators.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..be6312d --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,8 @@ +RELEASE_TYPE: patch + +Update the wire schemas emitted by `optional` and `ip_addresses` to match +the latest `hegel-core` protocol: `optional` now emits +`{"type": "constant", "value": null}` for the null branch (replacing +`{"type": "null"}`), and `ip_addresses` now emits +`{"type": "ip_addresses", "version": N}` (replacing `{"type": "ipv4"}` / +`{"type": "ipv6"}`). No public C++ API change. diff --git a/include/hegel/generators/combinators.h b/include/hegel/generators/combinators.h index f1f34bc..2fb97ab 100644 --- a/include/hegel/generators/combinators.h +++ b/include/hegel/generators/combinators.h @@ -300,7 +300,8 @@ namespace hegel::generators { hegel::internal::json::json generators = hegel::internal::json::json::array(); - generators.push_back(hegel::internal::json::json{{"type", "null"}}); + generators.push_back(hegel::internal::json::json{ + {"type", "constant"}, {"value", nullptr}}); generators.push_back(basic->schema); hegel::internal::json::json schema = {{"type", "one_of"}, {"generators", generators}}; diff --git a/src/generators.cpp b/src/generators.cpp index 92e6196..ed47a71 100644 --- a/src/generators.cpp +++ b/src/generators.cpp @@ -227,7 +227,7 @@ namespace hegel::generators { std::optional> as_basic() const override { return BasicGenerator{ - {{"type", version_ == 4 ? "ipv4" : "ipv6"}}, + {{"type", "ip_addresses"}, {"version", version_}}, &default_parse_raw}; } From 900cac6daab987098509e58606605970d35d79c6 Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Thu, 30 Apr 2026 12:47:21 -0400 Subject: [PATCH 2/4] claude: rename ip_addresses schema to ip_address 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. --- RELEASE.md | 2 +- src/generators.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index be6312d..cc4cccd 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,5 +4,5 @@ Update the wire schemas emitted by `optional` and `ip_addresses` to match the latest `hegel-core` protocol: `optional` now emits `{"type": "constant", "value": null}` for the null branch (replacing `{"type": "null"}`), and `ip_addresses` now emits -`{"type": "ip_addresses", "version": N}` (replacing `{"type": "ipv4"}` / +`{"type": "ip_address", "version": N}` (replacing `{"type": "ipv4"}` / `{"type": "ipv6"}`). No public C++ API change. diff --git a/src/generators.cpp b/src/generators.cpp index ed47a71..303c3b9 100644 --- a/src/generators.cpp +++ b/src/generators.cpp @@ -227,7 +227,7 @@ namespace hegel::generators { std::optional> as_basic() const override { return BasicGenerator{ - {{"type", "ip_addresses"}, {"version", version_}}, + {{"type", "ip_address"}, {"version", version_}}, &default_parse_raw}; } From 4d1cc7d758c1aae69adaf8dfcb552aa2c18cf2f2 Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Thu, 30 Apr 2026 13:05:05 -0400 Subject: [PATCH 3/4] claude: bump pinned hegel-core to 0.6.0 --- RELEASE.md | 11 +++++++++++ nix/flake.lock | 12 ++++++------ nix/flake.nix | 2 +- src/connection.cpp | 4 ++-- src/installer.h | 2 +- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index cc4cccd..d42b4ff 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -6,3 +6,14 @@ the latest `hegel-core` protocol: `optional` now emits `{"type": "null"}`), and `ip_addresses` now emits `{"type": "ip_address", "version": N}` (replacing `{"type": "ipv4"}` / `{"type": "ipv6"}`). No public C++ API change. + +Bump our pinned hegel-core to [0.6.0](https://github.com/hegeldev/hegel-core/releases/tag/v0.6.0), incorporating the following change: + +> This release makes the following breaking protocol changes: +> - Removed `{"type": "sampled_from"}`. Instead of serializing the values to sample from, ask for an integer index and index into the collection of values on the client side. +> - Removed `{"type": "null"}`. Use `{"type": "constant", "value": null}` instead. +> - Replaced `{"type": "ipv4"}` and `{"type": "ipv6"}` with a single `{"type": "ip_address", "version": <4|6>}` schema. +> +> The protocol version is now 0.12. +> +> — [v0.6.0](https://github.com/hegeldev/hegel-core/releases/tag/v0.6.0) diff --git a/nix/flake.lock b/nix/flake.lock index 16cb45c..ddfc6df 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -38,17 +38,17 @@ }, "locked": { "dir": "nix", - "lastModified": 1777479227, - "narHash": "sha256-s1JjMvJX3SRebwlSQeo6S99OWIoP0CFuPALvG1itzGw=", - "ref": "refs/tags/v0.5.0", - "rev": "a95da271bb026037d13656b4317a445a308fded3", - "revCount": 653, + "lastModified": 1777568232, + "narHash": "sha256-VInDnyh7uxm6d9IyfV3ShxHZD4BvsTF7wIB+kv9apbk=", + "ref": "refs/tags/v0.6.0", + "rev": "4630a7845bff88908be4505675a945711f43b5bd", + "revCount": 658, "type": "git", "url": "https://github.com/hegeldev/hegel-core" }, "original": { "dir": "nix", - "ref": "refs/tags/v0.5.0", + "ref": "refs/tags/v0.6.0", "type": "git", "url": "https://github.com/hegeldev/hegel-core" } diff --git a/nix/flake.nix b/nix/flake.nix index 85e166d..503c4ad 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; - hegel.url = "git+https://github.com/hegeldev/hegel-core?dir=nix&ref=refs/tags/v0.5.0"; + hegel.url = "git+https://github.com/hegeldev/hegel-core?dir=nix&ref=refs/tags/v0.6.0"; }; outputs = diff --git a/src/connection.cpp b/src/connection.cpp index d1c0d40..2066910 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -18,8 +18,8 @@ using hegel::internal::json::ImplUtil; namespace hegel::impl { - static constexpr const char* MIN_PROTOCOL_VERSION = "0.11"; - static constexpr const char* MAX_PROTOCOL_VERSION = "0.11"; + static constexpr const char* MIN_PROTOCOL_VERSION = "0.12"; + static constexpr const char* MAX_PROTOCOL_VERSION = "0.12"; static constexpr const char* HANDSHAKE_STRING = "hegel_handshake_start"; Connection::Connection(int read_fd, int write_fd) diff --git a/src/installer.h b/src/installer.h index a58f430..1c84f11 100644 --- a/src/installer.h +++ b/src/installer.h @@ -12,7 +12,7 @@ namespace hegel::impl { /// hegel-core version that this library is built against. Kept in sync /// with the Rust library's `HEGEL_SERVER_VERSION`. - constexpr const char* HEGEL_SERVER_VERSION = "0.5.0"; + constexpr const char* HEGEL_SERVER_VERSION = "0.6.0"; /// Returns the argv prefix used to invoke the hegel server. /// From 35bd367c7abbd35aea476b28953de76d55d5d905 Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Thu, 30 Apr 2026 14:29:29 -0400 Subject: [PATCH 4/4] reword release --- RELEASE.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index d42b4ff..9792e94 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,19 +1,3 @@ RELEASE_TYPE: patch -Update the wire schemas emitted by `optional` and `ip_addresses` to match -the latest `hegel-core` protocol: `optional` now emits -`{"type": "constant", "value": null}` for the null branch (replacing -`{"type": "null"}`), and `ip_addresses` now emits -`{"type": "ip_address", "version": N}` (replacing `{"type": "ipv4"}` / -`{"type": "ipv6"}`). No public C++ API change. - -Bump our pinned hegel-core to [0.6.0](https://github.com/hegeldev/hegel-core/releases/tag/v0.6.0), incorporating the following change: - -> This release makes the following breaking protocol changes: -> - Removed `{"type": "sampled_from"}`. Instead of serializing the values to sample from, ask for an integer index and index into the collection of values on the client side. -> - Removed `{"type": "null"}`. Use `{"type": "constant", "value": null}` instead. -> - Replaced `{"type": "ipv4"}` and `{"type": "ipv6"}` with a single `{"type": "ip_address", "version": <4|6>}` schema. -> -> The protocol version is now 0.12. -> -> — [v0.6.0](https://github.com/hegeldev/hegel-core/releases/tag/v0.6.0) +Internal refactor. \ No newline at end of file