{
  "schema": "experiment-protocol-freeze/v0",
  "experiment_id": "EXP-007",
  "title": "Cross-runtime — Codex CLI replication",
  "paper_reference": "Paper 1 · Study 6 · Gate E",
  "frozen_at": "2026-05-25T00:00:00Z",
  "status": "preregistered",
  "author": "Adrian Sanchez de la Sierra",
  "license": "CC BY 4.0",

  "hypothesis": {
    "primary": "Under the Codex CLI runtime on the OPBR-Bench cross-runtime partition, behavior contracts will exceed the best non-contract baseline by Delta F1 >= 0.30 with paired McNemar p < 0.01 (Holm-corrected across the baseline family). The result will hold regardless of the direction of the contract-vs-output ranking under Claude Code.",
    "falsifier": "Delta F1 < 0.30, OR any McNemar p > 0.01 after Holm correction across the baseline family."
  },

  "method": {
    "domains": ["code", "refund"],
    "n_runs_target": 400,
    "model": "Codex CLI default model (frozen for the duration of the experiment)",
    "runtime": "Codex CLI",
    "cross_runtime_reference": "Claude Code (EXP-004 traces, partition-matched)",
    "exclusions": [
      "runs with fatal harness errors",
      "runs whose output failed schema parsing"
    ]
  },

  "detectors": {
    "primary": "behavior_contract",
    "baselines": [
      "output_only_field_check",
      "rich_output_provenance",
      "llm_judge_trajectory",
      "operational_composite",
      "output_plus_operational"
    ]
  },

  "primary_metric": "F1 of behavior_contract on Codex CLI traces",
  "secondary_metrics": ["Delta F1 vs best baseline", "Wilson 95% CI on F1"],

  "statistical_tests": {
    "paired_test": "McNemar exact, per (contract vs. baseline) pair",
    "multiple_comparison": "Holm correction across the 5-baseline family",
    "family_wise_alpha": 0.01
  },

  "preregistered_gates": {
    "G_baseline_delta":  { "operator": ">=", "threshold": 0.30 },
    "G_mcnemar_family":  { "operator": "<", "threshold": 0.01, "applied_to": "every baseline (Holm-corrected)" }
  },

  "blockers": [
    "Codex CLI install on a research-isolated host",
    "OPENAI_API_KEY in a budget-bounded research workspace",
    "Codex adapter merged in agent-behavior-workbench >= 0.4"
  ],

  "outputs": {
    "primary": "lab/exp/exp-007-results.json (does not yet exist — runs pending)",
    "traces_corpus": "OPBR-Bench v0 (cross-runtime partition)",
    "code": "https://github.com/raising-agents/agent-behavior-workbench",
    "replication_cmd": "abw run --experiment EXP-007 --runtime codex"
  },

  "claim_boundary": "This is a methodological cross-runtime test. The question is whether the contract mechanism generalizes across the runtime layer, NOT whether one runtime is better than another. Result reporting will be runtime-symmetric. A null or overturned result will be reported in full, with corresponding scope tightening of Paper 1's contract dominance claim.",

  "paper_acceptance_gate": "Closes Gate E of the Paper 1 acceptance protocol (>= 2 runtimes)."
}
