Skip to content

feat(deep-scan): add configurable graceful time limits - #369

Merged
daneschneider-oai merged 6 commits into
mainfrom
codex/deep-scan-max-time-hours
Aug 12, 2026
Merged

feat(deep-scan): add configurable graceful time limits#369
daneschneider-oai merged 6 commits into
mainfrom
codex/deep-scan-max-time-hours

Conversation

@daneschneider-oai

@daneschneider-oai daneschneider-oai commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add scan --mode deep --max-time-hours and SDK maxTimeHours, supporting positive fractional durations up to 96 hours
  • increase the bundled MCP tool-call timeout to 97 hours and gracefully stop discovery after the configured deadline, preserving and reducing completed findings before returning
  • persist the effective limit across coordinator restarts, scan rejoin, saved scan recipes, and reruns
  • when a configured --max-cost is exceeded after deep discovery succeeds, stop model execution and seal an honest partial report without additional model calls
  • preserve existing confirmed findings, list unvalidated candidates as deferred follow-up, retain configured cost enforcement and existing incomplete-coverage exit behavior, and fail normally when discovery has not safely completed
  • synchronize the bundled plugin to version 0.1.19 while preserving existing public worker cancellation, reducer recovery, stable finding identity, continuation ownership, migration repair, and headless-context behavior

The default discovery limit is 96 hours, leaving approximately one hour for final reduction and result delivery under the 97-hour transport deadline. Explicit CLI/SDK options override [deep_scan] max_time_hours in the existing Codex Security configuration.

Verification

  • complete test suite: 1,048 passed, 11 expected platform skips, zero failures (7,125 assertions across 51 files)
  • TypeScript typechecking, generated-model consistency, formatting, and production build
  • real built CLI dry run accepts --max-time-hours 1.5 and rejects values above 96
  • real SQLite regressions cover completed deep discovery at the cost limit, repository-wide and scoped targets, confirmed finding preservation, honest deferred candidates, supporting out-of-scope evidence, invalid artifacts, and unchanged failure before discovery completion
  • offline npm pack plus the complete installed-package checker, including all 107 bundled plugin files, public imports, CLI, bundled Codex, and nested workers
  • regression coverage for graceful deadlines, fractional settings, saved recipes, migration backfill/repair, stable finding identities, completed-worker shutdown, and public bundle content

@daneschneider-oai daneschneider-oai changed the title Add configurable graceful deep-scan time limits feat(deep-scan): add configurable graceful time limits Aug 12, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for syncing the full Deep Scan timeout/cost stack. One cost-exhaustion reporting edge case remains in the bundled plugin. Also, the current Windows/Node 24 node-ci job is red: the long-path prompt test exceeds its 60-second hook timeout, then reports a missing scoped path, and the test step ultimately exceeds its 10-minute limit; please get that matrix job green before merging.

Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_db.py Outdated
@daneschneider-oai
daneschneider-oai merged commit 5c26297 into main Aug 12, 2026
24 of 25 checks passed
@daneschneider-oai
daneschneider-oai deleted the codex/deep-scan-max-time-hours branch August 12, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants