Skip to content

test(live): fan out the claude shared scenarios in parallel (canary-gated)#358

Merged
clkao merged 1 commit into
mainfrom
hotfix/live-scenario-parallelism
Jun 13, 2026
Merged

test(live): fan out the claude shared scenarios in parallel (canary-gated)#358
clkao merged 1 commit into
mainfrom
hotfix/live-scenario-parallelism

Conversation

@clkao

@clkao clkao commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Cuts the live-e2e wall-clock by parallelizing the heavy claude scenarios behind the existing cheap canary.

Why

The 4 claude shared scenarios (gate / rejection-flow / 3-cycle-escalation / merge-hook) each run a multi-minute live claude journey. Serially the claude-opus lane is the SUM (~27m) — and since the host lanes run as parallel matrix jobs, claude-opus is the whole job long pole. t.Parallel collapses it toward the slowest single scenario (~9m).

Short-circuit preserved

TestLiveEnsignCycle (the cheap basic drive) runs as an earlier step (separate go test invocation), so a systemic failure (auth/install) fails fast before this fan-out spends 4× concurrent API. "1 cheap canary, then fan out the rest."

Isolation for the concurrent sessions

  • Each scenario already gets its own workflowRoot (t.TempDir).
  • run() now also gives each its own CLAUDE_CONFIG_DIR nested under the runner base (withClaudeConfigDir, a non-mutating copy) — concurrent claude sessions never share config/session state.
  • CI artifact upload widened to the per-scenario projects subdirs.

Scope

claude only — codex (~6m) / pi (smoke) are not the wall-clock bottleneck; same pattern applies if wanted. Compiles under go vet -tags live; whole-repo go test ./... green. Parallel isolation gets its first live exercise on the next live run (per the decision to validate-on-next-run).

🤖 Generated with Claude Code

The four claude shared scenarios (gate / rejection-flow / 3-cycle-escalation /
merge-hook) each run a multi-minute live claude journey. Serially that makes the
claude-opus lane the SUM of the four (~27m) — and since the live job runs the host
lanes as parallel matrix jobs, claude-opus is the whole job's long pole. t.Parallel
collapses it toward the slowest single scenario (~9m).

The cheap canary stays: TestLiveEnsignCycle runs as an earlier step (separate go test
invocation), so a systemic failure (auth/install) still fails fast before this fan-out
spends 4x concurrent API. Isolation for the concurrent sessions: each scenario already
gets its own workflowRoot (t.TempDir); run() now also gives each its own
CLAUDE_CONFIG_DIR nested under the runner's base dir (via withClaudeConfigDir, a
non-mutating copy), so the parallel claude sessions never share config/session state.
The CI artifact upload widens to the per-scenario projects subdirs.

codex/pi lanes are not the wall-clock bottleneck (codex ~6m, pi smoke), so they stay
serial for now — same pattern applies if needed. Validated to compile (go vet -tags
live); the parallel isolation gets its first live exercise on the next live run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@clkao clkao merged commit 8ab302e into main Jun 13, 2026
6 of 9 checks passed
@clkao clkao deleted the hotfix/live-scenario-parallelism branch June 13, 2026 20:35
clkao added a commit that referenced this pull request Jun 13, 2026
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.

1 participant