Skip to content

test(molecule): split the slowest side effects into siblings - #196

Merged
thiras merged 1 commit into
mainfrom
test/molecule-split-side-effects
Oct 31, 2026
Merged

thiras merged 1 commit into
mainfrom
test/molecule-split-side-effects

Conversation

@thiras

@thiras thiras commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Why

Three scenarios set the Molecule wall clock, at about 7.5 minutes each in CI (run 41205792704): sponsord-install (469 s), iroh-relay-gate (452 s) and sponsord-onramp-nginx (~450 s). In each one the side effect is 70–80 % of the time: 14–16 whole-role re-runs.

What

Each scenario is split along its side effects, using the repo's sibling pattern (AGENTS.md § Molecule). The new scenario reuses the parent's prepare, converge and verify by path, has an identical inventory, and is in the pair list in tests/scripts-test.sh.

parent keeps new sibling takes
sponsord-install: release mode (the loopback mirror) sponsord-wallet: the treasury wallet and secret.env plays (prepare is ../sponsord/prepare.yml; it needs no mirror)
iroh-relay-gate: the node-ID read, §1–§4, then converging back iroh-relay-access: the node-ID read, §5–§6 (bind addresses, node-ID failures, access modes), then converging back
sponsord-onramp-nginx: plays 1–6 sponsord-onramp-turnstile: the custom gate page and Turnstile

The plays moved unchanged. Each side keeps the state its plays depend on, and the secret.env play stays whole (it compares PIDs).

The only read of default/files/decdn-node-stub moved from sponsord-install to sponsord-wallet with the wallet plays, so the two selector tests (#195) that named sponsord-install as a reader of that stub now name sponsord-wallet.

Each sibling is placed in SLOW_FIRST right after its parent for now (rebased onto #194's decdn-gateway-lifecycle entry). I'll reorder them from this PR's CI times.

Tradeoff

Each sibling adds one runner's fixed cost when it runs: about 70 s, or about 25 s with #193. With #195, a sibling runs only when a change can affect it.

Verification

  • make molecule SCENARIOS='sponsord-install sponsord-wallet iroh-relay-gate iroh-relay-access sponsord-onramp-nginx sponsord-onramp-turnstile': all six passed locally (642 s, 4 at a time).
  • make test-scripts (the pair checks for the three new siblings, SLOW_FIRST) and make lint pass.
  • To do: per-scenario CI times against the baseline, then the SLOW_FIRST order.

Rebased onto #193, #194 and #195.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 31, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

sponsord-install, iroh-relay-gate and sponsord-onramp-nginx were the
critical path of the Molecule run (~7.5 min each in CI), mostly side
effect. Each keeps its first half; a sibling that reuses its prepare,
converge and verify by path, with an identical inventory, takes the rest:

- sponsord-wallet: the treasury wallet and secret.env plays
- iroh-relay-access: bind addresses, node-ID failures and access modes
- sponsord-onramp-turnstile: the custom gate page and Turnstile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thiras
thiras force-pushed the test/molecule-split-side-effects branch from 2ec7976 to c0be5d8 Compare October 31, 2026 23:04
@thiras
thiras requested a balanced review from Copilot October 31, 2026 23:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the Molecule scenario split.

No open issues 🎉

Review effort: Balanced

@thiras
thiras merged commit 9526adc into main Oct 31, 2026
62 of 63 checks passed
@thiras
thiras deleted the test/molecule-split-side-effects branch October 31, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants