Skip to content

refactor(developer-experience): simplify pointer-line.sh - #14538

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14441

Summary

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

Simplified plugins/developer-experience/skills/setup/scripts/pointer-line.sh without changing behavior. valid_path now rejects '.' and '..' segments with one pattern test on "/$1/" in place of an IFS=/ word-split loop; the regex before it already guarantees non-empty, glob-free segments, so the result is the same for every input. The final-newline probe moved into the existing \[\[ -e AGENTS.md \]\] branch, which drops a duplicate existence check; FINAL_NL is read only in that branch. Added the required patch changelog fragment.

Not verified

  • plugins/developer-experience/skills/setup/scripts/pointer-line.test.sh was not run: this lane's Bash runs only the named wrappers. Left to the PR's CI.
  • ci-status green is a PR CI check, left to the PR's CI.
  • tidy-diff passes 4 and 5 (docs-hygiene, ai-slop) skipped on the changelog fragment, because its only prose is the line the issue requires word for word. Passes 1-3 ran.
  • Build/lint (shellcheck, shfmt) not run locally because the lane cannot invoke them; check-affected ran the checks it could, and CI runs the rest.
  • git status shows untracked dotfiles at the repo root (.bashrc, .bash_profile, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc). This run did not create them; they look like sandbox artifacts and should not go into the patch.

Fix

  • plugins/developer-experience/skills/setup/scripts/pointer-line.sh: valid_path's segment loop is now one [[ ]] pattern test, and the FINAL_NL computation is folded into the render branch that already checks AGENTS.md exists (-8 net lines)
  • .changes/developer-experience/work-resolve-issue-issue-14441-42595426525-1-c63d2115.md: new patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 0930cf0:

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

The run reports:

  • check-changelog-fragments: all 4 fragments valid (run before and after tidy)
  • check-changed-skills: setup PASS, 0 errors, 2 warnings that predate this change (description trigger phrasing, body length)
  • check-affected: 13 passed, 6 skipped over 2 changed files (run before and after tidy)
  • fresh-context subagent review of the diff: no findings; it checked that valid_path matches the old loop for every input the regex admits, and that FINAL_NL is never read unset under set -u
  • code-tidying:tidy-diff: passes 1-3 found nothing to change in the code lines; passes 4-5 skipped (see not_done)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42595426525

Left out: the items under Not verified.

Related

#14441

Merge-Risk: max=MEDIUM demote=false head=0930cf080e870df4ca308d031d1f74cb30f2a83c rubric=8.1.3 rater=claude-opus-5-5 checker=claude-opus-5-5

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 0930cf080e870df4ca308d031d1f74cb30f2a83c: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14538 (head 0930cf0)

I found no security issues. I read every hunk of both changed files.

plugins/developer-experience/skills/setup/scripts/pointer-line.sh

  • valid_path (line 130): this check stops path traversal in the --conventions path (called at line 168), so I checked that the new version rejects the same inputs as the old one.
    • The regex on line 1 of the function is unchanged. It still only lets through non-empty segments made of [A-Za-z0-9._-], so no input can carry glob characters, empty segments, or a leading or trailing /.
    • The new test [[ "/$1/" != */./* && "/$1/" != */../* ]] uses unquoted glob patterns. . and / are literal in a glob, so the test rejects a path exactly when one of its segments is . or ...
    • Segments such as ... and .a still pass, as they did before. Inputs like a/./b and ./. are still rejected.
    • Result: the guard is equally strict, and the traversal check is not weakened.
  • FINAL_NL (lines 349-351): this value is now computed inside the existing [[ -e "$AGENTS" ]] branch, and that branch is the only place it is read. Under set -u (line 17), no path reads it unset. Running tail after mktemp instead of before has no security effect.

.changes/developer-experience/...c63d2115.md: a new patch changelog fragment containing only prose. It has no security surface.

Other checks

  • Neither file matches a trusted-path glob.
  • The PR changes no trust control, merge hold, plugin manifest, workflow, or standing instruction.
  • The PR context contains no embedded instructions aimed at this lane. Its note about untracked root dotfiles is about the lane sandbox; none of them are in the diff.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 0930cf080e870df4ca308d031d1f74cb30f2a83c: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #14538, refactor(developer-experience): simplify pointer-line.sh

No findings. I read every hunk of both changed files. Neither file is on a trusted path.

What I checked

  • valid_path (plugins/developer-experience/skills/setup/scripts/pointer-line.sh:130-133): the new test on "/$1/" gives the same result as the old IFS=/ loop for every input the regex lets through.
    • The regex only allows segments made of [A-Za-z0-9._-]. Those segments are never empty and contain no glob characters, so the old unquoted word split only ever split on /.
    • Wrapping the value in slashes means every segment has a / on both sides. So */./* and */../* match exactly when some segment is . or ...
    • Segments such as ... or .a are still accepted: /.../ contains neither /./ nor /../.
    • The exit status is still 0 or 1. The only caller is line 168.
  • FINAL_NL (lines 348-351): the check for a final newline moved inside the existing [[ -e "$AGENTS" ]] branch. That branch is the only place the variable is read (I searched the whole file for it). So it is never read unset under set -u, and render gets the same value.
    • The tail probe now runs after mktemp instead of before. Output only differs if mktemp fails, and then the script exits 6 either way.
  • Changelog fragment: bump: patch with ### Changed / "Internal simplification, no behavior change." This matches the fragment the issue asks for, word for word.

Closing issue #14441 acceptance criteria

  • Behavior unchanged: met, based on the equivalence reasoning above. pointer-line.test.sh exists in the repository to catch a regression; I did not run it.
  • Diff edits only the listed file and changelog fragments: met.
  • Within 400 lines and 15 files: met (2 files, about 8 lines net removed).
  • ci-status green: left to CI, not checked here.
  • Fragment from new-changelog-fragment.sh: content matches. That it was generated by the script is author-claimed and unverified.

Path-scoped rules matching plugins/*/skills/** (skill-bodies-state-current-rules.md, cost-claims.md) cover skill prose and cost claims, which this change to shell logic does not touch. The PR changes no plugin manifests. The verification commands listed in the PR body are author-claimed; I could not run them.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 0930cf0

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-14538-0930cf080e870df4ca308d031d1f74cb30f2a83c, expires on 2026-12-09.

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 9, 2026
Merged via the queue into main with commit 15b8e64 Nov 9, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14441-42595426525-1 branch November 9, 2026 11:04
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 15b8e6451c83382dedbd6abdf7e4f336d3fecf95; 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 pointer-line.sh developer-experience plugin code

0 participants