roadmap BUILT

1081. capability_table: what an outside maintainer would fix before it leaves

Raised by a read-only outside review of crates/capability_table, met as a stranger to this tree would meet it on the day it becomes nifeos/<crate>. The review changed nothing; it lists what the move lane and the lanes after it change.

The crate's review package is notes/crate-reviews/capability-table.md, indexed in notes/crate-reviews.md. This review treats as settled whatever a ruling in the tree already covers. That is the crate name as ratified against caps and cap_space (reopened below for one reason only, item D1, ruled capability_table), CapabilityTable as the exported type and MAXIMUM_SLOTS as ratified. It also covers the five right bits and their positions (the system call wire format, pinned by abi::rights and asserted equal in kernel/src/capability_object.rs), the set-means-free word, the 64-slot ceiling and the publishing hold. Where a later rule contradicts an earlier ruling, the item says so.

The kernel is the crate's only consumer (kernel/Cargo.toml line 52; no other manifest in the tree depends on it). Milestone 1034 (a runbook for moving a crate out of nife) owns the move itself; this block owns the findings that should land inside that path, and the two findings against the move tool that the lane will hit first.

Reuse: script/crate-move, the template partsfoundry/crate-workflows at its newest release and at head, helpers/falsify.py, helpers/standalone.py, the template's naming helpers, cargo-mutants' recorded rows, Kani, and the crate's own harness builder (any_small_capability_table). No new tool.

Finding status

The crate lives in partsfoundry/capability_table, which the kernel pins. Each line states what that repository's main and nife's show.

Open decisions

None. The clearance below has its ruling.

Clear the review, which creates partsfoundry/capability_table

Ruled 2026-11-21 (UTC), option A. The crate moves to partsfoundry/capability_table with publish = false, no tag and no publish. It carries the table, the rights algebra and Capability::delegate. Reap, reap_decision and survey_includes, with their Kani harnesses and falsification patches, stay in nife, wired into script/verify and script/falsifications, with no change of behavior.

Background: a crate that leaves nife gets a review package under notes/crate-reviews/, which an architect reads; clearing it is the go to create the crate's repository and move the crate there. The package for this crate is notes/crate-reviews/capability-table.md. The crate's only consumer is the kernel, which then depends on it at a pinned revision.

Recommendation: A.

Door: one-way. The template's workflows and nife's pin act on a repository and a moved crate from the first day; moving back is a second move.

Prior art (recalled, not read): the Rust project moved libc out of the compiler's tree into a repository of its own, and the compiler consumes it back by version. Where nife differs: a review package checks that the crate stands alone before it leaves, not after. Example: jh7110_entropy, whose review the architect cleared on 2026-11-01 (UTC), lives in partsfoundry/jh7110_entropy, and nife depends on it at a pinned revision.

What it blocks: the move, and so the first tag and the first publish.

Goal

A stranger who clones the crate's repository can tell in one screen what it is for, and can build, test, prove and falsify it from the README alone. The property the README leads with (a capability passed on never carries more than its source held) holds by proof on the code the kernel runs, not on a neighbor of it. The repository's gates are green for the crate's own reasons on its first pull request.

What was checked, and how

The tools run, the sources read and what was not run are in the appendix.

Prior art

The comparison with nearby work is in the appendix.

The items

Effort: XS is under an hour for a lane, S is half a day, M is a day or two. A door is one-way when somebody outside the repository acts on it after the move or the release (a repository name, a published name, a published behavior, a layout, a license); everything else is two-way and the maintainer decides it. A name proposed below is provisional unless a ruling under Decisions for the architect ratifies it.

P0: blocks the move

The P0 items are in the appendix.

P1: before the first green pull request in the new repository

The P1 items are in the appendix.

P2: later

The P2 items are in the appendix.

Decisions for the architect

D1 and D2 have their rulings. Everything else above is two-way until the first release, and the maintainer decides it, provisionally. The review clearance that creates the repository is under Open decisions.

D1. The crate's name is capability_table

Ruled 2026-11-16 (UTC), option A. The crate carries the name capability_table from before the move. The name capability belongs on crates.io to an unrelated published crate (a skill-tree library for games, version 0.1.0, about 520 downloads all time, last updated more than a year before this review). A repository named nifeos/capability could never publish under its own name. A rename after the move would be a second move: a new repository, a new pin, and a dead name in every record between.

The name is free on crates.io, it names the thing the crate is (a table of capabilities with their rights), it reads at the use site (capability_table::CapabilityTable, capability_table::Rights), and it keeps capability as the word the type names carry. The earlier refusal of cap_space was that it named one of five exports and stuttered; capability_table names the central export, and the stutter is the one slotmap::SlotMap, slab::Slab and generational_table::Table all accept. The review refuses a nife_ prefix, because a crate that leaves does not mention nife. It also refuses capability as a repository name that can never publish, because that name closes the door ยง151 (the goal of the repository split is independent release) opens. There is no #[doc(alias = "capability")] on the crate: no old nife name carries an alias before the first release.

Prior art. Fuchsia publishes its handle and rights types as fuchsia-zircon, a name for the system and not for "handle". seL4's term is CSpace, which this review already refused. The Rust crates for a slot structure take the structure's name (slab, slotmap, thunderdome, generational_table). Rust's convention for a taken name is a qualifier, not a prefix (cap-std, cap-primitives).

Concrete example. The kernel's line is capability_table = { version = "0.1.0", git = "https://github.com/partsfoundry/capability_table", rev = "<tag commit>" } once the repository exists, and the two kernel files that name the crate (kernel/src/capability_object.rs and kernel/src/sched/region_reaping.rs, 17 lines) say capability_table::; capability_object.rs keeps its alias pub(crate) type CapabilityTable = capability_table::CapabilityTable<Object, CAPABILITY_TABLE_SLOTS>.

Door: one-way (a repository name and a published crate name), and the ruling closes it.

D2. The five names stand as built

Ruled 2026-11-19 (UTC), option A. Capability::delegate, Error::GrantRequired, Error::SlotOccupied, CapabilityTable::capacity and CapabilityTable::iter stand as built. Capability::delegate makes a copy of a capability with fewer rights and refuses without the GRANT right (Error::GrantRequired) or when the copy would hold a right the source lacks. The kernel calls that one method, so the proof covers the code the kernel runs. capacity is the number of slots, as in std's Vec::capacity, and len stays out because in std it counts the elements held. iter walks the occupied slots. Error::SlotOccupied answers an insert at a slot already in use, apart from a full table. The ruling refuses derive as a rename of delegate and adds no len. The first publish turns each name into a promise, and this ruling is the clearance for that promise.

Door: one-way at the first publish.

Done when

The checks are in the appendix.

Follow-on

BUGS

Index row

An outside review of capability_table before it leaves. Two items block the move (a manifest that leans on the workspace and a README that does not exist; text that cites nife on 69 lines). Five land before the first green pull request. Three are the proved derive, which is not the delegation the kernel runs, a 32-bit slot truncation, and len that means capacity. The other two are two defects in the move tool that corrupt all fourteen patches and skip the manifest step, and two mutators outside every harness. Nine items are for later. The crate is named capability_table, because another crate already holds the name capability on crates.io.