ci: bump checkout and setup-go to node24 majors, so the runner stops shimming every job - #51
Conversation
Every job in ci.yml and release.yml carried the same warning on every run: actions/checkout@v4 and actions/setup-go@v5 declare `runs.using: node20`, and the runner has been silently substituting Node 24. That is a compatibility shim, not a fix — it works until the runner drops it, and the first thing to break would be whichever PR or tag happens to be in flight. checkout v4 -> v7, setup-go v5 -> v7. Both are the current majors (checkout v7.0.1, setup-go v7.0.0) and both declare `runs.using: node24`, so nothing is being forced any more. The issue named v5 and v6; those numbers were already a major behind by the time it was written. What was checked across the majors being skipped, rather than trusting a green run: - checkout v5: node24, minimum runner v2.327.1. Hosted runners are far past that. - checkout v6: credentials move out of `.git/config` into a separate file pulled in by `includeIf`. Nothing here reads the auth header back out — release.yml authenticates `gh` with GH_TOKEN, not the checkout credential. - checkout v7: refuses to check out fork PR code, but only under `pull_request_target` and `workflow_run` (src/unsafe-pr-checkout-helper.ts returns early for anything else). ci.yml is `pull_request`, release.yml is a tag push, and cla.yml — the one `pull_request_target` workflow — has no checkout step. Fork PRs still build. - The Windows line-endings job depends on `core.autocrlf=true` being set globally in the step before checkout. checkout runs under a temporary HOME, but `configureTempGlobalConfig` still copies the existing `~/.gitconfig` into it in v7.0.1, so the setting is still honoured and the job still checks out the way Git for Windows would. That job passing while measuring nothing was the risk worth ruling out, and it is a stronger check than a green tick. - setup-go v6: sets `GOTOOLCHAIN=local`, so a `go` command can no longer quietly download a newer toolchain than the one installed. go.mod pins `go 1.26.5` with no `toolchain` directive and `go-version-file: go.mod` installs exactly that, so the two agree. - setup-go v7: ESM migration and dependency bumps, no interface change. cla.yml is left alone on purpose. contributor-assistant/github-action is also node20 and is also being shimmed — visible on pull_request_target runs, e.g. job 98791685255 — but v2.6.1 is the newest release, the default branch is node20 too, and the repository is archived upstream. There is no version to bump to; replacing it is its own decision. Filed separately. Closes #45 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MR6CqdYLH4bTBcggEbJTgX
Annotations checked, not just the tickCI run 33154345581 — all five checks pass, and annotations pulled per job from
Zero annotations of any level on all four jobs. The shim is gone, not merely quiet.
The Windows job is still measuring what it claims. This was the failure mode worth ruling out, since a silently-defeated
Identical, so Still emitting, and expected to: |
Every job in
ci.ymlandrelease.ymlhas been carrying the same warning on every run —actions/checkout@v4andactions/setup-go@v5declareruns.using: node20and the runner substitutes Node 24 behind them. This bumps both to the current major so nothing is being forced any more.actions/checkoutv4v7runs.using: node24actions/setup-gov5v7runs.using: node24Six
checkoutand fivesetup-goreferences, acrossci.yml(four jobs) andrelease.yml(two jobs). Major-tag pinning kept, which is what the repo already uses.#45 named
checkout@v5andsetup-go@v6. Both were a major behind by the time it was filed. I confirmed the current tags against the releases API rather than taking the issue's numbers.What I checked in the release notes
A green run would not have caught any of these, so they were read rather than inferred:
v2.327.1. Hosted runners are well past it..git/configfor a separate file pulled in viaincludeIf. Nothing in this repo reads that header back:release.ymlauthenticatesghwithGH_TOKEN, not the checkout credential.pull_request_targetandworkflow_run(actions/checkout#2454). This is the one that could have broken external contributors, so I readsrc/unsafe-pr-checkout-helper.tsat the tag:assertSafePrCheckoutreturns early for every event that is notpull_request_targetorworkflow_run.ci.ymlispull_request,release.ymlis a tag push, andcla.yml— the onlypull_request_targetworkflow here — has no checkout step. Fork PRs still build.GOTOOLCHAIN=local, so agocommand can no longer silently download a newer toolchain than the one installed.go.modhere pinsgo 1.26.5with notoolchaindirective, andgo-version-file: go.modinstalls exactly 1.26.5, so the requirement and the installed toolchain agree and there is nothing left to download.@actions/cache6.2.0. No interface change.The Windows line-endings job
The job most exposed to a checkout major bump, since it depends on
git config --global core.autocrlf truein the step before checkout actually reaching the checkout. checkout relocatesHOMEto a temporary directory for the duration, so the question is whether the global setting survives that.It does:
configureTempGlobalConfiginsrc/git-auth-helper.tsatv7.0.1still copies the existing~/.gitconfiginto the temp home, exactly as v4 did. Worth stating plainly because the failure here would have been silent — if the setting were dropped, no file would arrive with CRLF, the check would find nothing converted, and the job would go green while measuring nothing. I also grepped checkout's source at the tag forautocrlf/eolhandling: it has none, in v4 or v7.Release-workflow risk
release.ymlis the one that is not discovered until the next tag, so, explicitly:create-releaseusescheckoutonly to givegh release view/gh release createa repository context.GH_TOKEN: ${{ github.token }}does that work; the checkout credential is not involved, so the v6 credential relocation cannot reach it.binariesischeckout+setup-go+go build+gh release upload. The upload isghwithGH_TOKEN, not an action — no upload-artifact or release action is in the file at all, so the bump cannot touch artifact upload. Cross-compilation is driven byGOOS/GOARCH/CGO_ENABLED=0in the step env, none of whichGOTOOLCHAIN=localaffects; setup-go installs the go.mod version and the build runs on it.go.modrequirement it previously papered over with a toolchain download. That would fail on every matrix leg identically, andci.ymlexercises the samesetup-go@v7+go-version-file: go.modpair on this PR — so CI here is a real rehearsal of the release path's Go setup, not just an adjacent one.cla.ymlleft alone, deliberately#45 called
contributor-assistant/github-action@v2.6.1"not currently flagged". It is flagged — just not on the runs the issue was looking at. It emits the same warning onpull_request_targetruns (job98791685255on run33153787749); theissue_commentruns skip the step via itsif, which is why it looked clean.It cannot be fixed by a bump.
v2.6.1(2024-09-26) is the newest release, the default branch'saction.ymlisnode20as well, and the upstream repository is archived. There is no version to move to, so this needs a replacement rather than a version change — filed as #50.Verification
Baseline, run 33153787771 on
main— all four jobs carried:Post-merge check on this PR's run is recorded in the comments below: annotations pulled per job via
/repos/elk-work/ark/check-runs/<job>/annotations, not just a green tick, since a passing run and an annotation-free run are different things and the second one is the point of the issue.Closes #45