Skip to content

fix: Generate the fleet-discovery, scope-resolve and worktree-root mirrors from lib - #15577

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-15537-43213972662-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-15537-43213972662-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #15537

Summary

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

Moved the four hand-mirrored scripts (fleet-discovery.sh, scope-resolve.sh, worktree-root-resolve.sh, worktree-root-legacy.sh) into lib/ with git mv, from repo-fleet-hygiene for the first two and source-control for the worktree-root pair. Registered both plugin copies of each in scripts/shared-copies.txt and regenerated them with scripts/sync-shared-copies.sh, so each copy now differs from its canonical only by the generated header. The four cross-plugin-source-registry entries now name the sync gate as their dedicated check, each with a lib/<name> -> plugins/*/scripts/<name> cluster line, and the legacy entry keeps its delete-after-2026-12-31 note. Every caller still sources or runs the copy in its own plugin at the same path, and no script code changed.

Not verified

  • scope-resolve.test.sh, audit-fleet.test.sh and sync-fleet.test.sh (repo-fleet-hygiene), and worktree-create.test.sh and worktree-root-doctor.test.sh (source-control): this lane has no wrapper to run test suites, so they are left to the PR's CI
  • scripts/check-cross-plugin-source-drift.sh --check: no wrapper for it in this lane, so it is left to the PR's CI. The review read the script and found that both plugin copies of each file stay byte-identical to each other (same header) and that cluster lines are skipped (line 154)
  • ci-status green: a PR CI check, left to the PR's CI
  • tidy: not run, because the change touches the shared paths lib/ and scripts/ and changes more than the 10-file cutoff
  • verify step (build and tests): no build applies to these shell scripts, and the tests cannot run in this lane, as noted above. Recorded as skipped
  • cant-fail-scan: not run, because the change edits no test file
  • Informational, from the review: because a root lib/*.sh file changed, the PR workflow's ShellCheck step (.github/workflows/pr-require-checks.yml around 2284-2295) lints the whole tree rather than one plugin, both for this PR and for later edits to these canonicals
  • Untracked dotfiles at the repository root (.bashrc, .profile, .gitconfig, .idea, .vscode, .mcp.json, .ripgreprc, .zshrc, .zprofile, .bash_profile) are sandbox artifacts, not part of this change, and must stay out of the patch

Fix

  • lib/fleet-discovery.sh: moved from plugins/repo-fleet-hygiene/scripts/fleet-discovery.sh (git mv, content unchanged, mode 100755 kept)
  • lib/scope-resolve.sh: moved from plugins/repo-fleet-hygiene/scripts/scope-resolve.sh (git mv, content unchanged, mode 100755 kept)
  • lib/worktree-root-resolve.sh: moved from plugins/source-control/scripts/worktree-root-resolve.sh (git mv, content unchanged, mode 100755 kept)
  • lib/worktree-root-legacy.sh: moved from plugins/source-control/scripts/worktree-root-legacy.sh (git mv, content unchanged, mode 100644 kept)
  • plugins/repo-fleet-hygiene/scripts/fleet-discovery.sh, scope-resolve.sh, worktree-root-resolve.sh, worktree-root-legacy.sh: regenerated by scripts/sync-shared-copies.sh (canonical plus the two-line GENERATED header). fleet-discovery.sh and scope-resolve.sh are new files at the paths the renames…
  • plugins/source-control/scripts/fleet-discovery.sh, scope-resolve.sh, worktree-root-resolve.sh, worktree-root-legacy.sh: regenerated by scripts/sync-shared-copies.sh (canonical plus the two-line GENERATED header). worktree-root-resolve.sh and worktree-root-legacy.sh are new files at the paths the…
  • scripts/shared-copies.txt: eight rows registering both plugin copies of each canonical
  • scripts/cross-plugin-source-registry.txt: the four entries now read 'Dedicated check: scripts/sync-shared-copies.sh --check' with the lib/ canonical named, and each gained a lib/<name> -> plugins/*/scripts/<name> cluster line. The legacy entry keeps its delete-after-2026-12-31 note
  • .changes/repo-fleet-hygiene/work-resolve-issue-issue-15537-43213972662-1-72e40335.md: patch fragment, '### Changed' / 'Internal restructuring, no behavior change.'
  • .changes/source-control/work-resolve-issue-issue-15537-43213972662-1-452b9f83.md: patch fragment, '### Changed' / 'Internal restructuring, no behavior change.'

Verification

The runner ran each check from the base copy against 8f3b404:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • git-read diff --stat HEAD:<repo-fleet-hygiene copy> HEAD:<source-control copy> for each of the four scripts before the move: no output, so each pair was byte-identical and either copy could serve as the canonical
  • sync-shared-copies (regenerate): generated the eight copies, exit 0
  • sync-shared-copies --check: 'All 812 registered copies match their canonical sources.', exit 0
  • git-read diff HEAD on the regenerated copies: the only addition is the two-line GENERATED header, placed after the shebang (or at line 1 for worktree-root-legacy.sh, which has none). Modes unchanged
  • check-changelog-fragments: 'All 4 changelog fragment(s) under .changes/ are valid.'
  • check-changed-skills: 'No changed skills under plugins/*/skills/ - nothing to gate.'
  • check-affected: first run failed only on changelog-fragments (missing fragments for repo-fleet-hygiene and source-control). After the fragments were added: '13 passed, 6 skipped over 16 changed files', no failures
  • Fresh-context review subagent over the whole diff: no confirmed bugs. It verified that callers source their own plugin's copy by path, that worktree-root-resolve.sh still finds the legacy file as a sibling in lib/ and in each plugin, that registry readers (drift check, check-shell-portability,…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43213972662

Left out: the items under Not verified.

Related

#15537

Merge-Risk: max=LOW demote=false head=64a75538b636f5c1fbbe2481e9c6b346684a19ff rubric=8.4.11 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 64a75538b636f5c1fbbe2481e9c6b346684a19ff: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15577 (head 64a7553), incremental since 8f3b404

I found no security issues in this push.

What changed in this push

  • The push touched three files: lib/worktree-root-legacy.sh, plugins/repo-fleet-hygiene/scripts/worktree-root-legacy.sh and plugins/source-control/scripts/worktree-root-legacy.sh.
  • The incremental diff has no content patch for any of them. It lists each file only as status: modified, so I read all three files in full at the head commit.
  • Content matches the full diff. The canonical has the 100 lines of blob 97397fe5. Both plugin copies are that same file with only the two-line # GENERATED from lib/worktree-root-legacy.sh header added on top. That matches blob 35c09662 in the full diff.
  • What the push actually did was reset the file mode. At this head, the full diff now shows both copies as index 97397fe5..35c09662 100644, where the last review saw a 100644 → 100755 change. So this push puts the execute bit back to how it was. The file is sourced, not executed, has no shebang, and neither adds nor drops anything that runs.
  • The resolver still sources the file as a sibling through ${BASH_SOURCE[0]%/*}/worktree-root-legacy.sh. The git-config read, promote and retire logic is unchanged.

Trust controls and trusted paths: no file in this push matches a TRUSTED PATHS: glob. It touches no trusted-actor list, token request, kill switch, merge hold, .github/actions/ action, plugin manifest or instruction surface.

PR context: it contains no directives aimed at this lane.

Prior findings: the earlier review of 8f3b404 reported 0 findings, so nothing carries over. This review covered blocking findings only (blocking only: yes). It found nothing at any severity.

Coverage: I read all 3 files on the incremental list in full at head. None has a content hunk in the incremental diff.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on 8f3b4042c41ff55908e66d083565c6169f6d8e96; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/worktree-root-legacy.sh Resolved
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 64a75538b636f5c1fbbe2481e9c6b346684a19ff: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #15577 (incremental, 8f3b404 → 64a7553)

No findings in this push. Since this lane already reviewed an earlier head, this was a blocking-only review.

Scope. I read the incremental diff entries for the three changed files:

  • lib/worktree-root-legacy.sh
  • plugins/repo-fleet-hygiene/scripts/worktree-root-legacy.sh
  • plugins/source-control/scripts/worktree-root-legacy.sh

The API returned no patch for any of them: the push changed their file mode and nothing else. I compared them against the full PR diff:

  • The canonical lib/worktree-root-legacy.sh is now added as new file mode 100644.
  • Both plugin copies show only index 97397fe5..35c09662 100644, with no old mode/new mode lines.
  • Their content hunks are unchanged: each still adds only the two-line GENERATED header at line 1, because the file has no shebang.

Prior finding resolved. My earlier inline finding (discussion_r4550339460) said the sourced-only legacy file had picked up the exec bit (100755) in lib/ and in both copies. This push fixes that. All three paths are back to 100644, which matches the base mode, the PR description ("mode 100644 kept"), and the "Behavior is unchanged" criterion in the closing issue. I am not re-posting it.

Closing issue #15537. The rest of the PR is unchanged since the last review, and the criteria assessment from then still stands. With the mode fixed, the exception noted earlier under "Behavior is unchanged" is gone. The --check gates, the five named test suites and ci-status were run by the author or left to CI. I could not run anything in this lane, so they are unverified here.

No plugin manifest changed, so there are no manifest lines. Nothing in the PR context reads as an instruction to this lane.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM62nRb4
@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 64a75538b636f5c1fbbe2481e9c6b346684a19ff. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 64a7553.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 64a75538b636f5c1fbbe2481e9c6b346684a19ff, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 64a7553

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15577-64a75538b636f5c1fbbe2481e9c6b346684a19ff, expires on 2026-12-12.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 93ce6bc Nov 12, 2026
77 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15537-43213972662-1 branch November 12, 2026 12:59
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 4, timeout 0, no coverage 0, invalid 0, not run 3.
Covered-code score 0%; mutation score 0%.

File Killed Survived Timeout No coverage Invalid Not run
lib/fleet-discovery.sh 0 2 0 0 0 0
lib/scope-resolve.sh 0 2 0 0 0 0
lib/worktree-root-legacy.sh 0 0 0 0 0 1
lib/worktree-root-resolve.sh 0 0 0 0 0 2

Surviving mutants

Location Operator Disposition Cause
lib/scope-resolve.sh:64 ROR productive input-gap
lib/scope-resolve.sh:27 SBR productive input-gap
lib/fleet-discovery.sh:136 ROR productive input-gap
lib/fleet-discovery.sh:140 SBR productive input-gap

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 93ce6bc8f405ea28357a72a99312b519eb389cf4; later checks count it verified from this comment.

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.

Generate the fleet-discovery, scope-resolve and worktree-root mirrors from lib/

0 participants