scripts/verify_wave7_cellgemma_2p24_rebase.py
Use this file in any AI chat (paste-only or attachment-capable):
Pinned raw file: https://openislet.org/files/gen-eb955f8266035aba/scripts/verify_wave7_cellgemma_2p24_rebase.py · SHA-256: 5f31a6369f25031d…
tr10_tie = [50.1, 50.2, 50.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]
ct10_tie = [50.0, 50.0, 50.3, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0]
# All 7 blocks of +40 = +280; among the 3 small diffs {+0.1,+0.2,-0.3}: sums >= 0 are (+0.1+0.2+0.3=+0.6, +0.1+0.2-0.3=0, -0.1-0.2+0.3=0, -0.1+0.2+0.3=+0.4, +0.1-0.2+0.3=+0.2) -> 5 positive * 2 (two-sided) = 10/1024!
chk(exact_two_sided_sign_flip_paired_p(tr10_tie, ct10_tie) == 10.0 / 1024.0, "ADV_shared_exact_rational_10blk_tie_exact")
# 3. Live wetlab_contract.py:13143-13175 parity: Full Gate 0M is ALWAYS mandatory! t90=6.0 FAILS EVEN when gate0m_applicable=False!
r2_ord_t90_6 = _mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B", gate0m_applicable=False)
for _o2k in ("o2_40_mmhg", "o2_100_mmhg"):
for _b in r2_ord_t90_6[_o2k]["blocks"]:
_b["stepdown_t50_min"] = 2.0; _b["stepdown_t90_min"] = 6.0
chk("FAIL_GATE_A2_READOUT2_O2_40_GATE0M_SHUTOFF_T90_GT_3MIN_FAILED" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": r2_ord_t90_6})})["failures"], "ADV_shared_r2_gate0m_mandatory_even_when_flag_false")
r2_g0m_t90_6 = {**r2_ord_t90_6, "gate0m_applicable": True}
chk("FAIL_GATE_A2_READOUT2_O2_40_GATE0M_SHUTOFF_T90_GT_3MIN_FAILED" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": r2_g0m_t90_6})})["failures"], "ADV_shared_r2_gate0m_t90_6_FAILS")
# --- GATE-40 Regressions (9 tests) ---
# 4. Contradictory zero cumulative release trace in A-0b, A-1-bench, A-1-exact FAILS immediately (Critical #1)!
chk("FAIL_GATE_A0B_ZERO_OR_CONTRADICTORY_RELEASE_TRACE" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "cumulative_intact_parent_released_mg": [0.0] * len(tr14_t)})})["failures"], "ADV_G40_a0b_zero_release_fails")
chk("FAIL_GATE_A1_ZERO_OR_CONTRADICTORY_RELEASE_TRACE" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "cumulative_intact_parent_released_mg": [0.0] * len(tr35_t)})})["failures"], "ADV_G40_a1_zero_release_fails")
# 5. Mismatched Day-14 usable fraction or terminal mass recovery vs release trace FAILS!
chk("FAIL_GATE_A1_DAY14_USABLE_FRACTION_MISMATCH_WITH_TRACE" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "day14_usable_delivery_fraction_pct": 55.0})})["failures"], "ADV_G40_a1_u14_trace_mismatch")
chk("FAIL_GATE_A1_TERMINAL_MASS_RECOVERY_MISMATCH_WITH_MASS_RECORD" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "day35_residual_parent_mg": 0.0, "day35_degradant_mass_mg": 0.0, "day35_terminal_mass_recovery_pct": 99.87})})["failures"], "ADV_G40_a1_mass_rec_mismatch")
chk("FAIL_GATE_A1_T50_CONTRADICTS_RELEASE_TRACE" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "elution_t50_days": 13.5})})["failures"], "ADV_G40_a1_t50_trace_mismatch")
# 6. Critical #2: Exact double-boundary burst counterexample (4 mg @ 1h, 8 mg @ 3h, t_half=2.0h, Vd=35L -> 0.22857 >= 0.20!)
cmax_r1_ce = _recompute_pirfenidone_peak_systemic_cmax_ug_ml([0.0, 1.0, 3.0], [0.0, 4.0, 8.0], t_half_h=2.0, vd_l=35.0)
chk(abs(cmax_r1_ce - (8.0 / 35.0)) < 1e-12 and cmax_r1_ce > 0.20, "ADV_G40_supremum_double_burst_0p2286")
# Conservative PK policy rejects unrealistically fast t_half < 2.4 h or huge Vd > 65 L
chk("FAIL_GATE_A0B_INVALID_HUMAN_PK_ENVELOPE_THALF_OR_VD" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "assumed_human_t_half_h": 2.0})})["failures"], "ADV_G40_pk_thalf_lt_2p4_fails")
# 7. High #3: Future-dated 2028 Readout-2 inside 2026 A-2 receipt FAILS!
r2_future_2028 = _mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B", stage7_start_utc="2028-10-01T00:00:00Z", sort_reaggregation_utc="2028-10-15T00:00:00Z", assay_harvest_utc="2028-10-22T00:00:00Z")
chk("FAIL_GATE_A2_READOUT2_ASSAY_HARVEST_POSTDATES_RECEIPT" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": r2_future_2028})})["failures"], "ADV_G40_a2_future_2028_r2_fails")
# 8. High #4: Longitudinal A-4b animal ID swapping COATED <-> BLANK_VEHICLE across early & Day 28 FAILS!
prereg_long, a4b_long_base = _mk_r8_a4b_prereg_and_cohorts(py, by, ly, ry, a4a_y, coat_a, start_dt_str="2026-12-20T08:00:00Z", mode="VALIDATED_NONTERMINAL_LONGITUDINAL_IMAGING")
for _i in range(8):
a4b_long_base["day28_cohort_records"][2 * _i]["animal_id"] = f"L-VEH-{_i+1:02d}"
a4b_long_base["day28_cohort_records"][2 * _i + 1]["animal_id"] = f"L-COAT-{_i+1:02d}"
a4b_swap = _sign_receipt({**a4b_y, **a4b_long_base, "prerequisite_receipt_sha256s": {**pr_all_y, "A-4b-PREREGISTRATION": prereg_long["receipt_sha256"]}})
chk("FAIL_GATE_A4B_LONGITUDINAL_ANIMAL_ARM_REASSIGNMENT:L-COAT-01" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4b_preregistration_receipt": prereg_long, "a4b_evidence": a4b_swap})["failures"], "ADV_G40_a4b_longitudinal_arm_swap_fails")
# --- GATE-41 Regressions (11 tests) ---
# 9. Decisive #1: Raw local BMT replicates = 0.30 nM while claimed = 0.08 nM & mixture_requalification_receipt absent FAILS & HOLDS in BOTH bench & exact!
b2b_bad_raw_bmt = _mk_r8_b2b_replicates()
b2b_bad_raw_bmt["timepoint_replicate_records"][0]["local_bmt_total_replicates_nM"] = [0.30] * 6
b2b_bad_raw_bmt["timepoint_replicate_records"][0]["local_bmt_blq_flags"] = [False] * 6
r_b2b_ce_bench = evaluate_gate41_deucravacitinib_tyk2({**g41_bench, "b2b_bench_evidence": _sign_receipt({**b2bb_y, **b2b_bad_raw_bmt})})
chk("FAIL_GATE_B2B_BENCH_CLAIMED_LOCAL_BMT_UNDERSTATES_RAW_REPLICATES" in r_b2b_ce_bench["failures"] and "HOLD_GATE_B2B_BENCH_METABOLITE_TRIGGERED_MIXTURE_REQUAL_REQUIRED" in r_b2b_ce_bench["holds"], "ADV_G41_b2b_raw_bmt_0p30_contradiction_bench")
b2b_bad_raw_bmt_ex = _mk_r8_b2b_replicates(evidence_scope="exact_product")
b2b_bad_raw_bmt_ex["timepoint_replicate_records"][0]["local_bmt_total_replicates_nM"] = [0.30] * 6
b2b_bad_raw_bmt_ex["timepoint_replicate_records"][0]["local_bmt_blq_flags"] = [False] * 6
r_b2b_ce_exact = evaluate_gate41_deucravacitinib_tyk2({**g41_ok, "b2b_exact_evidence": _sign_receipt({**b2be_y, **b2b_bad_raw_bmt_ex})})
chk("FAIL_GATE_B2B_EXACT_CLAIMED_LOCAL_BMT_UNDERSTATES_RAW_REPLICATES" in r_b2b_ce_exact["failures"] and "HOLD_GATE_B2B_EXACT_METABOLITE_TRIGGERED_MIXTURE_REQUAL_REQUIRED" in r_b2b_ce_exact["holds"], "ADV_G41_b2b_raw_bmt_0p30_contradiction_exact")
# Also test contradictory blq_flags=True on 0.30 nM quantifiable BMT!
b2b_bad_blq = _mk_r8_b2b_replicates()
b2b_bad_blq["timepoint_replicate_records"][0]["local_bmt_total_replicates_nM"] = [0.30] * 6
chk("FAIL_GATE_B2B_BENCH_BLQ_FLAG_CONTRADICTS_QUANTIFIABLE_LOCAL_BMT:0" in evaluate_gate41_deucravacitinib_tyk2({**g41_bench, "b2b_bench_evidence": _sign_receipt({**b2bb_y, **b2b_bad_blq})})["failures"], "ADV_G41_b2b_blq_flag_contradiction_fails")
# 10. Bare mixture_requalified=True WITHOUT content-hashed mixture_requalification_receipt STILL HOLDS!
chk("HOLD_GATE_B2B_BENCH_METABOLITE_TRIGGERED_MIXTURE_REQUAL_REQUIRED" in evaluate_gate41_deucravacitinib_tyk2({**g41_bench, "b2b_bench_evidence": _sign_receipt({**b2bb_y, "c_bmt_local_total_u_alloc_nM": 0.25, "mixture_requalified": True})})["holds"], "ADV_G41_b2b_bare_mix_bool_insufficient")
def _mk_7ep_curve_reps() -> tuple[list[dict[str, list[float]]], list[dict[str, list[float]]]]:
d5 = (-0.2, -0.1, 0.0, 0.1, 0.2)
s_rows = [
{
"sprouting_pct": [round(sp + d, 3) for d in d5],
"nkg2a_pct": [round(nk + d, 3) for d in d5],
"cd94_pct": [round(c9 + d, 3) for d in d5],
"il10_retention_pct": [round(il + d, 3) for d in d5],
}
for sp, nk, c9, il in (
(99.2, 99.0, 99.0, 99.0),
(97.5, 96.5, 96.8, 96.0),
(96.0, 94.5, 95.0, 93.5),
(95.0, 93.0, 93.5, 91.0),
(94.0, 91.5, 92.0, 88.5),
(72.0, 74.0, 75.0, 68.0),
)
]
e_rows = [
{
"beta_cytokine_protection_pct": [round(eb + d, 3) for d in d5],
"nk_cytokine_suppression_pct": [round(en + d, 3) for d in d5],
"iec_ibmir_marker_suppression_pct": [round(ei + d, 3) for d in d5],
}
for eb, en, ei in (
(4.0, 3.8, 4.2),
(28.0, 27.5, 29.0),
(62.0, 61.5, 61.0),
(76.0, 75.0, 74.5),
(85.0, 84.0, 83.5),
(90.0, 89.5, 89.0),
)
]
return s_rows, e_rows
def _mk_mix_dr(
r_lo_m: float, r_hi_m: float, ec50_m: float = 6.5, csafe_m: float = 21.0,
*, tested_product_id: str = "BENCH_UNEDITED_PANEL", cover_unbounded_to_1: bool = False,
) -> dict[str, Any]:
grid_m = [0.0, 2.0, ec50_m, round(0.5 * (ec50_m + csafe_m), 2), csafe_m, round(csafe_m * 2.0, 2)]
f_lo_m = round(r_lo_m / (1.0 + r_lo_m), 6) if r_lo_m > 0.0 else 0.0
f_hi_m = 1.0 if cover_unbounded_to_1 else (round(r_hi_m / (1.0 + r_hi_m), 6) if r_hi_m > 0.0 else 0.0)
if cover_unbounded_to_1:
n_st = max(4, int(math.ceil((f_hi_m - f_lo_m) / 0.25)))
fracs = [round(f_lo_m + (f_hi_m - f_lo_m) * (k / float(n_st)), 6) for k in range(n_st + 1)]
fracs[0], fracs[-1] = f_lo_m, 1.0
pts: list[tuple[float, Any]] = [
(ff, "INF_PURE_BMT" if abs(ff - 1.0) <= 1e-9 else round(ff / (1.0 - ff), 6))
for ff in fracs
]
elif abs(r_hi_m - r_lo_m) <= 1e-9:
pts = [(f_lo_m, r_lo_m)]
else:
n_st = max(2, int(math.ceil((r_hi_m - r_lo_m) / 0.50)), int(math.ceil((f_hi_m - f_lo_m) / 0.25)))
ratios = [round(r_lo_m + (r_hi_m - r_lo_m) * (k / float(n_st)), 6) for k in range(n_st + 1)]
ratios[0], ratios[-1] = r_lo_m, r_hi_m
pts = [(round(rr / (1.0 + rr), 6) if rr > 0.0 else 0.0, rr) for rr in ratios]
curves = []
for ff, rr in pts:
sr_c, er_c = _mk_7ep_curve_reps()
curves.append({
"measured_bmt_fraction": ff,
"measured_bmt_to_parent_ratio": rr,
"tested_free_combined_conc_grid_nM": list(grid_m),
"mixture_safety_replicates_by_conc": sr_c,
"mixture_efficacy_replicates_by_conc": er_c,
})
_b = {
"analysis_method": "SIMULTANEOUS_BONFERRONI_GRID_BRACKET_STUDENT_T",
"tested_product_id": tested_product_id,
"tested_bmt_to_parent_ratio_min": r_lo_m,
"tested_bmt_to_parent_ratio_max": r_hi_m,
"tested_bmt_fraction_min": f_lo_m,
"tested_bmt_fraction_max": f_hi_m,
"composition_interpolation_rule": "CONSERVATIVE_MIN_CEILING_MAX_EC50_ACROSS_BRACKETED_RATIOS",
"mixture_composition_curves": curves,
}
return {**_b, "evidence_sha256": sha256_bytes(canonical_json_bytes(_b))}
# Valid content-hashed mixture_requalification_receipt clears triggered B-2b cleanly!
mix_rcpt_ok = _sign_receipt({
"stage": "MIXTURE_REQUALIFICATION", "verdict": "PASS",
"product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
"evidence_scope": "bench_unedited", "recorded_at_utc": "2026-09-11T10:00:00Z", **coat_b,
"analysis_record_sha256": "d" * 64,
"tested_bmt_to_parent_ratio_min": 0.0, "tested_bmt_to_parent_ratio_max": 0.25,
"mixture_ec50_eff_u95_free_nM": 6.5, "mixture_c_safe_max_l95_free_nM": 21.0,
"mixture_dose_response_evidence": _mk_mix_dr(0.0, 0.25, 6.5, 21.0),
})
chk(evaluate_gate41_deucravacitinib_tyk2({**g41_bench, "b2b_bench_evidence": _sign_receipt({**b2bb_y, "c_bmt_local_total_u_alloc_nM": 0.25, "mixture_requalified": True, "mixture_requalification_receipt": mix_rcpt_ok})})["verdict"] == "PASS_BENCH_ONLY_UNEDITED_PRE_MATERIALIZATION", "ADV_G41_b2b_valid_mixture_receipt_PASSES")
# 11. B-0a flat 100% safety curves OR flat 60% efficacy at 0 nM OR missing CD94 FAIL!
flat_s_reps = [{**b0a_s_reps_ok[0], "matched_vehicle_record_id": f"B0A-VEH-CONC-{_i}", "raw_unit_measurements": {k: {**v, "vehicle_record_id": f"B0A-VEH-CONC-{_i}"} for k, v in b0a_s_reps_ok[0]["raw_unit_measurements"].items()}} for _i in range(8)]
chk("FAIL_GATE_B0A_RAW_CONC_RESPONSE_CONTRADICTS_WINDOW" in evaluate_gate41_deucravacitinib_tyk2({"phase": "ROUTE_FREE_B0A", "b0a_evidence": _sign_receipt({**b0a_ok, "safety_sprouting_pct_grid": [100.0]*8, "safety_nkg2a_pct_grid": [100.0]*8, "safety_cd94_pct_grid": [100.0]*8, "safety_il10_retention_pct_grid": [100.0]*8, "safety_replicates_by_conc": flat_s_reps, "b0a_analysis_receipt": _sign_receipt({**b0a_an_ok, "raw_safety_replicates_sha256": sha256_bytes(canonical_json_bytes(flat_s_reps))})})})["failures"], "ADV_G41_b0a_flat_100_safety_fails")
chk("FAIL_GATE_B0A_RAW_CONC_RESPONSE_CONTRADICTS_WINDOW" in evaluate_gate41_deucravacitinib_tyk2({"phase": "ROUTE_FREE_B0A", "b0a_evidence": _sign_receipt({**b0a_ok, "efficacy_inhibition_pct_grid": [60.0]*8, "efficacy_beta_protection_pct_grid": [60.0]*8, "efficacy_nk_suppression_pct_grid": [60.0]*8, "efficacy_iec_ibmir_pct_grid": [60.0]*8})})["failures"], "ADV_G41_b0a_flat_60_efficacy_0nM_fails")
chk("FAIL_GATE_B0A_MISSING_RAW_CONC_RESPONSE_GRID" in evaluate_gate41_deucravacitinib_tyk2({"phase": "ROUTE_FREE_B0A", "b0a_evidence": _sign_receipt({k: v for k, v in b0a_ok.items() if k != "safety_cd94_pct_grid"})})["failures"], "ADV_G41_b0a_missing_cd94_fails")
# B-0a-exact flat 98% cassette retention FAILS!
chk("FAIL_GATE_B0A_EXACT_GRID_NOT_TWO_SIDED_BRACKETED" in evaluate_gate41_deucravacitinib_tyk2({**g41_ok, "b0a_exact_evidence": _sign_receipt({**b0a_ex_y, "cassette_retention_pct_grid": [98.0]*6})})["failures"], "ADV_G41_b0a_exact_flat_98_fails")
# 12. B-0a-exact predating B-2b-bench FAILS!
b0a_ex_early = _sign_receipt({**b0a_ex_y, "recorded_at_utc": "2026-09-11T09:00:00Z"})
chk("FAIL_CHRONOLOGICAL_PREREQ_POSTDATES_STAGE:B-2b-bench_AFTER_B-0a-exact" in evaluate_gate41_deucravacitinib_tyk2({**g41_ok, "b0a_exact_evidence": b0a_ex_early})["failures"], "ADV_G41_b0a_exact_before_b2b_bench_fails")
# 13. B-4 setting claimed bounds to observed sample extrema (ignoring alpha_conc/alpha_fu_parent/alpha_fu_bmt!) FAILS!
r_b4_extrema = evaluate_gate41_deucravacitinib_tyk2({**g41_ok, "b4_evidence": _sign_receipt({**b4_y, "invivo_u95_joint_peak_free_nM": 15.51, "invivo_days0_10_parent_lower_free_nM": 7.99, "invivo_systemic_plasma_u95_nM": 0.14})})
chk("FAIL_GATE_B4_CLAIMED_PEAK_UNDERSTATES_RECOMPUTED_SIMULTANEOUS_U95" in r_b4_extrema["failures"] and "FAIL_GATE_B4_CLAIMED_FLOOR_OVERSTATES_RECOMPUTED_SIMULTANEOUS_L95" in r_b4_extrema["failures"] and "FAIL_GATE_B4_CLAIMED_SYSTEMIC_UNDERSTATES_RECOMPUTED_SIMULTANEOUS_U95" in r_b4_extrema["failures"], "ADV_G41_b4_extrema_bypass_fails")
# --- GATE-42 Regressions (7 tests) ---
# 14. Identical IFNg-only and isolated TNFa+IFNg (zero incremental TNF effect!) FAILS!
att_zero_tnf = _sign_receipt({
**att_y,
"stage2_normoxia_mechanism_panel": {**att_panel_norm, "cond2_ifng_alone_beta_t0_pct_by_block": list(att_panel_norm["cond3_isolated_tnfa_ifng_beta_t0_pct_by_block"])},
"stage2_hypoxia_15mmhg_mechanism_panel": {**att_panel_hyp, "cond2_ifng_alone_beta_t0_pct_by_block": list(att_panel_hyp["cond3_isolated_tnfa_ifng_beta_t0_pct_by_block"])},
})
chk("FAIL_IIP0049_ZERO_OR_UNPROVEN_INCREMENTAL_TNF_OVER_IFNG_ONLY:NORMOXIA" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "iip0049_foundry_attribution_evidence": att_zero_tnf})["failures"], "ADV_G42_zero_incremental_tnf_over_ifng_fails")
# 15. Missing IL-1 positive control or raw 0h/24h shield MFI mismatch FAILS!
chk("FAIL_IIP0049_IL1_PATHWAY_POSITIVE_CONTROL_MISSING:NORMOXIA" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "iip0049_foundry_attribution_evidence": _sign_receipt({**att_y, "stage2_normoxia_mechanism_panel": {**att_panel_norm, "il1_pathway_positive_control_verified": False}})})["failures"], "ADV_G42_il1_pos_ctrl_missing")
chk("FAIL_IIP0049_SHIELD_KINETICS_COMPROMISED_ON_BACKGROUND:NORMOXIA" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "iip0049_foundry_attribution_evidence": _sign_receipt({**att_y, "stage2_normoxia_mechanism_panel": {**att_panel_norm, "cxcl10_24h_mfi_by_block": [700.0, 700.0, 700.0]}})})["failures"], "ADV_G42_raw_mfi_mismatch")
# 16. GATE-36 exogenous SHIELD scope outside drug-free boundary or GATE-32 recall L95 < 0.85 FAILS!
chk("FAIL_FOUNDRY_V2_GATE36_EXOGENOUS_SHIELD_OUTSIDE_DRUG_FREE_SCOPE" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "foundry_v2_gate36_evidence": _sign_receipt({**g36_y, "foundry_v2_module_scope": "EXOGENOUS_CHRONIC_SHIELD"})})["failures"], "ADV_G42_g36_exogenous_shield_blocked")
chk("FAIL_FOUNDRY_V2_GATE36_LIVE_GATE32_RECALL_L95_BELOW_0P70" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "foundry_v2_gate36_evidence": _sign_receipt({**g36_y, "live_gate32_debris_recall_receipt": _sign_receipt({**g32_y, "debris_recall_l95_suppressed_frac": 0.65})})})["failures"], "ADV_G42_g32_l95_lt_0p70")
# 17. Major #4: C-3-GSIS missing matched NT control comparator fails!
chk("FAIL_GATE_C3_GSIS_READOUT2_MATCHED_COMPARATOR_ID_MISMATCH" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "c3_gsis_evidence": _sign_receipt({**c3_gsis_y, "readout2_evidence": _mk_r8_readout2(block_prefix="C3G", stage7_start_utc="2026-09-12T00:00:00Z", sort_reaggregation_utc="2026-09-22T00:00:00Z", assay_harvest_utc="2026-10-01T00:00:00Z")})})["failures"], "ADV_G42_c3_gsis_missing_nt_ctrl_fails")
# 18. Chronology enforcement: SWITCH predating C-2 FAILS!
chk("FAIL_GATE42_CHRONOLOGY_NATIVE_SAFETY_SWITCH_PREDATES_C2" in evaluate_gate42_gy032_channel_c_screen({**g42_ok, "native_switch_evidence": _mk_r8_switch(py, by, ly, ry, mat_yc, "2026-09-22T09:00:00Z", candidate_gene=tg_dual, comparator_nt_lot_id=nt_y, prereq_receipts={"C-2": c2_y["receipt_sha256"]})})["failures"], "ADV_G42_sw_predates_c2_fails")
# --- GATE-43 & Live GATE-31 Parity Regressions (9 tests) ---