Repository navigation
fix(cli): avoid claiming output was kept after scan failures - #359
Conversation
ting-hong-shieh
left a comment
There was a problem hiding this comment.
Reviewed at 79e9fe1a569696160fe5d2e46d73f600e9155bc8. The new empty/non-empty directory cases work, but the same misleading retained-output claim remains when the path no longer exists.
Validation snapshot:
- Exact head and a clean synthetic merge onto current
main(216212b70a421b0bf30319d241de47a64050ec0f) both pass the two existing focused tests, TypeScript checking, formatting, andgit diff --check. - The same missing-path fixture fails on both trees. Its structured result is
exit 2 / claimed=true,SIGINT 130 / claimed=true, andSIGTERM 143 / claimed=true. - On the current-main merge, treating
ENOENTas no retained output makes all three cases pass. The PR's empty/non-empty test, TypeScript checking, formatting, and whitespace check remain clean.
I left one blocking inline finding. No model or provider call, API request, credential, or external service was used.
|
Security review completed. No security issues were found in this pull request. Reviewed commit: View security finding report Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79e9fe1a56
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Pushed a small update. ENOENT now counts as no retained output, with regression coverage for failed scans and SIGINT/SIGTERM after the output directory disappears. The branch is synced with current main; focused CLI tests, type checks, formatting, and the package build pass. Re-requesting review. If this is no longer a priority, no problem at all, just say the word and I will close. |
|
Also addressed the two follow-up edge cases from the automated review in 1ca3c2f. Partial-output detection now reads one directory entry and closes the handle, and cost-limit failures report no partial output when the directory is empty. The full CLI suite passes (143 tests), package build, type checks, formatting, and the changed-line secret scan pass. No force-push was used. |
Signed-off-by: Mr-Neutr0n <[email protected]>
Signed-off-by: Mr-Neutr0n <[email protected]>
Signed-off-by: Mr-Neutr0n <[email protected]>
|
Rebased and resolved the conflicts. |
1ca3c2f to
574cfde
Compare
Signed-off-by: Harikrishna KP <[email protected]>
|
Rebased by merging current main and resolved the import-only conflicts in 313743d. I also updated the signal regression fixture to create real retained output, so the ENOENT path behavior is covered. Verified 153 focused CLI/signal tests, pnpm run types, formatting, and plugin-source checks. No force-push used. Please rerun CI/review when convenient. |
|
Note To use Codex here, create a Codex account and connect to github. |
Refresh the branch onto current openai/codex-security main while keeping ENOENT-as-absent partial-output handling, single-entry directory checks, and cost-limit empty-path messaging. Co-authored-by: hari <[email protected]>
|
Re-verified on current head (
Please re-review when convenient. |
Refresh the branch onto current openai/codex-security main while keeping ENOENT-as-absent partial-output handling, single-entry directory checks, and cost-limit empty-path messaging aligned with short-context budget text. Co-authored-by: hari <[email protected]>
|
Rebased/merged onto latest Behavior preserved: ENOENT = no retained output (both helpers), single-entry opendir/read, cost-limit empty messaging. Cost-limit wording aligned with current short-context budget text from Please re-review when you have a chance — thanks! |
…utput-message # Conflicts: # sdk/typescript/src/cli.ts
|
Synced with main had removed the dedicated cost-limit message and folded the base wording into Verification: |
Codex Review SummaryThis 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. |
mldangelo-oai
left a comment
There was a problem hiding this comment.
The missing-path case is fixed, and the shared output check keeps the failure paths consistent. Current-head CI passes on Linux, macOS, and Windows; the full local Linux SDK run passed (4,990 passed, 65 skipped).
…utput-message # Conflicts: # plugins/codex-security/tests/test_finalize_scan_contract.py
|
Rebased onto current One conflict, in Verified on the merged head:
|
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
A failed or interrupted scan could say it kept partial output merely because it had a configured directory. That directory can be empty, contain staged inputs, or belong to a subsequent scan after the first one was archived.
Addresses the misleading output diagnostic in #191, #73, and #20. Those issues continue to track failures to produce draft artifacts.
Changes
Testing
Verified locally on
960b3988a33f73be2a74d97892d63cd6920b26ccagainstmainat0aeb39d501e03f4f3a9374dbc6d8d44940af0d46.Risk and rollout
The CLI uses the directory and scan ID already available on the existing failure and cancellation paths. Existing automation that parses the verbose
partial_outputfield will see it omitted. As with other saved-scan commands, an installation that requires an explicit Python interpreter can setPYTHONforscans show. The original directory remains visible.Public disclosure review