Skip to content

fix: harden Deep Scan worker startup and finalization - #274

Open
mldangelo-oai wants to merge 6 commits into
mdangelo/codex/fail-stale-scan-targetsfrom
mdangelo/codex/harden-deep-worker-finalization
Open

fix: harden Deep Scan worker startup and finalization#274
mldangelo-oai wants to merge 6 commits into
mdangelo/codex/fail-stale-scan-targetsfrom
mdangelo/codex/harden-deep-worker-finalization

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

  • Harden Deep Scan worker startup and completion handling using the maintained generated MCP runtime assets.
  • Tighten the canonical scan-draft schema while preserving the public artifact-contract and migration safeguards.

Stack

  • Intentionally stacked on mdangelo/codex/fail-stale-scan-targets so this review contains only its atomic upstream change.
  • Prerequisite for the pending 0.1.6 release in release: bump Codex Security to 0.1.6 #244; package version is unchanged.

Verification

  • Parsed every bundled workbench Python module.
  • Verified all 105 declared plugin payload files exist.
  • Initialized a fresh private workbench SQLite database successfully.
  • Passed Prettier for all 1 changed formatted files.
  • Passed the focused Deep Scan ownership/continuation regression suite.
  • Passed the focused released-migration and bundled artifact-schema regression tests.
  • The complete reconstructed sync passed 775 tests (5 platform/integration skips) and the installed-package smoke test.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact current head f79fe794711831a597e713d27a5e7bc3bd81f0a9 and only this atomic PR's declared base-to-head diff.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: f79fe79471

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

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: f79fe79471

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact updated head 037951822a7c5995dee31ce218eb114ae8b39fb3. This additive merge inherits the updated base and keeps the complete Deep Scan sync compatible with live scan progress PR #261.

@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

�� �%���1C� ��/��C������5��� ��'w��1�-@��C�T�1�}��̀78�U5�������V� =���\=!YdCF1���Qa�c�B�

P1 Badge Accept unrestricted disabled sandbox profiles

When the host reports the valid permissionProfile.type: "disabled" with an unrestricted filesystem—as in Code mode and the supplied environment—the decompressed runtime's resolveDeepWorkerParentSandbox rejects it solely because the type is not managed. This happens before deepScanStore.begin, so every start_codex_security_deep_scan call returns a non-retryable tool error even though the worker itself is explicitly launched with sandboxMode: "read-only". Treat a disabled/unrestricted parent as having no restrictions to preserve, or otherwise support this advertised headless environment.


�� �%���1C� ��/��C������5��� ��'w��1�-@��C�T�1�}��̀78�U5�������V� =���\=!YdCF1���Qa�c�B�

P2 Badge Serialize scan-draft document replacement

When two record_codex_security_scan_draft calls for the same scan overlap—for example, when an idempotent client retry starts before the original call returns—the decompressed runtime replaces findings.json, coverage.json, and scan-manifest.json sequentially under three independent per-file locks. The calls can therefore interleave and both report success while leaving one call's findings combined with the other's coverage or manifest, and later completion can seal that internally inconsistent result. Hold one scan-wide lock or stage and commit the three-document set as a single operation.


�� �%���1C� ��/��C������5��� ��'w��1�-@��C�T�1�}��̀78�U5�������V� =���\=!YdCF1���Qa�c�B�

P1 Badge Choose a valid target kind for migrated scans

For a running non-diff Git scan migrated from before target_snapshot_digest was recorded, the workbench intentionally exposes allowedKinds as ["git_worktree", "git_revision"]; however, the new buildTarget always selects the first value and has no digest to attach. It therefore writes a git_worktree target without the snapshotDigest required by scan-manifest.schema.json, so finalization cannot complete that otherwise recoverable legacy scan. Select git_revision when no authoritative snapshot digest exists, or derive the kind from the available coordinates rather than array order.

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

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 037951822a

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…odex/harden-deep-worker-finalization

# Conflicts:
#	sdk/typescript/_bundled_plugin/mcp/mcp-app.html.br
#	sdk/typescript/_bundled_plugin/mcp/server.mjs.br.part-000
#	sdk/typescript/_bundled_plugin/mcp/server.mjs.br.part-001
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact updated head 1a530092fdac2bdcb0d0e017dd1e704d76d70066. This additive update ships the exact generated MCP runtime from the same original upstream commit and preserves the atomic base-to-head diff.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 1a530092fd

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

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1a530092fd

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…odex/harden-deep-worker-finalization

# Conflicts:
#	sdk/typescript/_bundled_plugin/mcp/server.mjs.br.part-000
#	sdk/typescript/_bundled_plugin/mcp/server.mjs.br.part-001
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact updated head 5ae95e0e06fec83d019306a958f8df986d52244d. Inherits the regression-tested prompt/headless rejoin fix and safe URL delegation; the generated MCP runtime matches this original upstream stage and retains the bounded headless user-context argument.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 5ae95e0e06

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

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 5ae95e0e06

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…odex/harden-deep-worker-finalization

# Conflicts:
#	sdk/typescript/_bundled_plugin/mcp/server.mjs.br.part-000
#	sdk/typescript/_bundled_plugin/mcp/server.mjs.br.part-001
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact updated head 95920db993805ea7c5a6eb74517bd5827b81c570. Inherits regression-tested resumable finalization, accurate cached-token totals, distinct canonical finding identities, complete ignored-file coverage, safe context delegation, and preserved prompt/headless scan identity; the generated runtime remains matched to this original atomic upstream stage.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 95920db993

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

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 95920db993

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact updated head 9f11a4c91880390b117563c8eef1b9c2a1ec1450. Inherits regression-tested resumable finalization, accurate cached-token totals, distinct canonical finding identities, complete ignored-file coverage, safe context delegation, and preserved prompt/headless scan identity; the generated runtime remains matched to this original atomic upstream stage.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9f11a4c918

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

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9f11a4c918

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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.

3 participants