Skip to content

fix(evals): keep timeout status, cancel in-flight work, aggregate gate suspensions - #1047

Merged
TheGreatAxios merged 1 commit into
cl-7932-baseline-task-completion-rate-before-the-04x-line-and-refrom
cl-7968-fix-completion-harness-timeout-attribution-cancellation-and
Sep 15, 2026
Merged

TheGreatAxios merged 1 commit into
cl-7932-baseline-task-completion-rate-before-the-04x-line-and-refrom
cl-7968-fix-completion-harness-timeout-attribution-cancellation-and

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Timeout keeps status over failure signals: a run that times out after emitting a failure event is recorded as a timeout, via a new resolveRunStatus helper.
  • The deadline now cancels in-flight work: withTimeout takes an onTimeout hook that aborts the send, and the runner closes the agent plus awaits the inner send/harness/collect promises (behind a settle grace backstop) before grading, so verify never runs on partial state.
  • Gate suspensions are aggregated into completion totals and printed in the human summary instead of being collected and dropped.
  • Harness tests cover all three: resolveRunStatus precedence, onTimeout invocation/skip, gate totals and summary line.

Verification

  • bun test evals/completion/lib.test.ts scripts/eval-completion.test.ts: 16 pass, 0 fail.
  • bun run check (lint, typecheck, build, projects-dir guard, full suite): exit 0.

Fixes CL-7968

…e suspensions

A run that times out after emitting a failure signal kept the timeout status instead of being recorded failed. The deadline now aborts the in-flight send and the runner quiesces the agent pump and collector before grading, so verify never runs on partial state. Gate suspensions are summed into completion totals and printed in the human summary instead of being collected and dropped.
@linear-code

linear-code Bot commented Sep 14, 2026

Copy link
Copy Markdown

CL-7968

@TheGreatAxios
TheGreatAxios merged commit 4827e63 into cl-7932-baseline-task-completion-rate-before-the-04x-line-and-re Sep 15, 2026
13 checks passed
TheGreatAxios added a commit that referenced this pull request Sep 15, 2026
* feat(evals): add task-completion baseline harness for CL-7932

Summary: repeatable harness runs a frozen 4-task set end to end through the production agent loop with scripted mock responders, reporting completion rate plus control-layer signals (turns, retries, compaction events, doom-loop/thrash interventions, wall clock). Baseline on b509ed3: 50.0% (4/8 runs, 2 repeats), deterministic across repeats. Task set frozen as tasks.json v1 for the post-0.4.x re-measure.

Verification: bun scripts/eval-completion.ts --repeats 2 --out evals/completion/baseline-2026-09-14.json; bun test evals/completion/lib.test.ts (7 pass); bun run check (exit 0).

* fix(evals): make completion-harness withTimeout actually race the deadline

The sync finally cleared the timer before Promise.race settled, so RunStatus timeout was unreachable and --timeout-ms was a no-op. Await the race so the timer clears on settle, export withTimeout for testing, and guard main() with import.meta.main. Adds scripts/eval-completion.test.ts proving a hung run rejects after the timeout. Baseline re-run still 50.0% (4/8).

* fix(evals): keep timeout status, cancel in-flight work, aggregate gate suspensions (#1047)

A run that times out after emitting a failure signal kept the timeout status instead of being recorded failed. The deadline now aborts the in-flight send and the runner quiesces the agent pump and collector before grading, so verify never runs on partial state. Gate suspensions are summed into completion totals and printed in the human summary instead of being collected and dropped.

* fix(evals): contain completion-harness task paths and validate timeout (#1049)

* fix(evals): contain completion-harness task paths and validate timeout

Confine custom task-set fixture/script/verify references to the harness directory, mark the version-controlled grading trust boundary, reject degenerate timeout values, and re-record the baseline against the current tree.

* fix(evals): align baseline and totals with gate-suspension signal

Carry the gate-suspension total through schema, aggregation, and summary so the checked-in baseline validates. Add a regression test asserting the frozen baseline against the current report schema.

* fix(evals): label estimated turns and failed tool calls honestly (#1062)
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