Skip to content

Commit 77a71cd

Browse files
committed
test: keep avm_simulator in compat matrix, loosen assertion regex
Accept either 'not_true == true' (older nargo) or 'assert(not_true == true, "This assertion should fail!")' (post-#22911) in the public-error enrichment test. Drops the avm_simulator exclusion from compat_test_cmds added in the prior commit; only event_logs remains excluded (legacy artifacts don't have deliver_squashed_and_surviving_notes).
1 parent 314eb4a commit 77a71cd

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +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 and avm_simulator are excluded for the same reason: they exercise contract surface that
266-
# evolves alongside the test code (TestLog gains methods, AVM assertion-string format changes with
267-
# nargo) rather than the PXE oracle surface that backwards compatibility actually guarantees.
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.
268267
function compat_test_cmds {
269268
local version=${1:?version is required}
270269
local run_test_script="yarn-project/end-to-end/scripts/run_test.sh"
@@ -274,7 +273,7 @@ function compat_test_cmds {
274273
local tests=(
275274
src/e2e_!(prover|block_building|epochs)/*.test.ts
276275
src/e2e_p2p/reqresp/*.test.ts
277-
src/e2e_!(block_building|prover_*|kernelless_simulation|event_logs|avm_simulator).test.ts
276+
src/e2e_!(block_building|prover_*|kernelless_simulation|event_logs).test.ts
278277
)
279278
for test in "${tests[@]}"; do
280279
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)