Skip to main content

Module bundle

Module bundle 

Source
Expand description

Bundle packaging, verification, and merging.

A bundle is the self-contained handoff unit between the conversion machine and the consumer: the division-namespaced mirror subtree, the manifest shard, the rules snapshot that produced it, checksums.b3 over every bundle file, and BUNDLE.json. Bundles are always written clean. The producer’s torn-line tolerance is crash recovery for its own resume path, and packaging refuses a shard with a torn tail instead of repairing it, because a torn tail means an interrupted run and the remedy is resuming the run. Once a bundle passes verification, every line of every shard parses as a complete record.

Verification refuses the whole bundle on any failure and names every offender the failing step found. Merging verifies every input, copies bytes without rewriting a record or a path, and verifies its own output before reporting success. BUNDLE.json carries no timestamp, so packaging and merging the same inputs again is byte-identical.

Structs§

BundleDescriptor
The BUNDLE.json contents. The seven-field set is the frozen bundle@1 shape.
BundleOptions
Options for packaging one division.
BundleReport
The bundle verb output.
BundleSchema
The schema field of a BundleDescriptor. Serializes to the literal text-mirror/bundle@1 and rejects every other value, so a consumer fails closed on a bundle version it does not recognize.
DivisionCounts
Per-division record counts over every shard line, superseded outcomes included.
DivisionCoverage
Coverage for one division as an exact integer pair.
MergeReport
The merge verb output.
VerifyReport
The verify verb output.

Constants§

BUNDLE_SCHEMA
The bundle schema identifier carried by every BUNDLE.json.
CHECKSUMS_NAME
The checksum file name at the bundle root.
DESCRIPTOR_NAME
The descriptor file name at the bundle root.

Functions§

bundle
Packages one division into a bundle and verifies the result.
merge
Merges two or more bundles into one, checking each in full first.
valid_run_id
True when a run id fits the bundle@1 grammar: one to sixty four ASCII characters, alphanumeric first, then alphanumerics, dot, underscore, hyphen.
verify
Verifies a bundle in place.