Expand description
Canonical manifest-node encoding — WPMF v1.
A manifest node is addressed by BLAKE3(canonical_node_bytes). There is
exactly one byte string per logical node, so the same logical membership
always produces the same root hash. Every integer is unsigned big-endian,
entries and children are strictly ordered, and decoding rejects duplicates,
truncation, trailing bytes, and any non-canonical spelling.
The layouts below are byte-identical to the already-merged downstream
consumer (weft PR #1069, docs/PLAN_MANIFEST_FORMAT.md), including the
WPMF magic and the weft-plan-manifest-key-v1 routing domain. Byte
compatibility with a shipped consumer outranks upstream nomenclature: this
module is the normative definition of bytes that already exist, not a
second, competing format.
leaf: "WPMF" | u8(version=1) | u8(tag=0) | u16(count)
| count * ( u8(kind) | [u8;32](hash) | u64(decoded_size) )
branch: "WPMF" | u8(version=1) | u8(tag=1) | u8(depth) | u32(bitmap)
| popcnt * ( [u8;32](child_hash) | u64(object_count)
| u64(decoded_bytes) )Structs§
- Manifest
Branch - Manifest
Child - A branch’s reference to one child subtree, with the summary that lets a planner size a subtree without descending into it.
- Manifest
Key - The trie key:
(kind, object_hash). Ordering is the canonical plan order — kind first, then the 32 hash bytes lexicographically. - Manifest
Leaf - Manifest
Object - One immutable content object named by a manifest leaf.
- Manifest
Route - The fixed 256-bit route derived from a
ManifestKey, read as successive 5-bit groups, most-significant bit first.
Enums§
- Manifest
Decode Error - Rejected while decoding node bytes. Each variant is a distinct corruption
class and maps to a named fsck rule via
ManifestDecodeError::fsck_rule. - Manifest
Node - Manifest
Node Error - Rejected while constructing a node in memory.
- Manifest
Object Kind - The object types a manifest leaf may name.
Constants§
- MANIFEST_
BRANCH_ WIDTH - Branch fan-out — one bitmap slot per possible 5-bit route group.
- MANIFEST_
FORMAT_ VERSION - The only manifest format version this binary reads or writes.
- MANIFEST_
LEAF_ MAX_ ENTRIES - Entries a leaf may hold before it must split into a branch, unless the route is already exhausted.
- MANIFEST_
NODE_ MAGIC - Magic prefix on every canonical manifest node.
- MANIFEST_
ROUTE_ BITS - Routing bits consumed per trie level (32-way branching).
- MANIFEST_
ROUTE_ DOMAIN - Domain separator for the trie route. Hashed with the plan key to derive the 256 routing bits.
- MANIFEST_
ROUTE_ LEVELS - Levels available before the fixed 256-bit route is exhausted
(
ceil(256 / 5)). A leaf at this depth may exceedMANIFEST_LEAF_MAX_ENTRIESbecause no routing bits remain to split it.