roadmap BUILT

205. How a foreign program is told what to do

§170 (how a foreign program is told what to do), the decision this block depends on, was decided by calef on 2026-09-26, with two rulings of 2026-09-27 (UTC) recorded below: "N1" and "no mark". The argument page's layout is still his, built provisionally and proposed.

In brief. Unmodified ripgrep ran on nife and stopped at argument parsing, because the native ABI had no argument vector and std::env::args() compiled std's unsupported backend and yielded nothing. The argv is now built, so a stranger's program hears its line. What it may reach with those words is the half still to build. Everything milestone 121 (ripgrep on nife) still owes is behind that half: the confined rg, the loud ENUMERATE refusal, and the walk benchmark.

What the ruling asks this milestone to build

§170 has the ruling in full. In short:

  1. An argv of plain bytes in one page, carrying no authority. The transport was priced at about 50 lines and no new system call in notes/foreign-program-arguments.md (#1314), which also holds the layout this milestone proposes.
  2. A word that resolves to an existing file is granted that file as the program's manifest declares: read-only, read-write, or the file's directory. The manifest travels in the ELF (§197 (a package is one archive file), M2), which is the proposal design/roadmap/proposals/a-program-carries-its-manifest-in-an-elf-note.md.
  3. A manifest may declare "may create the named path" for a word that does not yet resolve.
  4. An unvouched program gets every named file read-only. Read-write and create each need a mark on the word, spelled provisionally here.
  5. The directories granted on the line bound everything else.

What is built (2026-09-26, lane milestone/205-foreign-program-arguments)

Clause 1, the transport, on all three architectures. A std program run from the prompt hears the line's words through std::env::args(), and nothing it hears is authority.

Proven by script/swish-check on every architecture. std_exerciser one 'two words' prints args ["std_exerciser", "one", "two words"]. std_exerciser redirected > args.txt takes the pipeline path, and wc counts what it wrote. std_exerciser *.rs is refused with nothing spawned. caps std_exerciser shows cap 8 frame args. Host tests in argument_protocol show that every byte round-trips and that no damage to the header or a length yields a partial argv. grant_plan's tests show that every word arrives unclassified, past the sixteen tokens parse_run keeps.

A std program run by path hears its words too (lane milestone/205-args-by-path). The shell reads the program's manifest note, and when it declares ArgSpec::Words sends the line as the argv. The note also has to declare the std runtime; grant_plan::image_can_carry ties the two. The progenitor sizes the image's region from the argv bit, because the region is split before the frames carrying the note arrive, and then checks that the note agrees. Bytes nobody vouched for get UNVOUCHED_STD_MANIFEST: §219 (how the shell names an installed program to the spawner)'s clock and configuration pages at the std slots, and the words, which carry no authority. Proven by installed/std-echo one 'two words' on every architecture, which prints words ["installed/std-echo", "one", "two words"]. std_echo is a second, small binary in the std_exerciser workspace, with a provisional name.

What is built (2026-09-27, lane milestone/205-designation)

Clauses 2 to 5: a word that names something here is granted it. calef ruled two questions first.

How it works:

Proven by script/swish-check with std_grep, a small std program that searches like rg and runs from the disk unvouched. In a directory holding docs/n.txt, std_grep needle docs prints docs/n.txt:find the needle here. std_grep needle prints std_grep: .: no directory was granted to search. caps previews the grant as docs only, read-only. Host tests cover designation, the planner's grant and the note's round trip.

What stays open

Provisional names

argument_protocol, ArgSpec::Words, argv, check_words, ARGS_BIT, ARGS_SLOT, ARGS_PAGE, the magic nifeargv, Refusal::PatternInArguments, Refusal::ArgumentsTooLong, image_hears_words, UNVOUCHED_STD_MANIFEST, std_echo, installed/std-echo, WordGrant, Designation, designation, each_word, NAMESET_BIT, std_grep and installed/std-grep.

BUGS

Follow-on

Index row

Minted from milestone 121's lane. §170 ruled on 2026-09-26: a byte argv in one page, and authority from the manifest and the line's directories. The argv is built: a std program at the prompt hears its line through std::env::args(), in a pipeline too. A word that names something in the shell's directory is granted it, read-only for bytes nobody vouched for; a line naming nothing grants nothing (N1), and there is no mark (calef, 2026-09-27).