Repository navigation
feat(scans): persist observed file reads in scan history - #1866
wholley-oai wants to merge 11 commits into
Conversation
mldangelo-oai
left a comment
There was a problem hiding this comment.
Reviewed the full diff, persistence/migration changes, scan lifecycle integration, saved-log attribution, and associated tests at c31b87e. Found one reproducible attribution issue below. The analyzer and saved-log suites passed (44 tests); renderer and CLI observation suites could not load because the local dependency environment lacks string-width and strip-ansi. This is a comment-only review, not an approval.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ 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. |
8869b41 to
a4a39f3
Compare
mldangelo-oai
left a comment
There was a problem hiding this comment.
The saved count can include files that the selected scan never showed to the model. The two cases below reproduced with synthetic sessions and local command output. Please cover both before persisting this metric.
The schema upgrade also needs a test using a database created by this PR. I opened such a database on current main (schema 72), then simulated appending this PR’s two SQL statements under a new version. SQLite rejected the first statement with duplicate column name: observed_files_read_at. Main already uses version 58 for a different migration. When integrating main, preserve its migration history and verify both a clean upgrade and an upgrade from the preview database with observations already present.
Merge current main, preserve preview observations across schema upgrades, and count retained excerpts only when their source is identifiable.
(cherry picked from commit 5ce7e7c)
Summary
codex-security scans showreports how many distinct repository paths appeared in identifiable source excerpts in the scan's saved tool output. The JSON field isobservedFilesRead, withcountandobservedAt. Review receipts continue to describe completed review.Changes
Testing
Risk and rollout
Unmeasured scans have a null count. A measured zero means the retained output contained no qualifying source excerpts. Opaque scripts and searches with ambiguous output can undercount. Older preview paths remain in the database when the original logs are gone. Optional observation failures leave the scan outcome intact. This PR covers the observed-read diagnostic discussed in #70.
Public disclosure review
The third attestation is open because some historical workflow artifacts were not inspected.