# E110 Part VIII: resource-side enforcement (gates G11, G12, G13, G18)

Session b5. FIRME AI CORPORATION, a three-person team. Results: `artifacts/e110/governance/GOVERNANCE_RESULTS.json`
(re-run: `python3 scripts/evolution110/run_governance_suite.py`; regression: `tests/test_e110_governance.py`).

**Path label: LOOPBACK.** The decision service and the resource server are separate OS processes on one host. They are
not separate failure domains, and this is not the production MCPGate (`cain/mcp_proxy.py`).

## Gaps found in the E102 boundary (code review, then confirmed by the suite)

1. **Single fence path.** KILL and REVOKE reached the resource only through the decision service. Cut that link (or
   compromise the decision service) and the resource kept honouring already-issued permits until they expired (5 s).
2. **No policy version in permits.** Re-issuing an agent's scope did not invalidate permits minted under the old scope.
3. **No tool binding in permits.** Harmless while the resource offers one tool; a substitution hole once it offers two.

What held: admission and the effect run inside the resource's single lock, and orders take the same lock, so there is
no time-of-check/time-of-use race at the resource.

## E110 hardened boundary (`cain/e110/governance/boundary.py`)

Built by subclassing the E102 services; `e102/govnet.py` is unchanged, so E102's published evidence stays reproducible.

- **Independent emergency path:** the resource also accepts **KILL and REVOKE only** signed by an emergency key that
  the decision service never loads. A forged emergency order is rejected; the emergency key cannot change policy.
- **Policy epoch:** every registration or revocation bumps the epoch; permits carry it; the resource refuses permits
  below the epoch it has been told about.
- **Tool binding:** permits carry the tool; the resource checks it against the operation.

## Results (22 attack cases + 1 blocked, each in fresh OS processes)

| Boundary | PASS | FAIL | BLOCKED |
|---|---|---|---|
| E102 baseline | 19 | 3 | 1 |
| **E110 hardened** | **22** | **0** | 1 |

Baseline failures (all fixed in the hardened boundary): pre-issued permit after a POLICY change; KILL while the
decision→resource link is cut; REVOKE while the link is cut.

KILL race: 40 concurrent steps with KILL fired mid-burst; 20 executed before the fence; **0 effects recorded after
the KILL order in the resource's own hash-chained ledger.**

Known limits (reported, not hidden):
- A stolen agent key can act **inside its own scope** until revoked (scope and budget bound it). Expected PASS = executes.
- **Validator failure / BFT: BLOCKED.** No consensus participates in this permit path.
- Same host, same administrator: G18 (operational independence) stays **FAIL** until the resource runs in a separate
  failure domain with its own administrator and key custody.

## Gate status from this work

| Gate | Status | Why |
|---|---|---|
| G11 resource-side enforcement | **PARTIAL** | 22/22 on loopback with resource-side refusal; not the production network path |
| G12 kill switch | **PARTIAL** | 0 effects after KILL incl. race and cut-link cases; loopback only |
| G13 identity | **PARTIAL** | Ed25519 agent keys and scoped permits verifiable; keys self-generated, no external issuer |
| G18 operational independence | **FAIL** | one host, one admin domain |
