Skip to content

feat: exported in-process testing network#24629

Open
Thunkar wants to merge 5 commits into
merge-train/fairies-v5from
gj/upstream_testing_utils
Open

feat: exported in-process testing network#24629
Thunkar wants to merge 5 commits into
merge-train/fairies-v5from
gj/upstream_testing_utils

Conversation

@Thunkar

@Thunkar Thunkar commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Upstreaming the utilities build for aztec-kit so external projects can benefit from our e2e scaffolding. Essentially the same thing we already use, but pure ts rather than the unpublishable .sh script. Verified with ci-full-no-test-cache

@Thunkar Thunkar self-assigned this Jul 9, 2026
@Thunkar Thunkar added ci-full Run all master checks. ci-draft Run CI on draft PRs. labels Jul 9, 2026
@Thunkar Thunkar changed the title wip feat: in-process testing network Jul 9, 2026
Thunkar added 2 commits July 9, 2026 12:32
The pure-Node signal/exit handlers in startAnvil only reap anvil when node runs
its own handlers (explicit stop, Ctrl+C, normal exit, uncaught exception). On a
parent hard-kill (SIGKILL/crash/OOM) they never run, and the detached anvil is
orphaned — verified empirically. That is the exact failure the removed
anvil_kill_wrapper.sh guarded against and a known source of CI flakiness.

Spawn anvil under a small inlined bash watchdog that polls its parent (this node
process) and reaps anvil via an EXIT/INT/TERM trap when the parent dies for any
reason. Inlined (not a shipped .sh) so it works from the published npm tarball,
with the resolved anvil binary passed via $ANVIL_BIN so it works without anvil
on PATH.
The watchdog trapped cleanup on EXIT/INT/TERM, but a trapped TERM does not
terminate bash — it ran cleanup and then resumed the parent-poll loop, so the
supervisor never exited on stop() until killChild's 5s SIGKILL escalation. That
5s collided with jest's 5s hook timeout and hung afterEach teardown
(forwarder_l1_tx_utils.test.ts). Trap the kill on EXIT only and have INT/TERM
just exit (firing the EXIT trap); use 'sleep & wait' so the poll is
interruptible. stop() now returns in ~1s; orphan-on-parent-death still holds.
@Thunkar Thunkar added ci-full-no-test-cache and removed ci-full Run all master checks. labels Jul 9, 2026
@Thunkar Thunkar changed the title feat: in-process testing network feat: exported in-process testing network Jul 9, 2026
@Thunkar Thunkar requested review from nchamo and spalladino July 9, 2026 13:41
@Thunkar Thunkar marked this pull request as ready for review July 9, 2026 13:41
@AztecBot

AztecBot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Flakey Tests

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

\033FLAKED\033 (8;;http://ci.aztec-labs.com/cec3a798e5e5f5a5�cec3a798e5e5f5a58;;�): yarn-project/kv-store/scripts/run_test.sh src/sqlite-opfs/internal/ordered-binary-browser.test.ts (2s) (code: 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants