Skip to content

feat(artifacts): save scan file inventories - #1030

Closed
ianw-oai wants to merge 3 commits into
mainfrom
codex/scan-file-inventory
Closed

ianw-oai wants to merge 3 commits into
mainfrom
codex/scan-file-inventory

Conversation

@ianw-oai

Copy link
Copy Markdown
Collaborator

Summary

Save file inventories so scan artifacts show which source files were fully reviewed and which remain. Previously, workers reported reviewed files, but the combined set was not saved.

Changes

  • Add optional coverage.fileInventory with in-scope and fully reviewed paths.
  • Write sorted, unique in_scope_files.txt, reviewed_files.txt, and remaining_files.txt under artifacts/coverage/. Include them in the final artifact seal.
  • Retain inventories across checkpoints and stopped-scan recovery. Combine accepted Deep workers without rereading consumed results or asking the reducer to reconstruct coverage.
  • Exclude reviewed paths outside the inventory and mark coverage partial when files remain.
  • Update scan instructions and the artifact contract. No new CLI commands, flags, dependencies, or separate progress ledger.

Testing

Passed:

  • File inventory, finalization, contract validation, and contract example tests: 188 passed, 2 skipped, plus 101 subtests.
  • MCP scan-draft and Deep coordinator suites.
  • SDK build:ci and MCP type check.
  • Plugin Ruff lint and format checks.
  • Plugin source compatibility check and all 9 checker tests.
  • Formatting check for changed TypeScript, JavaScript, and Markdown files; git diff --check.

The stopped-scan integration suite is blocked locally by the existing error Scan output parent must have a trusted owner. The same test fails on the unchanged base commit. No ownership checks were bypassed or removed. CI must verify that suite.

Risk and rollout

The inventory field is optional, so existing bundles remain valid. Missing inventory means unknown file coverage. These artifacts measure reported full-file review, not proof that a repository is secure. Files seen only in searches or excerpts do not count.

The existing scan-local writer creates and protects the new artifact directory. Finalization seals the file lists; stopped-result publication includes them in rollback. This PR does not add a coverage UI or release the plugin.

Public disclosure review

  • 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 enhancement New feature or request label Sep 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 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
🔒 Security Review ✅ Completed 2026-09-25T01:08:13.629432Z 1cdc971 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.

@mldangelo-oai mldangelo-oai changed the title feat(plugin): save scan file inventories feat(artifacts): save scan file inventories Oct 8, 2026
@mldangelo-oai mldangelo-oai added area:artifacts Saved scan state, storage, sealing, recovery, history, and artifact integrity. area:deep-scan Deep Scan coordination, worker scheduling, coverage, convergence, and resume. area:targets Repository and path targets, Git discovery, scope, inventories, and snapshots. and removed area:artifacts Saved scan state, storage, sealing, recovery, history, and artifact integrity. area:deep-scan Deep Scan coordination, worker scheduling, coverage, convergence, and resume. area:targets Repository and path targets, Git discovery, scope, inventories, and snapshots. labels Oct 8, 2026

@mldangelo-oai mldangelo-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.

The inventory ownership is well placed: the parent derives and normalizes the file list, and the existing finalization/sealing path carries it into saved artifacts. Deep reducers do not need to reconstruct repository coverage, and inventories remain optional for older or incomplete artifacts. I found no validated introduced defect in the completed audit.

One useful nonblocking addition is an explicit inventory assertion in the resumed accepted-discovery scenario, including an accepted worker already consumed by an earlier reducer. The reconstruction path appears correct, but that assertion would preserve the particular resume behavior changed here.

Recorded audit QA includes 160 passing inventory/finalization cases with two skips and 55 subtests, 55 passing recovery/result cases, and passing MCP draft/coordinator suites. Typechecking, the SDK CI build, Ruff, and the nine portable-source checker tests also passed. These checks cover synthetic local lifecycle and artifact behavior; they do not establish live model coverage quality.

AI-assisted review, reviewed by me. Most feedback is suggestions; concrete behavior issues are called out where applicable.

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.

2 participants