roadmap PARTIAL

1090. file_system_contract: what an outside maintainer would fix before it leaves

Raised by a read-only review of crates/file_system_contract as a stranger would meet it, the way milestone 1048 (generational_table: what an outside maintainer would fix before 0.1.0) reviewed that crate. It changes nothing; it lists what the move lane and the lanes after it change.

There is no review package for this crate in notes/crate-reviews/. The baseline this review takes as settled is therefore the rulings recorded at the names themselves and in the roadmap. They cover the crate name and the _contract suffix. They cover fs::VERSION, blk::VERSION and the two INTERFACE_IDs. They cover every opcode number, ROOT as 0 and the 8-bit opcode field at bits 63:56. Pull request #2797 ratified the limits TRANSFER_MAXIMUM, MAXIMUM_LENGTH_OR_OFFSET, MAXIMUM_HANDLE, grant::MAXIMUM_NAME, xattr::MAXIMUM_NAME, MAXIMUM_VALUE, MAXIMUM_COUNT, MAXIMUM_KIND, list::MAXIMUM_BYTES, store::MAXIMUM_BYTES and nameset::MAXIMUM_NAMES. The rulings also cover the errno choices (EROFS over EACCES, ENOTDIR for a directory verb through a file grant, ENOENT for a naming right), the NARROW verb, the PARENT_RIGHTS sentinel and BIND_SYNC. This review reopens none of those. Where a rule written after a ratification contradicts a ratified name, the item says so and leaves the reopening to the architect, under the ruling that a release review rechecks names ratified before a later rule.

The crate is on crates/externalization-list.txt and is step 2 of milestone 1017 (the contract crates leave in this order), paired there with file_system_fixture. The manifest has no dependencies of any kind, and the README says where the fixture's tests went. The two crates share one workspace repository, ruled 2026-11-14 (UTC); the fixture never publishes.

Reuse: the template partsfoundry/crate-workflows and its scaffold, its helpers (standalone.py, falsify.py, coverage-floor.sh, the name gates), Kani, cargo-mutants, cargo-llvm-cov, the classification of equivalent mutants already in notes/mutation-testing/. No new tool.

Finding status

One line per finding, in the review's order: items 1 to 5 in the blocks-the-move appendix, items 6 to 13 in the before-the-tag appendix, items 14 to 22 in the later-items appendix, then the decisions and the review package. The item texts use the names the review read; the crate's names now are file_system_contract, directory, extended_attribute and block.

Open decisions

None. The review package carries the name ratification and the clearance of the review, which stay the architect's.

Goal

A stranger who finds file_system_contract in its own repository can tell in one screen what the two protocols are. The stranger can build, test, prove and falsify it from the README alone on the stated minimum Rust version. Every required check is green for the crate's own reasons. Nothing in the crate names nife, a nife program or a nife package; the one on-disk name that does is ruled on before the move.

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 release or when it is a layout on a disk or a wire; a public name is one-way at release and the architect's call before it. Everything else is two-way and the maintainer decides it.

P0: red at the moving commit, or refused by the move rule

The P0 items are in the appendix.

P2: later

The P2 items are in the appendix.

P1: before the tag

The P1 items are in the appendix.

Decisions for the architect

The architect ruled A, C and D; B and E are the maintainer's provisional rulings on two-way doors. Each states the rule in force.

A. The reserved on-disk name: ruled 2026-11-14 (UTC)

In force: the extended-attribute store lives in a directory in the image root named .extended-attributes (xattr::STORE_DIR, src/xattr.rs line 77). Decision B rules the constant's own name. Every name-taking verb refuses that name with EINVAL, in every directory and at every depth of a path, and READDIR skips it, so it is both a disk layout and a wire rule. The name says what the directory holds and names no project. redoxfs_host extract and upstream's FUSE mount carry it out as a directory. A recovery listing of an image shows .extended-attributes/0000002a. Nife has no installs, so no image outside the maintainers' own carried the earlier name.

Prior art. Samba's streams_depot keeps alternate streams under a .streams directory named for the mechanism, not the vendor. macOS writes AppleDouble ._name files and .DS_Store, both named for the format or the feature. ext4 and NTFS keep attributes inside the inode or the MFT record and reserve no name. Where this crate differs: it reserves one name at every depth, which is the cost of a layer above an unchanged RedoxFS format.

Concrete example. A client gets EINVAL for CREATE ".extended-attributes" in the root and in any subdirectory, OPEN "sub/.extended-attributes" is EINVAL, and READDIR of a root that holds the store does not list it.

B. The names the gates refuse, and the units on the ratified limits

The background, the table, the prior art and an example are in the appendix.

Decided by the maintainer on 2026-11-14 (UTC), provisional: a two-way door before the first tag, which the architect may revisit. The table holds as written, applied by one lane, and STORE_DIRECTORY holds .extended-attributes, the value Decision A rules. The POSIX verb and errno names keep their spelling, each with #[doc(alias)] and a line naming the source. No alias of the old spellings.

C. The error range of a reply word: ruled 2026-11-14 (UTC)

In force: a reply's first word is an i64. A word in -4095..=-1 is the error code 1..=4095 (MAXIMUM_ERRNO, Linux's bound). Any other negative word is a protocol violation, and reply_errno reads it as EPROTO (71), never as success and never as a truncated code. A non-negative word is a result. reply_err asserts its code is in 1..=MAXIMUM_ERRNO in every build: a bad code is a bug in the sender, and a release build that skipped the check would put a success-looking or protocol-violating word on the wire. Two Kani harnesses prove the decoding for every i64, and unit tests pin -1, -4095, -4096 and i64::MIN. Every reply any current server sends keeps its word. Loosening the bound later is compatible; tightening is not.

Prior art. Linux include/linux/err.h (MAX_ERRNO, IS_ERR_VALUE); FreeBSD returns errno in a separate register with the carry flag, which this two-word protocol does not have; 9P2000.L carries the errno as its own field.

Concrete example. reply_errno(-5_000_000_000) is Some(71), where a truncating cast gave Some(705_032_704), and reply_errno(-2) is Some(2).

D. The store directory's name in §99: ruled 2026-11-19 (UTC)

In force: §99 (where Apple's metadata lands: stream or sidecar) names the sidecar store .extended-attributes, in its bytes-at-rest row and its closing paragraph, the name Decision A rules. The section says what is in force now and changes nothing else.

Prior art: §298 (a document states what is in force now) keeps git as the history. Python's PEPs and Rust's RFCs keep their original text and point to a successor; this tree chose the other way.

Concrete example: a reader of §99's cost table counts "one 4096-byte block for the node's blob under .extended-attributes" and then finds STORE_DIRECTORY holding the same name.

E. The review package and clearance of file_system_contract and file_system_fixture: maintainer ruling, provisional, 2026-11-19 (UTC)

In force: a lane writes one review package that covers both crates, which share one workspace repository (ruled 2026-11-14 UTC; the fixture never publishes), once the other items here land. The move is not held for it. The package step is the maintainer's provisional ruling on a two-way door. Ratifying the names and clearing the review, which is also the go to create the repository as publish = false, stay the architect's, and the package asks for them. The move follows, with items 1 to 3 and 10 here and items 6 and 11 of milestone 1091 (file_system_fixture: what an outside maintainer would fix before it leaves).

Prior art: jh7110_clock_and_reset and designware_ethernet each had a review package cleared before the organization made their repositories. Outside, rust-lang/futures-rs and tokio keep a test utility crate (futures-test, tokio-test) in the same workspace as the library it tests, which is the shape ruled here.

Concrete example: ratifying nameset::IS_DIRECTORY fixes the spelling in the filesystem servers and in the fixture's witness documentation at once, which is why the package lists both crates.

Done when

The checks are in the appendix.

BUGS

Follow-on

Index row

An outside review of file_system_contract before it leaves nife. Five items are red at the moving commit (the stand-alone text, clippy's proper-noun list, the falsification patch paths, one uncovered file, 22 names the gates refuse). Eight come before the first tag (a non-total errno decoder, packers that mask, seven unproven properties, the equivalent-mutant list, the README and prose gates, the rm module). Nine are for later. Five decisions, none open. The architect ruled the on-disk name (A), the bound on the error range of a reply word (C) and §99's store name (D). The maintainer rules provisionally on the naming pass with units (B, built) and on the review package for the shared repository (E).