feat(repo-fleet-hygiene): add reclaimable-worktree finding (#1776) - #2558
Conversation
Emit MEDIUM reclaimable-worktree when a linked worktree has reliable admin and an empty git status --porcelain. Status probe failures emit UNKNOWN worktree-disposability-unverifiable. Bump plugin to 0.13.0. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated security review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
The check is green on purpose, and it is not evidence. It certifies that a security pass ran, and this one did not complete — but the cause is outside this PR's control, so merging is deliberately left unblocked rather than locking every merge for the length of the outage. Nothing was reviewed at this head. Where this check is required, it is satisfied without that evidence; a human should review security-sensitive changes here before merging. Re-run the job, or workflow_dispatch this workflow with the PR number, to retry the review (ci-workflows#227). A new push also retries it only if the caller's Re-running does NOT help for every class:
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-run the job, or workflow_dispatch this workflow with the PR number, to retry the review. A new push re-triggers this lane only if the caller's |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 311862d145
ℹ️ 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".
| # Reclaimability is working-tree evidence only: an empty porcelain status means no uncommitted | ||
| # changes at audit time, not that nobody still needs the checkout. Stash list is deliberately | ||
| # out of scope — it would widen the read surface and still would not prove wantedness. | ||
| if wt_status_output="$(run_git_probe -C "$wt_path" status --porcelain 2>/dev/null)"; then |
There was a problem hiding this comment.
Disable repository-controlled fsmonitor before status
When a scanned worktree's local configuration sets core.fsmonitor to an executable path, this new git status probe executes that program, so merely auditing a repository can run repository-controlled code that mutates the host or hangs the unbounded probe. Setting GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM to /dev/null does not suppress repository-local configuration; the Git configuration documentation specifies that a non-boolean core.fsmonitor value is treated as a hook pathname. Override core.fsmonitor=false for this probe before describing the collector as read-only.
Useful? React with 👍 / 👎.
| # Reclaimability is working-tree evidence only: an empty porcelain status means no uncommitted | ||
| # changes at audit time, not that nobody still needs the checkout. Stash list is deliberately | ||
| # out of scope — it would widen the read surface and still would not prove wantedness. | ||
| if wt_status_output="$(run_git_probe -C "$wt_path" status --porcelain 2>/dev/null)"; then |
There was a problem hiding this comment.
Force submodule changes into the cleanliness check
When a worktree configures submodule.<name>.ignore=all or diff.ignoreSubmodules=all, this command can produce empty output even if an initialized submodule contains modified tracked files, causing the audit to emit reclaimable-worktree despite uncommitted content. The git status documentation states that --ignore-submodules=none overrides these configuration settings and considers all submodule modifications, so the probe and its allowlist should include that option.
Useful? React with 👍 / 👎.
Closes #1776
Summary
Adds the
reclaimable-worktreepeel from #1776 to the repo-fleet-hygiene audit collector: detect clean, unlocked linked worktrees via allowlistedgit status --porcelain.Fix
git_probe_allowedforstatus --porcelainand optionallog -1 --format=%ct HEADMEDIUM reclaimable-worktreefor clean linked worktrees;UNKNOWN worktree-disposability-unverifiableon probe failureVerification
bash plugins/repo-fleet-hygiene/skills/audit/scripts/audit-fleet.test.shscripts/affected-tests.sh --runon touched pathsRelated
Refs #1774 — host reap of unreaped worktrees remains Class C operator work.