Skip to content

ci: flake checks as CI Tier 0 via nix-fast-build (#779) - #797

Merged
c-vigo merged 1 commit into
feature/778-git-hooks-prekfrom
feature/779-flake-checks-tier0
Jul 1, 2026
Merged

c-vigo merged 1 commit into
feature/778-git-hooks-prekfrom
feature/779-flake-checks-tier0

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Lands Wave C / roadmap thread C (#779): make the flake's checks.<system> the Tier-0 CI gate, run by nix-fast-build (parallel + eval-cached) instead of a serial nix flake check, with effectful jobs staying GitHub-Actions-orchestrated.

Stacked on #778 (base feature/778-git-hooks-prek) because it consumes #778's checks.pre-commit. Will retarget to dev once #778 merges.

Changes

  • packages.<system>.nix-fast-build — a pinned-nixpkgs passthrough, so CI runs nix run .#nix-fast-build reproducibly. Deliberately not in devTools (no image/dev-shell bloat; it has no --version so it would trip the parity check).
  • ci.yml project-checks — the nix flake check build step becomes nix run .#nix-fast-build -- --skip-cached --no-nom --flake .#checks.x86_64-linux, building treefmt-formatting, deadnix/statix, devShell, devShellTools, and the git-hooks.nix pre-commit gate in parallel. A cheap test_flake_checks.py step validates the output schema (formatter/checks/apps/modules) that nix-fast-build doesn't build — preserving what nix flake check covered.
  • docs/rfcs/ADR-flake-checks-tier0.md — records the pure→Tier-0 / effectful→GH-orchestrated tiering, why the repo/git-dependent pytest units and impure hooks stay GH jobs, and the driver decision (nix-fast-build now; garnix documented as a future option; Tier-1 self-hosting deferred).
  • test_flake_checks.py — guard test that the nix-fast-build driver package stays exposed.

Verification

  • nix run .#nix-fast-build -- --flake .#checks.x86_64-linux → builds all checks, exit 0.
  • tests/test_flake_checks.py -k "not flake_check_succeeds" → 5 passed (schema + driver guard).
  • Pre-commit (prek) clean.

Refs: #779

Build every checks.<system> derivation (treefmt formatting, deadnix/statix,
dev-shell build, devShellTools, the git-hooks.nix pre-commit gate) in parallel
with an eval cache via nix-fast-build, replacing the serial `nix flake check`
step in project-checks. Expose nix-fast-build as packages.<system>.nix-fast-build
(pinned-nixpkgs passthrough) so CI runs it via `nix run .#nix-fast-build` without
baking a CI-only tool into the dev-shell or image. Validate the flake output
schema (formatter/checks/apps/modules) with test_flake_checks.py, preserving what
the removed `nix flake check` covered. Document the pure/effectful tiering in
docs/rfcs/ADR-flake-checks-tier0.md.

Refs: #779
@c-vigo
c-vigo merged commit b1af891 into feature/778-git-hooks-prek Jul 1, 2026
2 checks passed
@c-vigo
c-vigo deleted the feature/779-flake-checks-tier0 branch July 1, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant