Structural integrity verification — monotonic counters, service health, and evidence store operability
The CorrigibilityGate's integrity verification mode. Detects state corruption, counter tampering, and service degradation.
The integrity check reads integrity:* keys from the state backend:
integrity:events_count vs integrity:events_count:prevWithout a state backend, integrity checks are skipped (passes with "skipped" message).
Standard GateResult:
passed — true if all checks passchecks — individual check results with names and messagesduration_ms — how long the check took| Gate | Purpose | When |
|---|---|---|
| GainsGate | Infrastructure health | Between phases |
| CardioGate | Quality review + rate limit | Automated quality checks |
| CorrigibilityGate.run() | Text safety (regex) | Before destructive ops |
| CorrigibilityGate.check_integrity() | Structural integrity | After crashes, periodic |