Skip to content

refactor(mcp): simplify internal Deep Scan state and finding caches - #1352

Open
mldangelo-oai wants to merge 2 commits into
mainfrom
mdangelo/codex/simplify-private-deep-scan-state
Open

mldangelo-oai wants to merge 2 commits into
mainfrom
mdangelo/codex/simplify-private-deep-scan-state

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Simplify the plugin's internal Deep Scan state without changing saved scan data. The coordinator adapter stops copying fields it never uses, and the result-merging worker keeps each finding in one cache slot instead of retaining both its object and serialized forms.

Changes

  • Remove unused phase and canonical-artifact fields from the private MCP run state. Integration tests continue checking canonical artifacts at the workbench response boundary.
  • Store each reducer finding and its serialized form in the same cache slot.
  • Remove redundant preflight request cleanup and reuse existing coordinator test helpers.

Testing

Recorded focused validation covers the coordinator, store, real workbench integration, permission preflight, and paged finding reads. Integration tests still inspect canonical artifact paths in the actual workbench response and read the resulting files, even though the private adapter no longer copies those fields. Coordinator restart tests check persisted workers and reported progress.

The paging fixture reconstructs large findings containing quotes, Unicode, and prior evidence, then replaces a source file and verifies that the already-bound pages and references stay unchanged. The preflight cancellation test hangs a child during configuration reading, aborts it, and verifies that the child stops.

To repeat after building the plugin bundle, run node --experimental-strip-types --test tests/test_deep_scan_coordinator.ts tests/test_deep_scan_store.ts tests/test_deep_scan_store_integration.ts tests/test_deep_scan_permission_profile_preflight.ts tests/test_artifact_deep_reducer_pages.ts from plugins/codex-security/mcp-app.

After merging current main, all five focused MCP test entrypoints listed above passed, along with the executor, parent-sandbox, and stdio lifecycle test entrypoints. The portable plugin source checks, plugin bundle build, full type checks, and formatting checks also passed. The merge preserves the current runtime settings and diagnostic context; it removes the same redundant cleanup block already covered by this change.

Risk and rollout

No public CLI, persisted workbench schema, or worker settings change. The affected state adapter, reducer paging, and preflight lifecycle are covered by the focused tests. This can ship through the normal release process.

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T07:30:04.257796Z 8f30650 New commits
🔒 Security Review ✅ Completed 2026-10-07T07:30:34.917099Z 8f30650 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 refactor(mcp): simplify private Deep Scan state refactor(mcp): simplify internal Deep Scan state and finding caches Oct 7, 2026

@alandelong-oai alandelong-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 current diff; no actionable issues found.

@kmbroai kmbroai 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 full state/cache refactor, persisted schema, reducer snapshot binding, and preflight request lifecycle. Five focused test files passed locally, including store integration. Current CI inspected with no failures; broader rerun jobs remain pending. No actionable findings at this commit.

@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 c5dbbaf. No obvious correctness or regression issues found. Existing CI checks passed; I did not rerun the full suite locally.

@alandelong-oai alandelong-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 current diff; no actionable issues found.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants