roadmap PARTIAL

1158. block_roster_contract: the release review's findings

(The number and the slug are provisional.)

The release review of partsfoundry/block_roster_contract at commit f0c199ac, version 0.1.0-pre.3, under milestone 1129 (the combine review), whose block sets its form. The baseline is milestone 1059 (the outside review's findings land before its first release), its block and the cleared package notes/crate-reviews/block-roster-contract.md. Every 1059 finding is closed. The page layout, the identity values, the crate's name and the ratified names stay closed here, with one exception. The rule of design/naming.md that spells virtio as virtual_io is newer than the ratification of two transport constants, so the release-review rule reopens those two (P0-1).

Reuse: the crate's own tests, a scratch probe and a scratch benchmark. No new tool.

Finding status

Open decisions

The one-way doors D1 to D8 below.

Goal

A stranger who writes a kernel, a loader or a test hands a list of drives to another program in one page and picks this crate for it. The compiler tells a transport from an ordinal. Each refusal says what went wrong, and a second layout version can arrive without breaking a caller of 0.1.0.

What the review read and ran

The appendix lists the files, the commands with their results, the probe, each comparator and the benchmark's method. The guidelines table marks the 54 API Guidelines items.

Prior art

Measured from the crates.io API on 2026-11-26 at 22:53 (UTC). A stranger brings this crate one problem: tell a program which drives the machine has, in a page somebody else wrote. The ranked crates answer the first half on Linux, from the ambient /sys, and none has a wire form. The neighbors and the two systems outside Rust have the page.

crate or system role version read total 90 days reverse dependencies updated
block-utils ranked 1: lists block devices through udev 0.11.1 1,091,200 32,524 2 2023-09-14
rs-drivelist ranked 2: a list of drive descriptors 0.9.4 29,605 6,175 0 2024-08-04
blockdev ranked 3: walks /sys/block 0.6.2 13,256 5,009 0 2026-09-05
multiboot2 neighbor: a boot loader's tables, read by a kernel 0.28.0 1,041,556 237,214 2 2026-09-04
zerocopy neighbor: what a stranger would read the page with instead 0.8.66 1,210,090,471 360,879,323 938 2026-11-25
seL4 libsel4/include/sel4/bootinfo_types.h outside Rust: the page a kernel writes once for its first program 13.0.0
Linux drivers/nvme/host/core.c, nvme_scan_ns_list outside Rust: a reader of the NVMe active namespace list v6.12

zerocopy has a newer pre-release, and the review read its newest stable version. No integration target applies: the crate moves no bytes and holds no device.

What block_roster_contract does better

The ranked crates beat it on what an entry says: a name, a size, a serial number, a model. The crate's recorded reason is that listing a drive and holding it are separate authorities, so size waits for the endpoint. An ordinal is a position in a scan, and the README says a reader may trust no more.

The items

Effort is S (half a day), M (a day or two) or L (longer). A one-way item binds every caller from the first 0.1.0 tag. Each item names the symbol in src/lib.rs it reads.

P0: the 0.1.0 interface

P0-1. Two transport constants spell VIRTIO

Verified in source: TRANSPORT_VIRTIO_MEMORY_MAPPED_IO and TRANSPORT_VIRTIO_PCI. The naming rule spells the word virtual_io in every name the project authors, with no kept exception, and a renamed public item carries #[doc(alias = "virtio")]. The clearance ratified both names before that rule. The printed names (virtio-mmio, virtio-pci) are the specification's and stay. Change: VIRTUAL_IO_MEMORY_MAPPED_IO and VIRTUAL_IO_PCI, in the form P0-2 picks, with the three aliases. Door: one-way (D1). Effort: S.

P0-2. A transport is a bare u32

Verified in source and by building. Device::transport and the argument of count_by_transport are u32, and so is the ordinal. The probe compiled roster.count_by_transport(device.ordinal). multiboot2 wraps the same kind of number in MemoryAreaTypeRaw(u32) beside an enum with a Custom(u32) case. blockdev's DeviceType has as_str and Display. Change: pub struct Transport(u32) with new, get, name and Display, and the three kinds as associated constants. An unknown number stays representable, as the page needs. Door: one-way (D2). Effort: S in the crate, M across callers.

P0-3. Device has public fields and no constructor

Verified in source. Every writer builds Device { transport, ordinal }, so a field added by a second layout version breaks each literal. The struct's documentation already warns that the order of its fields is published behavior. multiboot2's MemoryArea keeps its fields private behind new and four const getters. seL4 and the ranked crates publish theirs. Change: private fields, pub const fn new(transport, ordinal), and transport() and ordinal(). The derived order stays. Door: one-way (D3), and the clearance ratified both field names. Effort: S, and one line at each caller.

P0-4. TooManyDevices is one unit struct for two causes

Verified in source and by building: write(&mut [0u8; 8], &[]) returns Err(TooManyDevices) for no devices. The type is a unit struct that any caller can build, so it can gain neither a cause nor a field. It carries neither the count nor the room. multiboot2-common 0.7.0 keeps MemoryError::ShorterThanHeader apart from SizeInsufficient(actual, expected). ReadError is #[non_exhaustive] and carries no numbers either. Change: a #[non_exhaustive] enum for write with a variant for each cause and named fields, under the name and the rule on carried input that the errors decision picks. Door: one-way (D4), and TooManyDevices is a ratified name. Effort: S.

P0-5. A roster of another version reads as no roster at all

Verified by building: a page that starts blkrosv2 returns ReadError::NotARoster, the same as a page of 0x55. The magic carries the version digit and the page holds no other version field, so VERSION is on the page only inside the magic. A reader of version 1 cannot report that the writer is newer. multiboot2's memory map tag carries entry_version apart from the magic. A page that starts to return a different variant after 0.1.0 changes published behavior. Change: a variant for a page whose first seven bytes are blkrosv and whose eighth is another digit, its name provisional. Door: one-way (D5). Effort: S.

P0-6. The identity constants and the entry points have no shared spelling

Verified in source. MAGIC is a u64 built with u64::from_le_bytes, where three sibling contract crates export [u8; 8]. read compares bytes and write converts back, so no caller of this crate needs the integer. VERSION is a u32 and INTERFACE_ID a u64. The reader is the associated function Roster::read, and the writer is the free function write. Change: whatever the contract-layout decision picks for each. Door: one-way (D6). Effort: S.

P0-7. Two refusal names carry no ruling

Verified in the baseline block: ReadError::CapacityBeyondPage and ReadError::CountBeyondCapacity are provisional. Both follow the ruled CountBeyondPage. Change: ratify both as built. Door: one-way (D7). Effort: S.

P1: before the first release

P1-1. devices() returns a type nobody can name, bound to the Roster and not to the page

Verified by building. The signature is fn devices(&self) -> impl ExactSizeIterator<Item = Device> + '_. Three probe functions failed to compile: devices().rev(), a for loop over &roster, and a function that returns Roster::read(page)?.devices() for the page's lifetime. Roster is Copy and borrows only the page. blockdev returns std::slice::Iter from iter and implements IntoIterator twice. multiboot2's EFIMemoryAreaIter<'a> has a name, Clone and ExactSizeIterator. Change: a named Devices<'a> that is Clone, double-ended, exact-size and fused; IntoIterator for Roster<'a> and &Roster<'a>. Door: two-way. Effort: S.

P1-2. Roster and the two errors miss common traits, and Roster prints raw bytes

Verified in source and by building. Roster has no PartialEq, Eq or Hash. ReadError and TooManyDevices have no Hash. {:?} of a roster prints Roster { entries: [[0, 0, 0, 0, 1, 0, 0, 0]] }. multiboot2's LoadError derives Hash and Ord. Change: the derives, and a Debug that lists devices. Door: two-way. Effort: S.

P1-3. No # Errors section, and one example for nine public functions

Verified in source. write has the one # Examples section. Roster::read and write describe their refusals in prose under no heading. The crate page has the layout and no example. Both examples call unwrap. blockdev gives get_devices an # Errors section and an example that uses ?. Change: the sections, an example on the crate page and on Roster::read, and ? in each. Door: two-way. Effort: S.

P1-4. The crate never names the system that gives INTERFACE_ID its meaning

Verified in source and the README. The README calls the writer "one party" and leaves the rest to "the system around this crate". The crate's doc comments say "the kernel" nine times. Nothing says whose registry holds the number 5, so a stranger cannot tell whether the crate fits another system. Change: one sentence that names the binary interface, and "the writer" for "the kernel". Door: two-way, apart from D8. Effort: S.

P2: may follow

Each is two-way and S. The appendix holds the evidence.

Measured performance

Measured in a release build with rustc 1.100.0 on a Linux x86_64 host, lowest of seven passes, on a 4096-byte page. The comparator derives zerocopy 0.8.66 on a header and an entry struct and makes the same five checks by hand. The appendix has the method and a second run.

operation 3 devices 510 devices
Roster::read 3.8 ns 3.8 ns
zerocopy, the same checks 3.8 ns 3.7 ns
Roster::read, then sum every device 6.2 ns 189 ns
zerocopy, the same sum 6.0 ns 196 ns
Roster::read, then count_by_transport 9.0 ns 127 ns
zerocopy, the same count 5.8 ns 130 ns
write 8.0 ns 171 ns

The interface costs nothing a caller can measure. The two runs differ by more than the two sides do.

One-way doors

Evidence for the shared decisions

Follow-on

Done when

script/review-status counts the block BUILT: no P0 or P1 line above reads Open or Waiting, and the architect has ruled D1 to D8.

BUGS

Index row

The release review of block_roster_contract against block-utils, rs-drivelist and blockdev, the neighbors multiboot2 and zerocopy, seL4's boot information page and the NVMe namespace list. Seven findings touch the 0.1.0 interface. They are two constants that spell VIRTIO, a transport that is a bare u32, public Device fields, one unit error for two causes, no refusal for another version, identity and entry-point spellings, and two names without a ruling. Four land before the release, five may follow, and eight doors wait for the architect.