Skip to content

Commit b6eab01

Browse files
authored
test: drop event_logs from compat matrix and loosen avm_simulator assertion regex (#23193)
## Summary Compat-e2e regressed on `v4.3.0-nightly.20260512-1` (https://github.com/AztecProtocol/aztec-packages/actions/runs/25731562906). After review with Jan and David, the two failing tests need different treatments — the PXE error enrichment itself is *not* broken; this is purely test-vs-old-artifact text drift. ## What this PR does - **`e2e_event_logs.test.ts`**: drop from the compat-e2e matrix. The new `tagging cache reconciliation against kernel squashing` test added in PR #23044 calls `TestLog::deliver_squashed_and_surviving_notes`, a method that does not exist in legacy 4.2.x artifacts. There is no reasonable backwards-compat coverage here without backporting the contract method itself. - **`e2e_avm_simulator.test.ts`**: keep it in the compat-e2e matrix and loosen the assertion-message regex to accept either the older or the newer assertion-span form: - old (pre-#22911 nargo): `'not_true == true'` - new (post-#22911 nargo): `'assert(not_true == true, "This assertion should fail!")'` The regex becomes `/Assertion failed: This assertion should fail!.*not_true == true/`, which matches both shapes and still rejects unrelated assertions. The test continues to validate the PXE's public-error enrichment pipeline (assertion decode + opcode→source resolution) against legacy artifacts — which is the actually-valuable coverage David flagged in the team-fairies thread. ## Why not exclude `avm_simulator` too? David pointed out that this case is the only public-error-enrichment test we have, and the enrichment code path is genuinely worth keeping under compat watch. Verified manually that enrichment runs correctly against legacy 4.2.x artifacts (paths, line/col, function names, assertion message all resolve); the only thing that differed was the locationText span granularity that nargo bakes into the artifact at compile time. Loosening the regex preserves the coverage without breaking on the legacy span shape. ## Test plan - `node -e '/Assertion failed: This assertion should fail!.*not_true == true/.test(…)'` matches both old and new forms, rejects unrelated assertions. - `bash -c 'shopt -s extglob; ls src/e2e_!(block_building|prover_*|kernelless_simulation|event_logs).test.ts'` from `yarn-project/end-to-end` resolves to 49 files (was 48 when `avm_simulator` was also excluded), `event_logs` correctly absent. - Compat-e2e is `continue-on-error` for nightlies — next nightly should be green on `ci-compat-e2e` once this lands. A forward-port of the regex loosening to `next` is also worthwhile (same file, identical strict regex there today), but mainline `next` doesn't run compat-e2e so it isn't blocking; can ship as a follow-up.
2 parents 80fe2ec + 0fadda7 commit b6eab01

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

yarn-project/end-to-end/bootstrap.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ function avm_check_circuit {
262262
# tests are known-flaky and provide no additional backwards-compat coverage). Also excludes
263263
# kernelless_simulation, which asserts on the exact number of nullifiers emitted and breaks whenever
264264
# contracts add/remove nullifier emissions across versions (unrelated to the compat contract surface).
265+
# event_logs is excluded because the new tagging-cache reconciliation test (#23044) calls a
266+
# TestLog method (deliver_squashed_and_surviving_notes) that does not exist in legacy artifacts.
265267
function compat_test_cmds {
266268
local version=${1:?version is required}
267269
local run_test_script="yarn-project/end-to-end/scripts/run_test.sh"
@@ -271,7 +273,7 @@ function compat_test_cmds {
271273
local tests=(
272274
src/e2e_!(prover|block_building|epochs)/*.test.ts
273275
src/e2e_p2p/reqresp/*.test.ts
274-
src/e2e_!(block_building|prover_*|kernelless_simulation).test.ts
276+
src/e2e_!(block_building|prover_*|kernelless_simulation|event_logs).test.ts
275277
)
276278
for test in "${tests[@]}"; do
277279
local name=${test#*e2e_}

yarn-project/end-to-end/src/e2e_avm_simulator.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,19 @@ describe('e2e_avm_simulator', () => {
5656
* at function.name();
5757
* let call = quote { $name($args) (/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/dispatch.nr:59:20)
5858
* at AvmTest.0xc3515746
59+
*
60+
* Older nargo (pre-#22911) recorded the assertion span as the inner boolean expression only,
61+
* so legacy contract artifacts under compat-e2e emit `'not_true == true'` instead of the full
62+
* `'assert(not_true == true, "This assertion should fail!")'`. The regex below accepts either
63+
* form so the test passes against both current-nargo artifacts and pinned legacy artifacts.
5964
*/
6065
describe('Not nested', () => {
6166
it('PXE processes user code assertions and recovers message (properly enriched)', async () => {
6267
await expect(
6368
avmContract.methods.assertion_failure().simulate({ from: defaultAccountAddress }),
6469
).rejects.toThrow(
6570
expect.objectContaining({
66-
message: expect.stringMatching(
67-
/Assertion failed: This assertion should fail! 'assert\(not_true == true, "This assertion should fail!"\)'/,
68-
),
71+
message: expect.stringMatching(/Assertion failed: This assertion should fail!.*not_true == true/),
6972
stack: expect.stringMatching(/at inner_helper_with_failed_assertion[\s\S]*at AvmTest\..*/),
7073
}),
7174
);

0 commit comments

Comments
 (0)