OpenIslet

scripts/verify_wave7_cellgemma_2p24_rebase.py

Wave-7 CellGemma-Islet (IIP-0062 to IIP-0065 / GATE-40 to GATE-43) Pure-CPU

script Release v0.8.0 gen-eb955f8266035aba 1.37 MB · 90 sections

Use this file in any AI chat (paste-only or attachment-capable):

Download as text (.txt) Download section (.txt)

Pinned raw file: https://openislet.org/files/gen-eb955f8266035aba/scripts/verify_wave7_cellgemma_2p24_rebase.py · SHA-256: 5f31a6369f25031d…

        "elution_t50_days": 9.75, "day14_usable_delivery_fraction_pct": 62.4,
        "day35_depot_exhaustion_pct": 94.0, "day35_residual_parent_pct": 6.0,
        "day35_terminal_mass_recovery_pct": 99.87, "day14_elution_verified": True,
        "elution_time_hours": tr35_t, "cumulative_intact_parent_released_mg": tr35_m,
        "assumed_human_t_half_h": 3.0, "assumed_human_vd_l": 50.0,
        "day1_intact_parent_free_uM": 180.0, "day14_intact_parent_free_uM": 92.0,
        "day35_intact_parent_free_uM": 4.0, "peak_daily_eluted_mg": 5.25,
        "assumed_human_clearance_l_per_day": 277.26,
        "a1_local_free_parent_timepoints": a1_tp_ok,
        "a1_local_pk_envelope": a1b_env_ok,
        "a1_local_ph_timepoints": [
            {"hour_h": h_p, "coating_lot_id": coat_a["coating_lot_id"], "ph_min": 7.32, "ph_max": 7.39}
            for h_p in (24.0, 168.0, 336.0, 504.0, 672.0, 840.0)
        ],
        "manufacturing_lot_release_records": _mk_pfd_3lots(coat_a["coating_lot_id"], tr35_t, tr35_m),
    })
    mat_y = _mk_r8_mat(py, by, ly, "2026-08-27T08:00:00Z")
    sw_y = _mk_r8_switch(py, by, ly, ry, mat_y, "2026-10-12T09:00:00Z", coating_identity=coat_a)
    g0v_y = _mk_r8_gate0v(py, by, ly, ry, mat_y, "2026-10-12T09:30:00Z", coating_identity=coat_a)
    pr_mat_y = {"BANK_MATERIALIZATION": mat_y["receipt_sha256"]}
    pr_all_y = {
        "BANK_MATERIALIZATION": mat_y["receipt_sha256"],
        "NATIVE_SAFETY_SWITCH": sw_y["receipt_sha256"],
        "GATE-0V-KILL": g0v_y["receipt_sha256"],
    }
    a1_y = _sign_receipt({
        "stage": "A-1", "verdict": "PASS", "product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
        "evidence_scope": "exact_product", "elution_started_at_utc": "2026-08-28T10:00:00Z",
        "recorded_at_utc": "2026-10-05T10:00:00Z", "parent_receipt_sha256": a1b_y["receipt_sha256"],
        "prerequisite_receipt_sha256s": pr_mat_y, **coat_a,
        "initial_pirfenidone_loading_mg": 18.75,
        "day35_residual_parent_mg": 1.125, "day35_degradant_mass_mg": 0.0,
        "elution_t50_days": 9.75, "day14_usable_delivery_fraction_pct": 62.4,
        "day35_depot_exhaustion_pct": 94.0, "day35_residual_parent_pct": 6.0,
        "day35_terminal_mass_recovery_pct": 99.87, "day14_elution_verified": True,
        "elution_time_hours": tr35_t, "cumulative_intact_parent_released_mg": tr35_m,
        "assumed_human_t_half_h": 3.0, "assumed_human_vd_l": 50.0,
        "day1_intact_parent_free_uM": 180.0, "day14_intact_parent_free_uM": 92.0,
        "day35_intact_parent_free_uM": 4.0, "peak_daily_eluted_mg": 5.25,
        "assumed_human_clearance_l_per_day": 277.26,
        "a1_local_free_parent_timepoints": a1_tp_ok,
        "a1_local_pk_envelope": a1e_env_ok,
        "a1_local_ph_timepoints": [
            {"hour_h": h_p, "coating_lot_id": coat_a["coating_lot_id"], "ph_min": 7.32, "ph_max": 7.39}
            for h_p in (24.0, 168.0, 336.0, 504.0, 672.0, 840.0)
        ],
        "manufacturing_lot_release_records": _mk_pfd_3lots(coat_a["coating_lot_id"], tr35_t, tr35_m),
    })
    a2_prolif_ok = [
        {"lot_id": f"A2-LOT-{i}", "assay_record_id": f"A2-PROLIF-ASSAY-{i}", "ki67_fold_vs_ctrl": 0.98, "edu_fold_vs_ctrl": 0.97, "ki67_edu_referred": False}
        for i in (1, 2, 3)
    ]
    a2_y = _sign_receipt({
        "stage": "A-2", "verdict": "PASS", "product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
        "evidence_scope": "exact_product", "study_start_utc": "2026-10-06T10:00:00Z",
        "a2_specimen_id": f"SPEC-A2-{ly}", "a2_cohort_id": f"COHORT-A2-{ly}",
        "recorded_at_utc": "2026-10-25T10:00:00Z", "parent_receipt_sha256": a1_y["receipt_sha256"],
        "prerequisite_receipt_sha256s": pr_mat_y, **coat_a,
        "shield_retention_by_component": _mk_r8_shields(py),
        "ins_positive_beta_viability_pct": 94.5, "a2_per_lot_proliferation_records": a2_prolif_ok,
        "worst_face_o2_mmhg": 43.0, "hour0_density_by_lineage": _mk_r8_hour0(py),
        "day14_iec_sprouting_pct_ctrl": 94.0, "day14_iec_sprout_length_pct_ctrl": 95.0,
        "day14_iec_branching_pct_ctrl": 94.5, "day14_iec_network_persistence_pct_ctrl": 94.0,
        "a2_vascular_vehicle_record_id": f"A2-VASC-VEH-{bv_a}",
        "a2_vascular_raw_measurements": (lambda _vb: {**_vb, "vascular_assay_receipt_sha256": sha256_bytes(canonical_json_bytes(_vb))})({
            "specimen_id": f"SPEC-A2-{ly}",
            "coating_lot_id": coat_a["coating_lot_id"],
            "matched_vehicle_lot_id": bv_a,
            "exposure_started_at_utc": "2026-10-06T12:00:00Z",
            "assessed_at_utc": "2026-10-21T12:00:00Z",
            "treated_sprout_length_um": 389.5, "vehicle_sprout_length_um": 410.0,
            "treated_branching_junctions": 26.46, "vehicle_branching_junctions": 28.0,
            "treated_network_persistence_idx": 0.8554, "vehicle_network_persistence_idx": 0.91,
        }),
        "day14_iec_teer_pct_ctrl": 96.0,
        "day14_iec_cdh5_pct_ctrl": 94.0, "day14_iec_col4a2_pct_ctrl": 92.0,
        "day14_iec_klf2_fold": 0.92, "day14_iec_vcam1_adhesion_fold": 1.05,
        "readout2_evidence": _mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B"),
        "readout3b_evidence": _mk_r8_readout3b(matched_vehicle_lot_id=bv_a, specimen_id=f"SPEC-A2-{ly}", specimen_lot_id=ly, intervention_cohort_id=f"COHORT-A2-{ly}"),
    })
    a3_y = _sign_receipt({
        "stage": "A-3", "verdict": "PASS", "product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
        "evidence_scope": "exact_product", "recorded_at_utc": "2026-11-01T10:00:00Z",
        "parent_receipt_sha256": a2_y["receipt_sha256"], "prerequisite_receipt_sha256s": pr_mat_y, **coat_a,
        "matched_control_switch_parity_evidence": _mk_r8_switch_parity(bv_a),
        "oq012_clonogenic_block": _mk_r8_oq012(),
    })
    a4a_y = _sign_receipt({
        "stage": "A-4a", "verdict": "PASS", "product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
        "evidence_scope": "exact_product", "coupon_started_at_utc": "2026-11-05T10:00:00Z",
        "recorded_at_utc": "2026-11-25T10:00:00Z", "parent_receipt_sha256": a3_y["receipt_sha256"],
        "prerequisite_receipt_sha256s": pr_all_y, **coat_a,
        "donor_pair_records": [
            {"donor_pair_id": "DP-1", "day7_col1a1_reduction_pct": 55.0, "day7_alpha_sma_reduction_pct": 53.0, "day14_col1a1_reduction_pct": 59.0, "day14_alpha_sma_reduction_pct": 57.0, "day14_viability_pct": 93.5, "worst_face_o2_mmhg": 42.5},
            {"donor_pair_id": "DP-2", "day7_col1a1_reduction_pct": 56.0, "day7_alpha_sma_reduction_pct": 54.0, "day14_col1a1_reduction_pct": 60.0, "day14_alpha_sma_reduction_pct": 58.0, "day14_viability_pct": 94.0, "worst_face_o2_mmhg": 43.0},
            {"donor_pair_id": "DP-3", "day7_col1a1_reduction_pct": 57.0, "day7_alpha_sma_reduction_pct": 55.0, "day14_col1a1_reduction_pct": 61.0, "day14_alpha_sma_reduction_pct": 59.0, "day14_viability_pct": 94.5, "worst_face_o2_mmhg": 43.5},
        ],
        "day7_col1a1_reduction_pct": 56.0, "day7_alpha_sma_reduction_pct": 54.0,
        "day14_col1a1_reduction_pct": 60.0, "day14_alpha_sma_reduction_pct": 58.0,
        "day14_viability_pct": 94.0, "worst_face_o2_mmhg": 43.0,
    })
    a4b_prereg_y, a4b_coh_y = _mk_r8_a4b_prereg_and_cohorts(py, by, ly, ry, a4a_y, coat_a, start_dt_str="2026-12-20T08:00:00Z")
    pr_a4b_y = {**pr_all_y, "A-4b-PREREGISTRATION": a4b_prereg_y["receipt_sha256"]}
    a4b_y = _sign_receipt({
        "stage": "A-4b", "verdict": "PASS", "product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
        "evidence_scope": "exact_product", "animal_work_started_at_utc": "2026-12-20T08:00:00Z",
        "recorded_at_utc": "2027-01-25T10:00:00Z", "parent_receipt_sha256": a4a_y["receipt_sha256"],
        "prerequisite_receipt_sha256s": pr_a4b_y, **coat_a,
        "blinded_allocation": True, "implant_extrusions": 0,
        **a4b_coh_y,
    })
    g40_bench = {
        "phase": "BENCH_UNEDITED", "track_mode": "PRIMARY", "credit_scope": "PRIMARY",
        "target_arm": "Y", "product_id": py, "bank_id": by, "lot_id": ly, "route_id": ry,
        "a0a_evidence": a0a_ok, "a0b_evidence": a0b_y, "a1_bench_evidence": a1b_y,
    }
    g40_ok = {
        **g40_bench, "phase": "EXACT_PRODUCT",
        "materialization_evidence": mat_y, "native_switch_evidence": sw_y, "gate0v_evidence": g0v_y,
        "a1_evidence": a1_y, "a2_evidence": a2_y, "a3_evidence": a3_y, "a4a_evidence": a4a_y,
        "a4b_preregistration_receipt": a4b_prereg_y, "a4b_evidence": a4b_y,
    }
    r40 = evaluate_gate40_pirfenidone_h4(g40_ok)
    chk(r40["verdict"] == OFFLINE_VERDICT_PRIMARY and r40["release_authorizing"] is False and r40["live_ledger_authenticated"] is False, "G40_pass_Y_R3P")
    chk(evaluate_gate40_pirfenidone_h4({"phase": "ROUTE_FREE_A0A", "a0a_evidence": a0a_ok})["verdict"] == "PASS_ROUTE_FREE_A0A_ONLY", "G40_phase1_ok")
    chk(evaluate_gate40_pirfenidone_h4(g40_bench)["verdict"] == "PASS_BENCH_ONLY_UNEDITED_PRE_MATERIALIZATION", "G40_phase2_ok")

    # GATE-40 closures (10 brand-new tests!)
    # 1. Instantaneous 18 mg burst in 1 hour breaches 1-compartment C_max >= 0.20 ug/mL even though steady-state 18/250 = 0.072 < 0.20!
    chk("FAIL_GATE_A1_RECOMPUTED_PEAK_SYSTEMIC_CMAX_CAP_BREACH" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "cumulative_intact_parent_released_mg": [0.0] + [18.0] * (len(tr35_t) - 1)})})["failures"], "G40_ADV_burst_cmax_breach")
    # 2. A-0b modeled plasma understating recomputed burst C_max fails!
    chk("FAIL_GATE_A0B_MODELED_PLASMA_UNDERSTATES_BURST_CMAX" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "modeled_systemic_plasma_ug_ml": 0.001})})["failures"], "G40_ADV_a0b_understates_cmax")
    # 3. A-2 matched comparator drop to 50% of blank vehicle fails BOTH raw ratio & Fieller L95!
    bad_r2_50 = _mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B")
    for b in bad_r2_50["o2_40_mmhg"]["blocks"]:
        b["matched_control_z2_increment"] = round(b["z2_increment"] * 2.0, 4)
        b["matched_control_output_ratio"] = 0.50
    chk("FAIL_GATE_A2_READOUT2_O2_40_RECOMPUTED_CTRL_FIELLER_L95_BELOW_FLOOR" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": bad_r2_50})})["failures"], "G40_ADV_a2_matched_ctrl_50pct_fail")
    # 4. A-2 Readout-2 Rule S8 Fieller fails when extended clocks apply (> 28 days) and comparator is missing!
    r2_ext = _mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B")
    r2_ext["dual_clocks_utc"]["assay_harvest_utc"] = "2026-11-10T00:00:00Z"
    chk("FAIL_GATE_A2_READOUT2_O2_40_MISSING_RULE_S8_COMPARATOR_Z2" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": r2_ext})})["failures"], "G40_ADV_a2_rule_s8_enforced")
    # 5. A-2 INS+ beta viability < 90% fails!
    chk("FAIL_GATE_A2_INS_POSITIVE_BETA_VIABILITY_BELOW_90PCT" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "ins_positive_beta_viability_pct": 82.0})})["failures"], "G40_ADV_a2_ins_viab_lt90")
    # 6. A-2 unpooled proliferation > 1.0x unreferred fails (and referred holds)!
    chk("FAIL_GATE_A2_UNREFERRED_PROLIFERATION_ELEVATION:A2-LOT-1" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "a2_per_lot_proliferation_records": [{**a2_prolif_ok[0], "ki67_fold_vs_ctrl": 1.08}, a2_prolif_ok[1], a2_prolif_ok[2]]})})["failures"], "G40_ADV_a2_prolif_unreferred")
    # 7. Gate 0V autologous tier submitted for allogeneic Design Y triggers HOLD_INAPPLICABLE_QUALIFICATION_TIER_FOR_PRODUCT_FAMILY!
    g0v_wrong_tier = _mk_r8_gate0v(py, by, ly, ry, mat_y, "2026-10-12T09:30:00Z", coating_identity=coat_a, tier_override="PASS_WHOLEGRAFT_AUTOLOGOUS_PROCESS_QUAL")
    chk("HOLD_INAPPLICABLE_QUALIFICATION_TIER_FOR_PRODUCT_FAMILY" in evaluate_gate40_pirfenidone_h4({**g40_ok, "gate0v_evidence": g0v_wrong_tier})["holds"], "G40_ADV_g0v_wrong_family_tier_hold")
    # 8. A-4b TERMINAL_HISTOLOGY reusing same animal ID across early & Day-28 cohorts FAILS!
    coh_overlap = _mk_r8_a4b_cohorts("2026-12-20T08:00:00Z")
    coh_overlap["day28_cohort_records"][0]["animal_id"] = coh_overlap["early_cohort_records"][0]["animal_id"]
    chk("FAIL_GATE_A4B_TERMINAL_EARLY_AND_DAY28_ANIMALS_NOT_DISJOINT" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4b_evidence": _sign_receipt({**a4b_y, **coh_overlap})})["failures"], "G40_ADV_a4b_terminal_overlap")
    # 9. A-4b null exclusion entry FAILS!
    chk("FAIL_GATE_A4B_EARLY_MALFORMED_OR_NULL_EXCLUSION_ROW:0" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4b_evidence": _sign_receipt({**a4b_y, "early_cohort_enrolled_coated_n": 9, "early_cohort_exclusions": [None]})})["failures"], "G40_ADV_a4b_null_excl")
    # 10. A-4b raw coated collagen indistinguishable from raw vehicle FAILS Welch t-test!
    coh_flat = _mk_r8_a4b_cohorts("2026-12-20T08:00:00Z")
    for r in coh_flat["day28_cohort_records"]:
        if r["arm"] == "COATED":
            r["pericapsular_collagen_thickness_um"] = 95.0
    chk("FAIL_GATE_A4B_RECOMPUTED_COLLAGEN_EFFICACY_OR_PVALUE_FAILED" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4b_evidence": _sign_receipt({**a4b_y, **coh_flat})})["failures"], "G40_ADV_a4b_flat_collagen_fails")

    # & Core 67 GATE-40 invariants
    chk("FAIL_A-1_COATING_IDENTITY_MISMATCH:coating_lot_id" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "coating_lot_id": "SWAPPED-LOT"})})["failures"], "G40_ADV_coating_lot_swap")
    chk("FAIL_GATE_A0A_ELAPSED_STUDY_DURATION_LT_7_DAYS" in evaluate_gate40_pirfenidone_h4({"phase": "ROUTE_FREE_A0A", "a0a_evidence": _sign_receipt({**a0a_ok, "study_start_utc": "2026-06-28T08:00:00Z"})})["failures"], "G40_ADV_a0a_lt_7d")
    chk("FAIL_GATE_A0B_ELAPSED_OBSERVATION_LT_14_DAYS" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "study_start_utc": "2026-07-12T09:00:00Z"})})["failures"], "G40_ADV_a0b_lt_14d")
    chk("FAIL_GATE_A1_EXACT_STARTED_BEFORE_BENCH_A1_COMPLETION" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "elution_started_at_utc": "2026-08-15T10:00:00Z"})})["failures"], "G40_ADV_a1_before_bench")
    chk("FAIL_GATE_A1_RECOMPUTED_SYSTEMIC_PLASMA_CAP_BREACH" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "peak_daily_eluted_mg": 60.0})})["failures"], "G40_ADV_a1_sys_cap")
    chk("FAIL_GATE_A2_READOUT3B_R2_ALLO_CD8_CTL_GT_5PCT:NK-D1" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout3b_evidence": {**_mk_r8_readout3b(matched_vehicle_lot_id=bv_a), "donor_records": [{**_mk_r8_readout3b(matched_vehicle_lot_id=bv_a)["donor_records"][0], "regime_ii_t0_unpreinduced": {**_mk_r8_readout3b(matched_vehicle_lot_id=bv_a)["donor_records"][0]["regime_ii_t0_unpreinduced"], "allogeneic_cd8_ctl_lysis_pct": 8.0}}, *_mk_r8_readout3b(matched_vehicle_lot_id=bv_a)["donor_records"][1:]]}})})["failures"], "G40_ADV_a2_r3b_cd8_fail")
    chk("FAIL_GATE_A2_READOUT2_UNRECOGNIZED_OR_TAMPERED_CANONICAL_Z_MIN_FLOOR" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": {**_mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B"), "z_min_floor": 0.01}})})["failures"], "G40_ADV_r2_zmin_tamper")
    chk("FAIL_GATE_A4B_EARLY_PERFUSION_OUTSIDE_36_72H:E-COAT-01" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4b_evidence": _sign_receipt({**a4b_y, "early_cohort_records": [{**a4b_y["early_cohort_records"][0], "assessed_at_utc": "2026-12-20T20:00:00Z"}, *a4b_y["early_cohort_records"][1:]]})})["failures"], "G40_ADV_a4b_early_ts")
    g0v_60k = _mk_r8_gate0v(py, by, ly, ry, mat_y, "2026-10-12T09:30:00Z", coating_identity=coat_a, treated_72h_n=60000)
    chk("HOLD_GATE0V_ESTIMAND1_TOTAL_ESCAPE_U_GT_1E_4:active_persistent_cvb4:GCG_alpha" in evaluate_gate40_pirfenidone_h4({**g40_ok, "gate0v_evidence": g0v_60k})["holds"], "G40_ADV_g0v_60k_est1_hold")
    chk("FAIL_GATE_A2_READOUT2_O2_40_GLUCOSE_THRESHOLD_LT_4P5MM" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a2_evidence": _sign_receipt({**a2_y, "readout2_evidence": {**_mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B"), "o2_40_mmhg": {"blocks": [{**_mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B")["o2_40_mmhg"]["blocks"][0], "glucose_threshold_mM": 3.5}, *_mk_r8_readout2(matched_comparator_id=bv_a, block_prefix="A2B")["o2_40_mmhg"]["blocks"][1:]]}}})})["failures"], "G40_ADV_r2_gthresh")

    chk("FAIL_GATE_A0B_ADDED_COATING_DIFF_PATH_GT_5UM" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "added_coating_water_equiv_diff_path_um": 6.5})})["failures"], "G40_ADV_a0b_added_path")
    chk("FAIL_GATE_A0B_LOCAL_PH_OUTSIDE_7P25_7P45" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "local_ph_min": 7.10})})["failures"], "G40_ADV_a0b_ph")
    chk("FAIL_GATE_A0B_PEAK_FREE_NOT_BELOW_ALL4_CEILINGS" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "peak_free_parent_u95_uM": 225.0})})["failures"], "G40_ADV_a0b_peak_ge")
    chk("FAIL_GATE_A0B_14D_SUSTAINED_NOT_BELOW_ALL4_CEILINGS" in evaluate_gate40_pirfenidone_h4({**g40_bench, "a0b_evidence": _sign_receipt({**a0b_y, "peak_free_parent_u95_uM": 235.0, "day14_sustained_free_parent_u95_uM": 220.0})})["failures"], "G40_ADV_a0b_sust_ge")
    chk("FAIL_GATE_A1_ELAPSED_ELUTION_DURATION_LT_35_DAYS" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a1_evidence": _sign_receipt({**a1_y, "recorded_at_utc": "2026-09-10T10:00:00Z"})})["failures"], "G40_ADV_a1_elapsed_lt_35d")
    chk("FAIL_GATE_A4A_ELAPSED_COUPON_DURATION_LT_14_DAYS" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4a_evidence": _sign_receipt({**a4a_y, "recorded_at_utc": "2026-11-12T10:00:00Z"})})["failures"], "G40_ADV_a4a_elapsed_lt_14d")
    chk("FAIL_GATE_A4B_ELAPSED_STUDY_DURATION_LT_28_DAYS" in evaluate_gate40_pirfenidone_h4({**g40_ok, "a4b_evidence": _sign_receipt({**a4b_y, "recorded_at_utc": "2027-01-05T10:00:00Z"})})["failures"], "G40_ADV_a4b_elapsed_lt_28d")