1027. Leaving the central program table
Raised 2026-11-02 (UTC) by the lane maintainer/leave-the-central-program-table. The architect
asked how crates/grant_plan stops holding one central table of the programs the shell can spawn,
what replaces it, and how to get there. On 2026-11-02 (UTC) the architect ruled that no grant binds
to a program's name: an owner's grant line may give installed bytes any capability the
progenitor endows, reboot and the installer included, and several programs may hold one. The
image's own programs keep their grants through the measured archive and stay the default. This
proposal answers from the code under that ruling, writes no code, and names everything new
provisionally. A file and a symbol stand in for line numbers, which §277 (cite
a heading or a symbol) forbids.
Reuse: the manifest note and its encoder (milestone 597 (a program carries its manifest in an ELF
note)) and the vouch in grant_plan::image_manifest. Also the owner's grant lines (milestone 892
(a std program at the prompt holds the network and a resolver)), the approval check (milestone 911
(scripted installs grant only what the owner's approval file allows)) and the progenitor's measured
archive. No new dependency.
Appendices: every row, classified, every consumer, the end state, what an installed program cannot hold yet, what each owner grant risks, how a typed word finds a program, the migration, prior art, the decisions and what was not verified.
What the tree does today
crates/program_table/src/program/catalog.rs declares 28 programs through the programs! macro, wire
ids 0 to 27. program/manifests.rs gives each its manifest in Program::manifest. The shell
resolves a bare word with Program::from_name, plans the line against that manifest, and sends the
id. The progenitor turns the id back into a program with Program::from_id, takes the ELF it
loaded at boot from the archive by the same name, and endows the same manifest.
A second path already exists. A program may carry its manifest in an ELF note
(.note.nife.manifest). When the shell runs a file by path, or a bare word that names an installed
program, it reads the note and sends the file's bytes. The progenitor hashes its own copy, looks
the digest up in the live installed-programs table, and calls grant_plan::image_manifest with the
note and the Vouch. endowed_image in crates/system_initializer/src/image_request.rs does this.
The table is not the main source of the crate's churn. Over the 30 days before this branch, 148
non-merge commits touched crates/grant_plan. Of those, 36 touched program.rs or program/, 55
touched spawnproto.rs and 43 touched lib.rs. About a third of the 36 add or change a program.
What the maintainer believed, checked
Each belief the brief carried, against the code.
- Two paths endow a child. Correct. One refinement: the
Vouchthe progenitor builds carries only the network grant (vouchedcallsinstalled_programs::network_granted), and zones come separately throughgranted_zones.installed_programs::Grantedhas five kinds (Network,Zone,Service,Directory,Installer), but the spawn path reads only the first two. The service has no start yet (milestone 910 (a package declares a service) is not started), and the directory kind has no asking manifest yet. - What
image_can_carryrefuses. Correct, with two corrections of wording. No field says "supervised job" or "second stream": the first isinterruptible, the second isOutputDeclaration::BytesAndDiagnostics. And the function also refuses every owner-granted field (reboot,sync,installer,catalog,indexes, the activation directory, console input). Beyondimage_can_carry, the frames path has transport limits of its own: an image runs only on a plain line (no pipe, no redirection), and the progenitor refuses a held image. Andendowed_imagerefuses installed bytes with aVERBSnote. So no package can installrmorwctoday. Nor can one installmdr(an input) or the eight tools that declare a second stream: the frames path blocks 11 of the 14 tools. rebootandsyncbelong to one program, and no image may hold them. Correct of the code: the note encoder refuses them at compile time andimage_can_carryat spawn, and the same two refusals keepjig's five owner's-console fields off every image. The ruling of 2026-11-02 makes each an owner's grant; the code does not follow yet.- About 28 rows. Exactly 28, ids 0 to 27, no hole.
Program::manifesthas 27 arms becauseNullSystemCall | SinkProducershare one, and 26 manifest functions serve them. The wire-id pin covers ids 0 to 12 only. Fixtures sit in the table because it is the only way to make a program spawnable by bare name on a boot with no disk. With a disk a fixture could run by path, but most declare grants the frames path cannot carry. Program::resolver_zoneandProgram::verbskey on the row. Correct. Each answers something only forjig. AVERBSnote type exists (capability_manifest_note::encode_verbs), and nothing on the installed path reads it.- The leaf crate waits on a ruling. Correct; the design works with and without it.
Findings the brief did not carry:
- The timetable is a fourth spawner.
components/src/timetable.rsbuilds jobs from its own archive bye.program.name()and endowsregistered.program.manifest(); in store mode it already reads installed programs' notes. pmap,disk_surveyoranddisk_partitionership in packages and have no row, so package membership and a row are already independent.mdr/Cargo.tomllinks neithergrant_plannor the note crate. A note formdrcosts its package a new edge to the planner unless the leaf crate exists.- Milestone 990 (the base image's first installed-programs table) already writes a vouch row for every program a composed image carries.
The end state recommended
Each program declares its own grants in its own note. The vouch decides what a note earns, and the
owner's grant lines decide what installed bytes earn beyond it. Nothing in nife keys on a
program's name. The end state appendix has the
details.
- Each program's source holds its manifest and carries it as a note,
reboot,jigandgraphical_terminalincluded. 26 of the 28 rows already encode (every_compiled_in_manifest_round_trips); the other two need theOWNER_GRANTSnote type. - The vouch: the measured archive for the image's own programs, the live installed-programs
table for the rest. Every owner-granted field needs a
grantline for the program's digest; the composition writes the image's own lines from the base approval file, which lists every grant the image makes.Vouch::Vouchedgrows from{ network }to a set of owner-granted kinds, andimage_manifestrefuses a declared kind without its grant, naming it, as it does for the network today. - The owner's
grantlines gain one kind per owner-granted field:reboot,sync,installer within <approval>,catalog,indexes rorrw,activation r,console, anddisplay. The root zone already has one (zone .). The verb table needs none: theVERBSnote narrows within what the owner granted. Each line binds to a digest, and a new version asks again unless an approval entry'supdatecovers it. grant_plankeeps the planner,spawnproto,Manifest,Vouchand the list of owner-granted fields. NoProgram, no pinned table and no role list remain.- The progenitor publishes a base list page from the archive's notes, and the shell plans from it and asks for an archive program by name. Every wire id becomes a hole.
- A typed word finds a program as it does today, and §229 (a bare name reaches an installed program) stands: a bare word the image carries runs the image's program. A replacement runs under its own name or by path, and its grants follow its digest, not its name. The command-name appendix has it.
The grants differ in danger. The security
appendix reads each one's behavior with two holders
from the code and sorts them into three classes. reboot, sync, the catalog, the activation
directory and zones are shareable. Console input and the display session are exclusive: one
foreground holder at the owner's console. The installer and the index store's write right are
console class, because a holder of either can turn one yes into every grant. An installed holder
gets them only in §270 (a package manager holds an installer endpoint, not the spawn endpoint)'s
delegated form, bounded by an approval. The built-ins stay the default and the fallback: no install
takes the archive's grants away, and rollback or removal drops a replacement's grants with its rows.
Why this shape and not the others. A registry in the installed-programs table would copy each note
outside the bytes the vouch covers, which §197 (a package is one archive file) chose against. A
table generated at build time would still change for every program, and nife would build each
departed package to read its notes. A pinned table for reboot and jig no longer has a reason:
the ruling binds no grant to a name. And while a row in nife holds ps's manifest, a ps release
that needs a new grant needs a nife commit, which is the coupling §316 (a program package leaves
as one repository) means to end.
The trade-offs, plainly. It adds a note type, a page format and a wire bit, all one-way. It moves the decision about what a base tool may hold from nife's code review to the image's approval file. It lets an owner hand a reviewed-by-nobody program the power to restart the machine, which is the ruling's intent and the reason for the confirmation in the security appendix.
The migration, one line per step
The migration appendix gives each step's tests, the wire-id rules and what changed from the first plan.
- Every row's program except the three owner-granted ones and
mdrcarries a note copied from its row; all 28 ids pinned. No ruling. - The
Endowmentcarries its manifest. No ruling. - The frames path carries a second stream and redirection. No ruling.
- A note type of its own,
OWNER_GRANTS, spells the owner-granted fields;image_can_carrystill refuses them (ruled as decision 1). - The grant lines, the
OwnerGrantsvouch and the confirmation; the blanket refusals go in the same pull request; the console class stays delegated (ruled as decision 2). - The display session keys on
Manifest::displayand allows one session. - The installed path reads the
VERBSnote. reboot,jigandgraphical_terminalcarry their own notes.- The progenitor publishes the base list (ruled as decision 3).
- Archive programs spawn by name, with grants from generation 1's lines; the image's names are the measured archive's (ruled as decision 7).
- The rows leave, one package per pull request; the last deletes
Program. - The leaf crate, if ruled.
The pinned table keyed by name, and the wire ids it would have kept, are no longer steps. Every step except the leaf crate has its ruling.
The decisions, in order
The decisions appendix gives each one with its background, alternatives and example. The ruling dissolved the question of the screen and keyboard.
- Ruled 2026-11-02 (UTC): the owner-granted asks travel in their own note type,
OWNER_GRANTS. - Ruled 2026-11-02 (UTC): three classes, with the installer and the index store's write right bounded by an approval for installed bytes, and none of the sensitive grants for a recorded service.
- Ruled 2026-11-02 (UTC): every program carries its own grant record, and nothing central remains.
- Ruled 2026-11-02 (UTC): the base approval file lists every grant the image makes to its own programs, and nothing comes from the archive implicitly.
- Ruled 2026-11-02 (UTC): a repository key's ceiling never covers an owner-granted kind.
- Ruled 2026-11-02 (UTC): no override. A bare word the image carries runs the image's program, and an installed program runs under its own name or by path.
- Ruled 2026-11-02 (UTC): "a name the image carries" means a name in the measured archive, with §229 (a bare name reaches an installed program)'s refusals unchanged.
- Decided by the maintainer, provisional: every new name ships provisional and meets its own name review. Reversing costs one pull request.
The leaf crate stays the separate decision already before the architect.
BUGS
Each of these holds today and matters only once installed bytes may hold the grant; the migration step named fixes it.
- Console input has no badge check:
SpawnLoop::console_inputplaces stdin for anystdjob that declares it, where the installer checksreq.badge == 0. Safe today because onlyjigdeclares it. Step 5. - Nothing keeps the display session to one holder.
Request::graphicalstartsgpu_driveron the lent capabilities with no live-session flag; only the shell's wait prevents a second. Step 6. - The index store has no lock, and the progenitor installs on its copy's word (milestone 801 (packages over the internet), ruling I2). Two writers race. Step 5 gives each manager its own copy.
- The progenitor believes a holder's
answered consoletrailer and writes every ask as granted (activation.rs,program_asks::asked_grants). The owner's yes lives only injig's prompt. Step 5 refuses that trailer from an installed holder. - The manager column records the holder's program name (
hold_reply(label, reply, p.name())), andcan_editcompares names. An installed manager needs an identity that is not a program name; its package name is the obvious one. Step 5. - Nothing settles the bench rows' class: milestone 961 (the kernel's special boots become commands typed at the production shell) runs them at a production shell, and the release image excludes the package that holds them.
pmapships in every image and nothing can spawn it, as the BUGS of §158 (the shell's table is one macro) records. Under the end state it needs only a note and a script line; this proposal does not schedule that.
Index row
How crates/grant_plan stops holding the shell's program table, under the ruling that no grant
binds to a program's name. Each program declares its own grants in its own note; the archive
vouches for the image's programs, and the owner's grant lines give installed bytes any
capability, reboot and the installer included, sorted into three classes by danger. A
replacement runs under its own name. Twelve steps get there, each keeping main shippable.