roadmap BUILT

1093. globally_unique_identifier_partition_table: what an outside maintainer would fix before 0.1.0

Raised by a read-only review of crates/globally_unique_identifier_partition_table as a stranger to this tree would meet it, before its move to nifeos/globally_unique_identifier_partition_table at step 2 of milestone 1017 (the contract crates leave in this order). It changes nothing; it lists what the next lanes change.

The review took its accepted baseline from the review package and reopens none of the decisions it settles or holds. Those are the crate name and the six ratified names, and the sixteen rows of its name table. They include its two decisions for the architect, now ruled below: where the two nife type GUIDs live, and whether lba and mbr spell out. They also include its two open questions: a totality harness for parse, and whether VERSION stays. Where this block touches a name the package lists, it says so and adds only what the package did not see.

Reuse: the template partsfoundry/crate-workflows and its scaffold, Kani, cargo-mutants, cargo-fuzz, the crate's own testing::sample_disk and its two real fixtures. No new tool. The one new dependency is this tree's own master_boot_record, which holds the protective-MBR code.

Finding status

Every item not Done blocks the first crates.io publish, which waits until every outside-review milestone reaches delivery.

Open decisions

None. The architect ratified the names and cleared the repository; the move waits only for the move lane.

Goal

A stranger who finds the crate on crates.io can tell in one screen what it is for. The stranger can build, test, prove and falsify it from the README alone. The stranger can recover a disk whose primary table has damage (the case the format exists for). Every function the crate exports is total on the inputs its documentation admits. The repository's gates are green for the crate's own reasons.

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 half a day, M a day or two. A door is one-way when somebody outside the repository acts on it after the release (a public name, a published behavior, a layout, a dependency); everything else is two-way and the maintainer decides it. Line numbers are at the head this review read.

P0: blocks the move to its own repository

  1. The sources carry nife's vocabulary, which the template's check / standalone refuses. LEFT. The move commit strips the Name: blocks and the manifest comment. Finding: Name: provenance blocks at src/lib.rs line 17, src/lib.rs line 44, src/lib.rs line 53, src/lib.rs line 59, src/header.rs line 19, src/guid.rs line 19, src/guid.rs line 33, src/mbr.rs line 7, src/table.rs lines 4, 102 and 350 and src/error.rs line 3. The publish = false line at Cargo.toml line 11 carries a comment naming crates/publish-allowlist.txt, a file the new repository will not have. The lib.rs line 17 block cites a design/decisions/ section. The template's standalone.py refuses a Name: block and the template's AGENTS.md refuses design/ paths. Two of the blocks quote a person, which the tree's own rule for records forbids; stripping them resolves that too. Evidence: the lines above; crate-workflows/AGENTS.md, "Comments and names". Change: the move commit strips every Name: block (the ruled procedure) and replaces the manifest comment with one sentence a stranger can act on ("set to true only in the release that publishes"). The runbook already owns the strip; this item is here so the gate's first run is not its first discovery. Door: two-way. Effort: XS, inside the move lane.

P2: later

The P2 items are in the appendix.

P1: before the tag

The P1 items are in the appendix.

Decisions for the architect

Each decision below is the rule in force from 2026-11-19 UTC. The maintainer's rulings are provisional.

Decision 1: the name of the one type a user holds

Background. The crate's central type is GloballyUniqueIdentifierPartitionTable, forty-two characters, reached as globally_unique_identifier_partition_table::GloballyUniqueIdentifierPartitionTable. The crate name stays as ratified and this block does not touch it. The type's name is a separate name, listed in the package's public API table without a row of its own, and it will be in every signature, error message and search result a user meets. In nife, xtask/src/confirm.rs already imports it as Table.

Recommendation: PartitionTable. The crate path already says which partition table, so the type says what it is inside that path, as std::collections::hash_map::HashMap does not repeat "collections" and gpt_disk_types::GptHeader repeats only the three letters. The recommendation is about reading, not effort: the rename is mechanical across sixteen files outside the crate. The cost is one more name in the family (the crate and its type no longer match), which uuid::Uuid shows is not the only convention. Refused alternatives: Table (the generic word the naming page warns against) and Gpt (the acronym the ratified crate name avoids).

Prior art: gpt::GptDisk, gpt_disk_types::GptHeader and GptPartitionEntryArray, uuid::Uuid, HashMap. Concrete example: today's README line reads GloballyUniqueIdentifierPartitionTable::parse(&disk[512..1024], &disk[1024..1024 + 16384])?; the recommendation makes it PartitionTable::parse(...).

Decided by the maintainer on 2026-11-14 (UTC), provisional: a two-way door before the first tag, which the architect may revisit. The type becomes PartitionTable, with no alias. Three callers already import it as Table (xtask/src/confirm.rs line 41, xtask/src/rollback.rs line 66, uefi_loader/src/chooser.rs line 38). A tag is a pre-release that only nifeos repositories pin. Effort: XS.

Decision 2: the size constants take their unit

Rule (maintainer, provisional, 2026-11-19 UTC; two-way until the first tag). The crate renames entry::SIZE to ENTRY_BYTES, the private SIZE_U32 to ENTRY_BYTES_U32, HEADER_SIZE to HEADER_BYTES. at::HEADER_SIZE and at::ENTRY_SIZE become at::HEADER_BYTES and at::ENTRY_BYTES. Header::entry_size becomes entry_bytes (alias SizeOfPartitionEntry), MINIMUM_BLOCK_SIZE and MAXIMUM_BLOCK_SIZE become MINIMUM_BLOCK_BYTES and MAXIMUM_BLOCK_BYTES. The field block_size becomes block_bytes. mbr::SIZE_LBA becomes mbr::SIZE_BLOCKS (alias SizeInLBA). The test becomes the_three_reads_a_partition_table_reader_makes. One rename lane does this with the package's name table. This pull request changes no crate code.

Why. The naming rules end a size with its unit, and the template's name gates refuse all eleven names. The units rule came after #2797 ratified the two block limits.

Prior art. gpt_disk_types leaves the unit to a BlockSize type; Linux writes sizeof_partition_entry; this tree's page contracts spell PAGE_BYTES. Nife puts the unit in the name. Example: [0u8; entry::ENTRY_BYTES] reads as 128 bytes.

Decision 3: uuid stays in the public API

Rule (architect, 2026-11-19 UTC). The crate keeps uuid::Uuid in its public signatures, with a caret floor of 1.28.0 and default features off. A GUID is an opaque sixteen-byte identifier: the crate checks and generates no version or variant. The rename lane adds a documentation item to the crate docs that says so (the maintainer's two-way call).

Why. Uuid is what users print, parse and compare (253 million recent downloads against 705 thousand for uguid), and a proof covers the two byte swaps this crate adds over all 2^128 values.

Prior art. gpt uses uuid; gpt_disk_types and uefi use uguid. Nife keeps the order every tool prints and pays sixteen byte moves per read. Example: a downstream holding a uefi Guid converts with Uuid::from_bytes(guid.to_bytes()).

Decision 4: where the nife partition type GUIDs live

Rule (architect, 2026-11-19 UTC). NIFE_DATA and NIFE_BOOT move, values unchanged, to a crate that stays in nife, provisionally nife_partition_types, and leave types::name. Whether the identifiers say nife or Moho stays open and two-way while the crate is unpublished.

Why. Every installed disk carries these values, so they never change, and a standalone crate may not name one system.

Prior art. gpt_disk_types and gpt carry the well-known types and leave a system's private types to that system; systemd keeps its Discoverable Partitions GUIDs in systemd. Example: uefi_loader reads the data type from the new crate, and types::name lists only public types.

Decision 5: spelling out lba and mbr

Rule (architect, 2026-11-19 UTC). The crate spells out logical_block_address and master_boot_record, as ยง154 (the acronym test is whether the phrase is spoken) spelled out gpt. The rename lane applies it to the header fields, Entry::first_lba and last_lba, PRIMARY_HEADER_LBA, the table readers, two error variants and the mbr module, enum, variant and functions.

Prior art. gpt_disk_types writes Lba and MasterBootRecord; Linux and FreeBSD write lba. Nife applies the acronym test, which most systems do not. Example: backup_header_lba() becomes backup_header_logical_block_address().

Decision 6: review clearance and the repository

Rule (architect, 2026-11-20 UTC). The architect cleared the review and ratified the names, from the review package, and cleared the repository nifeos/globally_unique_identifier_partition_table as publish = false, with no tag and no publication. The first tag waits on a bounded parse totality harness, or a recorded reason it cannot finish.

Prior art. generational_table, block_roster and file_allocation_table each moved on a cleared review with no tag. Example: script/crate-move globally_unique_identifier_partition_table then runs with the renamed constants and no nife GUID.

Done when

The checks are in the appendix.

BUGS

Follow-on

Index row

An outside review of globally_unique_identifier_partition_table before its move and first release: one item that blocks the move (nife's vocabulary in the sources), eleven to land before the tag, and eight for later. The eleven cover these. A panic in Entry::blocks on a hand-built entry. The missing path through the backup table that the specification requires. A disk-size check no caller performs. The array-location guess every caller makes. The forbid(unsafe_code) line. The twenty-three undocumented items. The error type's traits. The template's name, prose and mutation gates. The README's proof sections. The central type becomes PartitionTable; the size constants take their unit, uuid stays, the nife type GUIDs leave, and lba and mbr spell out.