Skip to content

fix(scan): report incomplete results as errors and deduplicate log warnings - #977

Merged
mldangelo-oai merged 27 commits into
mainfrom
mdangelo/codex/scan-failure-follow-up
Oct 8, 2026
Merged

mldangelo-oai merged 27 commits into
mainfrom
mdangelo/codex/scan-failure-follow-up

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Starting, rerunning, or resuming a scan with partial or unknown coverage reports a failure to JSON/JSONL full-output consumers while retaining available results. Optional cost tracking reports repeated permission warnings for each session log only once.

Changes

  • Return ok: false with SCAN_FAILED for incomplete --full-output results while retaining data, replay filtering, pagination, and exit code 2. Changed-target diagnostics take precedence.
  • Preserve the success envelope for completed scans that exit 1 because of the findings policy.
  • Deduplicate repeated EACCES/EPERM log-open warnings per scan and path while keeping retries active. Preserve other errors and the first-error behavior of an explicit spending limit.

Testing

Recorded local checks use Bun 1.3.14 on Linux, based on main 2ca151bf:

  • At 6dca78d8, all three session-log retry cases pass, including per-path EACCES/EPERM warning deduplication and repeated EMFILE warnings. The exact tsc --noEmit command, targeted formatting and git diff --check pass.
  • The unchanged paths retain five other focused API checks, 12 CLI checks and five cost-tracker checks from the earlier feature verification.
  • The filtering documentation matches the existing replay-command argument guard.

The retry fixtures keep the event loop alive while their fake Codex stream waits for the real tracker to poll. They use the same referenced timer pattern as adjacent tests and clear it in finally; production polling and configured test timeouts are unchanged.

The isolated native Windows EACCES retry check passed with the fixture reference. Require current CI on this final revision before merging. Full local test suites were not run.

Risk and rollout

JSON/JSONL full-output consumers should treat incomplete coverage as an error and continue reading available results under data. No public commands, flags, environment variables, or migrations change. Optional warning deduplication does not stop log readers or weaken a requested spending limit.

Public disclosure review

Reviewed the branch, title, description, commit history, complete six-file feature diff, comments, available workflow logs and artifact metadata, and fresh focused-test diagnostics. Fixtures are synthetic. No new screenshots or attachments are published; prior artifact-payload review limitations remain unchanged.

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Sep 19, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T08:59:01.848497Z 6dca78d New commits
🔒 Security Review ✅ Completed 2026-10-08T09:00:09.129353Z 6dca78d New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 27d4b40e06

ℹ️ 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".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

The log-warning changes overlap #465 and #970, with #223 tracking the reported failure. Let’s compare those parts together: an optional cost-log read failure should not stop the scan, the reader should recover when access returns, and an explicitly requested spending limit must still be enforced.

@mldangelo-oai mldangelo-oai changed the title fix(scan): report incomplete coverage and deduplicate log warnings fix(scan): report incomplete results as errors and deduplicate log warnings Oct 7, 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.

Reviewed the diff and relevant surrounding code at 65a1841, with an independent second pass. No obvious correctness or regression issues found. Full local platform suites were not rerun. CI still has failed, canceled, or unfinished checks; those results remain separate from this source-review approval.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: fcac0d8440

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4f35dfa85

ℹ️ 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".

Comment thread sdk/typescript/docs/cli.md Resolved
@mldangelo-oai mldangelo-oai added area:cli Command-line help, arguments, terminal UI, and user interaction. area:cost Token usage, cost estimates, spending limits, and quota visibility. labels Oct 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 178c6bb77f

ℹ️ 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".

Comment thread sdk/typescript/tests-ts/api.test.ts Resolved
@mldangelo-oai mldangelo-oai removed area:cost Token usage, cost estimates, spending limits, and quota visibility. area:cli Command-line help, arguments, terminal UI, and user interaction. labels Oct 8, 2026
@mldangelo-oai
mldangelo-oai merged commit 3547e76 into main Oct 8, 2026
69 of 71 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/scan-failure-follow-up branch October 8, 2026 19:23
@github-actions github-actions Bot mentioned this pull request Oct 8, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants