roadmap

Stage 5: reading files and the partition table

Appendix to 813. file_allocation_table. It records what stage 5 built and the evidence. Milestone 140 (mount a drive this system did not create) can start its read-only FAT stratum from this stage.

What stage 5 built

No nife type appears in a public signature.

The evidence

check result
Kani, three new harnesses every_sector_parses_to_a_sound_table_or_an_error covers every 512-byte sector. a_partition_device_reads_only_its_partition covers every partition and sector index. a_file_read_stays_inside_its_size_and_its_clusters covers any size, first cluster, request size and seek over volumes of one to three clusters of one, two or four sectors
falsification each harness has a patch that turns it red: an end check that allows 2^33, an off-by-one partition end, and a span that may run one byte past the size
unit tests files across clusters read in chunks of 1 to 700 bytes, seeks both ways, each chain failure, a failing device, entry kinds open_file_reader refuses, every FAT type byte, each partition table refusal, case folding for long and short names, paths through a subdirectory and .., and a stale long-name run
#1803's images the bare image opens as a volume. The MBR image opens through its partition table (type 0x0B, first sector 63). Every file in both reads to its recorded hash through open_file_reader, and lookup finds each in two or three spellings
oracle tests on FAT12, FAT16 (512 and 4096-byte sectors) and FAT32 volumes rust-fatfs wrote, every file read through open_file_reader equals rust-fatfs's bytes and a raw read of the chain. Every path is found in rust-fatfs's spelling, in upper case, in lower case and by short name. The FAT12, FAT16 and FAT32 volumes with 512-byte sectors also read through an MBR that wraps them. The volume this crate's writer lays out reads back by path and by alias
fuzz target file_allocation_table_boot_sector reads every file to its end, holds the bytes to the size, checks a failed reader stays failed, and opens the volumes an MBR names

Kani bounds what it unrolls. The file harness covers three clusters at most; the chain walk's own bound is the cluster count, and the fuzz target holds whole images.

Names minted

Every name in this stage has a ratified Name: block in its source.