# CAIN42 — ARGUS Test Plan & Methodology (Prompt 14)

## Layers

1. **Unit tests** — `tests/test_argus.py` (22 tests): assurance object signing/binding, state derivation, state
   machine, envelope evaluation, path hash/composition, reauthorization ladder, lease expiry/renewal, verifier
   mesh, drift→authority, memory firewall, evolution/world model, certificate clean-room + forgery, physical adapter.
2. **Formal properties** — `run_property_suite6()` → A-P01..A-P20 (the prompt's P86-P105). Reported as 117/117 with
   the prior suites (P1-P20, P41-P55, LEGION, P56-P82, E-P01-E-P15).
3. **Mutation testing** — `cain/runtime/mutation.py`, 13 new `MUT-ARGUS-*` mutations targeting expiry, self-renewal,
   independent-evidence renewal, revoked/drifted certificate, path composition, memory amplification, memory
   resurrection, unauthorized evolution promotion, verifier disagreement, independence collapsing, state shortcut,
   world-state authorization. Every security-critical mutation must be **killed** (test suite now 66 mutations).
4. **Adversarial assurance lab** — `cain/argus/lab.py`, 36 categories, deterministic; `run_argus_lab(cases=100000)`
   reports the **actual** number executed, blocked, and any violation (currently 100000 executed, 100000 blocked, 0
   violations).
5. **Hosted wire verification** — `scripts/cain42_continuum/hosted_pipeline_deploy_verify.py` restarts the
   production gateway and drives the real MCP server with the MCP SDK; each stage has positive/negative probes.
   19 ARGUS probes; pipeline now **67/67** wire probes verified.
6. **Live harness** — `scripts/cain42_continuum/hosted_harness_worker.py` runs all property suites, the real
   multi-process distributed lab, and mutation testing (in a throwaway git worktree of HEAD) in a separate process.

## Reproduce

```bash
python3 -m pytest tests/test_argus.py -q
python3 -c "from cain.argus import run_property_suite6; print(run_property_suite6())"
python3 -c "from cain.argus.lab import run_argus_lab; print(run_argus_lab(cases=100000))"
python3 -c "from cain.runtime.mutation import MutationTester, MUTATIONS; \
print(MutationTester().run([m for m in MUTATIONS if m.id.startswith('MUT-ARGUS')]))"
python3 scripts/cain42_continuum/hosted_pipeline_deploy_verify.py
python3 scripts/cain42_continuum/hosted_harness_worker.py
python3 scripts/ip/recalculate_ip_value_v14.py
```

## What this proves / does not prove

- **Proves:** the engines behave as specified on the tested inputs; the restrictive stages enforce at the live MCP
  boundary; mutations that weaken security are detected.
- **Does not prove:** the absence of unknown vulnerabilities; third-party assurance; real-hardware behavior; a
  clean long-duration soak; customer integration. Mutation testing is not a proof; a survivor is reported, not hidden.
