fix(bb): push missing q_5 in QArith3Gate test to unbreak nightly debug build#23229
Merged
federicobarbacovi merged 3 commits intoMay 14, 2026
Merged
Conversation
federicobarbacovi
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The nightly Barretenberg debug build (
Nightly Debug Buildworkflow, run 25781836067) onnext@2b1d9cf22dfailed incircuit_checker_tests:CI log: http://ci.aztec-labs.com/e0ba10c734d2dd7b
The assertion fires inside
UltraCircuitBuilder_::check_selector_length_consistency(stdlib_circuit_builders/ultra_circuit_builder.hpp), which is gated by#if NDEBUG ... #elseand so runs only in debug builds — that's why no other CI mode caught it.QArith3Gatebuilds two arithmetic gates manually by pushing each selector individually. Every in-tree gate constructor (create_arithmetic_gate,fix_witness,create_add_gate, etc.) followsq_4().emplace_back(...)withq_5().emplace_back(0); this test was the only manual-construction site that omitted theq_5push.Pre-merge-train, the consistency check used a per-flavour curated
get_selectors()forUltraTraceArithmeticBlockthat did not includeq_5, so the omission was invisible. PR #23137 (feat: merge-train/barretenberg) refactoredExecutionTraceBlocksoget_selectors()returnsnon_gate_selectors(7 entries includingq_5) concatenated withgate_selectors, expanding the consistency check to coverq_5. The test has been silently broken w.r.t. the new check ever since that landed last night.What
Add the missing
builder.blocks.arithmetic.q_5().emplace_back(0)to both manually-constructed gates inQArith3Gate, matching the existing convention.Verification
Full
circuit_checker_tests(79 tests) and a sanity-run ofpolynomials_tests,common_tests,relations_testsall pass after the fix.Full analysis: https://gist.github.com/AztecBot/74d9233cda80ad6c3108d670a019afea
ClaudeBox log: https://claudebox.work/s/3064b2e43c917621?run=1
ClaudeBox log: https://claudebox.work/s/3064b2e43c917621?run=1