e2e: keep the harness's own deadlines off the scaling path

Commit

Stefan Haubold3d ago

Review findings from Copilot on #2373.

The prompt-timeout scaling in the previous commit assumed WithPromptTimeout is only ever called from a test. It is not: opencode's Bootstrap warmup bounds each attempt with it (opencode.go:221), so scaling by opencode's 2.0 turned a documented 90s/30s/30s retry sequence into 180s/60s/60s. openCodeWarmupRetryBudget exists precisely because "3 x 90s is over four minutes of blocked CI", so the change broke the bound that constant was written to enforce -- and broke it silently, since nothing fails, CI just blocks for longer on the exact path the warmup exists to survive.

The premise behind scaling is false for such a number: it was written by one runner, for that runner, already knowing how slow it is, so multiplying it by that same runner's multiplier double-counts. withExactPromptTimeout (unexported) is now the option for the harness's own deadlines, WithPromptTimeout stays the scaling one for tests, and TestHarnessDeadlinesAreNotScaled fails the build on any non-test file in the package that reaches for the wrong one. Negative-tested by reverting the warmup call site: the guard names opencode.go's line.

My grep for the call sites was grep -rn WithPromptTimeout e2e/ | grep -v '/agents/', which filtered out the one directory holding the counter-example.

Copilot's other two findings were documentation corrections -- a runner count that contradicted its own next bullet, and a claim that every runner pinning a model passes --model from both entry points, which is false for codex (config.toml via seedCodexHome) and droid (Factory BYOK settings via Bootstrap), both of which pass no model flag at all. Those landed directly in the previous commit when this branch was rebased, since restating them as corrections would have meant committing text already known to be wrong.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com Entire-Checkpoint: 01M6DQHKTH4FR2T7D852YS2796