notes

What caps prints, and why each row is there

An appendix to a shell at EL0. crates/swish/src/preview.rs renders caps <command> and caps <path>, and its doc comments link here for the reason behind each row. The stem caps-preview is a provisional name.

The preview exists so that the line a person typed, plus the table under it, is the child's complete authority. Every row below follows from that. Nothing in the preview moves any authority, which is why it is reachable from a host test at all. The sentences a person reads before deciding to run something are checked without an emulator, and without a shell that holds anything.

A whole line, not a stage at a time

caps <command> takes a whole line, operators included (milestone 50 (pipes and redirection)). What a pipeline grants is not the sum of what its stages grant read one at a time, because which slot holds what depends on where the stage is. Previewing the line the person would run is the only preview worth having.

caps time <command> previews the command, because that is what would run. time moves no authority to it: the shell times with its own clock and the child gets the endowment the tail names. A preview that stopped at the prefix word would answer "this is not an invocation" about a line that is one. Nested prefixes are walked in a loop rather than by recursion. caps time time time date is a line a person can type, the function's frame carries a whole split Line by value, and recursion on a shell stack is a bug waiting for a long line (notes/pipes.md has two).

A stage's rows are narrowed by the line's verb (milestone 809 (the package client becomes a program), option V2). caps jig list shows what jig list would hold, which is what the progenitor endows, reading the same word off the argv.

caps <path>: what a file's bytes would be granted, and on whose word

This is §219 (how the shell names an installed program to the spawner), option D and gate D2, and milestone 198 (a package manager)'s rung 3a. The manifest a file carries in its note is milestone 597 (a program carries its manifest in an ELF note).

The shell computes every input from the bytes it read and the installed-programs table it can read. The digest is the file's SHA-256 in its text form, sha256:<hex>. The vouch is the live generation that lists that digest, and whether its entry is the owner's own vouch (§221 (the boot prompt is the owner's console)). The rows are the endowment the progenitor would build, decided by the same program_table::image_manifest it calls. A vouched file gets its own manifest, or NO_NOTE_MANIFEST's when it carries none. Unvouched bytes get UNVOUCHED_MANIFEST's three slots, or a refusal.

What the note asks is printed beside what is granted, because for unvouched bytes the two differ, and that difference is §219's rule made visible. An unvouched std image is previewed from its manifest too (milestone 205 (how a foreign program is told what to do)). Its two pages sit at the std layout's slots and its words at slot 8, so the native rows would name slots it does not get.

It is a preview, and it says so where it could be wrong. The progenitor hashes its own copy when the line runs, so a file changed in between is judged on what arrives then.

write_image_capabilities takes eight arguments. Each is one fact the caller already holds, and a struct used nowhere else would be more to read, not less.

The rows, in the order they print

A std program's slots are fixed by its runtime, not by the order they are listed in (milestone 595 (the shell runs a std program), crates/std_runtime_contract). The same grants land somewhere else, and slot 0 is not even the same kind of object. A preview that printed the native positions for one would describe a child the progenitor does not build.

Every row is printed from the manifest the progenitor endows from, m, never from the row's program.manifest(). For an image run from a file, the row is the placeholder program_table::IMAGE_ROW and m is what its note declared. Reading the placeholder under-reported a packaged free as holding neither machine row (the 2026-10-03 security audit's follow-up, item (d)).

How the tests hold it

crates/swish/src/preview/tests.rs sweeps the whole program table where a row depends on the manifest. the_arg_line_follows_the_manifest_for_every_program types, for each program, a line that supplies every operand its manifest asks for. That is a --mem at the declared minimum and a file name for a declared input or file, so a manifest shape nothing has used yet is still previewed.

The counts are gates on purpose. Exactly three programs declare entropy: uuid, std_exerciser (whose two draws from std::random::SystemRng must differ) and jig, whose TLS handshake draws its key share and nonces. Only jig's verbs that reach the index hold it (update, install), by grant_contract::verbs. A std program that does not declare entropy still runs: its SystemRng panics rather than inventing bytes, and its HashMap seeds best-effort. Exactly two reach the network: network_echo_client and jig, which fetches packages itself so the progenitor parses no network input. Only jig resolves names (calef's Q5 on #1884). A new program declaring any of these is a decision, and the count is where it has to be made.