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
- Milestone 755 (basalt v0 pins nife and runs its gate) is built. basalt pins a nife commit and runs that commit's own image build and tests. nife's tree builds the image it tests, from binaries nife compiled.
- Milestone 607 (nife is built and updated from packages, and its source divides by purpose) planned this step as its item 1: basalt assembles the image from base packages by digest, on the host. 607 did not say who assembles it. §297 says basalt does.
- Milestone 611 (every program and crate belongs to a package, and every package has a home) draws the package boundaries this build reads.
- Milestone 810 (
ripgrepis packaged in basalt and installed withjig) builds basalt's first package. This milestone extends that build to the base. - Milestone 911 (scripted installs grant only what the owner's approval file allows) gives the composition the check it runs with nobody at a prompt. The composition tests each package's asks against the image's approval file, and writes the same grant records an interactive install writes. 911's block names this dependency and leaves the edge here.
- Milestone 919 (a package carries several programs, and
jiginstalls, finds and removes each one) lets a base package such ascore-tools, with five programs, install at all.
The work
- basalt builds every base package from the pinned nife commit: the kernel, the progenitor, the
shell,
jigand 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 ascargo xtask base-packages, and basalt ashelpers/packages.py base, which drives the pin's own builder. The pin bump's workflow job runs it (see BUGS). - 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-imagebuilds it: it checks each archive's digest against the catalog, and the image carries that catalog plusSOURCES_ENTRYfor the index it names. - 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,
composereads each carried program's asks withprogram_asks, the reading the progenitor's install uses. It tests them against the package's entry withapproval_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).
composefinds 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.
- The composer runs the check. When the image's definition names an approval file,
- basalt's gate boots the composed image rather than the one nife's tree built. A job of its own
runs
helpers/packages.py baseand thencargo xtask base-image <arch> --from <repository> --catalog <index> --test --bootonce per architecture, beside thejig installlegs. 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 thekernelpackage's crates, the gap the block'sBUGSentry 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. - 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 imagestill packs the tree's image for every existing check, andcargo xtask base-imagecomposes the same membership from packages, booted byscript/ci-build'sbase-imagerow 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
- Milestone 990. Item 3's table half, where a composed image keeps its first generation, waits on milestone 990 (the base image's first installed-programs table), which sits on the launch RedoxFS launch volume.
- Done.
nifeos/basalt#50carried item 4, the composed boot, into basalt'spackages.yml. - Outstanding.
script/swish-check's rows have not run against a composed image. They are the next piece after item 4, and until then a composed image proves it boots to the prompt only.
BUGS
-
The kernel is built, not packaged. The kernel is firmware's entry, and no archive carries it: its package declares crates rather than programs.
base-imagetherefore builds it from those crates after composing the ramdisk. "No binary came from the tree" holds of the ramdisk and not of the kernel until 607's item 6. -
The base packages record no digest in a recipe. A recipe's
[package_digest]holds one package per architecture; the base is fifteen packages times three. Their digests are the repository index lines, which the composed image's catalog read checks, and basalt'sreproducejob compares two independent builds. Nothing yet compares a base package's bytes against a reviewed line, so a byte that moves without changing the index passes. Home: 917 (basalt's packages build reproducibly), or a recipe table shaped for a set rather than a package. -
script/swish-check's rows have not run against a composed image.--testcomposes the base plus thefixturespackage, which is what the kernel's boot self-test and the shell's check run; the rows' own claims on that image are the next piece. Until they run, a composed image proves it boots to the prompt and no further. -
The image's trust root still pins the base in the kernel until 607's item 6 lands, so a base package change still relinks the kernel.
-
One version number for the whole base (
0.1.0, provisional). The base packages release together, so a split version per package buys nothing yet, and the image refuses a package whose archive carries another version. -
The approval check reads notes, and the base's programs hold grants from a compiled table.
program_asksreads what a program's manifest note asks. A program the archive carries runs by name, and the progenitor endows it fromgrant_plan's compiled table, not from its note. Of the programspackages/base-image.tomllists, onlyjigcarries a note, and that note asks for nothing, because the compiled table already gives the image'sjigthe network, the installer endpoint and the catalog. So the check passes the base against any approval file. Measured 2026-10-31 (UTC): an aarch64--testcomposition against a file holding only itsapprovalline passed, because the fixtures whose notes ask (dialer,servant,seeker) arepackaged_onlyand no archive carries them. Ruled 2026-11-01 (UTC) on #2981: the base programs carry their real manifests in notes, the progenitor endows archive programs from the note, and the compiled table retires a few programs at a time. Home: milestone 992 (the base programs carry their manifests in notes), which follows milestone 697 (the trust root leaves the kernel binary) and holds the open question of what stops an ordinary package asking for a base-only authority.
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.