Repository navigation
ci: route fast-gate.yml and 39 more Linux jobs to the CodeBuild fleet - #11673
Conversation
|
Intent: Route Fast Gate's twelve cheap gate jobs to the self-hosted CodeBuild fleet (kirocrew-gha-linux), the same way ci.yml already routes its own Linux jobs, so these frequent/cheap checks stop paying hosted-runner queue time and cost. |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Same trigger class gets opposite treatments: Watchnightly.yml's revert comment says a SuggestionsInvert the canonical expression into a trigger allowlist — fleet only when [DESIGN-REVIEWED] 6cfa0e8 |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS Five routed jobs keep Not justified as shipped
What this change shipsInventory (8 items) — 6 justifiedIntent: route stateless Linux CI jobs from GitHub-hosted runners onto the existing self-hosted CodeBuild fleet for same-repo runs — ADDITION (extends the documented ci.yml pilot).
[FIRST-PRINCIPLES-REVIEWED] 6cfa0e8 |
4e031b9 to
c450bfd
Compare
c450bfd to
2d19a9c
Compare
Security Scope Review -- ✅ human override accepted@bolichen97 overrode this lane for [SCOPE-REVIEWED] 6cfa0e8 |
2d19a9c to
12e15a5
Compare
12e15a5 to
34e8481
Compare
|
span=367312660991 -- fixed
|
|
span=33263c34ae0d -- fixed
|
|
span=ca21d3b4ab9a -- fixed
|
|
span=f6ff3388fcbc -- fixed
|
|
span=eb2ca73d8905 -- accepted-and-deferred
|
e498380 to
4d61b65
Compare
4d61b65 to
477e1e7
Compare
477e1e7 to
6cfa0e8
Compare
|
/ai-review override target=security-scope head=6cfa0e84f92ec6431db333e198cfd73e9461c1a7 Reason: this diff (CI fleet-routing YAML + one test file) has zero shell/flow/cron surface for the security-scope lane to adjudicate. The Confirmed: no shell/flow/cron content in this diff. Requesting override for this head only; the underlying script gap should be tracked separately. |
|
AI-review override not recorded. Use |
|
/ai-review override scope 6cfa0e8: Diff has zero shell/flow/cron surface for this lane to adjudicate; generate correctly returned an empty candidate set, which validate() test-pinned as untrustworthy by design. |
Human judgment recorded@bolichen97 marked the scope AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
Fast Gate's twelve jobs, plus 36 more stateless Linux jobs across 22 other
workflow files (48 total, listed in "What changed" below), all ran on
GitHub-hosted
ubuntu-latest, even thoughci.ymlalready routes its ownLinux jobs to the self-hosted CodeBuild fleet (
kirocrew-gha-linux) forsame-repo runs.
Why it matters
These jobs are the majority of this repository's routine CI cost: cheap,
frequent, pure Python/Node/gh-CLI/Bedrock-OIDC work with no Docker
dependency, run on every push and PR to main. Leaving them on
ubuntu-latestpays hosted-runner queue time and cost for work the fleetalready absorbs.
What changed (motivation → approach → change)
ci.ymlresolves its Linux runner label once, in itschangesjob: asame-repo run gets a per-run CodeBuild label, a fork run — or any run
outside
kirodotdev/KiroCrew— stays onubuntu-latest. The real trustboundary is on the AWS side: the CodeBuild webhook allowlists actors who
can push to this repository (
docs/ci/ci-and-reviews.md:392-411); thisexpression only decides where a job's label points.
Fast Gate's twelve gate jobs can't reuse
ci.yml'sneeds-based pattern —a test pins every gate job to carry no
needs:/if:, since aneeds:edge would let a failed sibling skip a gate that must never be skippable —
so the routing is expressed two ways:
ci.yml(changes,await-fast-gate,frontend-lint,lockfile-engines-floor,backend-test-crew-container,electron-test) reusechanges'sneeds.changes.outputs.linux_runneroutput.
backend-lintstays onubuntu-latest: it OOM'd on the fleet'sdefault tier, then failed twice more ("runner lost communication with
the server") on the
_large(16 GB) variant too, reproduceddeterministically via two
gh run rerun --jobretries — a realincompatibility, not a flake.
other files — carries one self-contained
runs-on:expression computedfrom
github.*context, no job dependency needed.Three AI-review findings caught real gaps before merge. GPT 5.6:
generateruns an untrusted-diff Claude step whose
Writetool is fenced by ahardcoded
Write(//home/runner/work/_actions/**)deny — a GitHub-hostedpath CodeBuild relocates, failing the fence open next to a live Bedrock
credential; stays on
ubuntu-latest. Self-identified oncevalidatestarted failing: a diff limited to this file's own
runs-on:lines givesgenerate's model no shell/flow/cron surface to propose, andscope_candidates.pytreats an honestly emptycandidates.jsonasuntrustworthy by design — merging it with "proposed but already covered"
would be a false green — so
validate/publishstay onubuntu-latesttoo. GPT 5.6 again:
issue-summary.yml/issue-triage.ymlfire onissues: opened, triggerable by any GitHub user — no PR head repo tocompare, so the fork check always requests the fleet, rejected by the AWS
actor allowlist, queuing forever. Reverted both, plus
ai-review-human-override.yml/disposition-deferral-check.ymlproactively. Design Review: the same mechanism hits
nightly.yml'sschedule/workflow_dispatchtrigger — reverted that too. Separately,Design Review: ~50 hand-copies of the expression had nothing pinning them
identical, and the first parity test was vacuous. The rewrite asserts
byte-identity across every copy, that the routed set equals a fixed list,
and that every
ci.ymlresolver consumer reads the exact expected text.Untouched, deliberately:
memory-benchmark.yml'smeasure(
ubuntu-24.04-pinned),security-scope-review.yml'sadjudicate(OSmatrix),
backend-lint(fleet incompatibility, above), the eight permanentexceptions (
generate,validate,publish,summarize,triage,record,validate-deferral,nightly.yml'sversion), and everythingWindows/macOS-only, Docker-in-Docker, root-permission-sensitive, or
holding production signing credentials.
release.ymlstayed routed: itspush-to-tag actor already needs write access, so this allowlist gapdoesn't apply. Jobs this PR cannot trigger (
pages.yml, etc.) get their first live runpost-merge — issue #11705 tracks that,
accepted-and-deferredper DesignReview span
eb2ca73d8905.No job's steps, env, triggers, permissions, or timeout changed in any
touched file — only
runs-onand, where applicable,needs.🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged
Tests
A new test,
test_ci_fleet_routing_expression_parity.py, adds three checks:every copy of the inline routing expression is byte-identical to one
canonical copy, every job expected to carry either that expression or a
named permanent exception is enumerated exactly (a silent add/drop is
visible in a future diff), and every
ci.ymljob reading the resolver'soutput does so with the exact expected text.
Beyond that, the change is routing metadata on GitHub-hosted workflow jobs,
not application code, so correctness is otherwise verified by the live run
of this workflow set on this PR: every routed job completing on a
codebuild-kirocrew-gha-linux-*label is the proof, visible in this PR'sown check run.
Not provable from this PR's own check run: jobs whose trigger this PR
cannot fire —
pages.yml,add-contributor.yml, and others gated onworkflow_dispatch/schedule/pushto main — get their first liveCodeBuild run only after this PR merges. Filed
#11705 to track that;
accepted-and-deferredper the Design Review finding at spaneb2ca73d8905.Manual verification
Parsed all 63 workflow YAML files and confirmed every one still parses.
Re-executed the exact assertions from tests that pin job shape —
test_fast_gate_barrier.py'stest_every_gate_is_unconditional,test_builtin_skill_scope.py's andtest_vendor_manifest.py's equivalentchecks,
test_bench_round9.py'stest_the_measuring_job_pins_its_runner— against the final squashed YAML. (Full pytest needs a dependency closure
unavailable in this sandbox; each assertion was replicated verbatim from
its test's source against the same parsed YAML the real test would use.)
Diffed every touched file against its pre-change version: only
runs-on:and, where applicable,
needs:changed.Related Issues
no linked issue: internal follow-up from the CI/CodeBuild fleet migration
audit, not tracked by a GitHub issue.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)