P1: before the tag
An appendix to the milestone.
P1: before the first tag
-
Entry::blockspanics on an entry a caller can build. DONE (an_entry_whose_block_count_overflows_has_no_size; harnessan_entries_block_count_never_panics_and_is_exactwith its patch). Finding:blocksreturnsSome(self.last_lba - self.first_lba + 1)oncelast_lba >= first_lba. ForEntry::new(t, u, 0, u64::MAX)the addition overflows: a panic ("attempt to add with overflow") with overflow checks on,Some(0)with them off. Verified in the scratch probe. No parsed table reaches it:parseandcreateboth runcheck_partitions, which bounds every used entry inside a usable range that ends before the backup array. ButEntryis a public struct with public fields and aconst fn new, the documentation promisesNoneonly forlast_lba < first_lba, and the fuzz target callsblocksonly on parsed entries, so nothing in the tree can find it. Evidence:src/entry.rsline 120 tosrc/entry.rsline 126;fuzz/fuzz_targets/globally_unique_identifier_partition_table.rs. Change:self.last_lba.checked_sub(self.first_lba)?.checked_add(1), with the documentation sayingNonealso names a range the count cannot hold; one test; and a two-line Kani harness over two symbolicu64s thatblocksnever panics, with its falsification patch. Door: two-way. Effort: XS. -
The crate cannot open a disk whose primary table has damage, and the specification requires it to. DONE (
the_backup_alone_restores_the_primary_byte_for_byte,parse_backup_refuses_a_primary_a_wrong_size_and_a_damaged_array,parse_backup_returns_the_table_write_backup_header_described; harnessa_backup_header_restores_the_table_it_was_written_fromwith its patch: the backup header's field mapping on every disk sizecreateaccepts, the bytes between being the header round trip's). Finding:parserefuses a header whosemy_lbais not 1 (Error::NotPrimary), andcheck_backupneeds a parsed primary. So when the primary header or its array is corrupt, which is the case the backup exists for, the crate offers no way to read the backup, learn the partitions, or restore the primary. UEFI 2.10 section 5.3.2: "If the primary GPT is corrupt, software must check the last LBA of the device to see if it has a valid GPT Header and point to a valid GPT Partition Entry Array. If it points to a valid GPT Partition Entry Array, then software should restore the primary GPT if allowed by platform policy." Linux, FreeBSD andgdiskall read the backup on its own (prior art). The crate's own documentation calls the recovery story its reason for theNIFE_DATAconstant, and this is the half of it the crate does not do. Evidence:src/table.rsline 58 tosrc/table.rsline 62;src/table.rsline 217 tosrc/table.rsline 253;src/guid.rsline 139 tosrc/guid.rsline 145. Change: addparse_backup(backup_block, backup_entries, block_count: u64). It decodes the header, requiresmy_lba == block_count - 1andalternate_lba == PRIMARY_HEADER_LBA, and applies the same array and geometry checks (entry_array_lba > last_usable_lba, `entry_array_lba- array_blocks <= my_lba
). It returns a table normalized to the primary's orientation (my_lba1,alternate_lbathe last block,entry_array_lba2, the convention every tool writes and the onewrite_backup_headeralready assumes in reverse). Thenwrite_primary_headerandentry_arrayrestore the primary with no new code, andcheck_backupagainst the real primary says whether a restore is needed. Add one test that starts from thesgdiskfixture's tail with its head zeroed. Add one Kani harness, with a patch, thatparse_backupof whatwrite_backup_header` wrote agrees with the table that wrote it. Door: two-way (additive). Effort: M.
- array_blocks <= my_lba
-
Nothing compares the header's idea of the disk with the device. DONE:
check_disk_size(a_table_cloned_onto_another_size_of_disk_is_refused_by_the_size_check), theparsedocumentation, the README contract and aBUGSline in each nife caller. Wiring the check in is each program's own change. Finding:parsetakes the disk's size fromalternate_lba + 1and checks every other field against that. A table cloned onto a smaller or larger disk, or a disk grown under its table, parses clean.check_protective_mbrthen checks the MBR against the header's figure, not the device's, so an MBR cloned with it passes too. Linux checksfirst_usable_lbaandlast_usable_lbaagainst the device's last block and warns whenalternate_lbais not there. FreeBSD marks a header invalid whenhdr_lba_alt > last. The documentation ofparseand ofblock_countdoes not tell a caller to compare. No caller in nife does.uefi_loader's chooser holdsmedia.last_blockand never compares it withtable.block_count().system_installerreads the device's size for its own refusal and not for this one. Evidence:src/table.rsline 67 tosrc/table.rsline 72;src/table.rsline 270 tosrc/table.rsline 273;src/table.rsline 344 tosrc/table.rsline 346;uefi_loader/src/chooser.rsline 340 to:361. Change: addcheck_disk_size(&self, device_blocks: u64) -> Result<(), Error>with a new variantError::DiskSize { header: u64, device: u64 }. Require equality, since a grown disk is a resize for a tool to perform, not a table to accept. Add one sentence inparse's documentation and the README contract naming the three checks a caller runs afterparse(disk size, backup, protective MBR). Add aBUGSline in each nife caller that does not yet call it, for the lanes that follow. Door: two-way. Effort: S. -
parsecannot tell where the array bytes came from, and every caller guesses block 2. DONE for the cheap form (theparsedocumentation, the README example and theEntryArrayCrcdocumentation). WILL NOT FIX the firm form (provisional, 2026-11-22 UTC): a wrong block already fails the array CRC, and an added function can give the precise refusal later without breaking a caller. Finding: the documentation saysentry_array"is read from the header'sPartitionEntryLBA", but a caller learns that field only fromHeader::decodeor fromparseitself. All seven nife callers, the fuzz target and the README example read block 2 unconditionally. The specification requires only that the primary array lie after the header and end before the first usable block. A conformant table with its array elsewhere therefore fails here withEntryArrayCrc(the bytes from block 2 are not the array) orTableOverlapsUsable. The error documentation attributes both to a corrupt disk. Verified in the scratch probe withentry_array_lbaset to 3 on the sample disk. Evidence:src/table.rsline 22 tosrc/table.rsline 28;src/error.rsline 37;README.mdline 47;uefi_loader/src/chooser.rsline 355;components/src/system_installer.rsline 215. Change: take the cheap form first.parse's documentation and the README example show the two steps (Header::decodethe block from LBA 1, readentry_array_lbaforarray_blocks, thenparse).Error::EntryArrayCrc's documentation names "an array read from the wrong block" as a cause. The maintainer may prefer the firm form, aread_from: u64parameter withError::EntryArrayElsewhere { header: u64, read: u64 }. It changes the one signature every caller uses, which is cheap before the tag and not after. Door: two-way now, one-way for the firm form after the tag. Effort: S. -
The claim "no
unsafe" is prose. DONE (#![forbid(unsafe_code)]). Finding: the README and the crate root say the crate has nounsafe, and it has none, but nothing refuses one. The template's weekly fuzz opts a crate in only when its shipped source carries nounsafe, and its scan passes a crate whose roots carry#![forbid(unsafe_code)]without reading further. Evidence:src/lib.rsline 5;README.mdline 5;crate-workflows/README.md, "The weekly fuzz run". Change:#![forbid(unsafe_code)]under#![no_std]. Door: two-way. Effort: XS. -
Twenty-three public items have no documentation, and the lint that would say so is off. DONE (every field documented, the
allowand theBUGSline gone;cargo docwith warnings denied is clean). Finding:Cargo.tomlturnsmissing_docson andsrc/lib.rsline 17 turns it off again, for the eighteen fields ofError's variants, four variants ofBackupMismatchand the field ofMbrProblem::ExtraRecord. The README'sBUGSrecords it. The review package assigns it to the lane that ratifies the names; this block adds the shape of the fix. Evidence:src/lib.rsline 15 tosrc/lib.rsline 17;src/error.rsline 25 tosrc/error.rsline 69;src/error.rsline 86 tosrc/error.rsline 89. Change: one line per field, saying what the number is ("the CRC the header stores", "the CRC computed over the bytes", "the array's zero-based index"); drop theallowand theBUGSline. Door: two-way. Effort: S. -
The error type is not an error, and two of its parts print as Rust. DONE (
a_table_debug_prints_a_summary_and_every_refusal_is_an_error;core::error::Error,Displayfor both enums,#[non_exhaustive]on all three). Finding:ErrorimplementsDisplayand notcore::error::Error(stable since Rust 1.81, under this crate's 1.89); a caller cannot put it in aBox<dyn Error>or behind?intoanyhow.BackupMismatchandMbrProblemhave noDisplay, so a person reads "the backup header disagrees about MyLba" and "the protective MBR is wrong: ExtraRecord { index: 1 }". None of the three enums is#[non_exhaustive], so items 3, 4 and 5 each add a variant that would be a breaking change after the tag, and so would any later one. Evidence:src/error.rsline 114 tosrc/error.rsline 170;src/error.rsline 159 andsrc/error.rsline 160. Change:impl core::error::Error for Error {};DisplayforBackupMismatch("its MyLBA field") andMbrProblem("record 1 is a second partition: a hybrid MBR"), fed from theErrormessages;#[non_exhaustive]on all three. The last is the stricter choice, and the one that is reversible: dropping it later breaks nobody, adding it later breaks every exhaustivematch. Door: two-way until the tag; the#[non_exhaustive]choice is one-way after it. Effort: S. -
The template's name gates are red today, on ten register names and one spelled-out word. DONE. The rename lane applied the ratified names. Finding:
register_namesrefusesentry::SIZE,entry::SIZE_U32,header::HEADER_SIZE,header::at::HEADER_SIZE,header::at::ENTRY_SIZE,Header::entry_size,MINIMUM_BLOCK_SIZE,MAXIMUM_BLOCK_SIZE,mbr::SIZE_LBAand the fieldblock_size;spelled_outrefuses the testthe_three_reads_a_gpt_reader_makes. The package's rows 4 to 7 and 15 cover seven of these. It did not listSIZE_U32, the two offset constants inheader::atormbr::SIZE_LBA. They are private andname_release.pydoes not list them, but the template judges every name the crate defines. Evidence: the gate output;src/entry.rsline 16,src/entry.rsline 205,src/header.rsline 25,src/header.rsline 33,src/header.rsline 43,src/mbr.rsline 21. Change: in the one rename lane the package already plans, add the four. They areentry::ENTRY_BYTES_U32beside the package'sENTRY_BYTES;at::HEADER_BYTESandat::ENTRY_BYTESso the offset constants follow the fields they locate; andmbr::SIZE_BLOCKSwith#[doc(alias = "SizeInLBA")](the unit is blocks; under the package's decision 2 the_LBAnames change together). All are ratified 2026-11-20 UTC with the package's table. Door: names are the architect's; the private four are two-way. Effort: XS on top of the package's lane. -
The template's prose gate is red on nineteen acronyms. DONE. Each acronym is expanded at first use or reworded. The gate still refuses
GPTandRFCbeside their expansions, the template's false positive. Finding:check / standalonewants every acronym expanded at its first use, at a ceiling of 0.prose_acronymsreports these. In the README (lines 3 and 24): UEFI, GPT and RFC. In the crate root (lib.rsline 1,lib.rsline 4): GPT and UEFI. Incrc.rsline 3: IEEE and PNG. Inentry.rsline 22,:26and:30: OEM, IO and BIOS. Inguid.rsline 1,:3,:61,:69,:114,:123and:131: UUID, RFC, EFI, FAT, GRUB, LUKS, HFS and APFS. Inentry.rsline 132: FFFD, which is the code point U+FFFD and a false positive the gate should learn. Evidence: the gate output. Change: expand each at its first use in the README and once per crate in the sources ("Unified Extensible Firmware Interface (UEFI)", "Request for Comments (RFC)", "Logical Unit Key Setup (LUKS)"). For FFFD, write "the replacement character U+FFFD" and report the false positive to the template. A hexadecimal code point afterU+is not an acronym. The template owns that fix; this block names it on the blocked side. Door: two-way. Effort: S. -
The repository's mutation verdict stays red until the maintainers exempt the recorded equivalents. LEFT. It belongs to the move and the first full run in the new repository. Finding: the recorded baseline for the crate is 373 mutants, 3 missed, 2 timed out, 33 unviable. The triage finds six survivors equivalent: a shift of zero, three disjoint-bit
|to^, one comparison the next check repeats, and oneusizebound a 64-bit host cannot fail. The template'smutationverdict judges every shard against.github/mutants-exemptsand fails on a missed mutant that is not there; the scaffold's file is empty. Evidence:.cargo/mutants-baseline.txtline 48; the crate's section of the recorded census triage undernotes/mutation-testing/, whichnotes/mutation-testing/README.mdline 63 links;crate-workflows/README.md, "The full mutation run". Change: the move lane carries the six equivalents into the new repository's.github/mutants-exempts, each with the triage's one-line reason. It dispatchesmutation.ymlonce onmainso the release gate has a green full run to read. The two timeouts are the exhaustive sweeps. The shard timeout or--timeout-multiplierneeds checking on the first run. Door: two-way. Effort: S. -
The README is not yet the template's README. LEFT. The badge row, the measured Kani figures and the stranger run need the new repository. Finding: there is no badge row under the title (
readme_badgesfailscheck / standaloneon it). The patch recipe sayspatch -p3(README.mdline 71), which is the path depth inside nife, and the regenerated patches in the new repository apply at-p1. The README has nocargo kani --harness <module>::<name> --exactform, no measured time and peak memory forcargo kani, and no sentence on what a passing run prints that looks alarming. It has norustup target addline before the bare-metal build. Theuuidsentence under "Minimum Rust version" is right (verified against 1.28.0 and 1.29.2), and the scaffold wants thecargo +1.89 testcheck beside it. The README's oneBUGSline is item 7 and goes with it. Evidence:README.mdline 1,:71,:88to:92,:125,:129;crate-workflows/scaffold/README-crate.md. Change: add the scaffold's badge row with this repository's name. Add the "Running the proofs" and "Running one falsification patch" sections with this crate's figures (165 seconds total on the review host, the peak from/usr/bin/time -v). Add the target lines and the version check. Then record a stranger run. Door: two-way. Effort: S.