roadmap NOT-STARTED

1017. The contract crates leave in this order

Raised 2026-11-01 (UTC) by the lane lane/contract-crates-move-order. It answers in what order the 22 crates the first cut's programs link could leave this repository, and what policy makes breaking change safe across repositories. It moves no crate and changes no code. Every new name below is provisional.

Reuse: cargo metadata, git's rename detection, milestone 610's series, milestone 956's constants, the crate template and basalt's gate.

Two directions from the architect, both dated 2026-11-01 (UTC), frame it:

The second direction inverts the order of 2026-10-04 in milestone 756 (process-tools, core-tools and disk-tools are the first code to leave this repository). Programs first and the SDK last maximizes references back: each program repository would pin nife.

Appendices: measurements, prior art and questions for the architect.

What the measurements say

Measured at nifeos/nife@a8b7524d7 with one script, reproduced in the measurements appendix.

What a crate references in nife that blocks its move

All 22 inherit license and lints from nife's workspace manifest; each move writes them as literals, as jh7110_entropy did. system_tests is a dev-dependency of 17 of them; that edge points from nife to the crate, which the direction permits. Beyond those, five references would block:

crate reference back resolution
address_space_layout a test reads ../../user_mode_runtime/link.ld the test moves to user_mode_runtime
byte_sink_contract dev-dependency on moho_abi leaves after moho_abi
file_system_contract dev-dependency on file_system_fixture, which links it the two leave together
grant_plan dev-dependency on primitive_benchmark_contract, which stays that test moves, or the crate leaves too
capability_manifest_note a test reads ../../fuzz/seeds/, and nife's fuzz workspace builds it its seeds and fuzz target leave with it

Six more of the 22 have fuzz targets in nife's fuzz/ workspace. Those point from nife to the crate and do not block.

The architect reads each crate's code by hand before it leaves, at first every crate (condition 4 of §247 (the split begins with basalt holding nife, and procps moves first), ruled 2026-11-01 (UTC)). A crate also needs a tagged release whose commit carries its Cargo version, the baseline for cargo-semver-checks --baseline-rev. The pilot, jh7110_entropy, moved on 2026-10-31 (UTC) with no tag, so milestone 818 tags it first. A crate whose interface still breaks may leave, each break a new tagged release.

The rule: a crate leaves when every crate it links (normal, build and dev) has left or leaves with it, and no file in it names a nife path. Within a layer, the cheapest coordination goes first. Ruled 2026-11-01 (UTC): each package leaves as soon as the shared crates it links have left, in the order disk-tools, process-tools, core-tools, replacing milestone 756's single cut, and block_roster_contract stays the first crate a consumer outside nife reads. Ruled the same day: one repository per contract crate, created when the crate moves and only with the architect's approval of that exact repository. No lane creates one. A repository per package or per layer is refused. The four crates whose disposition is contribute (globally_unique_identifier_partition_table, byte_glob, domain_name_system, calendar) move in this order too (ruled 2026-11-01 UTC); only the offer waits.

step crates why here
0, the review pilot jh7110_entropy tag it, then the architect reads it; the others follow only as each review clears
1, the contract pilot block_roster_contract a leaf with no blocking reference; one writer in the kernel, one reader in disk_surveyor; its magic carries its version, so a reader refuses a mismatch today
2, leaves for disk-tools entropy_contract, clock_contract, socket_contract, globally_unique_identifier_partition_table, counter_frequency_contract, then file_system_contract with file_system_fixture, then moho_abi cheapest first by crossing commits and outside dependents; moho_abi last, at 66 crossing commits and 12 dependents
3 address_space_layout, then current_cpu_contract, then user_mode_runtime, then interfaces_note after the link.ld test moves; user_mode_runtime links six crates of step 2. interfaces_note, the INTERFACES leaf crate (provisional), leaves like any leaf (below)
4, first package disk-tools leaves as soon as its 12 crates and interfaces_note have left; milestone 756's condition 4 has it carry the INTERFACES macro, and it never waits for grant_plan
5, leaves for process-tools byte_sink_contract, byte_glob, program_argument_contract, domain_name_system leaves
6 machine_statistics_contract, domain_name_resolution_contract, grant_plan, then capability_manifest_note grant_plan is the largest coordination cost of all 22
7, second package process-tools leaves once its shared crates have, taking number_writer
8 calendar, environment_contract, then core-tools the last two crates core-tools reaches; the kernel links both; the third package leaves as soon as they have
9, redoxfs subtree_scope and memory_region_heap, then redoxfs each of the first two leaves on its own clearance as one repository or two, decided at the move (ruled 2026-11-20 UTC); redoxfs keeps its own track, as one repository (ruled 2026-11-01 UTC); talc becomes a pinned upstream dependency (below)
10 intrusive_queue, then inter_process_communication intrusive_queue is a leaf (milestone 1097 (intrusive_queue: what an outside maintainer would fix before its first release))

sealed_pair is not one of the 22. It leaves after nifefs and measured_boot have repositories and gets none now (milestone 1107 (sealed_pair: what an outside maintainer would fix before it leaves)).

jh7110_entropy stays the leaf pilot (milestone 818 (jh7110_entropy: proven JH7110 TRNG logic, released on its own)). It proves a leaf crate builds from its own repository and nife pins it by rev. It does not prove the contract case: no consumer outside nife, so no two pins must agree, and no version check has refused a real mismatch across the boundary. block_roster_contract proves both once disk-tools leaves.

Two findings want lanes of their own:

The version policy

Two numbers, two checkers, already separate in this tree:

The rule a peer checks is the one milestone 979 (interfaces a peer can check) ruled on 2026-10-29 (UTC). The system call ABI must match at spawn and never dual-serves. A shared page stays single-version and its reader refuses another magic. A message contract serves N and N-1. This proposal decides no wire format.

One rule is new, ruled 2026-11-01 (UTC): one revision per contract per image. basalt refuses an image whose components pin different revisions of one contract, and the bump pull request that moves a contract moves every pin of it together. Overriding the pins and building each as pinned are refused. The image is then the coherent set that §235 (its source divides by purpose) names. A pin is a git dependency on nifeos/<crate> by rev with its version stated.

Two checks move with each crate. nife's diff check, which fails a moved magic without its version constant (milestone 956's step 4), joins the crate template. The template's cargo-semver-checks compares against the last published release, but these crates stay unpublished while nife pins them by rev (§305 (git dependencies on nifeos/* only, pinned to a landed commit)), so it never fires. jh7110_entropy's pull request #5 renamed five public constants and drew no hold. The fix is to compare against the commit whose manifest last changed version (--baseline-rev). Inside nife, cargo-semver-checks stays refused.

Ruled 2026-11-01 (UTC): for a contract crate the needs-architect hold applies to a wire-identity change only (INTERFACE_ID, VERSION or a magic). A Rust-API break must bump the Cargo minor, checked mechanically, with no hold. Other crates, jh7110_entropy among them (milestone 818), keep the hold on every break. Telling the two apart needs an identity to compare, and 14 of the 22 have no INTERFACE_ID (the OWED table of milestone 956 (the linked interfaces carry checkable versions)). Those 14 get one first, and until then their breaks keep the hold.

What the integration gate must test

basalt's gate (milestone 755 (basalt v0 pins nife and runs its gate)) pins one component, nife, by commit. It runs that commit's script/ci-build test on three architectures, builds basalt's recipes twice for identical bytes, and boots an image.

It does not hold a second first-party pin. It cannot see two components pinning different revisions of one contract. It reads no program's INTERFACES note against what the image serves. And it can test a pair only after both halves merge, because a pin never names an unmerged commit. For a contract and a consumer to land together it needs four things:

  1. A pins.toml table for each contract and each program repository.
  2. A coherence check that refuses an image whose components' lock files name two revisions of one contract (ruled 2026-11-01 (UTC)).
  3. An interface agreement check: each program's INTERFACES entries against the versions the image's kernel and servers serve. That is the spawn check, run before boot over the whole image. A server's served versions can come from its own note; the kernel carries no note today, so it needs a list of its own.
  4. A trial run, ruled 2026-11-01 (UTC): a manual dispatch that takes candidate commits, merged or not, of repositories in the nifeos organization, runs checks 2 and 3 and the system test, and writes no pin and no file. It never runs a fork's pull request, and never on a self-hosted runner for a fork. It proves a pair before either half merges. The pin rule stands: a pin never names an unmerged commit (§305 (git dependencies on nifeos/* only, pinned to a landed commit)).

How a breaking change lands across two repositories

A real one took 53 minutes (jh7110_entropy pull request #5, then nife pull request #2979). The landing appendix works that case, then the contract case for block_roster_contract in four steps. The page is single-version, so the three pins move in one basalt pull request. A message contract serves N and N-1, so its steps may ship in separate bumps.

How nife consumes a crate that left

By rev, as §305 allows. A root [workspace.dependencies] entry would pin each contract once for every nife crate. nife pins jh7110_entropy in three manifests, which pull request #2979 had to move together. A local [patch] serves work on both sides and never reaches main.

The real cost is the second pull request: 53 minutes in the example above. Had all 22 lived elsewhere for 30 days, up to 244 changes would have needed one. nife's tools that walk crates/ also lose each crate: the Kani reach list, the verify table, milestone 610 (the interface's stability is measured weekly)'s series and the declaration check. Each must read the pinned checkout or the crate's own repository instead.

What a third-party implementation needs

Options considered

Reversibility

A move is cheap to undo while only nife and basalt consume it: copy the crate back. Other parties act on four things: a repository name, a published crate version (crates.io never deletes one), an INTERFACE_ID value and a release binary that compares a magic. The two reverts above came from the fourth. So the moved crates stay unpublished under §305 until their own release milestone, and ratifying the INTERFACE_ID values (milestone 979) comes before the first contract leaves.

The seven questions

  1. Considered: the options above.
  2. The tree: jh7110_entropy left on 2026-10-31 and nife pins it by rev; the crate template exists; basalt pins nife; milestone 956 carries the constants.
  3. Prior art: the appendix.
  4. The premise holds with one correction: disk-tools needs 12 of the 22, not all.
  5. Cost: the measurements appendix.
  6. Reversibility: above.
  7. At equal effort the choice stands; within a layer, cheapest first is about learning cost.

Where talc goes at step 9

Decided by the maintainer on 2026-11-01 (UTC), provisional; reversing costs one pull request, since nothing depends on it yet. The architect approved the rule that the maintainer decides a two-way door, and this first use. When redoxfs leaves, talc, patched to vendor/talc today by the engine's and redoxfs_server's manifests, becomes a git dependency of redoxfs on its upstream, pinned by rev with version. Any divergence stays a patch file in the redoxfs repository beside the engine's, naming the upstream revision it applies to. talc gets no repository of nife's own. Not taken: a fork (needs approval), pinning nife for it, replacing the allocator.

Read-only checks, 2026-11-01 (UTC); the questions appendix has the detail:

The review packet

script/crate-review-packet <crate>... writes one packet per crate to target/crate-review-packets/<crate>.md, never committed: the facts a reading needs, and a checklist for the judgments. The API comes from rustdoc JSON, since cargo public-api is not installed. The name is a provisional maintainer decision.

BUGS

Index row

The order in which the 22 crates the first cut links leave this repository: bottom-up, one repository each, block_roster_contract as the contract pilot, disk-tools as the first package. It sets the version policy and the gate that let a breaking change land across two repositories.