Skip to content

fix(scans): count historical files for unreviewable local renames - #2101

Merged
mldangelo-oai merged 17 commits into
mainfrom
mdangelo/codex/diff-inventory-count
Nov 5, 2026
Merged

mldangelo-oai merged 17 commits into
mainfrom
mdangelo/codex/diff-inventory-count

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Summary

A staged rename could disappear from a local diff scan when its destination went missing, moved into excluded metadata, or became a link. Registration then undercounted the files available to review. The scan now selects the original path as a deletion and classifies its committed contents.

Changes

  • Keep Git’s source path for a rename. Prefer an eligible destination and count it once. When the destination is ineligible, select the base path if it is in scope. A reviewable replacement at the original path still takes precedence.
  • Apply this selection in the Python registration counter and the TypeScript helpers that generate the file inventory and ranking input. Historical binary files remain excluded.
  • The general registration counter and linked-directory handling shipped in fix(scans): count changed files when registering diff scans #1916. This PR focuses on the remaining rename case. Independent experiments from the prior head around private Git configuration for workers, preventing index refresh during normalization, handling Git paths that cannot be represented natively on Windows, and batching unique object reads are deferred. The prior commits remain in the branch history.

Testing

  • Passed the complete Workbench target suite on Linux (154 passed, 73 platform skips), including registration cases for a valid, excluded, or missing destination and a binary historical source.
  • Passed the SDK CI build, MCP type checking, Ruff lint and formatting, plugin source compatibility, and all nine compatibility-checker tests.
  • Rebuilt the packaged helpers. The full SDK inventory suite passed (140 passed, 23 platform skips, 501 assertions), including the inventory and ranking entrypoints with text, binary, missing, excluded, and linked destinations.

Risk and rollout

This affects working-tree diff scans with a rename that Git recognizes. The local counter and both inventories must select the same path. The regression fixtures exercise this through each entrypoint. Native platform checks run in CI.

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.

@mldangelo-oai mldangelo-oai added the platform:windows Windows, PowerShell, Windows paths, or Windows ACLs label Oct 28, 2026 — with ChatGPT Codex Connector
@github-actions github-actions Bot added the bug Something isn't working label Oct 28, 2026

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

The count correction and directory-link handling look coherent, but this commit leaves several test fixtures inconsistent with the new behavior. The inline comments cover the worker permission mocks, ambient environment capture, and Windows fixture assumptions. Please fix those and rerun the affected CI checks.

Validation: 76 focused local tests/checks passed, with two Windows-only skips; builds, types/models, formatting and static package checks also passed. Exact-source CI failed, with 47 successful jobs and 18 failed jobs. Full runtime suites and native Windows execution were not run locally; local registration/SQLite checks remain limited by the test environment.

@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 addressing the four fixture issues from the previous review. The selected-diff counting and Git-environment transport look sound after reviewing the complete current diff and its integration with registration and worker execution. Two nonblocking suggestions below concern cleanup diagnostics and Windows test portability.

Builds, types, formatting, source checks, and focused SDK/MCP checks passed. The exact-source hosted run confirms the Windows loose-object fixes, worker credential and lifecycle fixtures, all eight fresh/resumed home combinations, and the Windows installed-package Deep Scan/retry smoke. The rank-output expectation now uses the correct platform newline; its six Linux cases passed, while the Windows shard was still running at review time.

Broader local Python and worker suites encountered existing filesystem ownership/protected-checkout restrictions, so this is not a full-suite or all-CI-green claim.

@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 refreshing this. No new actionable findings in this owner-level merge-safety review of all 43 changed files at ffeb948. Registration counts match the selected text-file view, and the Git changes preserve local-only object reads, explicit configuration, path boundaries, and worker permissions.

Portable checks, SDK build/types/format, plugin bundling, and focused Python, SDK, inventory, and streaming checks passed. Both hosted MCP shards passed on an identical source tree, including worker configuration and stdio lifecycle coverage. Current reports also confirm registration, missing-object behavior, cancellation, Windows Python tests, and Windows installed-package smoke.

Additional local cases were limited by filesystem ownership, a read-only default home, or an unchanged umask assumption. Windows SDK inventory and Git-settings shards were still running; those results and a complete local-suite pass are not claimed.

@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 the careful regression coverage. Reviewed all 43 changed files at 1ed1fc22a58c7b43bb04b8bcf0fab5c01a44ac18, including registration counts, inventory/path handling, Git configuration preservation, private snapshot lifetime, and worker cancellation. No actionable findings; both previous nonblocking suggestions are addressed.

Validation: required portable checks, SDK/plugin builds, types and formatting passed. Focused local checks passed 110 Python, 73 SDK, 94 MCP, and 20 native-adapter cases. I also verified hosted MCP and Linux/Windows Python results, Windows Git configuration/inventory coverage, installed Windows smoke, and native artifact provenance against a tested merge whose tree exactly matches this head.

Limits: the full SDK suite and live-model scans were not run locally. Existing workspace restrictions prevent some owner/home controls and the temporary-Git cancellation fixture from running locally; the corresponding hosted cancellation case passed. Platform skips remain skips. One Windows SDK shard was still running when checked.

@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 Git configuration across registration and worker launches. No blocking findings in this owner-level review at b04e8503e9d5284e4f0bbc3280e3f43ef7a4a13b. The incoming parent preflight retains the private Git snapshot and isolated worker configuration; the revised routing assertions preserve caller-supplied MCP settings across direct and coordinator paths.

Validation: ordered portable checks, SDK/plugin builds, types and formatting passed, plus 19 routing tests, eight Git-environment tests and the MCP preflight test file. Matching native inputs and artifact payloads were verified. Prior Python/MCP results were retained only where source and test inputs match. Four known filesystem-dependent test patterns were excluded; full local suites, local Windows and live-model qualification were not run.

@mldangelo-oai
mldangelo-oai marked this pull request as ready for review November 3, 2026 16:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-04T19:56:51.839124Z a2b689f New commits
🔒 Security Review ✅ Completed 2026-11-04T19:57:33.240229Z a2b689f 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.

@mldangelo-oai mldangelo-oai changed the title fix(scans): count changed text files during registration fix(scans): count historical files for unreviewable local renames Nov 4, 2026

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

Thank you for fixing the missing-rename case. No blocking findings in this review. The rebased contribution is unchanged: Python counting and packaged inventories agree on destination selection, historical deletion fallback, recreated-source precedence, and binary exclusion.

Fresh validation passed 24 Python cases, 18 packaged inventory cases, four cross-entrypoint probes, builds, types, formatting, and portable checks. Current CI passed on an identical source tree. No full local suite or live-model scan was run.

@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

Here are some automated review suggestions for this pull request.

Reviewed commit: e889ead130

ℹ️ 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 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 reviewable content when a rename destination disappears. The rename-chain issue remains: stage old.py → middle.py, move it again to new.py, then stage only new.py. The earlier real-Git/Python control selected new.py plus historical old.py and counted two files; the base selected only new.py. Resolve eligible destinations across both change sets before retaining a historical source.

This commit has the same source tree as the preceding reviewed head. Earlier verification remains historical with its original limits; no repeated run or duplicate inline comment is added.

@mldangelo-oai
mldangelo-oai merged commit 1417638 into main Nov 5, 2026
74 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/diff-inventory-count branch November 5, 2026 18:20
@github-actions github-actions Bot mentioned this pull request Nov 5, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working platform:windows Windows, PowerShell, Windows paths, or Windows ACLs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants