nikaia.toml, for each dependency too, and the build refuses what reaches beyond themOpen and answer this issue on GitHub.
tools, compiler, blocked, future, safety · opened 2026-11-08 · updated 2026-11-22 · 0 comments
Part of #1432. Blocked on #1433 (the vocabulary and the derivation). Decided by the owner (2026-11-08); the ADR is item 1.
A build whose program, or one of whose dependencies, reaches a permission kind its manifest does not grant fails, naming the call chain to the std entry and the line to add to nikaia.toml; a dependency without a grant reaches nothing; and every function value, trait call, dsl run and extern call the compiler cannot resolve counts as everything.
[permissions] # what the program may reach
grant = ["file(Dir('config')) read", "net connect", "stdout write"]
[dependencies.json]
path = "../json"
permissions = [] # json may reach nothing
[dependencies.http]
version = "1.2"
permissions = ["net"]
permissions.permissions key may reach nothing (fail closed). So that this is not a burden, nikaia add writes the set the compiler derived, and the refusal names the line to add (#1432 decision 8; WASI’s lesson: when granting is laborious, people grant --dir /).native and process are granted only by name, never through a wider word.file(anywhere) covers every root.code key, ADR-351 D8, resolves what it can); a lambda passed to a higher-order call (its touches is added at the call, never left out: docs/history/from-for-throws-and-touches.md §4-5); a call through a trait bound; a dsl block’s run function; an extern call; process::spawn. Each one is a .nika test whose report shows the expected set. A gap found is fixed as its own commit.[permissions] and permissions: an unknown kind or mode fails the build, naming the known ones.main reaches against grant; per dependency, the union over what its pub functions reach against its permissions. The refusal takes a new NK code, reserved by the supervisor, with the message, the call chain and the line to add (Appendix C). Tests: a program that writes a file it did not grant; a dependency that opens a socket with permissions = []; a dependency with no key at all.nikaia add writes the derived grant for the dependency it adds; nikaia permissions --write writes the program’s own. Output test.--locked fails on it, as for any contract change.The manifest reader, touch.nika, the tool behind nikaia add, a new diagnostic. No change to what touches orders. A program without a [permissions] table: decided in the ADR whether it means “everything” (as today) or is refused; recommendation for the ADR: everything for the program itself, fail closed for dependencies, so existing programs keep building.