Skip to content

refactor(docs-naming): simplify realign-file-names and setup scripts - #14552

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14459-42601548355-1
Nov 9, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14459-42601548355-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14459

Summary

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

Simplified the three docs-naming scripts without changing behavior. apply-rename.sh now has two helpers: generated_rows replaces the generated-file jq query that was written out three times, and rewrite_plan replaces the temp-file-then-write-back body that set_status and remap_sites both carried. It also merges the two bare-stem branches in the edit loop and drops rm calls that the EXIT trap already makes. setup-apply.sh now picks --arg or --argjson in one place instead of two near-identical jq branches. setup-check.sh drops the team_read/personal_read flags and the duplicated final summary printf. Messages, exit codes, flags and written files stay the same; the changes are left uncommitted in the working tree, as the lane instructions require.

Not verified

  • The docs-naming script test suites (apply-rename.test.sh, setup-apply.test.sh, setup-check.test.sh) were not run: this lane's Bash runs only the named wrappers. Left to the PR's CI.
  • shellcheck and shfmt were not run directly on the three scripts (the lane cannot invoke them); check-affected passed but its output does not list which linters it ran. Left to the PR's CI.
  • tidy-diff passes 4 and 5 (write-for-humans and the ai-slop fix flow on the changelog fragment) were skipped: the ai-slop fix flow needs its detector and digest-guard scripts, which this lane's Bash cannot run, and the fragment body is the exact text the issue requires. A manual read of the line…
  • cant-fail-scan does not apply: it scans test files, and this diff changes none.
  • ci-status green on the PR is checked by the PR's CI, not this run.

Fix

  • plugins/docs-naming/skills/realign-file-names/scripts/apply-rename.sh: added generated_rows (one jq query for the generated-file TSV, used by --regenerate-only, check_regenerators and the regenerate loop) and rewrite_plan (temp file and inode-preserving write-back shared by set_status and…
  • plugins/docs-naming/skills/setup/scripts/setup-apply.sh: the key=value merge picks --arg or --argjson with the same jq -e . test and runs one jq call instead of two branches
  • plugins/docs-naming/skills/setup/scripts/setup-check.sh: compares TEAM_STATE/PERSONAL_STATE directly instead of through team_read/personal_read; prints the final setup-check: N FAIL line once and exits 1 only when FAILS is non-zero
  • .changes/docs-naming/work-resolve-issue-issue-14459-42601548355-1-4639e48d.md: patch fragment, ### Changed with "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 8052fbb:

  • 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)
  • check-changed-skills: realign-file-names and setup PASS, 0 errors (existing description-length and body-length warnings only)
  • check-affected: 13 passed, 6 skipped over 4 changed files (run before and after tidy)
  • fresh-context review subagent over the whole diff: no behavior difference found; it checked die/blocked messages and exit codes, EXIT-trap temp cleanup, local tmp scoping, --arg/--argjson selection for null/false/empty values, and the setup-check state comparisons and final line; it found no test…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42601548355

Left out: the items under Not verified.

Related

#14459

Merge-Risk: unrated reason=no-rating

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

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 8052fbbc78e61e673e327cc5e6b9a53387899013: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14552, refactor(docs-naming): simplify realign-file-names and setup scripts

No security issues found. I read every hunk of all 4 changed files. None of them matches a trusted-path glob, and the PR changes no trust control, plugin manifest, workflow or instruction surface.

What I checked:

  • apply-rename.sh generated_rows. This is the same jq query, now run from a helper function. The data it feeds into the existing eval "$gcmd" regenerator is unchanged, and that eval was already there before this PR.
  • apply-rename.sh rewrite_plan. It passes the same -v assignments and awk program as before, through "$@", which is quoted, so splitting and quoting are unchanged. $OLD and $NEW still reach awk only as -v values, as they did in the base. The inode-preserving write-back (cat tmp > ARTIFACT) is kept.
  • Removed rm -f "$tmp" / rm -f "$awkerr" before die/blocked. Every path is still added to TEMPS (lines 249 and 483). The cleanup EXIT trap at apply-rename.sh#L70-L76 removes them, so no temp file is left behind.
  • *) prefix_re='' ;; changed to *) ;;. prefix_re is still cleared at the start of each loop pass (line 460), so no value can carry over from one row to the next.
  • setup-apply.sh. One jq call now takes "$value_opt" v "$value", where value_opt is --arg or --argjson. It uses the same jq -e . test as the two branches it replaces, and the value is still passed as a quoted argument, never put into the filter text.
  • setup-check.sh. Comparing TEAM_STATE/PERSONAL_STATE directly gives the same results as the old flags. The final line and the exit codes (0 when there are no FAILs, else 1) are unchanged.
  • Changelog fragment. Prose only.

The PR context file contains no embedded instructions aimed at this lane. There are no prior findings, so this was a full review, not a blocking-only one. Spend: none.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 8052fbbc78e61e673e327cc5e6b9a53387899013: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 4 changed files and checked each changed region against the full head file. I ran nothing: no shell was available. The PR's test-suite and linter results are the author's claims and I have not checked them.

Behavior checks, change by change

  • apply-rename.sh generated_rows: it runs exactly the jq/TSV query that used to be written out three times. Like before, it has no 2>/dev/null or tr -d '\r', so its output is the same.
  • rewrite_plan:
    • It calls awk "$@" "$ARTIFACT", which gives awk the same -v assignments, then the program, then the file.
    • Both die messages are unchanged.
    • The temp file is added to TEMPS before awk runs, so the cleanup EXIT trap (apply-rename.sh:72-76) still deletes it on every die.
    • tmp is now local. Nothing used the global tmp that set_status and remap_sites used to set, so this changes nothing.
  • Edit loop:
    • The merged bare-stem branch sets the same from, to and anchored values as the old code.
    • The removed rm -f calls before blocked are covered by the EXIT trap, because $tmp and $awkerr are added to TEMPS at line 483, before awk runs.
    • *) prefix_re='' ;; becoming *) ;; is safe: line 460 resets prefix_re on every pass of the loop.
  • setup-apply.sh: the script runs without set -e, so the jq -e . && value_opt=--argjson line cannot exit early. It picks the same option the old two branches did: JSON values use --argjson, while null, false and non-JSON text fall back to --arg.
  • setup-check.sh:
    • team_read and personal_read were only ever set from TEAM_STATE == present and PERSONAL_STATE == present, and nothing else reads them.
    • The single printf '\nsetup-check: %d FAIL\n' prints 0 FAIL when nothing failed, the same text as the old separate line.
    • Exit codes are still 0 when nothing failed and 1 when something did.

Closing issue #14459

  • Behavior unchanged: met, based on the checks above. The docs-naming *.test.sh suites cover these scripts. The PR says it did not run them and leaves them to CI.
  • Edits only the listed files plus changelog fragments: met.
  • Within 400 changed lines and 15 hand-edited files: met.
  • Fragment body is ### Changed with the required line: met (bump: patch).
  • ci-status green: CI decides this; this review cannot check it.

No plugin manifest changed and no userConfig key is involved, so there are no manifest lines. No prior findings, and this is the first review of this PR.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 969aa29 Nov 9, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14459-42601548355-1 branch November 9, 2026 11:50
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 8052fbbc78e61e673e327cc5e6b9a53387899013. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound: no-run;
  evidence-unbound:claude-security-review: not bound: no-run)

@github-actions

github-actions Bot commented Nov 9, 2026

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/docs-naming/skills/realign-file-names/scripts/apply-rename.sh 3 0 0 0 0 0
plugins/docs-naming/skills/setup/scripts/setup-apply.sh 1 0 0 0 0 0
plugins/docs-naming/skills/setup/scripts/setup-check.sh 2 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/docs-naming/skills/setup/scripts/setup-check.sh:284 LCR productive no-assertion

The run's summary has the full report.

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 realign-file-names and setup docs-naming plugin code

0 participants