Repository navigation
fix(deep-scan): preserve cost-stopped results across retries - #2686
Open
mldangelo-oai wants to merge 14 commits into
Open
mldangelo-oai wants to merge 14 commits into
mldangelo-oai wants to merge 14 commits into
Conversation
…mit-status # Conflicts: # plugins/codex-security/scripts/workbench_db.py
…fix/reconcile-deep-scan-cost-stop
Save the prepared manifest and selected review checkpoint before sealing a cost-limited scan. If SQLite cannot record the terminal result, verify the retained artifacts and finish indexing the same findings on retry. Allow an explicitly incomplete parent draft to retain its validated findings when the budget stops validation.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Deep Scan that exhausts its configured cost limit after discovery now reports a stopped outcome. The manifest records
failed, SARIF recordsexecutionSuccessful: false, and the CLI emitsscan.failedwithcost_limit_exceededand exits 2. Validated findings and deferred candidates remain available. Fixes #2415.Changes
This continues #2492 and preserves its contributor commits, including the authoritative parent-checkpoint fix. Its fork branch does not permit maintainer edits. This branch includes a normal merge of main at
173483d7.Before publishing the prepared seal, the workbench records the intended manifest, prior draft digest, selected checkpoint, cost and warning in its private state. A fresh fallback or a later resume verifies those inputs and indexes the original findings after an interrupted SQLite write. A budget stop can also retain a validated finding from an explicitly incomplete draft.
The existing workbench command dispatches the cost stop. The saved-result module records and validates its recovery receipt. The branch also includes the shared test-only inventory fixture correction from #2678.
Testing
git diff --checkpassed.Risk and rollout
Automation that previously treated a post-discovery cost stop as success will now receive exit 2. The recovery receipt covers newly prepared results and needs no database migration. Previously sealed scans retain their original status. Local runtime verification used Linux and synthetic model events.
When integrating #2669, retain both reasons to replace a review checkpoint: an explicit cost stop and conversion of authoritative unsealed legacy coverage. Ordinary existing checkpoints and frozen legacy recovery sources retain their existing selection. #2623 addresses bulk recovery of completed seals separately.
Public disclosure review