symfonic.services.switching.evidence¶
evidence ¶
SCP-FRZ-2 / SCP-REV-4 — retirement evidence, keyed to its freeze epoch.
Evidence is never "the drain was clean"; it is "the drain was clean under freeze epoch F". Keying it that way is what lets revocation invalidate a whole generation of results in one operation, and what makes reads that filter on the current epoch a structural guarantee instead of a review checklist item.
EvidenceInvalidated
dataclass
¶
EvidenceInvalidated(freeze_epoch_id: str, bundle_id: str, reason: str, evidence_ids: tuple[str, ...], kinds: tuple[str, ...], invalidated_at: float = 0.0)
The event T4.4.7 consumes when a freeze revocation lands.
RetirementEvidence
dataclass
¶
RetirementEvidence(evidence_id: str, freeze_epoch_id: str, bundle_id: str, kind: str, detail: str, recorded_at: float = 0.0, invalidated_by: str | None = None)
One gathered result, permanently attributed to one freeze epoch.
RetirementEvidenceStore ¶
Append-only evidence with epoch-scoped invalidation and a subscriber seam.
Source code in src/symfonic/services/switching/evidence.py
covers ¶
Whether every required evidence kind is present and still valid.
Source code in src/symfonic/services/switching/evidence.py
invalidate_epoch ¶
Atomically mark every row of this epoch invalid and emit the event.
Source code in src/symfonic/services/switching/evidence.py
valid_for ¶
SCP-REV-4: reads filter on non-invalidated AND matching epoch.