notes

The shell: what the program holds, and its known gaps

An appendix to notes/shell.md, which is the page to read. It holds design detail from components/src/swish/ that the code's comments link here rather than carry.

Granting only from what it holds

The shell grants nothing it does not hold. prog --mem N splits N pages from its own budget at slot 3. A bare name in a file position resolves only if the shell was granted a directory (DIR_TERMINAL). There is no run verb and no file: prefix. A bare name spawns, and the manifest declares which direction a file token goes (grant-expression.md).

caps prints the shell's whole endowment. caps <command> previews exactly what a command would get. That includes the one authority no token designates: a clock its manifest declares, as date's does.

Walking a path across two trees

This is the one-tree presentation of milestone 154 (a process that holds two directory capabilities), in one place. A path is resolved as a path before anything is opened. It is then opened one OPENDIR at a time from the root of the tree that serves it. So .. from a mount point is its parent in the first tree, because that is what the path says. A path through the mount point is opened on the second tree's endpoint and no other.

A bound name misdirects a path but cannot manufacture a boundary. .. past it is the same arithmetic a direct walk would do. A position inside a mounted tree is never deeper than the path it came from, so the walk's fixed capacity is never at risk.

The known gaps, at length

The code keeps one line per entry in its BUGS sections. The longer account: