Skip to content

Document large workspace Git audits#277

Merged
ariobarin merged 1 commit into
mainfrom
agent/document-large-workspace-git-audits
Jul 24, 2026
Merged

Document large workspace Git audits#277
ariobarin merged 1 commit into
mainfrom
agent/document-large-workspace-git-audits

Conversation

@ariobarin

Copy link
Copy Markdown
Owner

Large nested workspaces need a scalable read-only inventory that preserves linked worktrees without recursive .git status scans. This adds a focused reference and keeps cleanup behind separate authority.

@ariobarin ariobarin left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head review at d693389de504ead64357b50dee51bbdfb65670b9: no blocking findings. The new workspace-audit reference is read-only, preserves cleanup authority boundaries, handles linked worktrees explicitly, and gives scalable evidence collection guidance. portable checks run 1054 completed successfully, with no existing review comments or unresolved threads. Ready for merge under the user's explicit authority.

@ariobarin
ariobarin marked this pull request as ready for review July 24, 2026 14:43
@ariobarin
ariobarin merged commit 7b1c113 into main Jul 24, 2026
5 checks passed
@ariobarin
ariobarin deleted the agent/document-large-workspace-git-audits branch July 24, 2026 14:43

@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: d693389de5

ℹ️ 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".


```powershell
git -C <candidate> rev-parse --show-toplevel
git -C <candidate> rev-parse --git-common-dir

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Canonicalize common dirs before deduping

When the search discovers both the canonical checkout and a linked worktree for the same repository, this command can return .git for the main worktree while the linked worktree returns an absolute common-dir path; Git's rev-parse docs say --path-format=absolute makes affected paths absolute and canonical. A script following this block and deduplicating these returned strings will count one repository twice and rerun worktree list, defeating the scalable inventory the reference is meant to provide; please make the common-dir output absolute or explicitly canonicalize it before the line-26 dedupe.

Useful? React with 👍 / 👎.

Collect worktree state with bounded parallelism:

```powershell
git -C <worktree> status --porcelain=v2 --branch

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep status probes from writing index metadata

For audits run against read-only mounts or users' active worktrees, this plain git status is not actually read-only: I verified the exact command updates .git/index mtime, and Git's top-level docs provide --no-optional-locks for operations that would require optional locks. Since the reference promises a read-only preservation inventory, use git --no-optional-locks -C <worktree> status ... or set GIT_OPTIONAL_LOCKS=0 for the audit so the inventory does not mutate every worktree it inspects.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant