Repository navigation
fix(deep-scan): verify saved model inputs before resuming host scans - #1103
mldangelo-oai wants to merge 261 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsBlocking findings (6)
ℹ️ 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: 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". |
7804913 to
e29a658
Compare
593fdbb to
31e0f2c
Compare
e29a658 to
f2c3eed
Compare
31e0f2c to
42bd243
Compare
|
@codex review |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The scan-scoped persistence and guarded migration are consistent and adequately tested.
Review effort: Balanced
Findings: None
What changed in this PR
Scopes severity assessments per scan to prevent cross-scan overwrites.
Changes:
- Adds migration 42 and scan-keyed assessment storage.
- Passes scan IDs through save/read paths.
- Adds concurrency and migration coverage.
| File | Description |
|---|---|
sdk/typescript/tests-ts/classify-scan-severity.test.ts |
Tests scan isolation and migration behavior. |
sdk/typescript/src/severity-store.ts |
Includes scan ID when saving assessments. |
plugins/codex-security/tests/test_workbench_setup_and_migrations.py |
Tests migration 42 and guarded backfill. |
plugins/codex-security/tests/test_workbench_deep_scan.py |
Updates expected schema version. |
plugins/codex-security/tests/test_workbench_db.py |
Updates expected schema tables and version. |
plugins/codex-security/scripts/workbench_severity.py |
Reads and writes scan-scoped assessments. |
plugins/codex-security/scripts/workbench_schema.py |
Defines and backfills the new table. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
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". |
alandelong-oai
left a comment
There was a problem hiding this comment.
Reviewed 42bd243a38d3d3a79c0784eebdf1be870312645a against mdangelo/codex/pr939-stack-01-verification at f2c3eed65b1482497c1997bb53b463160b18fb52, scoped to this PR's diff and touched files.
Reviewed the per-scan schema migration, checkpoint writes/reads, and regression tests. No new actionable findings. Direct SQLite probes using the changed schema and checkpoint code preserved separate assessments for two scans of one finding.
Review included simplification/deletion opportunities. Full repository and platform test suites were not run.
42bd243 to
f27e123
Compare
183b88d to
75d6f5c
Compare
f27e123 to
144ac4f
Compare
faizan-oai
left a comment
There was a problem hiding this comment.
Reviewed the per-scan assessment key, save/read paths, and migration matching. Keeping assessments keyed by both scan and finding addresses the cross-scan overwrite. No issue found in this layer. Local migration checks were run at the integrated stack tip, rather than independently at this commit.
alandelong-oai
left a comment
There was a problem hiding this comment.
This moves severity assessments to per-scan storage and isolates concurrent classifications. Approval is withheld for the existing P2 in discussion_r4146527174: migration 42 still drops valid unindexed classifications from the newly selected table. I reproduced one readable legacy assessment becoming zero per-scan assessments using the exact migration SQL, with the original row retained and no foreign-key errors. The same migration remains at the current stack tip.
Completed three independent high-reasoning reviews and source verification against 75d6f5cb78812d7967ae03d641c4f32922274049 → 144ac4fe6f87ed20376f9069627c44fcb79516fd. No additional finding to duplicate here.
alandelong-oai
left a comment
There was a problem hiding this comment.
Re-reviewed after the base PR was merged and this PR was retargeted to main at 688e2aee6290e80b3e71ad132adf3e8071a2afa8. Three fresh independent passes found no additional issues. GitHub test merge 69272724c5a7f3f23da54de5b48b1b70f3b531cc has the expected base/head parents; its seven-file change matches the original severity patch despite the expanded three-dot diff.
Approval remains withheld for the existing P2 migration finding. On that test merge, the real migration still leaves one valid saved assessment with a deterministic occurrence identity as zero entries in the new per-scan table. The original row remains, but the new reader cannot use it. The SDK migration test explicitly expects the saved classification to become incomplete. The later recovery in #1150 fixes this at the final stack tip; that fix is not part of this PR.
Validation on the test merge: 296 Python tests and 14 classification tests passed; plugin build, Ruff lint/format, CI TypeScript build, portable source compatibility and its nine tests, and diff whitespace checks passed. No live model calls.
144ac4f to
fd5b5ba
Compare
|
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: fd5b5ba147
ℹ️ 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".
alandelong-oai
left a comment
There was a problem hiding this comment.
Re-reviewed fd5b5ba147484f20d64bf0680702ef6c7385631b against be8470aa77f21a8bdad614e994b3982066a21073, with three fresh independent passes and root verification.
Migration 46 fixes the earlier loss during migration: a valid unindexed legacy assessment now survives the upgrade, and repeating the migration preserves the recovered row.
One P2 remains for databases already at migration 42, as described in discussion_r4161619542. I reproduced it through the actual SDK publication-preparation API: one saved legacy assessment plus an empty per-scan table produces the incomplete-classification error on read-only publication. Running classification once applies migration 46; the same assessment and publication then succeed. A read-only caller needs a validated fallback for this recoverable row, or recovery before selecting the new table. No duplicate inline comment added; approval remains withheld for this specific upgrade path.
Validation: 14 SDK classification tests; the three touched Python test files; plugin build; Ruff lint/format; SDK TypeScript check; portable source compatibility and its tests. The synthetic migration and publication probes used no model calls or external publication. Current CI still has queued jobs.
fd5b5ba to
a2ca4d5
Compare
alandelong-oai
left a comment
There was a problem hiding this comment.
Re-reviewed the real PR diff at a2ca4d5dd7c68158753f039b574c0822ba0ca6b8. Three independent high-reasoning passes covered the complete changed patch and tests; root source checks and focused reproductions informed this decision.
The read-only classification fallback now recovers legacy assessments before any migration write, preserves existing per-scan rows and does not borrow another scan's assessment. Exact-head regression tests and actual SDK publication preparation pass.
Validation across touched paths at branch tip 06e75cfe: 1,356 SDK tests, 867 Python tests plus 100 subtests, and 108 MCP tests passed; builds, types, portable checks and installed-package checks passed. These are integration checks at the branch tip, not a claim that every intermediate PR or its CI is clean. The branch still descends from be8470aa, while the base ref is 2fd78804. GitHub test merge f1c97e81 has the expected parents and identical contents for all eight touched files; the broad local tip tests do not include the newer main changes.
# Conflicts: # plugins/codex-security/mcp-app/tests/deep_scan_profile_file_cases.ts # plugins/codex-security/scripts/workbench_source_scopes.py # sdk/typescript/src/project-config.ts
Read the effective model-file paths persisted by older SDKs before choosing a recovery interpreter. Use the selected scan's input roots for CLI history lookups and bulk receipt collection, including when publication fails. Exercise legacy sealed recovery through the SDK and both CLI paths with a harmless interpreter marker, and cover case-only Windows output directory changes.
|
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
Land #939 first. This PR extends its host Deep Scan receipts to the configured compact prompt and model catalog. Each receipt records the selected path and content digest, or the absence of a selection. If either input changes while a scan is paused, restoring the original input allows model work to resume.
Changes
Testing
... Fresh and resumed worker tests exercise the intended path.Public disclosure review
The update uses synthetic fixtures. Prior contributor context and attestation states are retained. Historical linked reports and attachments have incomplete coverage.