{
 "schema": "cain42.e166.preregistration.v1",
 "evolution": "E166",
 "title": "The Generalization Firewall: diagnosis-guided source improvement vs a 2x-compute frozen researcher",
 "status": "AGI: NOT ESTABLISHED \u00b7 RSI: EXPERIMENTAL",
 "written_at": "2026-11-24T03:10:16Z",
 "central_question": "Does a diagnosis-guided, held-out-accepted source modification of the research procedure beat the frozen procedure given twice the evaluation budget, and does it generalise across wording, structure, domains and held-out document families?",
 "e165_forensics": "artifacts/e166/E166_E165_FORENSIC_RECONSTRUCTION.md (840/840 rows reproduced; F1-F12)",
 "design": {
  "campaigns": 8,
  "domains": [
   "REPAIR",
   "MATH",
   "CAUSAL"
  ],
  "sealed_tasks_per_domain_per_campaign": 16,
  "hidden_tasks_per_comparison": 384,
  "representations": {
   "dev_visible": [
    "A|canonical|clean",
    "B|canonical|clean",
    "A|shuffled|clean",
    "A|canonical|noisy",
    "B|shuffled|noisy",
    "struct"
   ],
   "heldout_sealed_only": [
    "A|distributed|clean",
    "B|distributed|noisy",
    "C|canonical|clean",
    "C|shuffled|noisy",
    "A|canonical|clean|structgen"
   ]
  },
  "research_splits_per_domain": {
   "train": 16,
   "dev": 16,
   "hold": 16
  },
  "research_master": "e166-dev-v2",
  "sealed_master": "secret; SHA-256 committed in E166_SALT_COMMITMENT.json before the run; revealed after",
  "unit": "hidden task (campaign, uid), quality averaged over the named representations",
  "primary_metric": "hidden quality of the chosen option; 0 if it violates the document's real requirement",
  "candidate_evaluation_budget_K": 8,
  "memory_arm_K": 3,
  "adversarial_tasks_per_domain": 10
 },
 "budgets": {
  "standard": 16,
  "search": 32,
  "note": "oracle-enforced evaluations per task; P_search = frozen P0 with 2x; candidate code cannot read the trial table"
 },
 "arms": {
  "P0": "frozen researcher source",
  "P_search": "P0 with 2x evaluations",
  "P1": "E165 method: diagnose 6 problems, accept on the same 6 (>0.01)",
  "P2": "E166 treatment: diagnosis on train, selection on dev, held-out acceptance vs parent with per-domain firewall",
  "P2_candidate": "P2's best dev candidate before acceptance",
  "P_rand": "random patch sets, same pipeline without diagnosis",
  "P_mut": "syntactic constant mutations of P0, same acceptance",
  "P_oracle": "best proposed candidate chosen on sealed labels (upper bound, not deployable)",
  "MEM_M0..M3": "none / episodic log / failure->intervention memory / held-out-verified memory with provenance and expiry (K=3)",
  "C0..C4": "single (K=8) / 4 independent / 4 communicating / coordinator+specialists / reading-vs-search diversity; equal total K and diagnosis compute",
  "G1..G3": "successor lineage: G1 = P2 output; G2/G3 diagnose their parent on fresh research splits"
 },
 "groups": {
  "paraphrase": [
   "B|canonical|clean",
   "C|canonical|clean",
   "C|shuffled|noisy"
  ],
  "structure": [
   "A|shuffled|clean",
   "B|shuffled|noisy",
   "A|distributed|clean",
   "B|distributed|noisy",
   "A|canonical|clean|structgen"
  ],
  "heldout_documents": [
   "A|distributed|clean",
   "B|distributed|noisy",
   "C|canonical|clean",
   "C|shuffled|noisy"
  ]
 },
 "mde": 0.02,
 "doc_mde": 0.05,
 "robustness_margin": -0.05,
 "noninferiority": {
  "margin": 0.02,
  "lower_floor": -0.05
 },
 "diagnosis_accuracy_floor": 0.7,
 "flag_recall_floor": 0.5,
 "alpha": 0.05,
 "multiplicity": {
  "family": [
   "H1",
   "H2",
   "H3",
   "H4",
   "H5",
   "H6",
   "H7",
   "H9",
   "H10",
   "H13"
  ],
  "method": "Holm-Bonferroni across the primary family; H6 intersection-union (max p of 3 domains); H9 Bonferroni x3 inside; H10 Bonferroni x4 inside"
 },
 "tests": "one-sided paired t on per-task differences, 95% normal CI, campaign-cluster bootstrap reported; SUPPORTED needs mean >= MDE, lower CI > 0 and Holm p < 0.05",
 "hypotheses": {
  "H1": "P2 - P1 sealed quality (all reps) superiority AND observable diagnosis micro precision and recall >= 0.70 on held-out failures",
  "H2": "CENTRAL GATE: P2 - P_search sealed quality pooled over all 11 representations; superiority",
  "H3": "P2 - P0 on paraphrase reps (B, C) superiority AND P2 within-task drop (A->B, A->C) lower CI >= -0.05",
  "H4": "P2 - P0 on structure reps superiority AND P2 within-task drop (A canonical->shuffled, ->distributed) lower CI >= -0.05",
  "H5": "P2 - P0 doc_correct (requirement set exact, no invalid evidence, no trap) on held-out documents; superiority at MDE 0.05",
  "H6": "every domain P2 - P0 superior (intersection-union); any domain FAIL -> CONTRADICTED",
  "H7": "P2 - P_mut superiority AND P2 source differs from P0 in >= 50% of campaigns; leave-one-out ablations reported",
  "H8": "every distinct successor retains every capability group (non-inferiority); successors identical to their parent are NOT_TESTABLE",
  "H9": "a memory arm beats M0 on sealed (campaigns >= 1); arms whose source equals M0's in every campaign are NOT_TESTABLE",
  "H10": "a collective arm beats C0 at equal total K; collapsed arms NOT_TESTABLE",
  "H11": "fresh research splits + fresh sealed tasks, clean git archive, separate process: P2 - P_search and P2 - P0 both superior",
  "H12": "verified discoveries (accepted patch set, per-domain sealed lower CI > 0 vs P0, reproduced on fresh tasks) per 1000 research task-runs: P2 > P1, P_rand, P_mut and P2 >= 3",
  "H13": "P2 - P0 on adversarial documents superiority AND uncertainty-flag recall on 'missing' >= 0.50",
  "H14": "governance suite all cases pass; MCPGate decision chain intact; 0 budget violations",
  "H15": "external review: NOT_COMPLETED unless a named independent reviewer reports"
 },
 "power": {
  "pilot_sd_of_per_task_P2_minus_P_search": 0.2233,
  "n": 384,
  "se": 0.0114,
  "detectable_80pct_one_sided_alpha_0.05": 0.0283,
  "detectable_80pct_holm_worst_alpha_0.005": 0.0389,
  "statement": "effects between the MDE (0.02) and ~0.04 may be reported INCONCLUSIVE because of the Holm correction"
 },
 "stopping_rule": "fixed N: 8 campaigns, then a 4-campaign fresh replication; no interim looks at sealed rows; crashes resume from per-campaign checkpoints; a KILL leaves the run INCOMPLETE",
 "pilot_disclosure": "Two pilots were run by the builders with throwaway sealed salts ('dry-sealed', 'dry2-sealed') and research master e166-dev-v1 to debug the pipeline; their numbers were seen. The confirmatory run uses research master e166-dev-v2 and a fresh secret sealed master. Pilot results are not evidence and are not published as results.",
 "construction_disclosures": [
  "P0, the patch library, the task generators, the document families and the evaluator were written by the same team.",
  "The reading patches (lexicon, neg_scope, retraction, provenance) target failure modes the builders designed into families A/B; the 2x-compute control cannot fix reading errors by construction, so any H2 gain on documents is a comprehension gain. H2 is therefore also reported on the structured interface (search only).",
  "Family C was written after the patch library freeze (commit 7fbcb9d78 -> b56d25bc6) but by the same team.",
  "No model is called; every patch is human-designed; the meta-researcher selects and composes, it does not write code."
 ],
 "promotion_rules": "a candidate is an improved researcher only if H2 (G8) passes; a candidate passing vs parent but not vs P_search is an experimental branch",
 "code_sha256": {
  "__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "adversarial.py": "b0b65b97bc848cb7c96be3f6fbf7929c261e93fa29c3dd1a2b8f0ad64bcfd90a",
  "analyze.py": "9bdd0b68c85cb2f41a6086b0ab4cb536eda3371f527d7367dd974e64aa4750e7",
  "capability_retention.py": "c1b08c9849ecf9fc94a8b8a8d073848b2d0061942173aa64c2ed615c5bd36e29",
  "diagnosis_engine.py": "260febdfdc9afe2e48986fb60ea1962b60dd8116f30c77f751bfb72a0a27beae",
  "doc_family_c.py": "e493317110e4597722c22eacb39415290fb3b2c030165477a9554a2140d5afd6",
  "document_interface.py": "f8e581446b158994cb04717c1864925dce1fbd717aab5c2fe54479f8c9a09153",
  "evaluator.py": "c7813dbd5ce62c4e4a045e2ad96e6c5b4fbba609519469ee9654573cce4f6bc7",
  "experiments.py": "b709bb06537b8a27e66c88c93543eeb8507cf8e02a9d26cf8231c63c88192089",
  "governance.py": "9f91716c9d238b1337011955305f775c7bf3f1b7bb157dcea438cf0494110a6b",
  "replication.py": "8f04ab33d271b70212bebdba63535efd4fb0beff3063ace933bcdafb16ce4ef2",
  "researcher.py": "63218f26f06b1ad898f402b474a27ad3ea1befb6caab2c1c036e765444d0c020",
  "security.py": "c9f79261df6c76a7cf4214bd464e6114bcfd42964801d3851c51206fb24d4869",
  "source_intervention_engine.py": "0374e76dc76e79bada19a0f3861fe4f504f63b561a34df95cc1e7d6ec0625d3d",
  "tasks.py": "2525885689d2b89ba8f25d78ba03c780b2c236128dfcb9fe9b6f48376814fc47",
  "transfer_firewall.py": "b0a9c1b4855f2b64ebe160c3b5c214ff788015cd3ee8d71e1d38e8fffce1c1ab",
  "verify_e166_offline.py": "b4e9b61917cdb8c216905e75d91107be2b75e0beabeb8dae6afd82c50b13c894"
 },
 "patch_library_sha256": "5ffb0ad676ff9452d3f503e9ec244598576930f2901645394e9857df24ea66ca"
}