ci(github-actions): replace retired macos-13 runner label with macos-15-intel - #1186
Conversation
…15-intel GitHub retired the macos-13 hosted runner image: the latest actionlint downloaded by Validate Workflow Files rejects the label (failing every PR that touches workflow files, e.g. Renovate rollup #1180), and the darwin-x64 native build could never schedule. macos-15-intel is the current GitHub-hosted Intel macOS label for the x86_64-apple-darwin target. Adds scripts/validate-workflow-runners.mjs plus a node:test regression guard wired into test:ci-scripts that fails when any workflow references a retired GitHub-hosted runner label. Refs #1185
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7619c7047f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const matrixOs = text.match(/^\s*-?\s*os:\s*(.+?)\s*$/); | ||
| if (matrixOs) { | ||
| const label = matrixOs[1].replace(/^['"]|['"]$/g, ''); | ||
| if (label && !label.includes('${{')) { | ||
| found.push({ line: index + 1, label }); |
There was a problem hiding this comment.
Parse matrix OS arrays before checking runner labels
When a workflow uses the common matrix shorthand with runs-on: ${{ matrix.os }} and matrix.os: [ubuntu-22.04, macos-13], this regex captures the entire bracketed array as one label instead of checking each element, so isRetiredRunnerLabel never sees macos-13 and the new repository guard passes while a retired runner remains. Parse flow/block matrix arrays the same way as runs-on arrays, or use a YAML parser, so the check covers all static matrix labels it is meant to guard.
Useful? React with 👍 / 👎.
Review of the retired-label guard found three false negatives: flow-list matrix os axes, trailing inline comments on scalars, and block-sequence runs-on lists. Parse all three forms, strip inline comments, and add windows-2016 to the retired blocklist; document that the list needs a manual bump on future GitHub retirements with actionlint as backstop. Refs #1185
Final review found the block-region handler missed matrix os keys with empty values and YAML block sequences whose items sit at the same indentation as the key. Enter the block region for empty os: values and accept items at indentation >= the key's. Refs #1185
…ents Verification found a block region swallowed a following '- os: <label>' matrix include entry as a literal label, masking a retired label, and that blank or comment-only lines ended block sequences early. Let dash items that open an os: mapping fall through to the matrix matcher, skip blank/comment lines inside block regions, and rewrite the os: key regex with horizontal-whitespace classes to remove quadratic backtracking. Refs #1185
📦 Version Bump PreviewWhen this PR is merged into What happens on merge?
|
The horizontal-whitespace regexes no longer matched lines terminated by CRLF, silently missing retired labels in valid CRLF workflow files. Normalize line endings once before splitting so every matcher sees LF. Refs #1185
{ "schema": "hv-agent-run:v1", "runtime": "kimi", "session": "cricket-kimi-20260805-pr1180-repair", "issue": "https://github.com/happyvertical/sdk/issues/1185", "policy_revision": "1.0.0", "validation": [ "node --test scripts/validate-workflow-runners.test.mjs - 4/4 pass (red before fix)", "node --test scripts/*.test.mjs - 30/32 pass; 2 failures reproduce on clean origin/main (missing pnpm install artifacts), pre-existing", "actionlint v1.7.12 with CI flags on all 21 workflows - zero errors", "yamllint -c .github/.yamllint.yml on changed workflow - clean" ] }Summary
macos-13GitHub-hosted runner label withmacos-15-intelfor thex86_64-apple-darwinnative build matrix entry in.github/workflows/build-json-native.yml.scripts/validate-workflow-runners.mjs+validate-workflow-runners.test.mjs(wired intopnpm test:ci-scripts) as a regression guard: it fails when any workflow references a retired GitHub-hosted runner label.Root cause
Validate Workflow Filesdownloads the latest actionlint at run time. GitHub retired themacos-13runner image, so actionlint v1.7.12 rejects the label and every PR touching.github/workflows/*fails the gate — observed on Renovate rollup #1180 (run 30731126697, job 91451642775) and reproduced locally againstorigin/main. Independently, the darwin-x64 native build could never schedule on the retired label.Validation
build-json-native.yml:44 macos-13), green after:node --test scripts/validate-workflow-runners.test.mjs→ 4/4 pass.node --test scripts/*.test.mjs→ 30/32 pass; the 2 failures (validate-publish-packages,vitest-config) reproduce identically on a cleanorigin/mainworktree without these changes (missingpnpm installartifacts) — pre-existing, unrelated.-config-file .github/actionlint.yaml -ignore 'SC2086|SC2094|SC2129'(the exact CI invocation): zero errors across all 21 workflows.yamllint -c .github/.yamllint.yml .github/workflows/build-json-native.yml→ clean (the CI invocation).Refs #1185 — remaining acceptance criteria (syncing
dependency-updatestomain, Renovate rebase of #1180) are tracked there and require this fix to merge first.Notes
ci/testcommits are non-releaseable, so no changeset.dependency-updatesbase sync must follow after merge.