roadmap BUILT

154. A process that holds two directory capabilities

Built 2026-09-26 (PR #1346), for the mechanism. Minted 2026-08-23, proposed independently by two milestones that converge on the same gap: milestone 47's bind ("It is blocked on a second grant") and milestone 64's File::open fork ("tier two, anything that traverses, needs a namespace to resolve against, and that is 47's unbuilt half"). Built 2026-08-23: one process holding and resolving against two directory capabilities, on the real wire. §126 (a real, single, moving cwd), in design/decisions, decided 2026-08-25 that the holder has one real, moving position. Built 2026-09-26: the real shell and its grant planner across two trees, presented as calef ruled that day, "one tree with other trees mounted at names in it" ("The shell across two trees" below).

Not wired into the boot shell, on calef's instruction: that lands with the first real second filesystem, and it is 0660-a-second-filesystem-mounts-in-the-boot-shell.md.

The gap, in both milestones' own words

47: "A shell holds one directory capability, so a namespace assembled from what it holds has exactly one member and every bind is an alias inside one tree. The interesting case, and the only one that pays for the mechanism, is a union of two grants... Nothing in this system grants a second directory capability to one process. fs_service::start_granted_dir starts one caretaker and hands one endpoint; a second means a second caretaker, a second slot, and a spawn-protocol position to say which is which."

64: "Tier two, anything that traverses, needs a namespace to resolve against, and that is 47's unbuilt half. Path::new("assets").join("x.png"), an absolute path, or a program wanting two directories all land here."

The deliverable

Both milestones already name it identically: one process, two subtrees, /a/x and /b/y both resolving, /a/../b refused, and neither caretaker able to see the other's tree. Concretely:

What it unblocks

What this does not decide

The spawn-protocol encoding for "which directory is which" is a real wire-format question (two programs, the shell and init, must agree), in the same category 47's environment-variable section already prices as reversible-but-real. Left to whoever builds this, following the existing DIR_BIT/GRANT_WORDS precedent rather than inventing a new shape.

What was built

Two second-level pieces, host-tested and guest-tested rather than left as design:

What is now decided, and what is still open

Kept as the 2026-08-25 record. Its labeled presentation (/a/..., /b/..., two labeled caps rows) was replaced on 2026-09-26 by calef's one-tree ruling; see "The shell across two trees".

DECISIONS §126 closed an ambiguity in the first bullet below. A two-grant shell gets a real, single, moving cwd. State (which, pos) in place of one-grant Holdings' bare Cwd, a bare relative name resolves against pos inside whichever tree which currently names, an absolute /a/...//b/... path both resolves and moves between trees. .. at either tree's own root refuses exactly the way one-grant Cwd::apply already refuses at its own root today. That is a real, single answer, not a per-caller choice, and it does not answer 47's four open questions (unions and shadowing across more than two labeled sources, enumeration, the compile-time-set-to-runtime-lookup gap, whether $PATH survives as a string). Those stay exactly as open as they were, since this decision only ever concerned two disjoint, individually-labeled trees with one position at a time.

The shell across two trees, built 2026-09-26

Lane milestone/154-two-directories. The detail is notes/two-trees.md (provisional name).

Follow-on

Index row

Milestones 47 (bind) and 64 (tier-two File::open) independently named the same missing primitive: nothing granted a second directory capability to one process. BUILT 2026-09-26: one process holding two trees, and the real shell presenting them as one tree with the second mounted in it, per calef's ruling. The boot shell gets a second tree with the first real second filesystem.