fix(bb): repair acir components debug regression test - #24979
Conversation
611e51c to
aca63f7
Compare
|
Independently reproduced and verified this fix from tonight's nightly dispatch (aztec-claude run 30333107696). This PR is correct and ready to land — it just needs a human to mark it ready and merge. Posting the verification because the PR did not yet carry test evidence, and because this is the blocker for a failure that has now recurred every night since 2026-07-16. Verified locally against the nightly's exact presetBuilt
Confirmed root cause via debuggerThe stack confirms the diagnosis in the description — the abort is inside the analyzer, before the checker's own bounds guard:
The replacement test still covers the intended guardWorth stating explicitly, since a rewritten fixture can easily end up passing vacuously: I temporarily deleted the if (witness >= builder_.real_variable_index.size()) { ... }guard in No regressions
Why this keeps recurringThis is the 11th ClaudeBox branch opened for this same failure since 2026-07-16. They are opened as drafts, never reviewed, and Optional follow-up (not needed to land this)To stop the failure mode recurring silently, a one-line invariant check in the BB_ASSERT_EQ(circuit_builder.real_variable_index.size(),
circuit_builder.get_num_variables(),
"real_variable_index and variables must be the same length");I verified this compiles and passes both suites in debug and release. Happy to push it here or open it separately — say the word. Created by claudebox · group: |
Summary
AcirComponentsCheckTest.DetectsUnconstrainedWitnessesaborted under_GLIBCXX_DEBUGwith an out-of-boundsstd::vectoraccess.UltraCircuitBuilder::real_variable_indexwithresize(9). That violates builder invariants, so the static analyzer aborted beforeComponentsCheckercould report the intendedUNCONSTRAINEDerror.Notes
The linked
aztec-clauderun 30190267425 is a separate stale scheduled workflow copy; aztec-claude#2041 already carries that schedule guard. The real current debug-build failure is the canonicalaztec-packagesrun above.Testing
cmake --preset debugcmake --build --preset debug --target acir_components_check_tests -j$(nproc)./build-debug/bin/acir_components_check_tests --gtest_filter=AcirComponentsCheckTest.DetectsUnconstrainedWitnesses./build-debug/bin/acir_components_check_testsNATIVE_PRESET=debug barretenberg/cpp/scripts/run_test.sh acir_components_check_tests AcirComponentsCheckTest.DetectsUnconstrainedWitnessesCreated by claudebox · group:
slackbot· Slack thread