feat: govern local runner routing policy - #85
Conversation
|
Claude finished @kyle-sexton's task in 7m 24s —— View job PR Review: feat: govern local runner routing policy
OverallThis is a well-engineered, high-quality PR. The policy logic is correct, security boundaries are sound, and the test coverage is comprehensive. All issues below are suggestions or minor observations — none are merge-blockers. Security (positive observations)
Suggestion —
|
|
Thanks for the detailed review. I revalidated each suggestion against the final head
The remaining bullets are positive/informational observations. The Biome scope note predates this change and is outside this PR. Final evidence: runner-policy 83/83 and all 63 hosted checks pass at |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1919cf20-e67e-42d5-adae-6e1c0e0c37c3) |
There was a problem hiding this comment.
Risk: high. Not approving: Cursor Bugbot completed with status skipping because usage limits blocked analysis, so the required automated review signal is incomplete. Human review is needed for this infra-heavy runner-policy change; no additional reviewers were assigned because no eligible non-author reviewers are available in this repository.
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0795d22c89
ℹ️ 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".
| return { approved: true, kind: "hosted-reusable" }; | ||
| } | ||
| const target = local.approved | ||
| ? job.with[policy.governedReusableRunnerInput.name] |
There was a problem hiding this comment.
Guard missing local reusable inputs before indexing
When a job calls a repository-local workflow whose governed runner input is optional/defaulted and omits with: entirely, validateLocalCallMapping() accepts the call because it only rejects missing required inputs. localReusableWorkflowStatus() can then approve it as runner-input, so this line reads job.with.runner while job.with is undefined and the policy CLI exits with a TypeError instead of returning a finding or applying the default, breaking the policy gate for that workflow shape.
Useful? React with 👍 / 👎.


Summary
.lefthook/dotnet-format.jsonci-workflows/maincommit99ac2f8c5b09dbb785d4eaf18465cbd96c30290cDependencies
The final routing contract is the immutable squash merge from melodic-software/ci-workflows#74 (including stacked #76/#77):
99ac2f8c5b09dbb785d4eaf18465cbd96c30290cReviewed head
0795d22c89cb8fae11642ede9757e7b43fd5d546Validation
Independent author, reviewer, recheck, and integration-review gates all PASS with no findings.
$()remain inert data withshell:false100755ci-statusgates, zero selector gates0795d22c89cb8fae11642ede9757e7b43fd5d546All 63 hosted checks pass on this exact head.
Authoritative basis
Rollout safety
This PR does not change GitHub variables, secrets, runners, repository settings, or live infrastructure. Production routing remains hosted until the IaC and physical canary gates are applied later.
Note
High Risk
Large CI workflow refactor with secrets/vars for runner selection and a new security gate; misconfiguration could break merges or route jobs incorrectly until fleet is live.
Overview
Introduces a YAML-aware runner policy (
components/runner-policy,.github/runner-policy.json,policy.json) and a hosted Runner policy CI lane that tests and enforces it against workflow inventory and repository visibility.CI routing shifts eligible lint/contract jobs from fixed
ubuntu-latestto pairedselect-runner+ workload jobs usingneeds.select-*.outputs.runner || 'ubuntu-24.04',if: ${{ !cancelled() }}, andmerge_groupsupport. Control-plane jobs (runner-policy gate, ci-status, zizmor, osv-scanner) stay on explicit hosted runners with documented exceptions.ci-statusnow requiresrunner-policy, treats onlysuccessas pass (notskipped), and pins several workflows toci-workflows@99ac2f8.Local hooks: Lefthook .NET formatting moves to a consumer-owned
.lefthook/dotnet-format.jsonanddotnet-format-staged.mjs(shell-lessdotnet format whitespace). PSScriptAnalyzer staged checks run one target per freshpwshworker;PSUseCorrectCasingis removed from settings. Dependabot gains an npm root forcomponents/runner-policy.Reviewed by Cursor Bugbot for commit 0795d22. Bugbot is set up for automated code reviews on this repo. Configure here.