Skip to content

fix(source-control): reap and audit local-scope plugin records for dead worktrees - #8091

Merged
melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-7460-39105835897-1
Oct 19, 2026
Merged

melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-7460-39105835897-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #7460

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The reap helper and the worktree audit's Step 2b now select both project- and local-scope plugin records for a dead path. The reap carries each record's scope and uninstalls with it (-s project or -s local, always --keep-data, never -s user); the audit rows show each path's scopes.

Not verified

  • check-skill for the worktree skill could not run: the wrapper resolves skills under .claude/skills and the plugin skill was not found there, and setting CHECK_SKILL_SKILLS_ROOT needed approval, so audit.md got no skill-quality check
  • The audit.md change is a jq snippet in a doc; it was reviewed by reading but not executed against a real claude plugin list --json

Fix

  • plugins/source-control/scripts/reap-project-plugin-records.sh: enumerates project and local records, carries scope as a third tab field, uninstalls with the record's own scope, and reports the scope in its output lines
  • plugins/source-control/scripts/reap-project-plugin-records.test.sh: the CLI stub honors the scope passed; new case with a project and a local record on one dead path plus a local record elsewhere and a user record, checking both are uninstalled with their own scope and the others are untouched
  • plugins/source-control/skills/worktree/context/audit.md: Step 2b collection selects project and local scopes and adds a scopes column; headings and remedy note updated
  • .changes/source-control/fix-worktree-reap-local-scope-3f9a7c21.md: patch fragment, written by hand because HEAD was detached and the generator refused

Verification

The run reports:

Left out: the items under Not verified.

Related

#7460

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed ec803c69ddcc6ef4a7c1868ead5c7fdd140f80d6: 0 finding(s), 0 as inline comments.

No security issues in the incremental change since 9a5a31b.

The diff has two parts:

  • reap-project-plugin-records.sh: comment-only edit. It says the "no path flag" behavior was measured for project scope only and that local scope is unmeasured. No executable lines changed, so the existing --worktree-path cwd guard is unchanged.
  • worktree/context/audit.md: one prose line with the same wording change. The remedy is still emitted for the user to run, never inline, and the per-path user confirmation requirement is unchanged.

The change does not delete, narrow or soften any control, so the instruction-surface lens does not apply.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed ec803c69ddcc6ef4a7c1868ead5c7fdd140f80d6: 0 finding(s), 0 as inline comments.

Incremental review of ec803c69 against 9a5a31b5: no findings.

The change only rewords a header comment in plugins/source-control/scripts/reap-project-plugin-records.sh and one sentence in plugins/source-control/skills/worktree/context/audit.md. Both now say the "no path flag, resolves against cwd" behavior was measured for -s project only, and that -s local is unmeasured and treated the same.

I checked that claim against plugins/source-control/skills/worktree/fixtures/README.md. Its recorded claim (line 189) covers uninstall <id> -s project --keep-data only, and I found no local-scope measurement there. The reworded text matches that record. Nothing executable changed, so the earlier test and behavior review still stands.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: risk MED at head ec803c69ddcc6ef4a7c1868ead5c7fdd140f80d6. Only LOW merges without a human; this pull request waits for one.

MED findings:claude-review: 1 open

kyle-sexton and others added 2 commits October 18, 2026 19:35
…hangelog fragment

lint-repo failed MD022 and MD032 on the fragment: the ### Fixed heading had
no blank line before its list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…scope

Local scope was never probed; state it as unmeasured and assumed the same.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of 3 on ec803c6.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path enqueued this pull request at head ec803c69ddcc6ef4a7c1868ead5c7fdd140f80d6.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 12069cb Oct 19, 2026
26 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-7460-39105835897-1 branch October 19, 2026 14:25
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.

fix(source-control): worktree reap and audit ignore local-scope plugin records for dead worktrees

1 participant