roadmap BUILT

886. The filesystem test fixture moves to its own crate

(The title and slug are provisional.)

calef ruled on #1915, milestone 845 (the filesystem-protocol crate root is split along its seams), on 2026-10-11 (UTC): "Keep it for now, and open the follow-up milestone". This is that milestone. 845 keeps filesystem_protocol::fixture in the protocol crate as fixture.rs, with its tests in fixture/tests.rs, so that its split stays a pure move. This block moves it out. Built 2026-10-15 (UTC) on branch milestone/886-the-filesystem-test-fixture-moves-to-its-own-crate, after 845 (built 2026-10-11) had landed, so the two never cut the same file at once; the std relief the block ordered as its own pull request went first, as nifeos/nife#2205.

The crate name below is provisional and waits for calef's naming ratification pass; it does not block the lane.

What calef ruled (2026-10-11, UTC)

Relayed one question at a time by the maintainer, each with its prior art and alternatives.

Reuse: not applicable; this moves code and adds none.

What fixture is

Measured at 9532eeb53. pub mod fixture is lines 2566 to 3806 of crates/file_system_contract/src/lib.rs: 1,241 lines, 842 of them comments, 255 public items. It holds the names and contents of the files the test image ships, the witnesses' verdict words and the shapes of the walk and throughput benchmarks. It also holds the layout of the blank disk that milestone 57 (partitioning and formatting a real drive) writes.

It lives in the protocol crate because both sides of every filesystem test already depend on that crate. One item reaches back into it: throughput::UNIT is fs::TRANSFER_MAX. So a new crate depends on filesystem_protocol, and the protocol crate cannot re-export the new one without a dependency cycle. Every user is rewritten; there is no shim.

std carries it today

It did until this milestone landed: all of it, 34% of the generated fsproto.rs (measured at 9532eeb53). std_generate_modules copies lib.rs into the std farm as sys/pal/nife/fsproto.rs. 845's generator inlines every module back, so the copy stayed the same text, and while the copy carried the fixture, std_inputs_stamp hashed it, so editing a test file's expected contents marked every worktree's farm stale and rebuilt std. Step 1 below stopped the copy ahead of the move (#2205, 2026-10-15); the move deletes the file, and the skip with it. fsproto.rs is 2,470 lines at the build this block ships, with no fixture module and no std code naming one.

The premise is half right

The ruling's premise is that fixture is test data, not wire protocol. For most of its items that holds. For a few it does not: shipping programs use them to talk to each other.

item used in shipping code at what it is
READY 15 sites in 12 files: redoxfs_server, virtio's blk server, the NVMe and DesignWare drivers, three caretakers, login, system_initializer, the kernel's fs_service and two kernel benches the readiness word a storage or file server sends before it serves
DESCENT_REFUSED fs_subtree_caretaker the caretaker's refusal word
rm::OK, rm::status components/src/rm.rs rm's exit-status convention
crash::CUT redoxfs_server's crash injector the word it sends before it dies
throughput::RECORD a const assertion in redoxfs_server/src/lib.rs the record size its throughput phase assumes
blank disk_partitioner, system_installer (only LBA), mkfs milestone 57's test-disk layout, which the partitioner writes

READY is a protocol word misfiled. calef ruled that it and DESCENT_REFUSED stay in filesystem_protocol, and the rm status convention with them. A test-only crate that the kernel, virtio and system_initializer must depend on to boot would be the same mistake reversed. The other three are test hooks or test layout compiled into programs. They move with the fixture, and those programs depend on the new crate.

Who uses it

Measured at 9532eeb53 with a scan of every tracked .rs file outside vendor/ and the crate. The path filesystem_protocol::fixture occurs 185 times in 53 files; 35 of those lines are comments. Two more files import it in a brace list (rm.rs, and fs_test_client.rs, which then says fixture:: 102 times). So 187 sites change.

where files sites
system_tests/ 15 57
components/ 10 29
xtask/ 4 29
std_exerciser/ 1 26
kernel/ 5 13
redoxfs_server/ 6 12
crates/ (walk_pricing, system_initializer, virtio; four others in comments only) 8 11
fixtures/ 2 7
bench/host/ (comments only) 2 3

Ten manifests name the crate and use fixture in code. If the recommendation above holds, system_initializer and virtio need no new dependency. Outside Rust, 12 files cite the path: four roadmap blocks, six notes and two falsification patches under system_tests/falsifications/.

The work

  1. As soon as 845 lands, in a pull request of its own: the generator skips fixture.rs, STD_SRC_PATCH_VERSION is bumped, and the allow comment in sys/pal/nife/mod.rs stops naming it. Show the shorter fsproto.rs in the pull request.
  2. The protocol words in the table above move to the crate root or a module of their own, name provisional, and their users follow.
  3. The rest becomes a crate, crates/file_system_fixture (provisional), with fixture.rs as its lib.rs and fixture/tests.rs as its tests. It is no_std and depends on filesystem_protocol alone.
  4. Each user changes filesystem_protocol::fixture to file_system_fixture. A file that says fixture:: bare imports file_system_fixture as fixture, so its body does not change.

The name

file_system_fixture is the proposal. It is the module's existing name lifted to a crate, so every call site reads the same after the prefix, and a reader who knew the module finds the crate. It does not end in _protocol, because it is not a wire contract; that suffix is for contract crates since milestone 265 (_proto is a truncation). filesystem_test_image was considered and is narrower than the contents: it names the files the image ships, but not the verdict words or the benchmark shapes. calef names crates.

What moving it breaks

Done when

  1. filesystem_protocol has no fixture module, and no test data remains in it.
  2. The generated fsproto.rs has no fixture module, and the std farm builds.
  3. The kernel, virtio and system_initializer do not depend on the new crate. (The kernel's one exception, recorded: file_system_fixture is an optional dependency, on only under --features bench, whose filesystem benchmark speaks the throughput and walk shapes. No booting image sets the feature; cargo tree shows the crate absent from every default graph.)
  4. Every host test and doc test that passed before passes with no test body changed, and so does script/test on aarch64, riscv64 and x86_64.
  5. system_installer takes its block size from blk, not from blank::LBA, so no shipping installer depends on the test crate.
  6. The new crate's lib.rs carries a //! Name: line marked provisional.

Follow-on

Index row

filesystem_protocol::fixture is 1,241 lines of test data in a wire-protocol crate, and std copies all of it into every build: 34% of the generated fsproto.rs. This moves it to a crate of its own at 187 sites, after 845. A few of its items are protocol words that shipping programs use, and those stay, per calef's ruling. std stops copying it as soon as 845 lands.