chore: align with j4k-align 17.17.1 #22
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/align-17-17-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds j4k-align 17.17's baked-Node check before every
actions/setup-nodestep in the Forgejo workflows. A job now fails with a named error when its image doesn't already have the Node version from.node-version, instead of letting setup-node download it from GitHub.The same repair updates the other managed files: the commit-msg workflow parses PR fields with readable multi-line code and has reworded fork-PR comments,
scripts/check-msg.shlists the accepted types when it rejects a header, and a few workflow comments are corrected.Review
01M6JN1DVB26W7TV2K2KK61BT6— headbcd1d529816b87564a076e794d3c2135b43adf11Review — j4k-oss/fta-check @
e1861c6bb5Scope: diff against base tree
d4b4389ee4dcReview finished: 6 succeeded, 0 failed, 4 skipped by dispatch
Triage: settled
Facts: current review-wide projection
Computed under:
Findings (2)
low — The baked-Node step selects between two inputs at runtime, but only one is ever set
01M6JNP5MEY1ZMQBJSP54KCQH3.forgejo/workflows/checks.yml(snippet)01M6JNPN03Y5WANAH4SPD415KK· valid: The anchored selection line is grounded (exact) in checks.yml. The reviewer gives a concrete trace: every copy sets REQUIRED_NODE_VERSION_FILE='.node-version' in the step env, and a tree-wide grep finds REQUIRED_NODE_VERSION only at read sites. The batch offers no counterevidence, and Forgejo does not inject repository variables into a step's env unless the step maps them. So the inline-pin branch and the 'needs exactly one' else branch cannot run in this repository, and every reader of the step still has to parse them. That is Nonobvious Code and Special-General Mixture in the shipped file, and the reviewer quotes AGENTS.md: 'No parameter or option no caller passes'. The defect is in the file whether or not it is rendered. Remedy gap: the batch suggests these workflows may be rendered by j4k-align (see the related repetition claim). If so, a local edit to version="" would be overwritten, and the fix belongs in the template as a render-time choice, which the reviewer also proposes. Low severity is appropriate.01M6JNPN03Y5WANAH4SPD415KK· valid: Resubmitted because shell expansion garbled the quoted code in my previous verdict for this claim. The judgment is unchanged. The anchored selection line is grounded (exact) in checks.yml. The reviewer gives a concrete trace: every copy sets REQUIRED_NODE_VERSION_FILE='.node-version' in the step env, and a tree-wide grep finds REQUIRED_NODE_VERSION only at read sites. The batch offers no counterevidence, and Forgejo does not inject repository variables into a step's env unless the step maps them. So the inline-pin branch and the 'needs exactly one' else branch cannot run in this repository, and every reader of the step still has to parse them. That is Nonobvious Code and Special-General Mixture in the shipped file, and the reviewer quotes AGENTS.md: 'No parameter or option no caller passes'. The defect is in the file whether or not it is rendered. Remedy gap: the batch suggests these workflows may be rendered by j4k-align (see the related repetition claim). If so, a local edit to version="$(cat -- .node-version)" would be overwritten, and the fix belongs in the template as a render-time choice, which the reviewer also proposes. Low severity is appropriate.low — The baked-Node probe hard-codes setup-node's private cache layout and assumes x64
01M6JNP63DG3B7TX7S84FDYKX6.forgejo/workflows/checks.yml(snippet)01M6JNPN03Y5WANAH4SPD415KK· valid: The grounded excerpt shows the probe checks for '/opt/hostedtoolcache/node//x64.complete'. That hard-codes the architecture and the tool cache's '<tool>/<version>/<arch>.complete' marker layout, which is a decision owned by setup-node and @actions/tool-cache, not by this workflow: the Information Leakage red flag. The reviewer adds that the same jobs already key their pnpm cache on runner.arch, so the literal 'x64' is inconsistent with how the job treats architecture elsewhere. The impact is overstated, and I would keep it at low. Every job runs on ubuntu-latest, and nothing shows a non-x64 host, so the misdiagnosis is latent. Any probe of a baked tool cache must mirror this layout; the image baking presumably uses the same convention, so the reviewer's correction documents the coupling rather than removing it. The concrete improvement that holds is deriving the architecture from runner.arch and stating in a comment which convention the probe mirrors. If these files are rendered by j4k-align, as other batch evidence suggests, that change belongs in the template.01M6JNPN03Y5WANAH4SPD415KK· valid: Resubmitted because shell expansion garbled the quoted path in my previous verdict for this claim. The judgment is unchanged. The grounded excerpt shows the probe checks for '${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}/node/$version/x64.complete'. That hard-codes the architecture and the tool cache's '<tool>/<version>/<arch>.complete' marker layout, which is a decision owned by setup-node and @actions/tool-cache, not by this workflow: the Information Leakage red flag. The reviewer adds that the same jobs already key their pnpm cache on runner.arch, so the literal 'x64' is inconsistent with how the job treats architecture elsewhere. The impact is overstated, and I would keep it at low. Every job runs on ubuntu-latest, and nothing shows a non-x64 host, so the misdiagnosis is latent. Any probe of a baked tool cache must mirror this layout; the image baking presumably uses the same convention, so the reviewer's correction documents the coupling rather than removing it. The concrete improvement that holds is deriving the architecture from runner.arch and stating in a comment which convention the probe mirrors. If these files are rendered by j4k-align, as other batch evidence suggests, that change belongs in the template.Other claims
01M6JNP55KP0B28NFXQ6B0WBTQmedium — The baked-Node policy script is pasted as 29 identical lines into three workflowsCoverage
Coverage pass: 01M6JN1DVEVHP582E8DCZ12SYH
Accounting: complete (all slots terminal; see slot results for failures)
Slot health: healthy
@ -184,0 +186,4 @@REQUIRED_NODE_VERSION_FILE: ".node-version"run: |set -euif [ -n "${REQUIRED_NODE_VERSION:-}" ] && [ -z "${REQUIRED_NODE_VERSION_FILE:-}" ]; thenlow — The baked-Node step selects between two inputs at runtime, but only one is ever set
lens
aposd-plain· armdefault· tally 2 valid / 0 invalid / 0 uncertainclaim
01M6JNP5MEY1ZMQBJSP54KCQH3of review01M6JN1DVB26W7TV2K2KK61BT6This repeats a finding already rejected in j4k/media-preservation#42 (comment). This step is generated by j4k-align and isn't an interface of this repository.
REQUIRED_NODE_VERSIONmode has a caller. The step is one shared script (src/template-scripts/baked-node-check-script.tsin@j4k/align@17.17.1), and align'scredential-contract-forgejo.yml.hbsrenders it withREQUIRED_NODE_VERSION: "{{nodeExecutionVersion}}". That template's tests cover the branch and its error.workflowsaudit would report it, and the nextj4k-align --fixwould restore it.@ -184,0 +205,4 @@echo "::error::$pin does not name an exact Node version (X.Y.Z), so setup-node would resolve it from GitHub."exit 1fiif [ ! -f "${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}/node/$version/x64.complete" ]; thenlow — The baked-Node probe hard-codes setup-node's private cache layout and assumes x64
lens
aposd-plain· armdefault· tally 2 valid / 0 invalid / 0 uncertainclaim
01M6JNP63DG3B7TX7S84FDYKX6of review01M6JN1DVB26W7TV2K2KK61BT6Tracked in j4k/align#1076, which documents the
node/<version>/<arch>.completetool-cache marker and the fixedx64assumption in j4k-align's shared check. This step is generated from that source, so the change belongs there, not in this repository.The architecture half is latent today. The
ubuntu-latestjob image (code.j4k.dev/j4k-oss/node-ci:26-bookworm) is a singlelinux/amd64manifest according toskopeo inspect, so every job that runs this check runs on x64.Unadjudicated claim
01M6JNP55KP0B28NFXQ6B0WBTQ(medium), "The baked-Node policy script is pasted as 29 identical lines into three workflows": not a defect. The same finding was rejected with evidence in j4k/relief-ui#21 (comment).The three copies are rendered from one j4k-align source,
src/template-scripts/baked-node-check-script.ts(@j4k/align@17.17.1), through{{templateScript "baked-node-check"}}, so a change to the check is made once. Align'sworkflowsaudit reports any hand-edited copy as drifted and--fixrewrites it. Itssrc/workflow-baked-node.test.tsalso ties each step's.node-versionpin to the following setup-node step.