pub struct RootBinding {
pub roots_enumerated: usize,
pub sites: [(EffectRootKind, usize); 8],
pub effects: usize,
}Expand description
What a walk over the effect roots actually examined.
CLAUDE.md: a green gate that binds to nothing is vacuous, not a pass. A proof
over “every effect” is only as good as the roots it reached and the bundles it
found there, and neither number is visible from the proof’s own output. This
is that ledger, filled in by for_each_effect_root on every call.
Fields§
§roots_enumerated: usizeHow many of EffectRootKind::COUNT roots the walk enumerated. Always
COUNT for a walk that ran — a smaller number means a root stopped being
enumerated, which the walk itself asserts against.
sites: [(EffectRootKind, usize); 8]Per-root: how many bundles the campaign actually has there. A zero is not
a failure — a campaign with no traps has no traps[].payload — but it is
the reason a proof over that root binds to nothing, and it is reported
rather than left for a reader to infer.
effects: usizeTotal top-level effects across every root.
Implementations§
Source§impl RootBinding
impl RootBinding
Sourcepub fn unbound_roots(&self) -> Vec<EffectRootKind>
pub fn unbound_roots(&self) -> Vec<EffectRootKind>
The roots this campaign has no bundles at — where any proof over the effect surface is necessarily unbound.
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The ledger as a JSON object, for <out>/validation/effect-roots.json.
Self::summary renders the same numbers for a human reading stderr,
and stderr is where they stayed: a build’s stated binding was a string
nothing downstream could read, so a gate that wants to assert “this
campaign’s effect walk bound to something” had to scrape prose or go
without. Every other proof in this compiler already publishes its binding
as a validation/*.json ledger; this is the one that did not, and
spec-0039 criterion 6 needs it machine-readable — “printed somewhere” is
explicitly not enough.
unbound_roots is listed rather than left to be derived: a zero at a
root is not a failure (a campaign with no traps has no trap payloads),
but it is the reason any proof over that root binds to nothing, and the
point of a ledger is that a reader does not have to infer it.
Trait Implementations§
Source§impl Clone for RootBinding
impl Clone for RootBinding
Source§fn clone(&self) -> RootBinding
fn clone(&self) -> RootBinding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more