Issue #1437: The package registry records each version’s permissions, refuses more of them outside a major version, and runs foreign tests in a sandbox made from them (ADR-registry-1)

Open and answer this issue on GitHub.

tools, spec, ready, future · opened 2026-11-08 · updated 2026-11-08 · 0 comments

Part of #1432. Decided by the owner (2026-11-08). Item 1 is ADR text in ADR-registry-1 (status Open); the build goes with the registry itself and needs #1434.

Done when

ADR-registry-1 carries a decision covering the points below, and the registry’s tools (nikaia registry check, the resolver, nikaia update, the package pages) do what it says.

Decided

  1. More permissions are a breaking change. ADR-registry-1 D8 already refuses a patch or minor version that changes touches so that a caller who believed the old one is wrong; it reads touches as ordering. For permissions: a version that needs more (newly net, file(anywhere), native, the ability to measure time) is breaking, since a consumer’s grant does not allow it, and so comes only in a major version. Fewer permissions are always compatible.
  2. The index records the derived set per version: the permission kinds, “can measure time”, “deterministic” (#1435). The package page (D13) shows it, and search filters on it (“parsers that reach nothing”).
  3. The resolver respects grants. A consumer’s permissions for a dependency is a constraint in the SAT problem (D6): a version that needs more is excluded, never taken silently. The explanation says so: “json 1.4 needs net; this project grants it nothing.” nikaia update (D7) names a changed permission beside throws, pausing and locks.
  4. The registry shows, the local compiler enforces. The index entry serves search and resolution, never safety: the local compiler derives the set again from the sources (ADR-100; this is why ADR-registry-1 keeps the sources). Whoever takes over the CI or the index can make a page lie but cannot gain a permission. The same stance as D11’s mirrors: not trusted, checked.
  5. Foreign tests run in a sandbox made from the derived set. D3 runs a package’s tests in the registry’s CI. The set their functions reach becomes the CI run’s sandbox (no network where they reach no net, the file system limited to their roots), on Linux through Landlock/seccomp. This is where the run-time backstop of #1432 is required, not optional.
  6. A version that first needs native gets a human review, as a first registration does (D5).

To build

  1. ADR text: a new decision in ADR-registry-1 with points 1-6.
  2. In nikaia registry check: the derived set into the entry; the semver check of point 1. Test: a minor version that adds net is refused.
  3. In the resolver: grants as constraints, and the explanation. Test: two versions, the newer one needing net, a consumer granting nothing → the older one is chosen, and with only the newer one the explanation above is printed.
  4. In nikaia update: the changed permissions in the diff.
  5. In the CI workflow: the sandbox from the derived set (point 5); the review flag for a first native (point 6).
  6. In the page generator (D13): the set on the page and as a search filter.

Files and limits

docs/specification/adr/adr-registry-1.md, the registry tools as ADR-registry-1 names them (all tools/*.nika). Not changed: the archive format or the hash (D4).

Back to Open Issues