Skip to content

refactor(instruction-placement): simplify render-index, verify-load and discover scripts - #15315

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14591-42991915488-1
Nov 11, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14591

Summary

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

Simplified three of the four listed scripts with no change in behavior. render-index.sh: a header that repeated usage() now points to it, a new is_abs_path helper replaces two copies of the absolute-or-drive-letter test, the relative --file anchoring is one branch, the write subcommand's nested marker checks are flat guards, and comments that narrated history are shorter. discover.sh: the NATIVE case is one [[ ]] test, target_dir is one line, and a history comment is shorter. verify-load.sh: the EXPECTED line prints from one state variable. version.sh is already minimal and was left unchanged. A fresh-context review found three behavior differences, triggered only by symlink targets or paths starting with '-' or by a failing mktemp. I reverted the discover.sh symlink-loop and target_dir hunks and moved mktemp back ahead of the write checks, so those inputs now behave exactly as before.

Not verified

  • The instruction-placement shell test suites (render-index.test.sh, discover.test.sh, verify-load.test.sh, index-check.test.sh and others that source discover.sh) were not run directly: this lane runs only its named wrappers. Left to the PR's CI.
  • Tidy recorded as skipped: its ai-slop pass could not run detect.sh or digest-guard.sh under this lane's command allowlist. The fragment's one mandated line was read by hand and has no tells.
  • Finding outside this issue's no-behavior-change scope, left as is: verify-load.sh reads rc=$? inside 'if ! timeout ...; then', where $? is the status of the negated test (always 0). The timeout branch (rc 124) therefore never fires, and a CLI failure reports 'the CLI exited 0'. The fix changes…
  • version.sh: reviewed and not changed; its three helpers are already minimal and each comment carries a constraint.

Fix

  • plugins/instruction-placement/scripts/render-index.sh: header Subcommands/Usage/Exit block replaced by a pointer to usage(); is_abs_path helper added and used for relative --file anchoring (one anchor variable in place of root_abs and two branches); write's begin/end-marker and NO-INDEX-NEEDED…
  • plugins/instruction-placement/scripts/lib/discover.sh: ip_index_target_loaded's target_dir case and NATIVE case collapsed to [[ ]] tests; history comment on the outer find -L shortened
  • plugins/instruction-placement/scripts/verify-load.sh: EXPECTED MET/MISSING printed from one state variable in place of a matched flag and two printf branches
  • .changes/instruction-placement/work-resolve-issue-issue-14591-42991915488-1-96e7c9b9.md: patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 616c73f:

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

The run reports:

  • check-changelog-fragments: all 8 fragments valid (run before and after tidy and review fixes)
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 13 passed, 6 skipped over 4 changed files (final run after review fixes)
  • fresh-context review subagent over the full diff: 3 narrow-input behavior differences found (dash-prefixed symlink target in ip_realpath, dirname stderr on a missing dash-prefixed target, mktemp-failure ordering in write); all three reverted to the original behavior; every other hunk traced…
  • tidy-diff over the 18 changed hunks: no further edits (simplify, comment and residue passes found nothing; the fragment text is mandated verbatim)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42991915488

Left out: the items under Not verified.

Related

#14591

Merge-Risk: max=MEDIUM demote=false head=76184e69a92f5945cf835af8387951f7c76bd5dc rubric=8.4.2 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 reviewed 76184e69a92f5945cf835af8387951f7c76bd5dc: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15315 (incremental, 1 of 1 files read)

No security issues found.

This is an incremental review covering what changed since 616c73fb4f344bd05c1f4a153293e3dce5090459. Because this lane already reviewed an earlier head, only blocking findings would be reported.

The only file that changed is plugins/instruction-placement/scripts/render-index.sh, and the change is one comment hunk in the header (lines 27–29). The old pointer line ("Subcommands, usage and exit codes: usage() below, or --help.") now has an extra note: reachable exits 0 for LOADED or NATIVE, and exit 2 also means an unusable --root/--file path. No executable line changed.

  • This file does not match any trusted-path glob. It is not a trust control, a merge hold, a workflow or a plugin manifest.
  • The new text adds documentation and removes no rule, so the instruction-surface lens does not apply.
  • The earlier review of this PR found nothing, so there are no prior findings to restate. There are no settled threads that bear on this change.

PR context: the description contains no directives aimed at this lane.

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

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 76184e69a92f5945cf835af8387951f7c76bd5dc: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental): PR #15315, from 616c73fb to 76184e69

Blocking only. This lane already reviewed an earlier head, so this pass reports blocking findings only.

Scope: I read the one hunk in the one file on the incremental list, plugins/instruction-placement/scripts/render-index.sh.

What changed: the push adds two comment lines to the header (L27-29) and changes no code. It is the fix for this lane's earlier advisory, that the header no longer stated the full exit-code contract. I checked the new lines against the file at head:

  • Exit 2: they say exit 2 can mean an unusable path as well as a usage error. This is accurate. die at L132-134 exits 2, and it is called for --root is not a directory (L363), cannot enter --root (L393), and --file is not a readable file (L517, L559).
  • reachable: it exits with the status of ip_index_target_loaded (L430-432), and the new comment says that is 0 for LOADED or NATIVE. That matches the verdicts usage() describes at L111-114.

Unchanged output: usage() and the --help output are the same as before, so #14591's first criterion (printed text unchanged) still holds. The earlier review's acceptance-criteria check covers the rest; ci-status is left to CI.

Prior finding: the earlier advisory at render-index.sh:27 is resolved by this commit, and its settled thread is marked lines changed since resolution: no. I did not post it again.

Findings: none blocking. I ran no tests.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

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

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 76184e6.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 76184e6

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-15315-76184e69a92f5945cf835af8387951f7c76bd5dc, expires on 2026-12-11.

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 11, 2026
Merged via the queue into main with commit 9dcadd8 Nov 11, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14591-42991915488-1 branch November 11, 2026 09:54
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/instruction-placement/scripts/lib/discover.sh 2 0 0 0 0 0
plugins/instruction-placement/scripts/render-index.sh 4 0 0 0 0 0
plugins/instruction-placement/scripts/verify-load.sh 0 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/instruction-placement/scripts/verify-load.sh:227 ROR 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 9dcadd864f414048c5911f5f3a6af45f2ed8b405; 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 scripts and lib instruction-placement plugin code

0 participants