# CAIN HERMES — Enforcement Integrity

`cain/hermes/integrity.py`.

Continuously verifies that intended/compiled/deployed governance is the governance actually present and active:

- the intended policy exists (plan present)
- the compiled policy exists (plan digest present)
- the deployed policy exists (deployment records the plan digest)
- each enforcement point is reachable and active
- the policy hash matches the compiled plan
- the adapter version and runtime version match the certified ones
- the expected evidence is generated
- the action boundary exists

## Detects

`POLICY_BYPASS · STALE_POLICY · DEAD_ENFORCEMENT_POINT · SHADOW_ENFORCEMENT · CONFIGURATION_DRIFT · ADAPTER_DRIFT ·
RUNTIME_DRIFT · VERSION_MISMATCH · UNOBSERVED_PATH · UNEXPECTED_PATH · AUTHORITY_EXPANSION`.

Any finding is fail-closed; `integrity_ok` is never assumed.

## Distinction from existing work

`cain/substrate/cain_last_mile_enforcement.py` prevents **in-flight parameter mutation**; the cluster-13 validator
probes **network topology**. HERMES verifies the **governance deployment** (policy/version/evidence/boundary) and
detects shadow and unexpected paths at the governance layer.

## Status

IMPLEMENTED, TESTED, LIVE (the `enforcement_integrity` restriction-only hosted stage).
