Skip to content

test(bb): avoid vacuous iterations in BatchMultiScalarMul (merge-train flake refresh)#23227

Draft
AztecBot wants to merge 1 commit into
merge-train/barretenbergfrom
claudebox/fix-msm-test-shrink-ci
Draft

test(bb): avoid vacuous iterations in BatchMultiScalarMul (merge-train flake refresh)#23227
AztecBot wants to merge 1 commit into
merge-train/barretenbergfrom
claudebox/fix-msm-test-shrink-ci

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Why

The merge-train PR #23137 (head d016756552) failed its merge-queue CI run on a TXE/AVM flake unrelated to anything on the train — noir-contracts orderbook_contract test::test::create_order_zero_ask_amount got Timeout waiting for TypeScript callback for contract class from the AVM NAPI callback after 60s. The PR that was just merged into the train (#23226) only touches one barretenberg MSM test file, so it cannot have caused the failure. Per .claude/skills/merge-trains/SKILL.md option 1, landing a small PR onto merge-train/barretenberg refreshes the HEAD SHA so auto-merge can re-engage on #23137 (it won't re-enable after a failure conclusion).

Full analysis (failed run, log keys, why we can't reproduce ./bootstrap.sh ci locally): https://gist.github.com/AztecBot/24eb9bfac0fb6e29bdfcf031a7f50a63

What

Tiny test-quality follow-up to #23226 in the same file. test_batch_multi_scalar_mul was computing num_msms = rand_u8 % kMaxBatchMSMs and num_pts = rand_u16 % kMaxBatchPointsPerMSM, both of which can be 0 — making that iteration (or the whole test invocation) vacuous. Switched to 1 + (rand % (kMax - 1)) so every run exercises at least one MSM with at least one point. Max bound is unchanged (still kMax - 1), so the existing static_assert(kMaxBatchMSMs * kMaxBatchPointsPerMSM < num_points, ...) and runtime ASSERT_LT continue to hold.

How to land

This needs the ci-skip label and a force-merge via "Merge without waiting for requirements to be met" — claudebox can't apply labels itself. The point of this PR is to refresh the merge-train SHA, not to validate the test-quality tweak via CI.

Verification

cd barretenberg/cpp && rm -rf build && cmake --preset default -DBB_LITE=ON
cmake --build build --target ecc_tests
./build/bin/ecc_tests --gtest_filter='*ScalarMultiplicationTest*BatchMultiScalarMul*'

6/6 pass on BN254 and Grumpkin (BatchMultiScalarMul, BatchMultiScalarMulSparse, ScalarsUnchangedAfterBatchMultiScalarMul).

ClaudeBox log: https://claudebox.work/s/c5fe8d2727b143f9?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels May 12, 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