Repository navigation
fix(worktree-reaper): gate on ignored files, record ignored paths before removal (#6734) - #6748
Conversation
…gnored-dirt allowlist, record ignored paths (#6734)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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. |
|
🤖 Agent note · duplicate-PR salvage check (lane code-x)
Duplicate check per protocol: my lane implemented #6734 in parallel (PR #6749, branch I diffed my implementation against the merged 953bf96 before closing #6749:
Closing PR #6749 as superseded by this PR; no follow-up needed. |
Fixes #6734.
Problem
The worktree-reaper's CLEAN gate never enumerated ignored files (
git statuswithout--ignored), so a worktree whose only non-tracked content was ignored files classified as clean and was reaped —git worktree removedeleted the ignored content with the tree, unrecorded in the run record — even though ignored content is exactly what the PUSHED proof cannot cover. Verified in triage:status_entries()returned([], [])for an ignored-only synthetic worktree.Change (
infra/worktree-reaper/)status_entries()now also returns the ignored list (porcelain!!via--ignored=matching; git lists an ignored directory itself when the directory matches a rule, individual ignored files otherwise).ignored_dirt_prefixes/ignored_dirt_files(defaults +config.json: prefixestarget/,node_modules/— reproducible build output; files none), matched byignored_allowlisted()on whole path segments (build output lives at crate roots, e.g.pkgs/id/target/) and basename.reap_treerecords every ignored path present inignored_pathsin the run record.Tests
python3 tests/test_worktree_reaper.py— 14 tests OK on the laptop worktree, including newtest_05_ignored_gate(status-level: ignored-only tree enumerates as([], [], ["local-state.db"]); ignored-only tree keptdirty; allowlisted-untracked + unlisted-ignored tree kept; allowlistedtarget/tree reaped withignored_pathsnaming the target paths in the decision record) andtest_ignored_allowlistedunit coverage; the pre-existing reap matrix passes unchanged.🤖 Filed by repo-queue-worker Lane T in fallback mode (queue backend down 2026-11-06/07); the issue was the task.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.