# CAIN-42 — Evolution 02: Byzantine Authority Continuity Fabric — Report

## 1. Executive summary
Evolution 02 adds a canonical **Authority Object** and an **Authority Continuity Protocol** on top of
the Evolution 01 governance kernel. Every authority-bearing action is bound to a verifiable authority
object with an explicit lineage, scope, governance epoch and quorum certificate. Child authority can
never exceed parent; stale, revoked, epoch-invalid, policy-invalidated, trust-collapsed,
model/tool-substituted, replayed or expired authority fails closed. 18/18 authority invariants,
20/20 Byzantine authority attacks, 64/64 kernel tests, clean-room authority proof VERIFIED.
**Nothing is claimed patented, novel, first, or production-observed.**

## 2. Architecture map
`cain/govkernel/authority.py` (Authority Object, attenuation, continuity) ·
`revocation.py` (monotone revocation + emergency halt + epochs) · `causal_graph.py` (causal authority
graph) · `counterfactual.py` (governance what-if) · `authority_invariants.py` · `authority_attacks.py`
· clean-room `authority_verifier.py`. Integrates the Evolution 01 kernel and reuses E20 canon, E21
quorum, E22 permits, E25 delegation.

## 3. Authority Continuity Protocol
`continuity_check(authority, context)` fail-closed evaluates: revocation, governance epoch, policy
version, trust/risk hash, temporal validity, nonce replay, identity version, model identity, tool
identity, quorum certificate validity, evidence presence. Any failure returns a specific code and
denies. `action_matches(...)` binds authority to the exact resource/action/parameters/tenant.

## 4. Canonical Authority Object schema
`authority_id, principal_id, agent_id, agent_identity_version, capability_id, capability_version,
delegator_id, delegation_chain, parent_authority, authority_scope, resource_scope, action_scope,
parameter_constraints_hash, valid_from/valid_until, tenant_scope, policy_hash/policy_version,
trust_state_hash, risk_state_hash, model_identity, tool_identity, execution_environment_identity,
governance_epoch, quorum_certificate_hash, authorization_nonce, revocation_state/revocation_epoch,
causal_parent, evidence_root, creation_event, supersession_event, schema_version`.

## 5. Delegation model
`attenuation_violations(child, parent)` machine-checks child ⊆ parent for capabilities, resources,
actions, tenant, principal, expiry and epoch; `attenuates()` returns the boolean. Widening, outliving
the parent, tenant/principal change, epoch regression, and model/tool substitution are all detected.

## 6. Revocation model
`RevocationFabric`: append-only, **monotone** (first revocation wins; never un-revokes), with
emergency halt that fails closed for all governed execution. Propagation digest is deterministic.

## 7. Governance epoch model
`GovernanceEpoch` with `validate_epoch_transition` enforcing **+1 only** and a hash chain
(`prev_hash`); skipping and rollback are refused. Authority is valid only in its epoch.

## 8. Byzantine quorum integration
Authority commits to a `quorum_certificate_hash`; `continuity_check` requires it to be in the current
valid-quorum set. A Byzantine replica cannot unilaterally produce authority because the authority hash
binds the quorum certificate.

## 9. Causal Authority Graph
Typed edges (CREATED_AUTHORITY, DELEGATED_TO, PROPOSED_ACTION, POLICY_GOVERNED, TRUST_PERMITTED,
RISK_MODIFIED, QUORUM_CERTIFIED, ENFORCED_ACTION, EXECUTED_ACTION, EVIDENCE_RECORDED,
REVOKED_AUTHORITY, SUPERSEDED_AUTHORITY) with `why_allowed(action)` and `authority_origin(id)`. The
graph is a record, never an authority source.

## 10. Counterfactual governance
7 interventions (revoke authority, lower trust, previous policy, Byzantine quorum, change tool/model
identity, advance epoch). `executed` is always False; it re-evaluates continuity only.

## 11. Formal invariants
E02 adds 18 executable runtime checks (A-01…A-18). Classified **EXECUTABLE RUNTIME CHECK** — a TLA+
model is **NOT_MEASURED** (recommended for Evolution 03).

## 12. Attack matrix
20/20 Byzantine authority attacks demonstrate their protected property (unauthorized authority, replay,
parameter/scope mutation, delegation abuse, stale/future authority, epoch rollback, evidence forgery,
conflicting histories, quorum manipulation, equivocation, tenant crossing, escalation, resurrection,
model/tool substitution, post-revocation / post-policy / post-trust-collapse execution).

## 13. Test results
`tests/govkernel`: **64/64** (E01 26 + E02 38). Full regression E20–E26 + govkernel: see CHANGELOG.

## 14. Performance
Per-run latencies recorded in `E02_GATE_RESULTS.json`. A baseline-vs-E02 benchmark is **NOT_MEASURED**.

## 15. Evidence bundle
`artifacts/govkernel/` — `E02_GATE_RESULTS.json`, `E02_INVARIANTS.json`, `E02_ATTACKS.json`,
`AUTHORITY_PROOF.json`, `E02_EVIDENCE_BUNDLE.json`; published to the three sites.

## 16. Independent verifier
`verification/govkernel/cleanroom/authority_verifier.py` (zero CAIN imports): authenticity (hash),
parent attenuation, epoch/policy/trust/risk binding, temporal validity, revocation, quorum, evidence.
Positive PASS + negative FAIL.

## 17. IP Candidate Register
See `docs/evolution02/IP_CANDIDATE_REGISTER.md` (authority object + continuity protocol + attenuation
+ revocation/epoch monotonicity + causal authority graph + counterfactual governance). **No legal
patentability claimed; prior-art search required.**

## 18. Reproduction cost
See `docs/evolution02/REPRODUCTION_COST.md`. Realistic additional engineering over Evolution 01.

## 19. Security findings
No authorization bypass found in the tested E02 scope. Fail-closed behaviour verified for 14 continuity
conditions. Untested: live wiring of E02 as the authority boundary (still experimental).

## 20. Remaining weaknesses
- TLA+ model NOT_MEASURED. Baseline performance NOT_MEASURED.
- E02 is a library, not yet the live authority boundary.
- Quorum certificate is a hash commitment; full certificate validation reuses E21 and is not re-run here.

## 21. Production-readiness assessment
**Experimental.** Implemented + tested as a library with clean-room verification; not deployed as the
live authority boundary; no independent third-party verification.

## 22. Genuinely operational capabilities
Authority Object + attenuation + continuity checks + revocation fabric + epoch monotonicity + causal
graph queries + counterfactual evaluation + clean-room authority verification — all implemented and
tested.

## 23. Experimental capabilities
Live enforcement of E02 as the canonical authority boundary; TLA+ proofs; performance benchmarks;
multi-host revocation propagation.

## 24. Recommended EVOLUTION 03
Wire E02 as the live canonical authority boundary (feature-flagged), add a TLA+ model of attenuation +
epoch monotonicity + revocation, baseline-vs-E02 performance benchmarks, and multi-host revocation
propagation with measured convergence.
