Skip to content

refactor(actions): simplify setup-pinned-node, upload-fail-index and select-trusted-text - #14232

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14101-42514618122-1
Nov 8, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14101

Summary

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

Made three of the listed actions shorter without changing what they do. install-node.sh now uses a fail helper for its six identical error-and-exit blocks and a fetch helper for its three identical curl calls. upload-fail-index exits from inside the held-name loop instead of setting a found flag. select-trusted-text.mjs uses app == null (as the file already does in isDecisionComment), drops an optional chain the Array.isArray guard makes redundant, and puts two multi-line calls on one line each. Every message, exit code, output and export is unchanged. setup-runner-isolation/action.yml, upload-lane-transcript/action.yml, seal-transcript.mjs and select-trusted-text/action.yml were reviewed and left as they were: none had a simplification that keeps behavior exactly the same. For example, lstatSync's throwIfNoEntry would stop catching errors other than ENOENT, and composite actions cannot loop over upload steps.

Not verified

  • tidy: not run, because every changed file is under the shared path .github/
  • scripts/setup-pinned-node.test.sh, .github/scripts/pr-verify/workflow.test.mjs and select-trusted-text.test.mjs were not run on their own here (the lane runs only its wrappers); check-affected passed for the changed files, and the PR's CI runs the suites
  • ci-status green: left to the PR's CI
  • Changes are left uncommitted in the working tree as the runner instructs; the runner turns them into the patch

Fix

  • .github/actions/setup-pinned-node/install-node.sh: add fail() and fetch() helpers in place of six repeated echo ::error::...; exit 1 blocks and three repeated curl lines; the message text, flags and order are unchanged
  • .github/actions/upload-fail-index/action.yml: the 'Split the names' step fails inside the held-name loop instead of setting and testing a found flag
  • .github/actions/select-trusted-text/select-trusted-text.mjs: app == null in place of app === null || app === undefined, connection.pageInfo after the guard that proves connection exists, and two calls folded onto one line each

Verification

The runner ran each check from the base copy against 7659204:

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

The run reports:

  • check-changelog-fragments: all 1 fragment under .changes/ valid; no plugin changed, so no new fragment is needed
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 10 passed, 6 skipped over the 3 changed files; the rest are listed as CI-only
  • git-read diff HEAD: the curl flags and every ::error:: message in install-node.sh and upload-fail-index match the old text exactly
  • fresh-context review subagent over the whole diff (errexit in fail() after ||, the EXIT trap, fetch under set -e, == null, the optional chain after the guard, and the loop exit): no findings
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42514618122

Left out: the items under Not verified.

Related

#14101

Merge-Risk: max=HIGH demote=true head=76592040ac3bae960838568bfdd3b22d9e7764e1 rubric=8.1.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 8, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14232

No security issues found. I read every hunk in all 3 changed files, plus the surrounding code at the head SHA. None of the changes alters behaviour.

Trust control: .github/actions/select-trusted-text/select-trusted-text.mjs (trusted path)

This action decides what untrusted text reaches a lane, so I checked from the code alone whether anything now gets through that the base stopped. Nothing does:

  • L64, connection?.pageInfo → connection.pageInfo: the guard at L60 (Array.isArray(connection?.nodes)) throws whenever connection is null or undefined. So connection is always an object at L64, and the result is the same.
  • L117, app === null || app === undefined → app == null: loose == null matches exactly null and undefined, so it's the same truth table. A non-null performed_via_github_app still has to pass appBotListed. The author check isListed(ids, item.user) at L113 is unchanged.
  • L165 and the readEditors call: these are only reformatted onto one line. The arguments and their order are the same.

.github/actions/setup-pinned-node/install-node.sh

  • fail() runs exit 1 in the current shell, not a subshell, so every cond || fail still stops the script. The checks still run in the same order and all still fail closed: version format, runner OS, gpgv signature, checksum presence, SHA-256 match, and the installed node version.
  • fetch() uses the same curl flags (-fsSL --proto-redir '=https' --retry 5 --retry-all-errors) and the same $tmp/$base paths. It's called as a plain command under set -euo pipefail, so a failed download still exits before gpgv or the checksum step. Signature verification still runs before the tarball is fetched and extracted.

.github/actions/upload-fail-index/action.yml

  • The exit for a held name has moved inside the inner for loop. That loop isn't in a pipeline or subshell, so exit 1 still ends the step, at the same point and before that name's n$slot is written to GITHUB_OUTPUT. What reaches the step's outputs is unchanged.

Embedded text

The PR description and the closing issue contain no directives aimed at this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #14232 (refactor of setup-pinned-node, upload-fail-index, select-trusted-text)

No findings. I read every hunk of all 3 changed files and checked each one against the code at head. I did not run any tests.

What I checked

  • .github/actions/setup-pinned-node/install-node.sh
    • fail() runs exit 1, which ends the whole script even when it is called from the right side of ||. The EXIT trap that cleans up $tmp still fires, as it did before.
    • The six ::error:: messages match the old text.
    • fetch() passes the same curl flags as the old calls. It gives back curl's exit status, so under set -e a failed download still stops the script, with the same exit code.
    • $tmp and $base are read when fetch runs, after both are set.
    • The steps run in the same order: SHASUMS, then sig, then gpgv, then the tarball.
  • .github/actions/upload-fail-index/action.yml
    • The step now exits on the first held name, with the same message and exit code 1, and before any n<slot> output is written for that name. Same behavior as before.
    • .github/scripts/pr-verify/workflow.test.mjs (around L161 and L181) already tests the held-name failure.
  • .github/actions/select-trusted-text/select-trusted-text.mjs
    • connection.pageInfo at L64 is safe. The Array.isArray(connection?.nodes) check at L60 throws when connection is null or undefined, so by L64 it is always set.
    • app == null gives the same result as app === null || app === undefined.
    • Joining the two multi-line calls onto one line each changes nothing.
    • The existing select-trusted-text.test.mjs covers this file.

Closing issue #14101

  • Behavior unchanged: met for all three files. The tests named above could catch a regression.
  • Edits only listed files: met. All 3 changed files are on the issue's list.
  • Within 400 lines / 15 files: met. The diff is small and touches 3 files.
  • ci-status green: CI decides this. I did not check it.

The PR context file contains no instructions aimed at this lane. The author says the test suites and check-affected passed; I did not confirm that.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 7659204

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-14232-76592040ac3bae960838568bfdd3b22d9e7764e1, expires on 2026-12-08.

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 8, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot removed this pull request from the merge queue due to a manual request Nov 8, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit a37650a Nov 8, 2026
67 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14101-42514618122-1 branch November 8, 2026 21:08
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit a37650a978bbe6ce7ca91f912fbb20adb53e02e4; 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 select-trusted-text, setup-pinned-node, setup-runner-isolation and 2 more actions

0 participants