Skip to content

fix(scans): retain modified base files below directory links - #1927

Closed
mldangelo-oai wants to merge 27 commits into
mainfrom
mdangelo/codex/retain-committed-diff-paths
Closed

mldangelo-oai wants to merge 27 commits into
mainfrom
mdangelo/codex/retain-committed-diff-paths

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Shipped in #1916. The head of this PR and the squash commit on main (63afe50e) have the same Git tree.

Summary

A working-tree scan can lose a modified file when its parent directory is replaced by a symlink or Windows junction. The scan now reads the file from the base revision and keeps its path in the worklist with an empty preview.

Changes

  • Use the same modified-path rule for the TypeScript inventory and ranking commands, Python registration counts, and candidate source lines. Preserve how the current inventory handles newly added files below links.
  • Read the selected base blob from the local object database. A missing blob produces an error.
  • Extend the six existing directory-link cases with a modified text file whose replacement contains binary data.

Testing

On 684b5b7b0de, 32 Python tests passed. A real partial clone confirmed missing objects stay unfetched during registration and source-line lookup, and the two base lines stay available after an intentional fetch. Both Ruff checks, the SDK CI build and type check, plugin source compatibility, and all nine checker tests passed. The packaged inventory and ranking suites passed 142 cases on Linux and skipped 25 platform-specific cases. The prior feature patch reapplied to e11742ddd3f reproduced the complete refreshed tree.

Earlier validation at 36945567c53

  • Reproduced the missing path with the packaged parent on Linux. The fixed helper includes the path, reports one selected file, and uses the two lines from its base blob. A partial-clone fixture verified that a missing blob stays missing during registration, source-line lookup, and inventory generation.
  • Passed the packaged inventory and diff-rank suites on Linux. The final run passed 142 tests and skipped 25 platform-specific cases.
  • Passed 27 Python cases covering candidate sources, registration, and Git reads. Passed Ruff lint and formatting, the TypeScript CI build, plugin source compatibility, all nine compatibility-checker tests, and SDK type checks.

Risk and rollout

This PR targets #1916. The selection change affects local-patch modifications beneath directory links. Committed ranges continue to use their selected revision.

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 24, 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-11-03T16:25:20.271643Z dd3f689 New commits
🔒 Security Review ✅ Completed 2026-11-03T16:25:46.211920Z dd3f689 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.

@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.

Thanks for preserving the committed-file inventory consistently across directory links. This owner-level merge-safety review found no substantive issues. Treating a modified base file as deleted from the local view intentionally retains it with an empty preview, classifies the base blob, and keeps newly staged descendants out of scope.

Validation: the regression omits the row on the base and retains it on this head; the bundled SDK diff-rank tests passed (3 tests, 22 assertions), along with portable source checks and all 9 compatibility-checker tests. The broader Python run passed 241 cases, skipped 73, and hit 76 environment-dependent failures; representative failures reproduce on the unchanged base. Windows source-contract, standalone-plugin and packaged checks passed; the exact-head hosted CI run completed successfully.

@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.

Thanks for keeping the inventory and previews aligned. This owner-level merge-safety pass found no substantive issues at 4903a87. Modified base files below directory links intentionally remain in scope with an empty preview, while newly staged descendants stay excluded.

The before/after probe confirms base-blob classification and downstream line counts. All 80 inventory tests, bundled diff-rank tests (3 tests, 22 assertions), and portable checks passed. The broader Python run had 241 passes, 73 skips and 76 environment-related failures; all discovery/fallback failures and a representative ownership failure also reproduce on the unchanged base. Current-head Windows source-contract and standalone-plugin jobs passed; the packaged Windows shard 8 test step also passed, with job cleanup still running.

@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.

Thanks for keeping the inventory and preview behavior consistent. Owner-level merge-safety review of dd54c66 against the #1916 base: no findings. Modified base files below directory links remain in scope with an empty preview, while newly staged descendants stay excluded.

Passed 32 focused Python cases, a downstream base-line-count check, two packaged selection/Unicode tests, Ruff, CI compilation, and all nine source-compatibility tests. Verified the exact-source hosted Windows packaged regression passed; Linux and macOS packaged reports also passed. Broader SDK/native suites were not rerun 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.

Thanks for preserving the committed-file inventory and preview behavior together. This owner-level merge-safety review of ac34048 against #1916 found no issues. Modified base files below directory links remain in scope with an empty preview, while newly staged descendants stay excluded.

Validation: 135 focused Python cases, nine count/inventory scenarios plus a downstream base-line-count check, all three packaged diff-rank tests, builds, types, Ruff, and all nine source-compatibility tests passed. Four local Python failures reproduce on the unchanged base because of the test environment. Windows execution was not run locally, and the current hosted Windows packaged result is still pending. The full SDK suite was not rerun.

@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.

Thanks for keeping the modified base-file selection consistent between the TypeScript and Python paths. No material findings: files beneath a replacement directory link retain their base-blob classification and empty preview, and missing local objects fail explicitly.

Validation: 42 focused tests passed, including all six changed directory-link cases, with two Windows-only skips. A separate local missing-blob fixture, builds, types, Ruff and formatting passed. All 65 hosted CI jobs passed against the reviewed source tree. Full runtime and SQLite integration suites were not run 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.

Thanks for preserving the directory-link behavior. At dd3f689de3f544c5095cb51bed15dadfac2201c5, this PR now has an empty diff against its pinned #1916 base, 1151dcf2e2aaeabd58cd29f08a88cc9051542800. The complete Git trees are identical, and GitHub also reports zero changed files. The implementation and regression cases are already present in that parent.

No material issues in this head’s contribution. I verified ancestry, tree identity and the relevant parent-contained paths; runtime tests were not rerun for the empty diff.

Base automatically changed from mdangelo/codex/diff-scope-file-count to main November 3, 2026 17:09
@github-actions github-actions Bot added the bug Something isn't working label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants