Skip to main content

Building Kailash

A small, reproducible toolchain builds and verifies Kailash. Nix flakes evaluate the whole distribution declaratively. A single tool manifest drives every generated surface. Every claim traces to a merge-verified pull request. This page documents that loop. The same loop gives the evidence records cited across the roadmap and its dependency graph.

The build environment

Layer Component Role
Gate surface GitHub Actions, hosted runners (ubuntu-latest + ubuntu-24.04-arm) The authoritative check and build surface: one runner per declared system (x86_64-linux, aarch64-linux) — merge evidence lives here, never on a laptop
Authoring workstation macOS (Apple silicon) Editing, issue/board work, site publishing; runs the same suite for development only
Development eval Local Linux builders (containers/VM) Fast inner loop; development-only evidence — never the merge record
Distribution substrate Nix + flakes (Determinate Nix) nix flake check is the single evaluation gate; the lockfile is the version
Source pins nvfetcher Every bespoke tool pinned commit-exact; _sources/ committed
Derivation checks checks.manifest-wellformed and friends Manifest-driven gates that grow with the build matrix (KA-15)

The runners carry the gates because CI is the acceptance surface. The overlay’s flake-check matrix (workflow) evaluates every declared system and builds the manifest gate on hosted hardware. The OS repo runs the same shape from the root flake. It carries the per-package build matrix, the disk-bound image builds (self-hosted, by design), and the VM tests at KA-15. Contributor machines run the identical commands for development; they do not carry the record.

Verification standard

Every build item uses a hypothesis-first test-driven loop (the engineering standard, scope clauses and hosted-runner authority in #119, encoded in both repos’ CONTRIBUTING):

  1. Spec — the issue’s plan-ref and acceptance line are the design source. The canon register maps each item to its plan sections.
  2. RED — write the failing test first, and commit it watched-failing. The validator freezes the manifest contract before the data lands: schema, invariants, reconcile counts.
  3. GREEN — the minimal implementation makes the gate pass; nothing more.
  4. PR — branch per change, GPG-signed commits, and the CI gates: the flake-check matrix, dependency review, pre-commit. Every PR carries the hypothesis and the RED/GREEN evidence in the body.
  5. Close on acceptance — an issue closes only when the tree verifies its acceptance line. Run the check; paste the evidence. Harness before capability: nothing merges ahead of its regression check.

The loop gives the property that matters: a runnable check proves every roadmap artefact, not prose.

The gate loop in practice

The overlay’s first week shows the whole loop: the manifest gate and the flake harness:

1. contract test (RED)   manifest-wellformed FAIL: categories.yaml missing (rc=1)
2. data lands            categories.yaml v1 — CLASSIC census transcribed (9 cats, 141 slots exact)
3. reconcile guard       layer totals checked against §3.6 with data-packs excluded (141/59/46/91)
4. GREEN                 manifest-wellformed OK rc=0 — same gate, stricter input
5. hosted proof          flake-check matrix green on github actions (both systems)

The authoritative-surface clause earned two hosted-runner catches, exactly as predicted:

  • a cross-arch --all-systems run demanded an aarch64 builder the x86_64 runner does not have (fixed by the runner-per-system matrix);
  • the manifest gate’s first hosted execution exposed source-context assumptions. Local green had masked them (fixed by running the gate against the flake source with its dependencies declared).

The gate that gates the manifest also gates itself.

What ships when

Delivery runs in wave lanes — the repo milestones Wave 0 … Wave 8 — mirrored on the kailash Roadmap board. The Sprint queue view is the open 2026.01 train front. Each roadmap item decomposes into roughly one-hour children. Each child is one PR. The parent stays open as the acceptance gate. The 2026.01 exit is the delivery-gate ledger on the roadmap, not a date.