roadmap PARTIAL

814. non_volatile_memory_express: proven NVMe queue logic, released on its own

(From calef's rulings on pull request #1806; the title and slug are drafts. Milestone 813 (a proven FAT crate released on its own) is the shape this follows.)

calef's rulings, quoted from the maintainer comments on #1806 of 2026-10-07 (UTC):

What exists, checked 2026-10-07 (UTC)

Reuse: the alternatives were surveyed in #1806's other-implementations.md appendix (looked up 2026-10-07), and none is taken, because calef ruled this crate "publish ours". rcore-os's nvme-driver 0.8.2 (MIT, 4.9k downloads, one reverse dependency, no proofs found) lives in the tgoskits monorepo. lihanrui2913's nvme is a 0.0.0 from 2025-04. Redox's nvmed is a daemon, not a library, and its GitHub mirror is archived. SPDK (C) stays the reference for behavior. None is a sans-IO layer a model checker can reach, and the proofs are the point. No upstream offer goes anywhere: calef ruled on #1806 that nife contributes only to projects nife depends on.

What is proven

Each row is a property this crate must prove before it publishes. The harness cell reads as in milestone 813's table. Each patch is at crates/non_volatile_memory_express/falsifications/. All six prove. The spawn handoff has two harnesses, which sit with Handoff in driver_process_contract, which does not publish.

property harness
Submission queue pushes stay in bounds verification::sq_push_stays_in_bounds
Completion pops stay in bounds, and the phase flips only at the wrap verification::cq_pop_stays_in_bounds_and_flips_only_at_the_wrap
Distinct doorbells never collide verification::distinct_doorbells_never_collide
The PRP pair is total and page-disciplined verification::physical_region_page_pair_is_total_and_page_disciplined
The identify-namespace parse is total and bounds its shift verification::identify_parse_is_total_and_bounds_the_shift
A transfer command is built only for a block the namespace has verification::a_transfer_command_is_only_built_for_a_block_the_namespace_has

Not proven: the Capabilities register decode beyond the doorbell stride the handoff harness bounds, the status fields of Completion::from_dwords, and anything in time (reset, enable, timeouts), which lives in the driver's volatile shell. The handoff harnesses prove nife's spawn handoff, not NVMe; they left with Handoff on 2026-10-26 (#2736).

Release, by #1806's rulings

  1. The name is settled before anything leaves (857's Fork 5 as calef amended it on 2026-10-11 UTC). script/names non_volatile_memory_express reports it ratified, crates.io answers 404 for it (or it is already ours), and partsfoundry/non_volatile_memory_express does not exist yet. script/crate-standalone checks the first.
  2. In the tree, script/verify proves the harnesses and Cargo.toml says publish = false.
  3. The package meets Fork 3 of milestone 857 (crates released on their own). cargo package --list shows its harnesses and falsification patches.
  4. Ready means proofs passing and the API stable. §235 (the OS is built and updated from packages, and its source divides by purpose) has milestone 610 (the interface's stability is measured weekly)'s per-package co-change column, and the soak (step 5) is how the second is measured. When the soak exits, calef adds it to the lint-checked publish allowlist. The partsfoundry/non_volatile_memory_express repository is created when the crate moves, on the shared CI template (milestone 887), through reusable workflows: Kani through kani-github-action, lint, release. Its release workflow refuses to publish unless the proof job is green. No harness here reads target_arch, so stock Kani proves them. §218 (carry a Kani patch so riscv64 is proved) applies only if a harness comes to need riscv64. Milestone 589 (Kani can prove riscv64 from the hosts we already have) built it.
  5. Soak, as its own repository, until the soak's five end conditions in the runbook hold.
  6. Publish and consume the release by version, by the runbook's publication steps.

Parity

Pure logic, tested on the host. This lane built it on 2026-10-07 with the pinned nightly for aarch64-unknown-none-softfloat, riscv64imac-unknown-none-elf, x86_64-unknown-none and the host, all exit 0. The release workflow builds the same four.

Standalone, measured 2026-10-11 (UTC)

script/crate-standalone non_volatile_memory_express fails today, at base ae6b91e79. The manifest inherits license and lints from nife's workspace and states no rust-version, and there is no README, LICENSE-MIT or LICENSE-APACHE. Those hold for all nine crates. Builds and tests on stable for the host and the three bare-metal targets. Stock Kani proves all six harnesses in the copy, and each falsification patch, applied with -p3, turns its harness red. It fails on manifest and files only, plus 25 lines citing this tree: 12 §N, 8 milestone N, 2 tree paths, 2 naming calef and 1 provenance block.

script/names reports the name non_volatile_memory_express ratified (checked 2026-10-25).

Measured again on 2026-10-25 (UTC) with --no-kani: the manifest and files pass, the build passes on all four targets, and the only citations left sit in Name: blocks, which stay until the ratification pass. With Kani, every harness proves and every falsification patch fails its harness.

calef ratified every name in the crate (Namespace, Namespace::holds_whole_block, Namespace::transfer_command and the field Namespace::capacity_bytes, 2026-11-03 UTC, #3118). The two assertion constants THE_*_SHARE_NO_BIT are private, so they do not count among the crate's names. script/crate-standalone non_volatile_memory_express exits 0. calef approves creating the repository after the crate's review.

Review before release

Exit

A check proves it. In nife, cargo tree --locked -i non_volatile_memory_express resolves to v0.1.x from crates.io with a checksum in Cargo.lock, crates/non_volatile_memory_express no longer exists, and the tree builds for all three targets. In partsfoundry/non_volatile_memory_express, the run that published 0.1.0 shows the Kani job green ahead of the publish job, and every harness's falsification patch makes its proof fail. The five soak criteria of release step 5 hold before it publishes.

The name check of release step 1 passes first, by Fork 5 of milestone 857. Before the move, script/crate-standalone non_volatile_memory_express exits 0 in nife, and every row of What is proven names a harness that stock Kani proves in the copy and whose falsification patch makes it fail. No crate publishes without the proofs milestone 857 (crates released on their own) requires.

What the crate no longer cites

The crate's source cites nothing of this tree beyond its Name: blocks. This section keeps the links it carried, by milestone 857's provenance rule.

BUGS

Follow-on

Index row

nife's NVMe queue arithmetic, with six Kani proofs and their falsification patches, published on crates.io as non_volatile_memory_express 0.1 from its own nifeos repository. Another hobby OS can then drive NVMe on proven queue logic, and nife consumes the same release.