# E166 Phase A — Forensic reconstruction of E165

FIRME AI CORPORATION · CAIN-42 · **AGI: NOT ESTABLISHED · RSI: EXPERIMENTAL**

Generated 2026-11-24T02:32:12Z by `scripts/evolution166/forensic_e165.py` from commit `006beb706`.
Historical E165 records under `artifacts/evolution165/` were read, never modified (their SHA-256 values are listed in
`E165_FORENSIC_FINDINGS.json`).

## 1. Reproduction

- Environment: clean `git archive` of the commit in a temporary directory; same host; same process family.
- Revealed salt matches the committed SHA-256: **True**.
- Sealed rows: recorded 840, reproduced 840, **mismatches 0**.
- Every headline effect reproduced to 6 decimals: H1 -0.097503, H2 -0.174365, H3 -0.040925, H4 -0.040925, H5 -0.031310, H8 -0.026286, H11 -0.055221, H13 -0.049047.
- Verdict discrepancy between the code at the commit and the published file: H9 code=INCONCLUSIVE / published=NOT_TESTABLE, H10 code=INCONCLUSIVE / published=NOT_TESTABLE. The published NOT_TESTABLE is the correct reading (the arms collapsed), but it was applied after the analysis code ran; the code itself does not detect collapse.
- H6, H14 and H15 are PENDING in the analysis code and were filled by later scripts (replication, independent evaluation, security).
- **Reproducibility gap (F12):** E165 imports `cain/cain2027/e158/*`, which is untracked in git. The rebuild used the working-tree copy; hashes are recorded.

## 2. Findings

### F1. E165's semantic-drop metric is NaN: task ids differ per representation, so original and paraphrase never pair

- Source: `cain/cain2027/e165/domains.py::_id; experiments.py::run.drop` (commit `006beb706`)
- Effect: H1 compared P1 vs P0 on paraphrased tasks only; the within-task robustness drop it was meant to measure was never measured
- Evidence:

```json
{
 "drop_P1": NaN,
 "drop_P0": NaN,
 "id_includes_rep": "domains._id hashes rep",
 "same_task_ids_across_reps": 0
}
```

### F2. E165 'paraphrase' is a candidate reordering with identical hidden quality; P0's own original-paraphrase gap is sampling noise

- Source: `cain/cain2027/e165/domains.py::task (rep=='paraphrase' only permutes rows)` (commit `006beb706`)
- Effect: no wording exists in E165 tasks; H1 'semantic robustness' could not test meaning-preserving rewording
- Evidence:

```json
{
 "hidden_quality_identical": true,
 "P0_orig_minus_para_over_20_eval_seeds": {
  "mean": 0.026,
  "sd": 0.1177,
  "min": -0.2561,
  "max": 0.1981
 }
}
```

### F3. E165's compute budget is honour-based: the researcher gets the whole evaluation table; some patches read far more than their budget

- Source: `cain/cain2027/e165/research.py::run_source passes Y; INFO_SRC np.var(Y[i,:m]); BAL_SRC np.var(p['Y'])` (commit `006beb706`)
- Effect: 'equal compute' between arms was not enforced; P_search's 2x budget was the only honest extra compute
- Evidence:

```json
{
 "P0": {
  "cell_reads": 120,
  "distinct_cells": 120,
  "nominal_evaluations": 120
 },
 "ucb": {
  "cell_reads": 120,
  "distinct_cells": 120,
  "nominal_evaluations": 120
 },
 "info": {
  "cell_reads": 6280,
  "distinct_cells": 1120,
  "nominal_evaluations": 120
 },
 "balanced": {
  "cell_reads": 3719,
  "distinct_cells": 3584,
  "nominal_evaluations": 120
 },
 "failure_aware": {
  "cell_reads": 120,
  "distinct_cells": 120,
  "nominal_evaluations": 120
 },
 "adaptive": {
  "cell_reads": 3719,
  "distinct_cells": 3584,
  "nominal_evaluations": 120
 }
}
```

### F4. Diagnosis and acceptance used the same 6 development problems; accepted patches' development gains did not carry to sealed problems

- Source: `cain/cain2027/e165/research.py::meta_propose (accepted = gain>0.01 on the selection set)` (commit `006beb706`)
- Effect: selection on a 6-problem set inflates the apparent gain (selection bias); no held-out diagnosis set existed
- Evidence:

```json
{
 "per_seed": [
  {
   "seed": 0,
   "chosen": "ucb",
   "dev_gain_on_6": 0.038515,
   "sealed_gain_on_18": -0.0134
  },
  {
   "seed": 1,
   "chosen": null,
   "dev_gain_on_6": 0.001588,
   "sealed_gain_on_18": 0.0
  },
  {
   "seed": 2,
   "chosen": null,
   "dev_gain_on_6": -0.132812,
   "sealed_gain_on_18": 0.0
  },
  {
   "seed": 3,
   "chosen": "ucb",
   "dev_gain_on_6": 0.234444,
   "sealed_gain_on_18": -0.0813
  },
  {
   "seed": 4,
   "chosen": "ucb",
   "dev_gain_on_6": 0.07506,
   "sealed_gain_on_18": -0.1329
  }
 ],
 "mean_dev_gain_accepted": 0.116,
 "mean_sealed_gain_accepted": -0.0759
}
```

### F5. Structural and REPAIR losses come from the UCB patch spreading a fixed budget over more candidates (1/3 initial sample, c=1 bonus)

- Source: `cain/cain2027/e165/research.py::UCB_SRC; domains.py structure generator (REPAIR 32 edits, MATH 96, CAUSAL 80)` (commit `006beb706`)
- Effect: the only accepted patch (ucb) explores more and exploits less; on larger or noisier sets that loses to greedy P0 and badly to P0 with 2x budget
- Evidence:

```json
{
 "mean_quality_by_arm_rep_domain": {
  "P0|original|REPAIR": 0.7083,
  "P0|original|MATH": 0.6203,
  "P0|original|CAUSAL": 0.9179,
  "P1|original|REPAIR": 0.7167,
  "P1|original|MATH": 0.6109,
  "P1|original|CAUSAL": 0.8887,
  "P_search|original|REPAIR": 1.0,
  "P_search|original|MATH": 0.8359,
  "P_search|original|CAUSAL": 0.9567,
  "P0|paraphrase|REPAIR": 0.5667,
  "P0|paraphrase|MATH": 0.7859,
  "P0|paraphrase|CAUSAL": 0.8883,
  "P1|paraphrase|REPAIR": 0.3333,
  "P1|paraphrase|MATH": 0.6953,
  "P1|paraphrase|CAUSAL": 0.9197,
  "P_search|paraphrase|REPAIR": 0.925,
  "P_search|paraphrase|MATH": 0.8328,
  "P_search|paraphrase|CAUSAL": 0.9567,
  "P0|permuted|REPAIR": 0.675,
  "P0|permuted|MATH": 0.6328,
  "P0|permuted|CAUSAL": 0.8895,
  "P1|permuted|REPAIR": 0.55,
  "P1|permuted|MATH": 0.6922,
  "P1|permuted|CAUSAL": 0.9095,
  "P_search|permuted|REPAIR": 1.0,
  "P_search|permuted|MATH": 0.9141,
  "P_search|permuted|CAUSAL": 0.9567,
  "P0|structure|REPAIR": 0.75,
  "P0|structure|MATH": 0.5958,
  "P0|structure|CAUSAL": 0.9378,
  "P1|structure|REPAIR": 0.2812,
  "P1|structure|MATH": 0.5698,
  "P1|structure|CAUSAL": 0.9095,
  "P_search|structure|REPAIR": 0.775,
  "P_search|structure|MATH": 0.7031,
  "P_search|structure|CAUSAL": 0.8913
 },
 "candidate_counts": {
  "REPAIR": {
   "original_n": 24,
   "structure_n": 32
  },
  "MATH": {
   "original_n": 64,
   "structure_n": 96
  },
  "CAUSAL": {
   "original_n": 16,
   "structure_n": 80
  }
 },
 "patch_chosen_in_accepted_seeds": [
  "ucb"
 ]
}
```

### F6. P_search (P0 with 2x evaluations) beat P1 by -0.229 because extra honest evaluations matter more than the patch

- Source: `experiments.py::run collect_arm('P_search', ..., budget=2*BUDGET)` (commit `006beb706`)
- Effect: E165 had no compute-matched superiority; any E166 candidate must beat this control
- Evidence:

```json
{
 "P1_minus_P_search": {
  "mean_diff": -0.229067,
  "ci95": [
   -0.294982,
   -0.163151
  ],
  "n": 90
 },
 "P1_minus_P_mut": {
  "mean_diff": 0.039366,
  "ci95": [
   -0.003015,
   0.081747
  ]
 }
}
```

### F7. G2 existed in only 1 of 5 seeds; elsewhere G2 = G1 or = P0, so the successor test mostly compared a source to itself

- Source: `experiments.py::run (g2 = meta_propose_from only if P1 accepted)` (commit `006beb706`)
- Effect: H5/H8 differences are mostly ties; the successor claim was untestable at that sample size
- Evidence:

```json
{
 "g2_by_seed": {
  "0": [
   "balanced",
   true
  ],
  "1": [
   null,
   false
  ],
  "2": [
   null,
   false
  ],
  "3": [
   null,
   false
  ],
  "4": [
   null,
   false
  ]
 }
}
```

### F8. Memory arms collapsed because diagnosis found no failure mode on devB[0] (accept requires mode != none, memory only re-ranks); collective arms all chose 'ucb'

- Source: `research.py::meta_propose (memory adds a ranking bonus; acceptance gated by diagnosis mode); experiments.py::run memory/collective blocks` (commit `006beb706`)
- Effect: the arms could not differ by construction in that campaign; E165 correctly marked them NOT_TESTABLE
- Evidence:

```json
{
 "memory": {
  "memory": {
   "ucb": [
    1,
    1,
    0.16666666666666666
   ],
   "info": [
    1,
    1,
    0.16666666666666666
   ],
   "balanced": [
    0,
    1,
    0.16666666666666666
   ],
   "failure_aware": [
    1,
    1,
    0.16666666666666666
   ],
   "adaptive": [
    0,
    1,
    0.16666666666666666
   ]
  },
  "M0": {
   "chosen": null,
   "sealed": 0.764358
  },
  "M2": {
   "chosen": null,
   "sealed": 0.764358
  },
  "M3": {
   "chosen": null,
   "sealed": 0.764358
  }
 },
 "collective": {
  "C0": {
   "chosen": "ucb",
   "sealed": 0.615768
  },
  "C1": {
   "chosen": "ucb",
   "sealed": 0.615768
  },
  "C2": {
   "chosen": "ucb",
   "sealed": 0.615768
  }
 }
}
```

### F9. H3 and H4 used the identical comparison (P1 vs P0 on original+paraphrase+permuted); the Holm family double-counted one test

- Source: `experiments.py::run (h3 = cmp(P1,P0,reps=...), h4 = cmp(P1,P0))` (commit `006beb706`)
- Effect: no verdict changes (both negative), but the correction was over a family with a duplicate
- Evidence:

```json
{
 "H3_mean_diff": -0.040925,
 "H4_mean_diff": -0.040925,
 "H3_p": 0.9023820560150093,
 "H4_p": 0.9023820560150093,
 "H3_verdict_rule": "count of domains (not the pooled test)"
}
```

### F10. E165 H14 'independent evaluator' = a second statistics routine + re-execution of the same source on the same host

- Source: `scripts/evolution165/independent_eval.py (imports cain.cain2027.e165 and re-runs R.run_source)` (commit `006beb706`)
- Effect: independence level: separate statistics implementation, same process family, same host, same administrator; it reproduced a negative result. Not third-party.
- Evidence:

```json
{
 "kind": "independently implemented verification (same source, different statistics); NOT third-party reproduction",
 "re_execution_checked": 48,
 "mismatches": 0,
 "H14_verdict": "SUPPORTED"
}
```

### F11. E165 sealed sample: 2 tasks per domain per seed (n = 30 per representation); every primary test was underpowered for MDE 0.02

- Source: `experiments.py constants SEEDS, SEALED_PER_DOMAIN` (commit `006beb706`)
- Effect: CIs ~±0.1 against an MDE of 0.02
- Evidence:

```json
{
 "design": {
  "seeds": 5,
  "dev_per_domain": 2,
  "sealed_per_domain": 2,
  "budget": 120,
  "reps": [
   "original",
   "paraphrase",
   "permuted",
   "structure"
  ],
  "domains": [
   "REPAIR",
   "MATH",
   "CAUSAL"
  ],
  "mde": 0.02,
  "primary_family": [
   "H1",
   "H2",
   "H3",
   "H4",
   "H5",
   "H8",
   "H9",
   "H10",
   "H11",
   "H13"
  ]
 }
}
```

### F12. E165 cannot be rebuilt from git alone: it imports cain/cain2027/e158/security_and_ops.py (AST guard) and, via E163 domains, e158/domains.py; both untracked at the commit

- Source: `cain/cain2027/e165/research.py::load (from cain.cain2027.e158.security_and_ops import ast_guard)` (commit `006beb706`)
- Effect: reproduction used the working-tree copy (hash recorded); a reviewer with only the repository could not re-run E165
- Evidence:

```json
{
 "untracked_dependency_sha256": {
  "__init__.py": "8ad13f1b1447e4aa0b1e3ad3cc022c36b8c2cdb2521c9181353012b2f0b16dd5",
  "benchmarks.py": "aa35863cbd3e53d83bfed4e36820b3b5a769b2de6bd6f8c7c1e0f9b1b6f90e12",
  "codearm.py": "ca3f984e2ff30cd06b6ad375fb2562343f39fd130e9cfd5cbff287ab89789658",
  "colonies.py": "6436ef818384f930fec33db00b155bb6910580b573f47e6c219a41b5ff5b7955",
  "director.py": "cf856dbbbc22932c15cf93654e6c32c1affddf402ec1613cc3d360f3727811de",
  "domains.py": "d258b681c7fd717292d06379d561bca8a6b21019b5a7d858714e76836986c895",
  "memory_system.py": "782127344c5b340ccbef93593e56ab8aa95927eaea08b27f4af1305cda0f0d00",
  "organism.py": "e08406e6580f96e192780b69f09be78ab3e53906d073d1798495522bf1f9dd72",
  "research.py": "11fef276a64d7980185ea1fee09e10edba5c8de442c6d637733e186ab867ac6c",
  "rsi.py": "164d7a3a0177172ac4f8747fccfd250bec17846a9a90fc589d23c9d8ce609845",
  "security_and_ops.py": "e494b3da4577fb4b0f909c6b7229e337897ac7103c3baa8de8986c6c558c2791",
  "unified_organism.py": "300a5e0f93d1e99704e53eccc68f0376bb960666a85efc307f090b8adba95742"
 },
 "git_tracked_at_commit": false
}
```

## 3. Answers to the specification's questions

| Question | Answer from the evidence |
|---|---|
| Why did paraphrase performance decline? | E165 'paraphrase' only reorders candidates (F2); hidden quality is identical. P0's own original-vs-paraphrase gap ranges -0.256 to +0.198 across 20 evaluation seeds, so the -0.0975 is within the sampling noise of a reorder, added to an overfit patch (F4). No wording existed to test. The within-task drop metric was NaN (F1). |
| Why did structure decline by ~0.174? | The accepted patch was UCB in every accepted seed (F5); on the larger structure sets it spreads 120 evaluations over 32/96/80 candidates. REPAIR structure: P1 0.2812 vs P0 0.75. |
| Why did REPAIR decline by ~0.117? | REPAIR trials are 6-test subsamples (coarse, noisy pass rates); UCB's bonus keeps re-sampling ties instead of exploiting (F5), and the patch was selected on 6 problems (F4). |
| Why did P1 lose to the 2x-budget control? | Extra honest evaluations dominate a small policy change (F6); meanwhile some patches silently read up to 6280 cells against a 120-evaluation budget (F3), so 'equal compute' was never enforced. |
| Why did accepted patches perform poorly? | Selection on 6 problems: mean development gain of accepted patches +0.116 vs sealed -0.076 (F4). |
| Why was G2 not established? | G2 existed in 1 of 5 seeds (F7); elsewhere it equals G1 or P0, so the test mostly compared a source to itself. |
| Why did memory/collective collapse? | Diagnosis returned mode 'none' on the memory campaign, so no arm could accept a patch; memory only re-ranks. All collective arms chose 'ucb' (F8). |
| Bias from metric, sampling or construction? | Yes: unenforced compute (F3), same-set selection (F4), a reorder labelled 'paraphrase' (F2), a NaN robustness metric (F1), a duplicated test in the Holm family (F9), n = 30 per representation (F11). |
| Was the independent recomputation independent? | No, not in implementation of the experiment: a second statistics routine plus re-execution of the same source on the same host (F10). It reproduced a negative result. |

## 4. Consequences for E166 (design inputs, not results)

1. The evaluator owns the evaluation table: researchers only get an oracle that counts and caps evaluations (fixes F3).
2. Diagnosis, development, held-out diagnosis and sealed confirmation are separate splits; acceptance never uses the selection set (fixes F4).
3. Meaning-preserving rewording exists only where there is wording: every task is also rendered as a natural-language document with template families (fixes F2).
4. Robustness is measured within the same hidden task across representations (fixes F1).
5. Arm-collapse detection is automatic and a collapsed comparison is NOT_TESTABLE by code, not by later relabel (fixes F8 / discrepancy).
6. One test per hypothesis in the Holm family (fixes F9); larger sealed sample with a power check (F11).
7. The second evaluator is a separate stdlib implementation that rescores from raw outputs and the sealed key (improves on F10; same author, so still not third-party).
8. Every dependency of the E166 run is tracked in git at the frozen commit (fixes F12).
