Repository navigation
fix(deep-scan): recover sealed host results and verify saved instructions - #939
mldangelo-oai wants to merge 380 commits into
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ 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". |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsBlocking findings (10)
ℹ️ 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. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53b4f2a23f
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 690cd7b6fc
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f69cb00cc3
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1535d522f6
ℹ️ 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".
|
@codex review Please review the six reporting and output ports from |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8ee906bdd
ℹ️ 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".
|
@codex review Please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c572c92cc9
ℹ️ 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".
|
@codex review Please review the current head |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ 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". |
|
@codex review |
|
@codex review Please review the current head |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ 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". |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Session-independent resume remains inconsistent with the implementation when the merge-session log is unavailable.
Review effort: Lite
Findings: None
What changed in this PR
This pull request refactors Deep Scan to compose ordinary SDK scans, merge checkpointed results, and finalize a single parent report.
Changes:
- Replaces worker/reducer orchestration with parallel ordinary scans.
- Adds checkpointing, recovery, locking, cancellation, and result-preservation handling.
- Updates plugin packaging, MCP behavior, documentation, tests, and CI sharding.
- Retires obsolete Deep Scan worker/reducer components.
The documented session-independent resume behavior remains inconsistent with implementation when the merge-session log is unavailable.
| File | Change |
|---|---|
sdk/typescript/tests-ts/workbench-scan-history.test.ts |
Updates scan history regression coverage. |
sdk/typescript/tests-ts/workbench-canonical-paths.test.ts |
Updates canonical-path coverage. |
sdk/typescript/tests-ts/test-reports.test.ts |
Tests report discovery patterns. |
sdk/typescript/tests-ts/support/api-client.ts |
Updates test client support. |
sdk/typescript/tests-ts/skeleton.test.ts |
Tests shard configuration. |
sdk/typescript/tests-ts/scan-logs.test.ts |
Tests scan log behavior. |
sdk/typescript/tests-ts/scan-execution.test.ts |
Tests scan execution and locking. |
sdk/typescript/tests-ts/repository-findings.test.ts |
Updates repository finding fixtures. |
sdk/typescript/tests-ts/prompt-only-start-timeout.test.ts |
Updates prompt-only timeout coverage. |
sdk/typescript/tests-ts/plugin-root.ts |
Supports variable bundle layouts. |
sdk/typescript/tests-ts/native-scan-package.test.ts |
Tests native scan packaging. |
sdk/typescript/tests-ts/deep-scan-windows-executable.test.ts |
Updates Windows executable coverage. |
sdk/typescript/tests-ts/deep-scan-timestamp-compat.test.ts |
Updates timestamp compatibility coverage. |
sdk/typescript/tests-ts/deep-scan-parent-denials.test.ts |
Updates parent-denial coverage. |
sdk/typescript/tests-ts/completed-scan-handoff.test.ts |
Updates completed-scan handoff coverage. |
sdk/typescript/tests-ts/cli-workbench.test.ts |
Tests workbench CLI behavior. |
sdk/typescript/tests-ts/cli-deep-scan-summary.test.ts |
Updates Deep Scan summary tests. |
sdk/typescript/tests-ts/build-plugin.test.ts |
Tests standalone plugin loading. |
sdk/typescript/tests-ts/api-surface.test.ts |
Updates API surface fixtures. |
sdk/typescript/tests-ts/api-post-scan.test.ts |
Updates post-scan API coverage. |
sdk/typescript/tests-ts/api-events.test.ts |
Updates API event fixtures. |
sdk/typescript/tests-ts/api-attribution-concurrency.test.ts |
Tests concurrent scan attribution. |
sdk/typescript/src/version.ts |
Updates SDK version handling. |
sdk/typescript/src/scan-logs.ts |
Updates scan log resolution. |
sdk/typescript/src/scan-execution.ts |
Adds shared scan execution and locking behavior. |
sdk/typescript/src/runtime.ts |
Updates runtime and artifact handling. |
sdk/typescript/src/deep-config.ts |
Updates Deep Scan configuration. |
sdk/typescript/src/cost.ts |
Updates composed scan cost tracking. |
sdk/typescript/src/config.ts |
Adds scan configuration overrides. |
sdk/typescript/src/cli.ts |
Updates CLI resume and output behavior. |
sdk/typescript/src/auth.ts |
Updates authentication checks. |
sdk/typescript/scripts/check-package.mjs |
Updates package validation inputs. |
sdk/typescript/README.md |
Documents composed Deep Scan behavior. |
plugins/codex-security/tests/workbench_test_support.py |
Adds workbench composition test helpers. |
plugins/codex-security/tests/test_workbench_timestamps.py |
Tests workbench timestamps. |
plugins/codex-security/tests/test_workbench_setup_and_migrations.py |
Tests setup and migration locking. |
plugins/codex-security/tests/test_workbench_scan_usage.py |
Tests composed scan usage accounting. |
plugins/codex-security/tests/test_workbench_scan_history.py |
Updates workbench history coverage. |
plugins/codex-security/tests/test_workbench_prompt_only_scan.py |
Tests prompt-only scan setup. |
plugins/codex-security/tests/test_workbench_native_indexes.py |
Tests native index handling. |
plugins/codex-security/tests/test_workbench_feedback.py |
Tests child-scan feedback handling. |
plugins/codex-security/tests/test_workbench_db_exports.py |
Updates database export fixtures. |
plugins/codex-security/tests/test_workbench_completion_binding.py |
Tests completion checkpoint binding. |
plugins/codex-security/tests/test_workbench_cancellation.py |
Tests cancellation result preservation. |
plugins/codex-security/tests/test_windows_report_e2e.py |
Updates Windows report coverage. |
plugins/codex-security/tests/test_scan_contract_examples.py |
Updates scan contract examples. |
plugins/codex-security/tests/test_finalize_scan_contract.py |
Tests finalization cleanup behavior. |
plugins/codex-security/tests/test_deep_scan_successful_publication.py |
Tests successful composed publication. |
plugins/codex-security/tests/test_deep_scan_stop_conditions.py |
Updates Deep Scan stop-condition tests. |
plugins/codex-security/tests/test_deep_scan_publication.py |
Updates Deep Scan publication coverage. |
plugins/codex-security/scripts/workbench/storage.py |
Adds completion locking utilities. |
plugins/codex-security/scripts/workbench/handoff.py |
Handles Deep Scan ownership and handoff. |
plugins/codex-security/scripts/workbench_scan_usage.py |
Tracks composed execution threads. |
plugins/codex-security/scripts/workbench_scan_start.py |
Adds composition checkpoints and child scans. |
plugins/codex-security/scripts/workbench_progress.py |
Updates composition progress handling. |
plugins/codex-security/scripts/workbench_native_indexes.py |
Hides internal child results from indexes. |
plugins/codex-security/scripts/workbench_finding_index.py |
Separates internal and published findings. |
plugins/codex-security/scripts/workbench_feedback.py |
Filters internal child feedback. |
plugins/codex-security/scripts/workbench_cli.py |
Updates workbench CLI commands. |
plugins/codex-security/scripts/windows_scan_local_files.py |
Adds Windows-safe directory operations. |
plugins/codex-security/scripts/finalize_scan_contract.py |
Updates finalization and cleanup operations. |
plugins/codex-security/schemas/tools/worker-threat-model.schema.json |
Removes the retired worker schema. |
plugins/codex-security/schemas/tools/deep-reducer.schema.json |
Removes the retired reducer schema. |
plugins/codex-security/references/scan-contract.md |
Documents composed scan contracts. |
plugins/codex-security/references/scan-artifacts.md |
Documents Deep Scan artifacts. |
plugins/codex-security/references/final-report.md |
Documents shared finalization. |
plugins/codex-security/references/config-preflight.md |
Documents scan permission requirements. |
plugins/codex-security/plugin-files.json |
Updates packaged files. |
plugins/codex-security/native/README.md |
Documents shared SDK build inputs. |
plugins/codex-security/native/proof.mts |
Updates native lock proof imports. |
plugins/codex-security/native/proof-windows.mts |
Updates Windows lock proof imports. |
plugins/codex-security/mcp-app/tsconfig.json |
Updates MCP compilation inputs. |
plugins/codex-security/mcp-app/tests/test_workbench_state_fallback.mjs |
Tests bundled state fallback behavior. |
plugins/codex-security/mcp-app/tests/test_scan_handoff.mjs |
Updates scan handoff tests. |
plugins/codex-security/mcp-app/tests/test_native_permissions.mjs |
Tests native permission resolution. |
plugins/codex-security/mcp-app/tests/test_deep_scan_templates.mjs |
Updates Deep Scan template coverage. |
plugins/codex-security/mcp-app/tests/test_deep_reducer_paging_eval.mjs |
Updates retired reducer evaluation coverage. |
plugins/codex-security/mcp-app/tests/test_artifact_storage.mjs |
Tests artifact storage behavior. |
plugins/codex-security/mcp-app/tests/test_artifact_storage_regressions.mjs |
Tests artifact storage regressions. |
plugins/codex-security/mcp-app/tests/test_artifact_foundation.mjs |
Updates artifact foundation coverage. |
plugins/codex-security/mcp-app/src/server/compact-artifact-tools.ts |
Removes retired worker/reducer tool registration. |
plugins/codex-security/mcp-app/src/scan-handoff.ts |
Updates Deep Scan handoff guidance. |
plugins/codex-security/mcp-app/src/native-permissions.ts |
Resolves ordinary scan permissions. |
plugins/codex-security/mcp-app/src/deep-scan/templates.ts |
Removes obsolete Deep Scan templates. |
plugins/codex-security/mcp-app/src/deep-scan/executable-path.ts |
Removes the relocated executable helper. |
plugins/codex-security/mcp-app/src/deep-scan/errors.ts |
Removes obsolete worker error handling. |
plugins/codex-security/mcp-app/src/deep-scan/artifacts.ts |
Removes obsolete worker artifact handling. |
plugins/codex-security/mcp-app/src/artifact-validation-phase.ts |
Uses shared artifact validation. |
plugins/codex-security/mcp-app/src/artifact-threat-model.ts |
Removes obsolete threat-model tooling. |
plugins/codex-security/mcp-app/src/artifact-storage.ts |
Protects host-owned Deep Scan state. |
plugins/codex-security/mcp-app/src/artifact-io.ts |
Restricts artifact contexts to scans. |
plugins/codex-security/mcp-app/src/artifact-discovery.ts |
Uses shared artifact candidate handling. |
plugins/codex-security/mcp-app/src/artifact-deep-reducer-pages.ts |
Removes obsolete reducer paging. |
plugins/codex-security/mcp-app/src/artifact-context.ts |
Removes worker/reducer contexts. |
plugins/codex-security/mcp-app/src/artifact-candidate.ts |
Adds the shared candidate schema. |
plugins/codex-security/mcp-app/src/artifact-attack-path.ts |
Uses shared artifact candidate handling. |
plugins/codex-security/mcp-app/scripts/test_host_build.mjs |
Updates standalone host build tests. |
plugins/codex-security/mcp-app/scripts/build_mcp_app.mjs |
Bundles shared SDK runtime sources. |
plugins/codex-security/mcp-app/main.ts |
Simplifies MCP startup. |
plugins/codex-security/mcp-app/evals/README.md |
Updates evaluation documentation. |
plugins/codex-security/mcp-app/evals/deep-reducer-paging-server.mjs |
Removes the retired reducer evaluation server. |
plugins/codex-security/mcp-app/evals/controlled-code-mode.mjs |
Removes the retired reducer evaluation harness. |
plugins/codex-security/mcp-app/artifact-writer-main.ts |
Removes the artifact-writer entrypoint. |
plugins/codex-security/mcp-app/templates/deep-scan/discovery.md |
Removes the obsolete discovery template. |
plugins/codex-security/mcp-app/templates/deep-scan/dedup.md |
Removes the obsolete reducer template. |
.github/workflows/test-quality.yml |
Updates Windows sharding and report comparison. |
.github/workflows/node-ci.yml |
Builds the plugin with shared SDK dependencies. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36f56e998e
ℹ️ 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".
|
@codex review Please review the current head |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ 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". |
|
@codex review Please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67156f807f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 671ec31852
ℹ️ 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".
|
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". |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 7cba4d56a0
ℹ️ 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.
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: e72b55028b
ℹ️ 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.
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 5135e91e04
ℹ️ 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.
|
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". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68b321b5c3
ℹ️ 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".
|
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
When a host Deep Scan stops between sealing and publishing its result, its owner can finish publication even if the original checkout has been removed. A scan that still needs model work checks the saved model instruction file before starting or retrying a worker. This preserves the work accepted by the host coordinator in #2118.
Changes
developer_instructionsor its absence at registration. When checking a resumed worker, resolve the model inputs from its Codex home, native profile and explicit overrides in order of increasing precedence.Testing
envreceives its utility name. Both cases passed locally with standalone and simulated multicallenv. Ubuntu test log... The SDK matched the registered paths, rejected a foreign output containing a copied manifest, and completed after removal of the original checkout.main, 17 Python recovery cases, four MCP input and retry cases, 19 worker runtime cases and the SDK model-input checks passed.Risk and rollout
The host continues to own dispatch, checkpointing, comparison and publication. A historical flat receipt containing only a digest verifies the digest. A recipe with no instruction receipt cannot establish its original contents. Historical pricing uses the information available in the saved recipe. Land this PR first. Its follow-up #1103 extends the same receipt to the compact prompt and model catalog.
Public disclosure review
The source changes, synthetic fixtures, branch name, title, proposed description, commit metadata and available review discussion were reviewed. Historical logs, attachments and restricted reports were not fully inspected.