Repository navigation
Allow ignored artifacts in verified merge cleanup - #1964
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 5e2355d714f229d142d0994f1b975d6537f395e8, 22.7s: request_changes (0 critical, 1 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| raise WorktreeError(f"could not inspect nested worktrees in {wt}: {exc}") from exc | ||
|
|
||
| # Other repositories' linked worktrees are absent from this Git registry. | ||
| for path, _, files in root.walk(on_error=fail_scan): |
There was a problem hiding this comment.
suggestion: Full-tree walk visits every file in large ignored artifacts
root.walk() lists every directory under the worktree, including large ignored trees such as .venv and node_modules. The PR exists to clean up exactly these trees, which hold about 100 GiB across 129 worktrees. The scan also runs while the ref lock is held, and _lock_verified_ref has only a 30 s prepare timeout. It is correct but may be slow. If it matters, prune dirs in place to skip entries that are themselves nested-checkout roots once found, or document the cost. No change is required.
Architecture-Review: unchanged; the nested checkout safeguard applies to linked and standalone Git checkouts. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 0f847e4ae631b995e98b874cf8972ce398aeeb5f, 13.8s: approve (0 critical, 0 important, 1 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
|
|
||
| # Other repositories' checkouts are absent from this Git registry. | ||
| for path, directories, files in root.walk(on_error=fail_scan): | ||
| if path != root and (".git" in files or ".git" in directories): |
There was a problem hiding this comment.
suggestion: Nested-repo scan only recognises entries named .git, so ignored bare repositories are still deleted
The widened check now catches standalone clones, where .git is a directory. Linked worktrees, where .git is a file, were already caught, and symlinks also land in files because Path.walk does not follow them. A bare repository nested under an ignored path (for example ignored/mirror.git/ containing HEAD, objects/ and refs/) has no .git entry. It passes the scan, and the non-forced git worktree remove deletes it. If that case matters, the smallest fix is to also treat a directory containing HEAD plus objects/ and refs/ as a repository. Otherwise, document the limitation in the comment at line 384. This is not a regression: the previous code missed it too.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Allow ignored artifacts in verified merge cleanup
Context and goal
du -skx.Refs #575
Acceptance
Validation
Recorded for
0f847e4ae631uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Review
(filled by loopzero review)
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.