Repository navigation
feat(ci): add run_flake_check to skip inline checks for fan-out consumers - #9
Conversation
…mers Add a run_flake_check input (default true) to build.yml and the ci.yml orchestrator. When false, the standalone flake-check job is skipped and build.yml skips its inline nix flake check + coverage steps (only building/ pushing the OCI image) — letting a consumer fan the checks out into its own parallel matrix. Default true is inert for existing consumers. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
This change is part of the following stack: Change managed by git-spice. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR adds a ChangesSkip Monolithic Flake Check Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openspec/specs/reusable-ci/spec.md`:
- Around line 129-137: The Inputs table is missing the new run_flake_check input
defined in the "Requirement: run_flake_check input" section; update the Inputs
table in the spec to add a row for run_flake_check (type: boolean, required: no,
default: true) and note its behavior (when true run nix flake check + coverage;
when false skip standalone flake-check job and forward value to build.yml so
inline check/coverage steps are skipped; OCI image build/push unaffected) so the
Inputs section matches the requirement text and the ci.yml contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 84666be6-3075-4cd2-a50b-62b968c9d46d
📒 Files selected for processing (10)
.github/workflows/build.yml.github/workflows/ci.ymlopenspec/changes/archive/2026-05-29-skip-monolithic-flake-check/.openspec.yamlopenspec/changes/archive/2026-05-29-skip-monolithic-flake-check/design.mdopenspec/changes/archive/2026-05-29-skip-monolithic-flake-check/proposal.mdopenspec/changes/archive/2026-05-29-skip-monolithic-flake-check/specs/oci-build/spec.mdopenspec/changes/archive/2026-05-29-skip-monolithic-flake-check/specs/reusable-ci/spec.mdopenspec/changes/archive/2026-05-29-skip-monolithic-flake-check/tasks.mdopenspec/specs/oci-build/spec.mdopenspec/specs/reusable-ci/spec.md
There was a problem hiding this comment.
Code Review
This pull request introduces a run_flake_check boolean input (defaulting to true) to the reusable workflows build.yml and ci.yml, allowing consumers to skip monolithic inline flake checks and coverage runs when parallelizing checks. The changes include updates to the reusable-ci and oci-build specifications, as well as proposal and design documentation. Feedback from the review highlights that the new input needs to be added to the inputs table in the reusable-ci specification, and that the scenario updates in the delta specification for oci-build should be synchronized with the main specification file.
…ci-build scenarios Address review feedback on #9: add run_flake_check (and the earlier test_systems) rows to the reusable-ci Inputs table, and add run_flake_check to the owner/fork scenario WHEN clauses in the oci-build spec to match the delta. Co-Authored-By: Claude Opus 4.8 <[email protected]>
## Why After compile-once (#1292) CI is ~10m, bottlenecked by a single `nix flake check` building **~13 check derivations on one contended 4-core runner**. They're logically parallel but CPU-starved; the remaining costs (backend-cohort test execution, golangci's own analysis) aren't cacheable — they need more cores in parallel. ## What Replace the monolithic check with a **CI matrix**: - `check-matrix` job enumerates checks: `nix eval .#checks.x86_64-linux --apply builtins.attrNames --json`. - `checks` job runs each as its own parallel runner: `nix build .#checks.x86_64-linux.<name>` (`fail-fast: false`), pulling the shared `_ncps-test-cache`/`_ncps-base` from Cachix instead of rebuilding. - `coverage` job (`needs: checks`) merges per-cohort profiles → Codecov. - The shared build job sets **`run_flake_check: false`** (kalbasit/gh-actions#9) so it only builds/pushes the OCI image. Wall-clock collapses from sum-under-contention (~10m) to **slowest-single-check + nix setup (~3–4m)** — the path to the ~5m target. The per-job times on this run also give us the first clean per-check breakdown. ##⚠️ Merge order Depends on **kalbasit/gh-actions#9** (adds `run_flake_check`). The caller is **temporarily pinned to the gh-actions branch** to validate now; revert to `@main` before merging once #9 lands. OpenSpec: `flake-check-topology` gains "CI runs each check as an independent parallel job" + "Coverage is produced by a job consuming the fanned-out cohorts". --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
Why
The reusable workflow runs
nix flake check+ coverage inline (standaloneflake-checkjob and inside the OCIbuildjob). A consumer that wants to fan the checks out into its own parallel matrix (one job pernix build .#checks.<system>.<name>, for much faster wall-clock) has no way to turn the monolithic inline check off — it would run twice.What
Add a
run_flake_checkinput (boolean, defaulttrue) tobuild.ymland theci.ymlorchestrator. Whenfalse:flake-checkjob is skipped, andbuild.ymlskips its inline Flake check / Build coverage / Codecov steps, only building/pushing the OCI image.Default
trueis inert for every existing consumer. The consumer (e.g. ncps) then owns the fanned-out checks + a coverage job.Specs:
oci-build(conditional check/coverage) +reusable-ci(new input).actionlintclean.Paired with the ncps fan-out PR (forthcoming) that sets
run_flake_check: falseand adds the check matrix.