# CAIN42 — ATLAS Test Plan & Methodology (Prompt 15)

## Layers

1. **Unit tests** — `tests/test_atlas.py` (19 tests): levels ladder + revocation, evidence signing/independence,
   composition (no score summing), negotiation + local-policy dominance + bounded negotiation, transaction-scoped
   trust + exact-transaction binding, certificate scope/forgery, delegation attenuation/attribution, revocation
   propagation/monotonic merge, continuous downgrade-only, registry clamping, evidence-only reputation, sandbox
   economy, handshake transports, SIMULATED physical federation, risk bundle.
2. **Formal properties** — `run_property_suite7()` → A-F01..A-F25 (the prompt's P106-P130). Hosted suite totals
   with the prior suites.
3. **Mutation testing** — `cain/runtime/mutation.py`, 13 `MUT-ATLAS-*` mutations. Every security-critical mutation
   must be **killed**.
4. **Adversarial federation lab** — `cain/atlas/lab.py`, 35 categories, deterministic;
   `run_atlas_lab(cases=100000)` reports the **actual** executed/blocked/violations.
5. **Hosted wire verification** — `scripts/cain42_continuum/hosted_pipeline_deploy_verify.py` restarts the gateway
   and drives the real MCP server; 16 ATLAS probes.
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, separate from the
   request-serving gateway.

## Reproduce

```bash
python3 -m pytest tests/test_atlas.py -q
python3 -c "from cain.atlas import run_property_suite7; print(run_property_suite7())"
python3 -c "from cain.atlas.lab import run_atlas_lab; print(run_atlas_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-ATLAS')]))"
python3 scripts/cain42_continuum/hosted_pipeline_deploy_verify.py
python3 scripts/ip/recalculate_ip_value_v15.py
```

## What this proves / does not prove

- **Proves:** the engines behave as specified on 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 cross-organization
  federation; real hardware; real financial settlement. Mutation testing is not a proof.
