Issue #1433: Permissions, first part: the ADR with the permission kinds, the fs::Root rule, dsl and the trust base

Open 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.

Done when

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.

What is there today

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).

The vocabulary (decided)

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.

The fs::Root rule (decided)

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.

To build

  1. The ADR (working name ADR-permissions-1, the first part): the five groups of #1432 decision 1, the table above, the fs::Root rule, dsl, and the trust base: the compiler, std’s run time and the hand-written std.contracts.

Files and limits

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.

Ruled out

Split (2026-11-21)

Comments

keywan-ghadami, 2026-11-21

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:


Generated by Claude Code

Back to Open Issues