Repository navigation
refactor(ci): install the pinned shfmt through one composite action - #15957
Conversation
Add .github/actions/setup-pinned-shfmt, which holds the shfmt version and both SHA-256 pins (Linux amd64 binary, Windows amd64 .exe), picked by runner.os. It takes an optional bin-dir and cache-dir, expands a leading ~/ in either, checks the hash, puts the bin dir on GITHUB_PATH (through cygpath -w on Windows) and fails unless shfmt --version prints the pin. The eight install steps in pr-test-platforms.yml (4 Windows jobs), pr-require-checks.yml (check-plugins, check-skills, test-bash, with cache-dir ~/.cache/ci-tools) and maintenance-audit-test-selection.yml now call it, keeping their names and if: conditions, and the comments that kept the copies equal by hand name the action instead. Closes #15949 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #15957 (incremental, head 4f1abda)I found no security issues in this push. This was an incremental review: it covered only the change since What changed. One line changed in .github/actions/setup-pinned-shfmt/action.yml#L1: the action's display name went from What I checked.
Prior findings. The previous review on this PR reported 0 findings, so there was nothing to carry forward. Spend: none. critical-findings: 0 |
|
claude-review reviewed Code review (incremental, blocking only): no findingsScope: the changes since What changed:
References to the name:
The rename therefore affects no caller, test or acceptance criterion of #15949. The earlier review at Other notes:
Verifier dropped 0 of 0 candidates. |
The org naming lint requires an action's `name:` to equal the Title Case form of its directory: `Setup Pinned Shfmt`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #15949
session: Simplify E2 A
Summary
Adds
.github/actions/setup-pinned-shfmt, a composite action that holds the shfmt version (v3.14.1) and both SHA-256 pins, and calls it from the eight shfmt install steps inpr-test-platforms.yml,pr-require-checks.ymlandmaintenance-audit-test-selection.yml(restructuring pass #15695). Before, each step carried its ownSHFMT_VERSIONandSHFMT_SHA256, kept equal by hand through "Same v3.14.1 pin as ..." comments.Fix
.github/actions/setup-pinned-shfmt/action.yml, shaped likesetup-pinned-node: onebashrun step that picks the Linux amd64 binary or the Windows amd64.exeand its SHA-256 byrunner.os(any other OS fails with an error). Inputsbin-dir(default$HOME/.local/bin) andcache-dir(optional) reach the script throughenv:, and a leading~/in either is expanded to$HOME/. Withcache-dir, it downloads into<cache-dir>/shfmt-v3.14.1only when that file is missing and copies it to the bin directory, as the required-checks copies did. It then checks the SHA-256, makes the file executable on Linux, adds the bin directory toGITHUB_PATH(throughcygpath -won Windows), and fails unlessshfmt --versionprints the pin. It takes no token and reads no secret.if:conditions, and becomeuses: ./.github/actions/setup-pinned-shfmt # zizmor: ignore[self-repository]. The threepr-require-checks.ymlsteps passcache-dir: ~/.cache/ci-tools, and theiractions/cachekeys, which name the version, are unchanged.Log-only output changes:
$HOME/.local/bintoGITHUB_PATHand checks the version.curlloses-sfor the--no-progress-meterform the other copies use.test-bashno longer printsshfmt --versiona second time.Out of scope, per the issue: the two
eval-browser-dispatch.ymlcopies (R2-3, blocked on this action reaching main), the cache keys, and the cloud installers.Verification
HOME,GITHUB_PATHfile, the real release download), and every case behaved as intended:cache-dir: ~/.cache/ci-tools, both cold and warm, with no download on a warm cache;bin-dir: ~/tools/bin;pr-test-platforms.ymlWindows jobs.actionlinton the three workflows: clean.scripts/check-docs-only-gate.sh --checkandscripts/check-lane-coverage.sh --checkpass, andnode scripts/check-artifact-retention.mjsreports 152 upload steps matched.node --test --test-concurrency=4on the 59 node test files that name these workflows or local actions: 6108/6108 pass.test_merge_holds_sync.pyandtest_babysit_postmerge_quarantine.py: 106 passed..githubsuite (ci-status) and the Windows test jobs.Related
Part of restructuring pass #15695 (child R2-1 of the /simplify epic). Unblocks R2-3, which moves the
eval-browser-dispatch.ymlcopies onto this action.🤖 Generated with Claude Code