Expand description
Canonical pack-extent claims — the physical half of the reshape’s read path.
A manifest node names only immutable logical facts. Where an object’s bytes actually live is a mutable control-plane fact, so it never enters the content root; repacking must change a read envelope, not a manifest hash. This module gives that envelope a canonical encoding of its own so it can be signed, transported, and checked byte-for-byte.
Two rules from the downstream consumer are load-bearing and reproduced here exactly:
- Offset-canonical ordering. Records are ordered by pack offset, not by object key. Packs are laid out for delta compression, so object order and physical order routinely disagree; ordering by object first makes valid coalesced ranges fail their contiguity check (weft #1070, the bug fixed after weft #1069 merged).
- Gap-free coverage. A coalesced range carries a sorted partition of its
authorized records that covers
[start, end)exactly — no gap, no overlap. A pack may hold objects of mixed audience, so one physical range read must never authorize an unselected byte gap between two authorized records. Coalescing joins exactly adjacent extents only.
claim: "WPMX" | u8(version=1) | u16(pack_id_len) | pack_id
| u16(etag_len) | etag | u64(start) | u64(end)
| u32(record_count)
| count * ( u8(kind) | [u8;32](object_hash)
| u64(decoded_size) | u64(offset) | u64(length)
| [u8;32](encoded_digest) )Structs§
- Pack
Range Claim - One coalesced physical range read, plus the partition of authorized records it covers.
- Pack
Record - One object’s physical slice of a pack.
Enums§
Constants§
- PACK_
CLAIM_ MAGIC - Magic prefix on every canonical pack-range claim.
- PACK_
CLAIM_ VERSION - The only claim format version this binary reads or writes.