Skip to content

feat(bench): timeout workdir snapshots + BENCH_RESUME_DIR resume mode - #361

Merged
dahai80 merged 1 commit into
mainfrom
feat-resume-task
Nov 27, 2026
Merged

dahai80 merged 1 commit into
mainfrom
feat-resume-task

Conversation

@dahai80

@dahai80 dahai80 commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Closes #360 (harness-side half; engine throughput is the upstream half).

Problem

4/20 harness-gain failures are 600 s timeout kills that discard the work tree. The medium tier resolves AT the cap (T10/T11/T12: timedOut=true, verify passes on the final tree), so timed-out trees are often near-green — the runner currently throws that work away.

Change

  • snapshotWorkdir() helper (tar, best-effort) — replaces the inline DRA snapshot block.
  • On timeout, the runner snapshots the work tree to <outDir>/<task>.timeout.tar (skipped for tasks that were themselves resumed).
  • BENCH_RESUME_DIR=<prior results dir> resume mode: tasks with a timeout snapshot extract that tree into a fresh workdir (fixture build + git init skipped) and run with a deterministic resume preamble appended to the task prompt — no LLM summarization in the pipeline. Rows gain resumed, log lines mark [resumed].
  • Engine-retry path reuses the same (possibly resumed) prompt.

Verification

  • bun build --no-bundle clean.
  • Tar roundtrip smoke (fixture commit + files, extract into fresh dir) verified.

Success criteria follow-up

The issue's BENCH_RESUME=1 recovered/total metric lands once a rerun produces .timeout.tar artifacts; first live validation = rerun with BENCH_RESUME_DIR pointed at a results dir containing T05/T13/T14/T17 snapshots.

🤖 Generated with Claude Code

Issue #360 harness-side half. 4/20 suite failures are 600s kills that
discard a near-green tree (the medium tier resolves AT the cap, so timed-
out trees are often minutes from passing).

- snapshotWorkdir() helper (tar -C workdir .) replaces the inline DRA
  snapshot; still best-effort.
- Timeout path now snapshots the work tree to <outDir>/<task>.timeout.tar
  (skipped for tasks that were themselves resumed).
- BENCH_RESUME_DIR=<prior results dir>: tasks with a timeout snapshot
  extract that tree into the workdir instead of building the fixture and
  run with a deterministic resume preamble (no LLM summarization); rows
  gain resumed=true and the log line marks [resumed].
- Engine-retry path now reuses the same (possibly resume) prompt.

Smoke: tar roundtrip fixture commit + agent edits verified extract-clean.

Co-Authored-By: Claude Code <[email protected]>
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.

feat: workdir snapshot on timeout + resume-task (Codex checkpoint/rollback parity)

1 participant