Skip to main content

Module gate

Module gate 

Source
Expand description

The evidence gates (SP4 design §5), as predicates over AdapterMetadata.

These live in the library rather than in tests/adapter_contract.rs for one reason: a gate whose only expression is an assertion over static METADATA items cannot be proven non-vacuous. cargo mutants mutates functions, not statics, so a weaker-than-intended gate — Gate B’s biconditional written as a single implication, say — would pass purely because no shipped adapter exhibits the excluded combination. As functions they take negative fixtures, and a mutant reaches them.

Enums§

GateFailure
Why a gate refused. One variant per rule, so a test names the rule it is pinning.

Constants§

CITED
MEASURED
The provenance prefixes a basis may start with (SP4 design D5).
UNKNOWN_VERSION
The encoding of a failed probe in evidence.upstream_version (SP4 design §9 outcome 2).
UNMEASURED

Functions§

gate_a_shape
Gate A’s shape half: what can be checked before any transcript exists (SP4 design §5.2).
gate_b
Gate B: every basis carries a provenance prefix, no newline, and unmeasured: exactly when Unknown.
gate_c
Gate C: what Proven costs, and what a failed probe forces (SP4 design §5, D6).
gates_before_transcripts
Every gate that applies before the probe run, for one adapter.