Skip to main content

Module header

Module header 

Source
Expand description

Normative .10d container header — the barrier surface every later P0 task consumes.

Layout: 64 bytes, repr(C), all fields naturally aligned, one explicit pad0[2] field that must be zero. The header carries:

  • magic + version (the parse-rejection gates for bad magic / unknown version)
  • axis_roles[10] — the normative axis-role taxonomy (one AxisRole per axis in AXIS_ORDER); any Undefined entry is rejected
  • metric_descriptor — the super::metric_check::MetricCompletenessDescriptor verified against Tensor10D::full_distance’s actual v-branch behaviour; a diverging descriptor is rejected (the “queryability claim == code” gate)
  • header_crc32cspec-reserved in P0.1: the field exists and is written as zero on encode, but P0.3 wires the shared CRC-32C (delegated from q42/p64_weight.rs) and starts enforcing it. P0.1 does not enforce the CRC — that is P0.3’s acceptance gate, not P0.1’s.
  • reserved[8] — zero, future use (governance default-disposition flags, capability bits, time-base selector — all P0.2+ territory).

The header is the foundation every later P0 task writes into, so its byte layout is frozen at v1 and asserted by header_is_pod_with_exact_size: size_of::<Container10dHeader>() == 64 and the named pad/reserved fields are zero.

Structs§

Container10dHeader
The normative .10d v1 header — 64 bytes, repr(C), naturally aligned.

Enums§

HeaderParseError
Parse error categories — one per acceptance-gate rejection.

Constants§

FLAG_DEFAULT_DISPOSITION_REFUSE
Header flag bit 0: default disposition = Refuse. A reader that ignores the Governance section still fails closed. Always set in v1 headers produced by Container10dHeader::proposed.
HEADER_BYTE_SIZE
Exact byte size of the header POD. Asserted by the size-of test so a future field addition cannot silently shift the layout.
HEADER_VERSION
.10d header version. Increment only when the POD layout or caller-buffer contract changes (forward-compat is by version, not by flag bits).
MAGIC_10D
.10d container magic — ASCII "10d\0".
MAX_SECTION_COUNT
Maximum number of section descriptors the parser will accept. Bounds the section-table allocation against a hostile/malformed file. 1024 is far beyond any realistic .10d (the design’s section types number ~10) while keeping the table trivially small.