roadmap PARTIAL

909. basalt composes the bootable image from its packages

(Minted 2026-10-12 (UTC) by lane maintainer/foreign-programs-via-jig, under §297 (software reaches a nife system as a package jig installs from basalt's index, the kernel included). The number is provisional until the merge queue lands it; the title and slug are drafts.)

calef, 2026-10-12 (UTC): "The image should be composed from basalts packages." The programs a system needs before jig runs reach it this way. They are the kernel, the progenitor, the shell, jig and the network stack.

Where it stands

Partial, and the pair of verbs is the part that ships.

nife composes an image from packages. packages/base-image.toml (provisional; minted 2026-10-28 UTC) names the programs an image carries and one version for the base, because a package releases together and an image carries what it boots. It lists the drivers package's programs because the kernel's filesystem service panics without block_driver: an image that left the drivers out boots to the progenitor and stops there. cargo xtask package --package <name> --arch <arch> [--version <v>] packs one package from its milestone 611 (every program and crate belongs to a package) definition, and cargo xtask base-packages <arch> [--test] builds the base set. --test adds the fixtures package, the one the composed test image's boot self-test runs and no release image carries.

cargo xtask base-image <arch> [--from <dir>] [--catalog <path>] [--out <dir>] [--test] [--boot] composes the image. It takes every program's bin/<program> member out of the archive of the package that owns it, and refuses a program the catalog does not vouch for or whose bytes disagree with it. It writes CATALOG and the measurement table with the archive build's own writer, then builds the kernel against that manifest, because a kernel built before its archive refuses to enter the progenitor. An aarch64 image composed this way boots to the swish prompt with the boot self-test green, and script/ci-build's base-image row boots one on every pull request.

--test adds the programs of the fixtures package, which every archive build packs and no release image carries: the kernel's boot self-test runs kernel_test_subject and memory_region_depleter, so a composed image without them boots with two self-test checks red.

basalt builds the same set through its own entry point. recipes/base.toml (provisional) names no program: it points at the pinned checkout's image definition, so membership stays nife's. helpers/packages.py base <nife> <repository> [--triples <t>] [--test] stages the pin, runs that commit's cargo xtask base-packages per architecture, copies the packages into the repository layout jig reads, and writes each package's source archive. base --test asks the pin for the fixtures package and lays it, and the index naming it, in a test channel beside rolling, which publish never serves: a fixtures archive cannot reach a published index while the composer still reads it.

Reused rather than written twice: milestone 611's package definitions and helpers/packages.py --check as the format's reader, cargo xtask package's one producer (build, write_out), the archive build's write_archive_with and measurement table, boot_check::boot_image for the boot, and basalt's existing repository, source-archive and publish path.

Where it starts

The work

  1. basalt builds every base package from the pinned nife commit: the kernel, the progenitor, the shell, jig and the network stack. The rest of the base is what §241 (a threadbare base: the boot slot holds the kernel and what boots and repairs, and every other program is a package) names. nife builds it as cargo xtask base-packages, and basalt as helpers/packages.py base, which drives the pin's own builder. The pin bump's workflow job runs it (see BUGS).
  2. basalt composes each architecture's image from those packages, by digest, as 607's item 1 describes. The image names basalt's index (§250 (an image names its distribution's package index, at basalt.nifeos.org, and a package's bytes may live anywhere)). cargo xtask base-image builds it: it checks each archive's digest against the catalog, and the image carries that catalog plus SOURCES_ENTRY for the index it names.
  3. Each package in the image passes 911's host-side check against the image's approval file, and the image's first installed-programs table holds the resulting grant records. A package whose manifest asks for more than the file allows fails the build, naming the extra grant.
    • The composer runs the check. When the image's definition names an approval file, compose reads each carried program's asks with program_asks, the reading the progenitor's install uses. It tests them against the package's entry with approval_file::File::check, and refuses the composition naming every extra grant of the package.
    • The composer reads a note from an ELF of any machine, and refuses a note it cannot read (the architect ruled so on 2026-11-01 UTC). compose finds each program's note through the program headers alone (program_asks::checked_asked_grants_of), which check no machine, so an image for another machine than the host's gets the same check. A program that is not an ELF, or whose note or manifest does not parse, refuses the composition and the refusal names it. A program with no note at all still asks for nothing. The parser's machine check stays on the paths that run code.
    • The base image names no approval file until a base program carries a note that asks. The check reads manifest notes, and the base's programs take their grants from the progenitor's compiled table (see BUGS). Ruled 2026-11-01 (UTC) on #2981: the check and the first table read the base programs' own notes, which a later milestone gives them (milestone 992 (the base programs carry their manifests in notes)).
    • The table waits on milestone 990 (the base image's first installed-programs table). The first table lives as files under activation/ on the RedoxFS launch volume, with no separate seed image (ruled 2026-10-30 UTC on #2894). What the first generation holds, and what measured boot needs from it, are in notes/the-first-installed-programs-table.md.
  4. basalt's gate boots the composed image rather than the one nife's tree built. A job of its own runs helpers/packages.py base and then cargo xtask base-image <arch> --from <repository> --catalog <index> --test --boot once per architecture, beside the jig install legs. It boots an image composed from the base packages the pin's builder packed, and that image reaches the prompt; the kernel still comes from the kernel package's crates, the gap the block's BUGS entry records. Both composed rows are two of the seven check names basalt's ruleset requires, so a composed image that stops booting holds a merge.
  5. nife's own image build stays for nife's tests, composed from the same package definitions, so a nife change can be tested before basalt pins it. cargo xtask image still packs the tree's image for every existing check, and cargo xtask base-image composes the same membership from packages, booted by script/ci-build's base-image row on every pull request.

Done when

Under QEMU on aarch64, riscv64 and x86_64, basalt's gate boots an image it composed from its own packages and reaches the swish prompt. script/swish-check's rows pass on that image. No binary in the image came from nife's tree build rather than from a package basalt built.

Reuse: 607's design for assembly by digest, 755's gate and 810's package build, extended rather than replaced.

Follow-on

BUGS

Index row

basalt composes the bootable image from the packages it builds, so the kernel and the base reach a system the same way every other program does.