From 8791cb11d2d57b7d9ec0c30804a4e370cc4efbc4 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 5 Mar 2026 14:02:45 -0500 Subject: [PATCH 01/14] add printing blob and toggle for printing blob --- include/hegel/options.h | 4 ++++ src/hegel.cpp | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/include/hegel/options.h b/include/hegel/options.h index ded3534..e4900c4 100644 --- a/include/hegel/options.h +++ b/include/hegel/options.h @@ -53,5 +53,9 @@ namespace hegel::options { std::optional hegel_path; std::optional seed; + + std::optional failure_blob; + + bool print_blob; }; } // namespace hegel::options diff --git a/src/hegel.cpp b/src/hegel.cpp index 6699872..da9b761 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -100,6 +100,13 @@ namespace hegel { } else { run_test_msg["seed"] = nullptr; } + + if (options.failure_blob.has_value()) { + run_test_msg["failure_blob"] = options.failure_blob.value(); + } else { + run_test_msg["failure_blob"] = nullptr; + } + conn.request(0, run_test_msg); // Event loop on test channel @@ -178,6 +185,11 @@ namespace hegel { test_passed = results.value("passed", true); final_replays_remaining = results.value("interesting_test_cases", 0); + if (options.print_blob && results.contains("failure_blob")) { + auto byte_sequence = results["failure_blob"].get_binary(); + std::string ascii_string(reinterpret_cast(byte_sequence.data()), byte_sequence.size()); + std::cerr << std::format("Failure blob for reproduction: {}\n", ascii_string); + } } if (final_replays_remaining <= 0) { done = true; @@ -191,7 +203,10 @@ namespace hegel { int status; waitpid(child_pid, &status, 0); std::filesystem::remove_all(temp_dir); - + + if (test_passed && options.failure_blob.has_value()) { + throw std::runtime_error("Failure blob did not cause a failure"); + } if (!test_passed) { throw std::runtime_error("Hegel test failed"); } From 5a939630e3981f627c21599191cf36e17ed128b5 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 5 Mar 2026 15:06:40 -0500 Subject: [PATCH 02/14] update flake, format --- flake.lock | 14 +++++++------- src/hegel.cpp | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 7fb2494..9b373ff 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "uv2nix": "uv2nix" }, "locked": { - "lastModified": 1771946793, - "narHash": "sha256-6Ac1vc0woyJej3Io9AiuJsJHZEn0m/QM8BTulAQxvs4=", + "lastModified": 1772481709, + "narHash": "sha256-Vw+ZGfpK2xPEw2t9Yvb1wt0DUU+BExdEq/SrC73R2JA=", "ref": "refs/heads/main", - "rev": "4beb2cb14efe030cac84def7f817ff3f6f6543c8", - "revCount": 244, + "rev": "85daaeb55d843882e11408d49db9a66bbff5e14a", + "revCount": 310, "type": "git", "url": "ssh://git@github.com/antithesishq/hegel" }, @@ -68,11 +68,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1772624091, + "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", "type": "github" }, "original": { diff --git a/src/hegel.cpp b/src/hegel.cpp index da9b761..c2e2f4f 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -94,7 +94,8 @@ namespace hegel { nlohmann::json run_test_msg = {{"command", "run_test"}, {"name", "test"}, {"test_cases", test_cases}, - {"channel_id", test_channel}}; + {"channel_id", test_channel}, + {"print_blob", options.print_blob}}; if (options.seed.has_value()) { run_test_msg["seed"] = options.seed.value(); } else { @@ -185,10 +186,15 @@ namespace hegel { test_passed = results.value("passed", true); final_replays_remaining = results.value("interesting_test_cases", 0); - if (options.print_blob && results.contains("failure_blob")) { - auto byte_sequence = results["failure_blob"].get_binary(); - std::string ascii_string(reinterpret_cast(byte_sequence.data()), byte_sequence.size()); - std::cerr << std::format("Failure blob for reproduction: {}\n", ascii_string); + if (results.contains("failure_blob")) { + auto byte_sequence = + results["failure_blob"].get_binary(); + std::string ascii_string( + reinterpret_cast(byte_sequence.data()), + byte_sequence.size()); + std::cerr << std::format( + "Failure blob for reproduction: {}\n", + ascii_string); } } if (final_replays_remaining <= 0) { @@ -203,7 +209,7 @@ namespace hegel { int status; waitpid(child_pid, &status, 0); std::filesystem::remove_all(temp_dir); - + if (test_passed && options.failure_blob.has_value()) { throw std::runtime_error("Failure blob did not cause a failure"); } From 74f0ee53676ef763d1641d2247499918d6b2e5a4 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 5 Mar 2026 16:59:50 -0500 Subject: [PATCH 03/14] remove std::format for compat --- src/hegel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hegel.cpp b/src/hegel.cpp index c2e2f4f..ca24973 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -192,9 +192,9 @@ namespace hegel { std::string ascii_string( reinterpret_cast(byte_sequence.data()), byte_sequence.size()); - std::cerr << std::format( - "Failure blob for reproduction: {}\n", - ascii_string); + std::cerr + << "Failure blob for reproduction: " << ascii_string + << "\n"; } } if (final_replays_remaining <= 0) { From f13c9b7cd881c2e1e8410eeae061da7541d43f54 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Fri, 6 Mar 2026 13:48:28 -0500 Subject: [PATCH 04/14] release.md --- RELEASE.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..6223e2b --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +RELEASE_TYPE: patch + +Add support for @reproduce_failure and print blob. From 7585000615fa427ffe225bf362c3b031dad2d4c5 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Mon, 9 Mar 2026 16:02:33 -0400 Subject: [PATCH 05/14] update flake --- flake.lock | 45 +++++++++++++++++++++++---------------------- flake.nix | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index 9b373ff..0a10b11 100644 --- a/flake.lock +++ b/flake.lock @@ -37,26 +37,27 @@ "uv2nix": "uv2nix" }, "locked": { - "lastModified": 1772481709, - "narHash": "sha256-Vw+ZGfpK2xPEw2t9Yvb1wt0DUU+BExdEq/SrC73R2JA=", - "ref": "refs/heads/main", - "rev": "85daaeb55d843882e11408d49db9a66bbff5e14a", - "revCount": 310, + "lastModified": 1772822839, + "narHash": "sha256-K8c7ASoblMrgmYwjLZBj0ewNEjB6EJ7t7+Ugo1y79Dg=", + "ref": "echoumcp1/add-repro-support", + "rev": "900fdfd8ad2c46f3866a713d5624de9d709aff8f", + "revCount": 331, "type": "git", - "url": "ssh://git@github.com/antithesishq/hegel" + "url": "ssh://git@github.com/antithesishq/hegel-core" }, "original": { + "ref": "echoumcp1/add-repro-support", "type": "git", - "url": "ssh://git@github.com/antithesishq/hegel" + "url": "ssh://git@github.com/antithesishq/hegel-core" } }, "nixpkgs": { "locked": { - "lastModified": 1771369470, - "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", + "lastModified": 1772624091, + "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0182a361324364ae3f436a63005877674cf45efb", + "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", "type": "github" }, "original": { @@ -68,11 +69,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1772624091, - "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", + "lastModified": 1772963539, + "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", + "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", "type": "github" }, "original": { @@ -98,11 +99,11 @@ ] }, "locked": { - "lastModified": 1763662255, - "narHash": "sha256-4bocaOyLa3AfiS8KrWjZQYu+IAta05u3gYZzZ6zXbT0=", + "lastModified": 1772555609, + "narHash": "sha256-3BA3HnUvJSbHJAlJj6XSy0Jmu7RyP2gyB/0fL7XuEDo=", "owner": "pyproject-nix", "repo": "build-system-pkgs", - "rev": "042904167604c681a090c07eb6967b4dd4dae88c", + "rev": "c37f66a953535c394244888598947679af231863", "type": "github" }, "original": { @@ -119,11 +120,11 @@ ] }, "locked": { - "lastModified": 1769936401, - "narHash": "sha256-kwCOegKLZJM9v/e/7cqwg1p/YjjTAukKPqmxKnAZRgA=", + "lastModified": 1771518446, + "narHash": "sha256-nFJSfD89vWTu92KyuJWDoTQJuoDuddkJV3TlOl1cOic=", "owner": "pyproject-nix", "repo": "pyproject.nix", - "rev": "b0d513eeeebed6d45b4f2e874f9afba2021f7812", + "rev": "eb204c6b3335698dec6c7fc1da0ebc3c6df05937", "type": "github" }, "original": { @@ -151,11 +152,11 @@ ] }, "locked": { - "lastModified": 1770770348, - "narHash": "sha256-A2GzkmzdYvdgmMEu5yxW+xhossP+txrYb7RuzRaqhlg=", + "lastModified": 1772545244, + "narHash": "sha256-Ys+5UMOqp2kRvnSjyBcvGnjOhkIXB88On1ZcAstz1vY=", "owner": "pyproject-nix", "repo": "uv2nix", - "rev": "5d1b2cb4fe3158043fbafbbe2e46238abbc954b0", + "rev": "482aba340ded40ef557d331315f227d5eba84ced", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 56488ad..79ff522 100644 --- a/flake.nix +++ b/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+ssh://git@github.com/antithesishq/hegel"; + hegel.url = "git+ssh://git@github.com/antithesishq/hegel-core?ref=echoumcp1/add-repro-support"; }; outputs = From c02d969464fafa8cc9674bb4de416f55b2e010b8 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Wed, 11 Mar 2026 14:07:17 -0400 Subject: [PATCH 06/14] move failure blob printing to after replay --- flake.lock | 1 + flake.nix | 1 + src/hegel.cpp | 12 ++++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 120000 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 120000 index 0000000..efba038 --- /dev/null +++ b/flake.lock @@ -0,0 +1 @@ +nix/flake.lock \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8f63d2d --- /dev/null +++ b/flake.nix @@ -0,0 +1 @@ +import ./nix/flake.nix diff --git a/src/hegel.cpp b/src/hegel.cpp index 324e9dc..93036db 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -122,6 +122,7 @@ namespace hegel { // Event loop on test channel bool test_passed = true; + std::optional failure_blob = std::nullopt; int final_replays_remaining = 0; bool done = false; while (!done) { @@ -199,12 +200,11 @@ namespace hegel { if (results.contains("failure_blob")) { auto byte_sequence = results["failure_blob"].get_binary(); - std::string ascii_string( + std::string failure_blob_string( reinterpret_cast(byte_sequence.data()), byte_sequence.size()); - std::cerr - << "Failure blob for reproduction: " << ascii_string - << "\n"; + failure_blob = + std::optional(failure_blob_string); } } if (final_replays_remaining <= 0) { @@ -223,6 +223,10 @@ namespace hegel { if (test_passed && options.failure_blob.has_value()) { throw std::runtime_error("Failure blob did not cause a failure"); } + if (failure_blob.has_value()) { + std::cerr << "Failure blob for reproduction: " + << failure_blob.value() << "\n"; + } if (!test_passed) { throw std::runtime_error("Hegel test failed"); } From 0e81056f0a7de7857fa9acde9c52c4b7819186c9 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Wed, 11 Mar 2026 15:55:11 -0400 Subject: [PATCH 07/14] add header for optional --- src/hegel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hegel.cpp b/src/hegel.cpp index 93036db..645b7bb 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include #include From 7d989919d339e8b27b2f8c7911052aaba2c1ddb3 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Wed, 11 Mar 2026 15:56:29 -0400 Subject: [PATCH 08/14] fix format --- src/hegel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hegel.cpp b/src/hegel.cpp index 645b7bb..4aad681 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -15,12 +15,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include From f6c643e74c327c4c01257a905202eaae1c8ef68a Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 12 Mar 2026 10:46:51 -0400 Subject: [PATCH 09/14] support printing multiple failure blobs --- src/hegel.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/hegel.cpp b/src/hegel.cpp index 4aad681..84abe45 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -105,8 +105,7 @@ namespace hegel { nlohmann::json run_test_msg = {{"command", "run_test"}, {"test_cases", test_cases}, - {"channel_id", test_channel}, - {"print_blob", options.print_blob}}; + {"channel_id", test_channel}}; if (options.seed.has_value()) { run_test_msg["seed"] = options.seed.value(); } else { @@ -123,7 +122,7 @@ namespace hegel { // Event loop on test channel bool test_passed = true; - std::optional failure_blob = std::nullopt; + std::vector failure_blobs; int final_replays_remaining = 0; bool done = false; while (!done) { @@ -198,14 +197,12 @@ namespace hegel { test_passed = results.value("passed", true); final_replays_remaining = results.value("interesting_test_cases", 0); - if (results.contains("failure_blob")) { - auto byte_sequence = - results["failure_blob"].get_binary(); + for (const auto& blob : results["failure_blobs"]) { + auto byte_sequence = blob.get_binary(); std::string failure_blob_string( reinterpret_cast(byte_sequence.data()), byte_sequence.size()); - failure_blob = - std::optional(failure_blob_string); + failure_blobs.push_back(failure_blob_string); } } if (final_replays_remaining <= 0) { @@ -224,9 +221,11 @@ namespace hegel { if (test_passed && options.failure_blob.has_value()) { throw std::runtime_error("Failure blob did not cause a failure"); } - if (failure_blob.has_value()) { - std::cerr << "Failure blob for reproduction: " - << failure_blob.value() << "\n"; + if (options.print_blob && !failure_blobs.empty()) { + std::cerr << "Failure blobs for reproduction:\n"; + for (const auto& blob : failure_blobs) { + std::cerr << blob << "\n"; + } } if (!test_passed) { throw std::runtime_error("Hegel test failed"); From f4b178ce05e6e555d15b58293db8e76cbafba4d8 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 26 Mar 2026 14:28:03 -0400 Subject: [PATCH 10/14] update hegel-core name and add json string assignment operator --- .github/workflows/ci.yml | 8 ++++---- CMakeLists.txt | 2 +- include/hegel/json.h | 1 + justfile | 4 ++-- nix/flake.nix | 2 ++ src/json.cpp | 4 ++++ 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af99310..cd67d96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/antithesishq/hegel.git + run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git - name: Run clang-tidy run: just check-tidy @@ -131,7 +131,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/antithesishq/hegel.git + run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git - name: Configure CMake env: @@ -171,7 +171,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/antithesishq/hegel.git + run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git - name: Configure CMake run: cmake -B build @@ -233,7 +233,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/antithesishq/hegel.git + run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git - name: Configure CMake run: cmake -B build -DHEGEL_BUILD_DOCS=ON diff --git a/CMakeLists.txt b/CMakeLists.txt index 935d43c..6ef1215 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,7 @@ else() message(STATUS "using local hegel from ${HEGEL_LOCAL_DIR}") set(HEGEL_INSTALL_SOURCE "${HEGEL_LOCAL_DIR}") else() - set(HEGEL_INSTALL_SOURCE "git+ssh://git@github.com/antithesishq/hegel.git") + set(HEGEL_INSTALL_SOURCE "git+ssh://git@github.com/hegeldev/hegel-core.git") endif() execute_process( diff --git a/include/hegel/json.h b/include/hegel/json.h index 4bc201a..ca5863e 100644 --- a/include/hegel/json.h +++ b/include/hegel/json.h @@ -47,6 +47,7 @@ namespace hegel::internal::json { bool is_array() const noexcept; bool is_object() const noexcept; + json_raw_ref& operator=(const std::string& other); json_raw_ref& operator=(const size_t& other); json_raw_ref& operator=(const double& other); json_raw_ref& operator=(const std::nullptr_t& other); diff --git a/justfile b/justfile index 8efc31d..d18303a 100644 --- a/justfile +++ b/justfile @@ -5,7 +5,7 @@ setup: mkdir -p "$HOME/.local/bin" ln -sf "$HEGEL_BINARY" "$HOME/.local/bin/hegel" else - uv tool install "hegel @ git+ssh://git@github.com/antithesishq/hegel.git" + uv tool install "hegel @ git+ssh://git@github.com/hegeldev/hegel-core.git" fi build: @@ -38,7 +38,7 @@ check: build-conformance: build conformance: build-conformance - uv run --with "hegel @ git+ssh://git@github.com/antithesishq/hegel.git" \ + uv run --with "hegel @ git+ssh://git@github.com/hegeldev/hegel-core.git" \ --with pytest --with hypothesis \ pytest tests/conformance/test_conformance.py --durations=20 --durations-min=1.0 diff --git a/nix/flake.nix b/nix/flake.nix index 9bfbe08..95b5bdd 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -126,6 +126,8 @@ inputsFrom = [ self.packages.${system}.default ]; packages = [ pkgs.clang-tools + pkgs.uv + pkgs.just ]; }; } diff --git a/src/json.cpp b/src/json.cpp index 70950d8..29f6c0d 100644 --- a/src/json.cpp +++ b/src/json.cpp @@ -142,6 +142,10 @@ namespace hegel::internal::json { size_t json_raw_ref::size() const noexcept { return ref->data.size(); } + json_raw_ref& json_raw_ref::operator=(const std::string& other) { + ref->data = other; + return *this; + } json_raw_ref& json_raw_ref::operator=(const size_t& other) { ref->data = other; return *this; From b0b1122219214fcbc9ce5282d4cd31c74539fe60 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 26 Mar 2026 14:36:50 -0400 Subject: [PATCH 11/14] switch to https clone --- .github/workflows/ci.yml | 8 ++++---- CMakeLists.txt | 2 +- nix/flake.nix | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd67d96..0b8d148 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git + run: pip install git+https://github.com/hegeldev/hegel-core.git - name: Run clang-tidy run: just check-tidy @@ -131,7 +131,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git + run: pip install git+https://github.com/hegeldev/hegel-core.git - name: Configure CMake env: @@ -171,7 +171,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git + run: pip install git+https://github.com/hegeldev/hegel-core.git - name: Configure CMake run: cmake -B build @@ -233,7 +233,7 @@ jobs: python-version: '3.13' - name: Install hegel - run: pip install git+ssh://git@github.com/hegeldev/hegel-core.git + run: pip install git+https://github.com/hegeldev/hegel-core.git - name: Configure CMake run: cmake -B build -DHEGEL_BUILD_DOCS=ON diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ef1215..99ee705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,7 @@ else() message(STATUS "using local hegel from ${HEGEL_LOCAL_DIR}") set(HEGEL_INSTALL_SOURCE "${HEGEL_LOCAL_DIR}") else() - set(HEGEL_INSTALL_SOURCE "git+ssh://git@github.com/hegeldev/hegel-core.git") + set(HEGEL_INSTALL_SOURCE "git+https://github.com/hegeldev/hegel-core.git") endif() execute_process( diff --git a/nix/flake.nix b/nix/flake.nix index 95b5bdd..4472cc2 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+ssh://git@github.com/antithesishq/hegel-core?ref=echoumcp1/add-repro-support"; + hegel.url = "git+https://github.com/hegeldev/hegel-core"; }; outputs = From c69b42ee3a01175ca83990d1965ef07c972753ec Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Thu, 26 Mar 2026 14:57:57 -0400 Subject: [PATCH 12/14] update flake temporarily --- nix/flake.lock | 14 ++++++++------ nix/flake.nix | 2 +- src/connection.cpp | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/nix/flake.lock b/nix/flake.lock index 0a10b11..c26f96d 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -37,18 +37,20 @@ "uv2nix": "uv2nix" }, "locked": { - "lastModified": 1772822839, - "narHash": "sha256-K8c7ASoblMrgmYwjLZBj0ewNEjB6EJ7t7+Ugo1y79Dg=", + "dir": "nix", + "lastModified": 1774548222, + "narHash": "sha256-bO6kB5iq+jPwOH4R17z7TqK506Ap+OZ551/OguFk0dE=", "ref": "echoumcp1/add-repro-support", - "rev": "900fdfd8ad2c46f3866a713d5624de9d709aff8f", - "revCount": 331, + "rev": "a7d79294ad85b5fbe35909d1837ee9b35e57464d", + "revCount": 454, "type": "git", - "url": "ssh://git@github.com/antithesishq/hegel-core" + "url": "https://github.com/echoumcp1/hegel-core" }, "original": { + "dir": "nix", "ref": "echoumcp1/add-repro-support", "type": "git", - "url": "ssh://git@github.com/antithesishq/hegel-core" + "url": "https://github.com/echoumcp1/hegel-core" } }, "nixpkgs": { diff --git a/nix/flake.nix b/nix/flake.nix index 4472cc2..2e46717 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"; + hegel.url = "git+https://github.com/echoumcp1/hegel-core?ref=echoumcp1/add-repro-support&dir=nix"; }; outputs = diff --git a/src/connection.cpp b/src/connection.cpp index 6b2b224..958e4b3 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -47,7 +47,7 @@ namespace hegel::impl { // Handshake // ============================================================================= static constexpr const char* MIN_PROTOCOL_VERSION = "0.1"; - static constexpr const char* MAX_PROTOCOL_VERSION = "0.4"; + static constexpr const char* MAX_PROTOCOL_VERSION = "0.7"; static constexpr const char* HANDSHAKE_STRING = "hegel_handshake_start"; void Connection::handshake() { From cf2e0f1a00fb9c3fa853cd549dc8a2bbe9018b2c Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Tue, 31 Mar 2026 11:05:59 -0400 Subject: [PATCH 13/14] add prints for flaky and health check fails --- src/hegel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/hegel.cpp b/src/hegel.cpp index fef4ff9..340b405 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -129,6 +129,8 @@ namespace hegel { // Event loop on test channel bool test_passed = true; std::vector failure_blobs; + std::string health_check_msg; + std::string flaky_test_msg; int final_replays_remaining = 0; bool done = false; while (!done) { @@ -203,6 +205,8 @@ namespace hegel { if (payload.contains("results")) { auto& results = ImplUtil::raw(payload["results"]); test_passed = results.value("passed", true); + health_check_msg = results.value("health_check_failure", ""); + flaky_test_msg = results.value("flaky", ""); final_replays_remaining = results.value("interesting_test_cases", 0); for (const auto& blob : results["failure_blobs"]) { @@ -235,6 +239,12 @@ namespace hegel { std::cerr << blob << "\n"; } } + if (health_check_msg.length() > 0) { + std::cerr << health_check_msg << "\n"; + } + if (flaky_test_msg.length() > 0) { + std::cerr << flaky_test_msg << "\n"; + } if (!test_passed) { throw std::runtime_error("Hegel test failed"); } From 4e0b5f12a6acf83af137a44637860f9d9849c969 Mon Sep 17 00:00:00 2001 From: Ethan Chou Date: Wed, 1 Apr 2026 10:24:21 -0400 Subject: [PATCH 14/14] lint and remove extra nix files --- flake.lock | 1 - flake.nix | 1 - nix/flake.lock | 11 +++++------ nix/flake.nix | 2 +- src/hegel.cpp | 3 ++- 5 files changed, 8 insertions(+), 10 deletions(-) delete mode 120000 flake.lock delete mode 100644 flake.nix diff --git a/flake.lock b/flake.lock deleted file mode 120000 index efba038..0000000 --- a/flake.lock +++ /dev/null @@ -1 +0,0 @@ -nix/flake.lock \ No newline at end of file diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 8f63d2d..0000000 --- a/flake.nix +++ /dev/null @@ -1 +0,0 @@ -import ./nix/flake.nix diff --git a/nix/flake.lock b/nix/flake.lock index 2b36b95..a597f37 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -38,17 +38,16 @@ }, "locked": { "dir": "nix", - "lastModified": 1774548222, - "narHash": "sha256-bO6kB5iq+jPwOH4R17z7TqK506Ap+OZ551/OguFk0dE=", - "ref": "echoumcp1/add-repro-support", - "rev": "a7d79294ad85b5fbe35909d1837ee9b35e57464d", - "revCount": 454, + "lastModified": 1774970430, + "narHash": "sha256-P0sAAgeL9ziFoUyCLBAEscVz1o2CcZCS+ynmn6i9GD8=", + "ref": "refs/heads/main", + "rev": "73bcda3c91c2f7391717cde30ce75f207bd13a10", + "revCount": 429, "type": "git", "url": "https://github.com/hegeldev/hegel-core.git" }, "original": { "dir": "nix", - "ref": "echoumcp1/add-repro-support", "type": "git", "url": "https://github.com/hegeldev/hegel-core.git" } diff --git a/nix/flake.nix b/nix/flake.nix index 44a1dd3..b58a7af 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.git"; + hegel.url = "git+https://github.com/hegeldev/hegel-core.git?dir=nix"; }; outputs = diff --git a/src/hegel.cpp b/src/hegel.cpp index 340b405..69ca07e 100644 --- a/src/hegel.cpp +++ b/src/hegel.cpp @@ -205,7 +205,8 @@ namespace hegel { if (payload.contains("results")) { auto& results = ImplUtil::raw(payload["results"]); test_passed = results.value("passed", true); - health_check_msg = results.value("health_check_failure", ""); + health_check_msg = + results.value("health_check_failure", ""); flaky_test_msg = results.value("flaky", ""); final_replays_remaining = results.value("interesting_test_cases", 0);