Skip to content

refactor(instruction-placement): simplify migrate cutover-check and plan-migration scripts - #15230

Merged
melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-14592-42939081944-1
Nov 11, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14592

Summary

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

Simplified the two migrate scripts without changing outputs, exit codes, flags or messages. In cutover-check.sh: repo_plan now takes the repository's index instead of looking the path up in a loop (duplicates are already rejected); the canary scratch-directory setup shared by canary_leg and write_probe_leg moved into one canary_dir helper; the home-root default is resolved once; write_probe reuses the existing unreach printer; the env-vars truncation check drops its flag variable; the grading calls lose their rc boilerplate. In plan-migration.sh: the '.' special cases for AGENTS.md/CLAUDE.md paths are gone ('./X' is the same file); the BUDGET path sum runs in one loop without a chain array; the SUPPRESS and DOCSHOME emitters each use one printf; a duplicated comment paragraph is shortened. A dynamic condition_$n loop was tried and reverted because shellcheck could no longer see the calls.

Not verified

  • cutover-check.test.sh and plan-migration.test.sh were not executed directly: this lane's Bash runs only the named wrappers, and check-affected's output does not list which suites it ran; left to the PR's CI
  • tidy-diff passes 4 and 5 (markdown) skipped: the only markdown line is the changelog fragment whose text the issue fixes verbatim; code passes 1-3 ran and found nothing to change
  • build/test step recorded skipped: shell scripts have no build, and the test suites are left to CI as above
  • cant-fail-scan not applicable: it scans test files and this change touches none
  • ci-status green is a PR check, left to the PR's CI

Fix

  • plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh: index-keyed repo_plan, shared canary_dir helper, single CANARY_HOME_ROOT default, unreach reuse in write_probe, simpler env-vars branch and grading calls
  • plugins/instruction-placement/skills/migrate/scripts/plan-migration.sh: dropped '.' path special cases, single-loop BUDGET sum, one-printf SUPPRESS and DOCSHOME rows, shortened duplicated PATHDET comment
  • .changes/instruction-placement/work-resolve-issue-issue-14592-42939081944-1-c369381e.md: patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 618139a:

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

The run reports:

  • check-changelog-fragments: all 10 fragments valid
  • check-changed-skills: migrate skill PASS, 0 errors (3 pre-existing size warnings on SKILL.md, untouched)
  • check-affected: first run failed shellcheck SC2329 on the dynamic condition_$n loop; reverted to explicit calls; re-run 13 passed, 6 skipped, 0 failed
  • fresh-context review subagent: one finding, an unreadable directory AGENTS.md made the new BUDGET sum treat the empty byte count as 0 where the original aborted the loop; fixed by keeping the textual arithmetic substitution for every path step; all other changes confirmed output-identical
  • tests read: cutover-check.test.sh and plan-migration.test.sh reference no internal function names changed here
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42939081944

Left out: the items under Not verified.

Related

#14592

Merge-Risk: max=HIGH demote=true head=ca487e03818ad212f4ca470d029b3c5ad06f7c39 rubric=8.4.1 rater=claude-opus-5-5 checker=claude-opus-5-5

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

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of ca487e03818ad212f4ca470d029b3c5ad06f7c39: no file of this pull request changed since the review of 0b41ac6.

Security review: PR #15230 at 0b41ac68 (incremental since 16bf1d2a)

I found no security issues in this push. This was an incremental review. Only one file is in scope, plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh, and I read its whole change. This lane already reviewed an earlier head, so this review reported blocking findings only.

What changed

The push puts back the second diagnostic note, env-vars: page not read (fetch failed or file empty), plus a comment above it. The note prints in the branch for a page that never reaches the tail marker (cutover-check.sh#L388-L391). The script printed it there before this PR, so the PR's "messages unchanged" claim holds again.

What I checked

  • The verdict does not change. The added line only calls note. In the truncated branch, heading_found and bullet_found stay 0, so the heading_found == 1 && bullet_found == 0 path (L408) still cannot give MET for a page that was cut off. The message is a fixed string, so it adds no new place for untrusted input to get in.
  • Scope.
    • The file is on no trusted path.
    • The push touches no plugin manifest, workflow, token request, trusted-actor list, kill switch or merge hold.
    • It removes or weakens no standing instruction.
  • Prior findings. The only entry is the earlier summary comment, which reported 0 findings, so nothing carries over.

Spend: none. This change starts no real charge and uses no prepaid credit.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of ca487e03818ad212f4ca470d029b3c5ad06f7c39: no file of this pull request changed since the review of 0b41ac6.

Incremental code review: PR #15230 (16bf1d2a → 0b41ac68)

I read the whole change in scope: one hunk in cutover-check.sh, so 1 of 1 file. This lane had already reviewed an earlier head, so this review reports blocking findings only.

No new findings. This push fixes the blocking finding from the last review (discussion_r4533077179):

  • What the push does: the truncation branch at cutover-check.sh#L388-L391 prints "never reaches" and then "page not read".
  • What main does: the base set complete=0, printed "never reaches", then failed the second if … && ((complete == 1)) and fell through to its else, which printed "page not read". The output is the same two lines in the same order.
  • Other states match too: heading_found and bullet_found stay 0 on that path, as on the base. Nothing at head still references the removed complete variable.

Closing issue #14592 criteria:

  • Behavior unchanged: met at this head for the env-vars branches, judged by reading the base and head control flow.
  • Only the listed files and the fragment are edited, under the size limits: this push adds two lines to a file already in scope, so nothing changes there.

Verification: I didn't run cutover-check.sh or its tests. What I say about base behavior comes from reading the diff, not from running it.

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

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 16bf1d2.

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the merge gate refuses this head verify:earlier-fail, and the lane found every note of that earlier pr-verify FAIL already addressed by the diff, so it pushed nothing; only a session can move the head for the verifier to judge again. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=15230 -f activity=address-feedback

@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 16bf1d2add8f774f7f0c4f37bf0acdf31fbe7e13; the summary is in this lane's pull request comment.

claude-lane: claude-review

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

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

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head ca487e03818ad212f4ca470d029b3c5ad06f7c39. 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:earlier-fail)

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 11, 2026
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 11, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on ca487e0.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 11, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for ca487e0

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-15230-ca487e03818ad212f4ca470d029b3c5ad06f7c39, expires on 2026-12-11.

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

@melodic-automation-lanes melodic-automation-lanes Bot removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 11, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 3a8648a Nov 11, 2026
100 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14592-42939081944-1 branch November 11, 2026 04:28
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

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

File Killed Survived Timeout No coverage Invalid Not run
plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh 1 3 0 0 0 0
plugins/instruction-placement/skills/migrate/scripts/plan-migration.sh 3 0 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh:192 other productive input-gap
plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh:392 LCR productive no-assertion
plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh:569 SBR productive no-assertion

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 3a8648aaee15d578b35aa834abb63d9a6e78db48; 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.

Simplify the migrate instruction-placement plugin code

1 participant