Skip to content

refactor(e2e): unify setup and setupFromFresh into single function#19532

Merged
spalladino merged 2 commits intonextfrom
palla/unify-e2e-setup
Jan 14, 2026
Merged

refactor(e2e): unify setup and setupFromFresh into single function#19532
spalladino merged 2 commits intonextfrom
palla/unify-e2e-setup

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Jan 13, 2026

Consolidates the two e2e test setup functions (setup from utils.ts and setupFromFresh from snapshot_manager.ts) into a unified setup function in a new setup.ts file

Changes

  • Create setup.ts with:
    • Unified EndToEndContext type (includes aztecNodeConfig alias for backward compatibility)
    • Unified setup function that handles all setup scenarios
    • New flags: fundSponsoredFPC, skipAccountDeployment, l1ContractsArgs
  • Remove snapshot_manager.ts
  • Update all callsites for setupFromFresh to use setup, adjusting options to match existing behaviour

🤖 Generated with Claude Code

@spalladino spalladino added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Jan 13, 2026
@spalladino spalladino force-pushed the palla/remove-snapshot-manager-2 branch from a96c518 to 3c7ccaf Compare January 13, 2026 13:18
@spalladino spalladino force-pushed the palla/unify-e2e-setup branch 3 times, most recently from e4d267e to e603d04 Compare January 13, 2026 14:18
Base automatically changed from palla/remove-snapshot-manager-2 to next January 13, 2026 14:44
@spalladino spalladino force-pushed the palla/unify-e2e-setup branch 2 times, most recently from 7807a0e to f6029c9 Compare January 13, 2026 19:24
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 13, 2026

Flakey Tests

🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/b623a9d95f05f544�b623a9d95f05f5448;;�): yarn-project/end-to-end/scripts/run_test.sh web3signer src/composed/web3signer/e2e_multi_validator_node_key_store.test.ts (40s) (code: 1) (\033Santiago Palladino\033: refactor(e2e): unify setup and setupFromFresh into single function (#19532))
\033FLAKED\033 (8;;http://ci.aztec-labs.com/07c57aab3a4e6c22�07c57aab3a4e6c228;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates multiple blocks" (602s) (code: 124) group:e2e-p2p-epoch-flakes (\033Santiago Palladino\033: refactor(e2e): unify setup and setupFromFresh into single function (#19532))

Copy link
Collaborator

@PhilWindle PhilWindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice consolidation. Just a question of use of as any.

@spalladino spalladino force-pushed the palla/unify-e2e-setup branch from 75d6a5e to 4f2d1c5 Compare January 14, 2026 12:41
spalladino and others added 2 commits January 14, 2026 09:42
Consolidate the two e2e test setup functions into a unified setup function
in setup.ts. Both utils.ts and snapshot_manager.ts now re-export from setup.ts
with backward-compatible wrappers.

Key changes:
- Create setup.ts with unified EndToEndContext type and setup function
- Add aztecNodeConfig alias for backward compatibility with SubsystemsContext
- snapshot_manager.ts provides SubsystemsContext type (with non-optional fields)
  and setupFromFresh wrapper function
- utils.ts re-exports from setup.ts for full backward compatibility
- Both fundSponsoredFPC and skipAccountDeployment flags added to SetupOptions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ed setup

Completes the migration from setupFromFresh to the unified setup API by:
- Deleting fixtures/snapshot_manager.ts entirely
- Migrating all 9 test fixtures from setupFromFresh to setup
- Replacing SubsystemsContext with EndToEndContext throughout
- Updating field access (aztecNode → aztecNodeService, added ! assertions)
- Properly merging l1ContractsArgs at all callsites
- Setting fundSponsoredFPC: true and skipAccountDeployment: true everywhere

All tests verified with tsc, format, and lint.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@spalladino spalladino force-pushed the palla/unify-e2e-setup branch from 4f2d1c5 to c576e6d Compare January 14, 2026 12:42
@spalladino spalladino added this pull request to the merge queue Jan 14, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 14, 2026
@spalladino spalladino added this pull request to the merge queue Jan 14, 2026
Merged via the queue into next with commit 65144c1 Jan 14, 2026
17 checks passed
@spalladino spalladino deleted the palla/unify-e2e-setup branch January 14, 2026 19:10
ludamad added a commit that referenced this pull request Feb 23, 2026
Slide 19 (§4 insights · PR correlation): two-column layout showing which
PRs caused each weekly flake spike and which fixes produced each recovery:

Spikes:
- W02 (2,647 flakes): Santiago refactors #19532/#19509/#19564 exposed
  timing races across p2p/epoch simultaneously
- W04 (935 flakes): PhilWindle #19982 added cross-chain mbps tests
  without pre-deflaking — valid_epoch_pruned_slash 0→346 events
- W06 (850 flakes): three high-risk PRs merged same day (#20047 peer
  scoring, #20241 max checkpoints→32, #20257 hash constants)

Fixes:
- W03 recovery: Santiago #19914 — checkpointed chain tip for PXE
  (root fix; PXE was using latest not checkpointed block)
- W05 recovery: Santiago #20088 slasher multi-block fix + #20140
  discv5 deflake + GCP step-down (−6 testbed namespaces)
- W07 improvement: Santiago #20351 mbps fix (p2p_client 311→0),
  #20462 remove hardcoded 10s timeout, ludamad #20613 CI parallelism

Also: correct three factual errors spotted during full review —
- Summary: next P50 is growing (+10% in 3 weeks), not stable
- Flake trend W07 note: e2e-p2p-epoch-flakes dropped 373×, not just
  "251 flakes lowest since December"
- Gaps slide: replaced stale "ci_phases broken" card with GCP egress
  costs gap (bc→awk fix is deployed; egress attribution is the gap now)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure ci-no-squash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants