inspect: add a per-inspector timeout (default 10m)

main

Commit

dipree2mo ago

Inspectors previously ran under a plain cancel context with no deadline, so a stuck agent could hang the review forever. Each inspector now runs under its own context.WithTimeout (RunConfig.InspectorTimeout, default 10m via defaultInspectorTimeout, overridable with --timeout). On timeout the inspector's process is killed and it is marked failed-by-timeout; sibling inspectors and the judge proceed. A parent cancellation (Ctrl+C) is still classified as cancelled, not timed out.

  • RunConfig.InspectorTimeout + inspectorTimeout() default helper.
  • Run and RunMulti wrap each Start in a per-agent deadline and detect DeadlineExceeded (vs parent cancel) to set the failed-by-timeout error.
  • --timeout duration flag (default 10m) wired through runReview to both the single- and multi-inspector paths.
  • Tests: Run times out a hanging inspector; RunMulti times out one inspector while a sibling still succeeds.
  • Docs updated (command surface + architecture note).

Entire-Checkpoint: c8c400c372be

Checkpoints

Checkout the hand off doc that I just added.

PiOpus 4.8
View session
Checkpoint 1