Skip to content

fix: BB_DISABLE_ASSERTS in HonkRecursionConstraintTestWithoutPredicate.GenerateVKFromConstraints#22811

Draft
AztecBot wants to merge 1 commit intonextfrom
claudebox/fix-bb-debug-build
Draft

fix: BB_DISABLE_ASSERTS in HonkRecursionConstraintTestWithoutPredicate.GenerateVKFromConstraints#22811
AztecBot wants to merge 1 commit intonextfrom
claudebox/fix-bb-debug-build

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented Apr 28, 2026

Summary

Unblock the nightly barretenberg-debug build, which has been red every night
since 2026-04-22. The job aborts in
dsl_tests HonkRecursionConstraintTestWithoutPredicate/1.GenerateVKFromConstraints
(UltraZK) with:

Assertion failed: (index < virtual_size_ + virtual_padding)

in SharedShiftedVirtualZeroesArray::get during the first sumcheck prover
round.

Root cause

OinkProver::commit_to_masking_poly allocates gemini_masking_poly with
virtual_size = polynomials.max_end_index(), which is 4135 (odd) for this
circuit. SumcheckProverRound::compute_effective_round_size rounds the round
size up to the next even, so extend_edges reads
gemini_masking_poly[edge_idx + 1] at index == virtual_size. That hits the
debug-only BB_ASSERT_DEBUG. In release the same get() falls through to the
return zero branch (index == end_), the read is well-defined, and proofs
are unaffected; only the debug nightly catches it.

Introduced by #22334 (chore!: masking at the top of the trace).

Fix

Apply the same surgical BB_DISABLE_ASSERTS() workaround already used for the
sibling test HonkRecursionConstraintTestWithPredicate.GenerateVKFromConstraints
(PR #21542). Debug-only, scoped to the test entry — production proving paths
keep the assert live.

The proper fix (rounding virtual_size up to even in the polynomial allocator)
is being pursued separately on draft PRs #22793 / #22789 / #22754. None have
landed in 6+ days; this workaround unblocks the nightly while that work
continues.

Verification

Local debug preset (-D_GLIBCXX_DEBUG, clang-20):

./build-debug/bin/dsl_tests \
  --gtest_filter='HonkRecursionConstraintTestWithoutPredicate/1.GenerateVKFromConstraints'

[ OK ] HonkRecursionConstraintTestWithoutPredicate/1.GenerateVKFromConstraints (101149 ms)
[ PASSED ] 1 test.

PR-branch CI3 passing on this fix:
https://github.com/AztecProtocol/aztec-packages/actions/runs/25037005543

Recurring failures

Nightly debug build failed again every day since this PR was opened — same
assertion, same test, same root cause. This PR is ready to merge but still
sits in draft state.

Date Failed run
2026-04-28 https://github.com/AztecProtocol/aztec-packages/actions/runs/25036789496
2026-04-29 (today; same test, same assertion — see ClaudeBox kickoff link below)

ClaudeBox investigation logs:

Full analysis: https://gist.github.com/AztecBot/7dd9c1d252717940c52a377e70ef1e74

@ludamad / honk-team — please mark this ready for review and merge so the
nightly stops paging us until the proper fix in #22793 lands.

@AztecBot AztecBot force-pushed the claudebox/fix-bb-debug-build branch from 75a1125 to a0f603a Compare April 28, 2026 06:11
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant