test(live): fan out the claude shared scenarios in parallel (canary-gated)#358
Merged
Conversation
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
added a commit
that referenced
this pull request
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Parallelcollapses it toward the slowest single scenario (~9m).Short-circuit preserved
TestLiveEnsignCycle(the cheap basic drive) runs as an earlier step (separatego testinvocation), 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
workflowRoot(t.TempDir).run()now also gives each its ownCLAUDE_CONFIG_DIRnested under the runner base (withClaudeConfigDir, a non-mutating copy) — concurrent claude sessions never share config/session state.projectssubdirs.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-repogo 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