fs::Root rule, dsl and the trust baseOpen and answer this issue on GitHub.
tools, compiler, ready, future · opened 2026-11-08 · updated 2026-11-21 · 1 comment
Part of #1432. Decided by the owner (2026-11-08); the ADR is item 1.
The ADR (working name ADR-permissions-1) is in docs/specification/adr/ and holds the five groups of #1432 decision 1, the vocabulary table below, the fs::Root rule, dsl and the trust base; that commit carries Fixes #1433, and the report has a Found: line per finding.
touches (Part III 13.5) is derived for every function (crates/nikaia-std/src/tools/touch.nika). In std.contracts only file, socket, stdout, stderr, args and lock have kinds. env::var, env::temp_dir, time::now, time::since_epoch, time::Instant::elapsed, process::run, process::spawn and process::exit have no touches and so count as “everything” (checked 2026-11-08).
| kind | modes | notes |
|---|---|---|
file(root) |
read / write | root is Dir(…) with a literal, a parameter, scratch or anywhere (below) |
net (today socket) |
connect / listen | |
stdin, stdout, stderr |
read / write | |
args, env |
read | env can hold secrets |
clock(wall), clock(mono) |
read | two kinds, no precision setting (#1432 decision 6) |
random |
read | |
system |
read | facts about the machine: working directory, host name, process id, task::cores, env::temp_dir |
exit |
write | the exit status is an output |
process |
— | spawn: counts as everything |
native |
— | extern, a Rust crate, handing text to a foreign interpreter: counts as everything |
lock stays an ordering fact for touches, not a permission; the report leaves it out.
fs::Root rule (decided)fs::Root::Dir("site") with a literal reaches file(Dir("site")).fs::Root::Anywhere, Dir("/") or Dir( a computed path ) reaches file(anywhere), the whole file system (the sites --trust lists today).Root taken as a parameter is recorded as file(root), and the caller fills it in, as file(path) is filled in today. The function gets no file system authority of its own.fs::scratch() reaches file(scratch): a fresh, empty directory of its own.dsl (decided)A grammar’s run at build time reaches nothing (Part II 10.2, NK1152). A grammar run while the program runs and the function that runs a block (execute, exec) are derived as any function. Only where that function hands the text to foreign code is it native.
fs::Root rule, dsl, and the trust base: the compiler, std’s run time and the hand-written std.contracts.docs/specification/adr/ for the ADR. The other files of the original list moved with their items (below). Not changed: what touches orders (ADR-292); the report adds no refusal (that is the manifest’s issue). The new kinds must not reorder any statement that is ordered today.
nikaia permissions shows what main and each dependency reach, with one call chain per kind (was item 7)std entry that reaches the outside names its permission kind in std.contracts (were items 3 and 2)fs::Root, and a Root parameter is filled in by the caller (was item 4)std’s run time refuses a name that leaves its fs::Root::Dir through a symlink race (was item 5)dsl block reaches nothing by itself in the permission derivation, and native only through foreign code (was item 6)Split into run-sized parts (2026-11-21). Nothing of the list was found built: no ADR on permissions in docs/specification/adr/, no nikaia permissions tool, std.contracts still writes only file, socket, stdout, stderr, args and lock (635 entries with touches = []), and crates/nikaia-std/src/fs.rs still canonicalises a name under Dir before opening it.
This issue keeps item 1, the ADR. The rest, in build order:
nikaia permissions, after this ADR);std.contracts, after #2563);fs::Root rule in touch.nika, after #2565);Dir, no dependency);dsl, after #2563).Generated by Claude Code