# CAIN-42 E142 — Phase 0 Forensic Baseline Audit

**FIRME AI CORPORATION · CAIN-42 · E142 · 2026-11-22 (audit run 02:48–03:20Z)**
AGI: NOT ESTABLISHED · RSI: EXPERIMENTAL · historical E141 results are not rewritten here.

## 1. Repository state

| Item | Finding |
|---|---|
| Repository | `/root/cain-studio-platform` |
| Branch | `evolution-79` (the long-running integration branch; E138–E141 were all committed here) |
| HEAD at E142 start | `acecf9e8c` — "E142: calibration_iw, world_model_frontier, rsi_meta …" |
| Prior E142 work found | `025499a15` H1–H4 preregistration (`docs/unified-apex/E142_PREREGISTRATION.md`) and `acecf9e8c` H1–H4 code, both committed ~35 min before this session by an earlier session. Code was **not loaded** by the running service (it started 02:06:39Z, before the 02:14 commit). |
| Dirty tree | ~7,145 modified/untracked paths, almost all generated artifacts and peer sessions' work (homepages, ledgers, evidence pages). E142 commits only its own paths (`git commit -- <paths>`). |
| E141 commits | `8e51e55a8` (engine, dashboards, evidence), `4b3df0a05` (systemd service). E140: `b8e304adf`, `625a51725`. E140→E141 adds `cain/cain2027/unified/e141/` (11 files, +2,432 lines). |

## 2. E141 verification

| Check | Command | Result |
|---|---|---|
| E141 engine tests | `python3 -m pytest tests/unified_apex/test_e141_engine.py` | **14/14 pass** (8 consecutive runs after the fix below) |
| E141 published bundle | `python3 -I verify_e141_offline.py .` in `clawx-site/evidence/e141-continuous-research-engine-2026-11-22/` | **17/17** |
| E141 working-copy artifacts | same verifier in `artifacts/unified_apex/e141/` | **16/17 — FAIL `manifest_file_hashes` (`drills.jsonl`)**: a systemd crash-restart drill line was appended after export and never re-exported. Discrepancy only in the working copy; the published bundle is consistent. |
| Historical verifiers (published bundles) | `scripts/unified_apex/{e138,e139,e140}/verify_*.py`, `scripts/unified_apex/verify_apex_offline.py` | E138 **34/34** · E139 **32/32** · E140 **41/41** · APEX **29/29** |
| Store integrity | `PRAGMA integrity_check` on `/root/.cain-e141/research.db` (read-only) | `ok`; journal mode `wal`; 0 duplicate experiment ids |
| Event chain | `e141ctl verify-chain` | ok, 8,456 events at ~03:16Z |
| Duplicate results / verdicts | E141 drills (bundle) | 0 / 0 |

**Bug found and fixed (commit `f77d2db2f`):** `discovery.top_up` replication could pick an `rsi_meta` experiment as its source and build a malformed cell (`KeyError: 'n_train'`). The E142 test `test_e142_scheduler_caps_cell_share` failed intermittently (≈1 in 3 runs). Fixed by excluding RSI families from replication sources and requiring a known family. It never affected the running production service (its in-memory scheduler predates `rsi_meta`).

**Evaluator independence:** the evaluator is a separate process with its own Ed25519 key and a secret salt in a 0700 directory that is a tmpfs inside the worker sandbox; it regenerates truth from `(params, seed)` and rescores raw predictions (`evaluator._eval_family`); fabricated summaries are rejected (E141: 7/7 adversarial audits). It is the same team's code.

## 3. Runtime

| Item | Finding |
|---|---|
| Production service | `cain-e141-research.service` active since 02:06:39Z; unit matches `deploy/e141/cain-e141-research.service` (`Nice=10`, `MemoryMax=3G`, `CPUQuota=300%`, `Restart=on-failure`); 3 sandboxed workers + evaluator; 125.9 MB RSS |
| Engine limits (control table) | max 3 workers, ≥3 GB free memory, load ≤1.6/core, ≥8 GB free disk, 8 CPU-h/day, 4 GB store cap, pace 20 s, paid API budget 0 (not settable) |
| Host | 8 vCPU, 30 GB RAM (19 GB available), no GPU, disk 96% used (27 GB free), load 5–6 |
| **Restart to load E142 code** | `systemctl restart cain-e141-research` was **refused by the session's safety classifier**. E142 therefore runs as a **separate, session-bound engine instance** with its own store `/root/.cain-e142/` (same code, same sandbox, same evaluator design, no public writes). Deviation from the H1–H4 preregistration ("runs inside the systemd service") — disclosed; the analysis plan is unchanged. Owner action to run E142 inside the permanent service: `systemctl restart cain-e141-research` with `CAIN_E141_ONLY_FAMILIES` unset. |

## 4. Public surfaces

| Check | Result |
|---|---|
| `https://{clawx.click,cainstudio.online,mcpgate.online}/e141-live.json` | HTTP 200, 81,855 bytes each, **byte-identical** (SHA-256 prefix `9c4956360bceb44d`, generated 03:14:05Z) |
| `/api/v1/e141/status`, `/events?since=N&limit=k`, `/experiments/{id}` | 200; `since` honoured (8340 → 8341..8343). Note: the parameter is `since`, not `after`; an unknown parameter silently returns from 0. |
| SSE `/api/v1/e141/stream` with `Last-Event-ID: 7000` | replays from `id: 7001` with `retry: 3000` |
| Stale-data handling | snapshot carries `generated_at`/`generated_epoch`; dashboards mark STALE/DISCONNECTED (E141 render audit) |

## 5. Discrepancies and unverified claims

1. **"Holm p=0.0" on all three homepages** (CAIN-TOP-EVIDENCE panel, hard-coded in `scripts/e127/top_updater.py:107`). The APEX JSON stores `p_value: 0.0` (float underflow). Recomputed exact McNemar p from its discordant counts: log10 p = −55.0, −34.8, −27.3 → Holm-adjusted **p < 1e-27**. Text corrected at the source; the 4-minute cron republishes it.
2. E141 report says "not yet installed as a permanent 24/7 service"; it **was** installed later (`4b3df0a05`). The report predates that commit; the service addendum records it.
3. Working-copy E141 artifacts fail their own manifest (item 2 above).
4. Homepages stack ~20 generated evidence blocks above the fold (E141 live, E140 hero, top evidence, organism strip, E129…E121). Several are written by other sessions' crons (`scripts/e138/update_front_evidence.py`, `scripts/e127/top_updater.py`). E142 does not rewrite peer blocks; it adds its own block below the E141 live block.
5. E140 CLADDER 91.87% is a contaminated local proxy (already relabelled by E141); E140 ARC-AGI-1 17/400 is a public-split local execution with a DSL authored by the same team after the public set was available — contamination is **not excluded** (see the E142 benchmark registry).
6. E141 limitations confirmed by the repository: constructed environments, one CPU host, no model calls, same-team evaluator, data-only (Pathway 1) RSI.
