Skip to content

fix(evals): Cancel provider retries after test timeout - #821

Merged
dcramer merged 1 commit into
mainfrom
codex/fix-eval-provider-cancellation
Jul 10, 2026
Merged

dcramer merged 1 commit into
mainfrom
codex/fix-eval-provider-cancellation

Conversation

@dcramer

@dcramer dcramer commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Vitest already aborts the eval harness signal when a test times out, but the
Slack eval path dropped that signal before agent execution. Active provider
calls and provider retry backoff could therefore continue during teardown.

This passes the host signal through runEvalScenario into AgentRunPolicy.
The agent runner aborts the active Pi call and uses the shared abort-capable
chat/sleep utility for provider retry backoff. Other standard delay helpers
now use the same utility; the two lock delays that intentionally unref()
their timers remain feature-owned because they have different lifecycle
semantics.

Slack runtime, classifier, judge, and explicit taskTimeout behavior remain
unchanged. Focused coverage verifies harness signal wiring, active provider
cancellation, retry cancellation, and the shared delay contract.

Fixes #779

@vercel

vercel Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jul 10, 2026 5:25pm

Request Review

@dcramer
dcramer force-pushed the codex/fix-eval-provider-cancellation branch from 263cfef to 4ee8934 Compare July 10, 2026 16:19
@dcramer dcramer changed the title fix(evals): Cancel provider work when tests time out fix(evals): Cancel provider retries after test timeout Jul 10, 2026
@dcramer
dcramer force-pushed the codex/fix-eval-provider-cancellation branch from 4ee8934 to f0f87eb Compare July 10, 2026 16:32
@dcramer
dcramer force-pushed the codex/fix-eval-provider-cancellation branch from f0f87eb to f2ba900 Compare July 10, 2026 16:36
Propagate the eval host abort signal into the active Pi call and provider retry backoff so timed-out Vitest cases do not leave provider work running during teardown.

Keep cancellation local to the agent execution boundary instead of spreading it through Slack runtime and classifier layers.

Fixes #779
Co-Authored-By: GPT-5.4 <[email protected]>
@dcramer
dcramer force-pushed the codex/fix-eval-provider-cancellation branch from f2ba900 to 306090b Compare July 10, 2026 17:24
@dcramer
dcramer marked this pull request as ready for review July 10, 2026 17:31
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jul 10, 2026
@dcramer
dcramer merged commit cd93c59 into main Jul 10, 2026
20 checks passed
@dcramer
dcramer deleted the codex/fix-eval-provider-cancellation branch July 10, 2026 17:39

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 306090b5 Deployed Jul 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

evals: harness hangs on provider retries far past per-test timeout

1 participant