Skip to content

chore: add writing-e2e-tests skill#24597

Merged
spalladino merged 1 commit into
merge-train/spartan-v5from
cb/writing-e2e-tests-skill
Jul 8, 2026
Merged

chore: add writing-e2e-tests skill#24597
spalladino merged 1 commit into
merge-train/spartan-v5from
cb/writing-e2e-tests-skill

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Adds yarn-project/.claude/skills/writing-e2e-tests/SKILL.md: a skill that gives an agent everything it needs to place, structure, and write a robust e2e test with little guidance. Written against the v5-next e2e layout (category directories with per-category READMEs and context classes).

What it covers

  • Step 0 decision ladder: unit test → new expectation in an existing test → new it in an existing suite → new file on an existing context/harness → new standalone test.
  • Where to place the test: recap of the category directories (automine/ via AutomineTestContext, single-node/ via setupWithProver/setupBlockProducer, multi-node/ via MultiNodeTestContext on the mock-gossip bus, p2p/ via P2PNetworkTest on real libp2p, plus composed/, infra/, spartan/, bench/), the multi-node-vs-p2p decision rule, pointers to the per-category READMEs as the authoritative reference, file naming (describe matches path, header comment), automatic CI registration through bootstrap.sh globs, .parallel.test.ts semantics, and jest/bash timeout sync.
  • Setup reuse: the three layers (category contexts → domain harnesses → root SetupOptions), the standard suite file shape, one-environment-per-file, preset spread order, guarded teardown.
  • Readability: intent-only test bodies, the named-waiter surface (fixtures/wait_helpers.ts, context waiters, ChainMonitor), shared helpers and co-located *_test_helpers.ts, simulators with afterEach checks, shared error constants.
  • Speed: themes distilled from the recent test(e2e)/perf(e2e)/chore(e2e) speedup PRs and their tracking issues — avoid unneeded setup, genesis seeding over setup txs, BatchCall batching over Promise.all overlap (with the PXE-serialization caveat), warping dead waits with markProvenAndWarp/warpWithSequencersPaused ("an honest wait beats a flaky warp"), named timing profiles over ad-hoc cadences, and measuring with the testSpan instrumentation + track-e2e-times skill before optimizing.
  • Flakiness: twelve golden rules synthesized from six months of deflake PRs and the accumulated flaky-test gotchas (poll-don't-sleep via named waiters, receipt-anchored assertions, mined ≠ checkpointed ≠ proven, syncChainTip tag awareness, pipelining timing margins + findSlotsWithProposers, invariant-not-exact-value assertions, L1 account/nonce and port hygiene, freeze-L1-across-restarts, gossip-mesh readiness via runGossipScenario, fee padding, determinism, honest timeouts), plus deflaker.sh validation and .test_patterns.yml as a last resort.
  • Final pre-ship checklist.

All helper/API names cited were verified to exist on merge-train/spartan-v5 (AutomineTestContext.setup, setupWithProver/setupBlockProducer, MOCK_GOSSIP_MULTI_VALIDATOR_OPTS, wait_helpers.ts waiters, warpWithSequencersPaused, markProvenAndWarp, testSpan/TEST_TIMING_FILE, runGossipScenario, waitForP2PMeshConnectivity, findSlotsWithProposers, getPaddedMaxFeesPerGas, etc.). Genesis-prefill techniques that only exist in still-open speedup PRs are described as themes to look for rather than as concrete APIs.

@AztecBot AztecBot added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Jul 7, 2026
@AztecBot AztecBot changed the base branch from next to merge-train/spartan-v5 July 7, 2026 21:31
@AztecBot AztecBot force-pushed the cb/writing-e2e-tests-skill branch from 6057fdb to 1dcf5bc Compare July 7, 2026 21:31
@spalladino spalladino force-pushed the cb/writing-e2e-tests-skill branch from 1dcf5bc to d530a48 Compare July 8, 2026 13:28
@spalladino spalladino marked this pull request as ready for review July 8, 2026 13:29
@spalladino spalladino enabled auto-merge (squash) July 8, 2026 13:29
@spalladino spalladino merged commit 4c2b6d8 into merge-train/spartan-v5 Jul 8, 2026
14 of 18 checks passed
@spalladino spalladino deleted the cb/writing-e2e-tests-skill branch July 8, 2026 13:46
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. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants