Expand description
Detector-motif registry: the canonical 16 detectors plus the registry hash that the contract pins.
The detector layer is part of the deterministic execution contract. Two crucial properties live here:
- The order of detector motifs. The detector cell encodes which
detectors fired in a single 16-bit mask; bit
ialways refers toMotifClass::variant_at(i). Reordering would silently flip the meaning of every stored mask. - The registry hash. The contract carries a
registry_hashfield that pins the detector set; if the constant exposed here changes (new motif added, threshold table altered, name renamed) the contract hash must be recomputed and any stored case files become invalid. That is intentional — a detector-set change is a contract breach by design.
Enums§
- Detector
Profile - R.9 — detector-axis expansion profiles. Seven profile IDs are
reserved (
D16,D64,D128,D205,D512,D1024,D2000). At HEADD16,D64, andD128are fully implemented: D16 is the legacy 16-motif profile (R.9.a, audit-mode reference); D64 is the R.9.b/R.10/R.11 throughput path that drove the R.13 ~55× full-pipeline campaign reduction; D128 is the R.9.d.1 scaling-ladder proof (commit99a0f3b, 16 motifs × 8 variants, wide-digest baseline with R.10b compact-pack deferred).D205and the wider profiles still reserve their identity + registry- hash slots, deferred to paper §16. - Motif
Class - The deterministic catalog of detector motifs. Sixteen entries, all in
canonical order. Bit
iof aDetectorCell::detector_maskis1whenMOTIF_CATALOG[i].classfired on that cell.
Constants§
- MOTIF_
CATALOG - Order-locked array of all 16 motif classes. Used by the registry hash and by iteration sites that need to walk every detector in canonical order.
Functions§
- registry_
canonical_ bytes - Canonical bytes of the detector registry: a comma-separated list of the motif names in catalog order, with no whitespace. This format produces a stable hash that changes if any name is renamed or any motif is reordered, which is exactly what we want for breach detection.
- registry_
canonical_ len - Length of the populated prefix of
registry_canonical_bytes(). - registry_
hash - SHA-256 digest of the canonical detector registry. The contract’s
registry_hashfield must equal this value verbatim; a mismatch is aDetectorRegistryMismatchverdict. - registry_
hash_ string - Lowercased hex spelling of
registry_hashprefixed withsha256:, suitable for direct substitution intocontract.toml.