roadmap BUILT

1096. interfaces_note: what an outside maintainer would fix before it leaves

Raised by a read-only review of crates/interfaces_note as a stranger to this tree would meet it, on a fresh clone at the head of main. It changes nothing; it lists what the move lane changes before script/crate-move can finish, and what the architect ruled first.

The crate has no review package in notes/crate-reviews/. The settled baseline is therefore the block of milestone 956 (the linked interfaces carry checkable versions), which rules the note type INTERFACES = 4. It also rules the descriptor shape (a version word, a count, then records of a u64 id and a u32 version in strictly ascending id order). It rules the id table with 21 for this crate, the equality check at spawn and the rule that a missing note or a missing entry passes. The audit report "from the package to the grant" under design/audit-reports/ accepted the missing-note rule. None of those is reopened here. Step 3 of milestone 1017 (the contract crates leave in this order) puts this crate last in its step and says it leaves like any leaf.

Reuse: script/crate-move, the template partsfoundry/crate-workflows and its scaffold, Kani, cargo-mutants, cargo-fuzz. No new tool.

Finding status

Every finding not Done blocks the first crates.io publish, under the publishing hold.

Open decisions

None.

Goal

A stranger who opens partsfoundry/interfaces_note can tell in one screen what the note is, place one in a program from the README alone, and decode one from untrusted bytes without a panic. The move's dry run exits 0 at the newest template release, with its build step run, and every public name stands ratified.

What was checked, and how

The tools run, the sources read and what was not run are in the appendix.

The items

Each item: what, where, why, the fix, effort (S/M/L), door.

P0: the move's own dry run fails on these

  1. The manifest does not stand alone. crates/interfaces_note/Cargo.toml line 5 inherits license and :12 inherits [lints] from a workspace that will not be there, and there is no rust-version. The staged tree fails at cargo generate-lockfile before any test runs, and standalone.py fails three lines on it. Fix: license = "MIT OR Apache-2.0", rust-version = "1.85", the workspace's cfg(kani) check-cfg inlined under [lints.rust], plus description, readme, keywords and categories (no-std, no-std::no-alloc, encoding). S. Two-way.
  2. No README and no license files. The dry run stages the scaffold's README shape and standalone.py fails on LICENSE-MIT and LICENSE-APACHE. Fix: a README in the shared order (readme_sections.py: title and summary, ## What it does, ## EXAMPLES, ## What is proven, ## BUGS, ## Minimum Rust version, ## License) and the two license files from the template's root. M, because the README carries what items 7 and 8 ask for. Two-way.
  3. The documentation cites this tree. Cargo.toml line 8 and src/lib.rs line 6, :73-76 (the id table "Milestone 956 holds", "script/lint holds the tree to it"), :232 and :498 cite a milestone or a script. The module doc speaks of "the progenitor", "spawn", "a package" and capability_manifest_note, none of which a stranger has. The Name: blocks, which also carry the lane names and the architect's name, vanish in the move and need no edit. Fix: rewrite the module doc to state the format, the reader's rule and what a loader does with it, in the words "the program" and "the system that loads it". The rule is that an unknown version, a count over 64, a length the count does not predict and ids out of order all refuse. S. Two-way.
  4. The word the lint forbids is the wire format. src/lib.rs line 3, :15, :32, :34, :310, :326 and :492 say nife. Two of them (:15, :32) are prose and reword. The other five are the owner string b"nife", the section .note.nife.manifest and the test that asserts those bytes; they are the format itself. The move check and lint_externalized_crates.py both fail them, and no rewording removes them. Fix: decision 1 keeps the bytes behind a // wire literal marker, which #3575 applied; the two prose lines reword with item 3. S. One-way, because the owner string is in every built program.

P1: before the tag

  1. Passive voice over the template's ceiling. src/lib.rs: 19 passives in 2,408 words; the template's main allows 4 and fails the rest. v7 does not run the gate; the next release will, and the move pins the newest release. Fix inside item 3's rewrite. S. Two-way.
  2. Two acronyms unexpanded. src/lib.rs line 5 (ABI) and :28 (NUL). The template's main fails them at a ceiling of 0. Fix: "application binary interface (ABI)" and "NUL terminator" at first use. S. Two-way.
  3. A stranger cannot place the note from the documentation. The macro writes to .note.nife.manifest, and nothing in the crate says that a link script must KEEP that input section into an output section inside a PT_NOTE (and a readable PT_LOAD), as crates/user_mode_runtime/link.ld lines 70 to 72 does. Nothing says that every word is little-endian whatever the target's byte order (put4 writes to_le_bytes at src/lib.rs line 132, and an ELF note's header is in the file's byte order, so a big-endian ELF would carry a wrong header). Nothing says where the id registry lives once the crate has left: with the system that reads the note, the crate reserving 21 for itself. Nothing in the README will say that check_served passes an absent entry (src/lib.rs lines 246 to 262) unless the rewrite carries it. Fix: a ## The contract section in the README with the byte table from notes/interfaces-note.md, the link-script requirement, the endianness rule, the registry rule and the absent-entry rule. M. Two-way.
  4. The only example does not compile. The macro's doctest at src/lib.rs lines 313 to 317 is ignore and names abi::, which no reader has. A #[used] static in a named section compiles and links on a host, so the example can run with literal ids. encode_interfaces, decode_interfaces, version_of and check_served have no doctest. Fix: four doctests, the macro one with Declared { id: 1, version: 1 }. S. Two-way.
  5. Three lengths carry no unit. src/lib.rs line 37 NAME_FIELD (8 bytes), :40 HEADER_LEN (12 bytes; register_names.py refuses it) and the public :96 INTERFACE_RECORD (12 bytes). interfaces_len (:112) and interfaces_note_len (:269) return byte counts and read as counts of interfaces; interfaces_len(3) is 44. The rule is design/naming.md's "a length or a limit carries its unit". Fix: the private two now (NAME_FIELD_BYTES, HEADER_BYTES); the public three as decision 2 decides, provisionally. S. Two-way before the first tag.
  6. Declared names a state, not a thing. src/lib.rs line 102. A stranger reads interfaces_note::Declared { id, version } and asks "declared what?". Design/naming.md asks for a noun. Fix: DeclaredInterface, as decision 2 decides, provisionally. S. Two-way before the first tag.

P2: for later

  1. No fuzz target. The crate has no unsafe and a decoder fed untrusted bytes, the shape the weekly fuzz opt-in targets, and fuzz/ has no target for it. Fix: a target that decodes arbitrary bytes and, on Ok, re-encodes and compares, plus the opt-in in the moved repository. S. Two-way.
  2. The proof runs one direction. a_decoded_interface_list_encodes_back_to_its_bytes proves decode-then-encode for a list of two; encode-then-decode is a test on fixed data. Fix: a harness over two symbolic ascending ids and two symbolic versions that encodes, decodes and compares, with a replayable falsification patch as milestone 1037 (a new Kani harness must arrive falsified) requires. S. Two-way.
  3. A test name the abbreviation report flags. src/lib.rs line 475 an_unsorted_list_is_not_encoded: unsorted is not in the word lists. Report only. Fix: a_list_out_of_order_is_not_encoded. S. Two-way.
  4. Interfaces::iter yields by value. src/lib.rs line 178 returns Declared, where std's iter yields references. The iterator decodes records on the fly, so by value is the honest shape; the doc comment should say so in one clause. S. Two-way.
  5. The three triaged timeouts travel nowhere. notes/project-metrics/mutation-triage.csv holds three += to *= loop-counter mutants as equivalent hangs. The dry run carries only a .cargo/mutants-baseline.txt row, and this crate has none. If the template's verdict counts a timeout as a miss (unverified), the moved repository's first full mutation run is red for a reason already judged. Fix: carry the three rows into .github/mutants-exempts at the move, with their reason. S. Two-way.

Decisions for the architect

The rules in force, with their background and prior art, are in the appendix:

Prior art

The comparison with nearby work is in the appendix.

Follow-on

Done when

The checks are in the appendix.

BUGS

Index row

An outside review of interfaces_note before its move. Every finding and decision is done: the crate stands alone in partsfoundry/interfaces_note with publish = false, no tag and no publish, a decoder fuzz target and its triaged mutation exemptions. The stranger test and the first weekly mutation run in the new repository remain.