"promotion_authorized": pa, } if extra_fields: for k, v in extra_fields.items(): require_cond(k != "archive_sha256", "extra_fields cannot override archive_sha256") body[k] = copy.deepcopy(v) return seal_evidence_record(body) def _make_upstream_evidence_record( *, record_id: str, gate_source: str, product_id: str, lot_id: str, bank_id: str, bank_origin: str, construct_manifest_sha256: str | None = None, evidence_tier: str = "SYNTHETIC_FIXTURE", decision: str | None = None, authority_scope: str | None = None, bank_qualified: bool | None = None, promotion_authorized: bool | None = None, ) -> dict[str, Any]: csha = construct_manifest_sha256 or sha256_str(f"lot_construct_manifest|{product_id}|{lot_id}|v0.9.0") return _make_evidence_record_v2( record_id=record_id, gate_source=gate_source, product_id=product_id, lot_id=lot_id, bank_id=bank_id, bank_origin=bank_origin, construct_manifest_sha256=csha, evidence_tier=evidence_tier, decision=decision, authority_scope=authority_scope, bank_qualified=bank_qualified, promotion_authorized=promotion_authorized, ) def _canonical_synthetic_gate34_fixtures() -> dict[str, dict[str, Any]]: """Synthetic self-test fixtures ONLY (evidence_tier='SYNTHETIC_FIXTURE'; NEVER authorizes clinical promotion).""" sh_csha = sha256_str("lot_construct_manifest|ISLET1_DESIGN_B_V090|SYNTH_SHIELD_LOT_001|v0.9.0") ins_csha = sha256_str("lot_construct_manifest|ISLET1_DESIGN_Y_V3|SYNTH_INS_LOT_001|v0.9.0") cuff_csha = sha256_str("lot_construct_manifest|ISLET1_DESIGN_B_V090|SYNTH_CUFF_LOT_001|v0.9.0") iv_csha = sha256_str("lot_construct_manifest|ISLET1_DESIGN_D1B_LEAN_K2|SYNTH_INVVAX_LOT_001|v0.9.0") ins_elisa_kits = { "Roche Elecsys": { "kit_catalog_id": "ROCHE-03184897190", "kit_lot_id": "ROCHE_LOT_SYNTH_01", "low_conc_nmol_L": 0.05, "low_conc_recovery_pct": 96.2, "mid_conc_nmol_L": 1.00, "mid_conc_recovery_pct": 98.5, "diluted_high_conc_nmol_L": 5.00, "diluted_high_conc_recovery_pct": 99.1, }, "Mercodia": { "kit_catalog_id": "MERCODIA-10-1136-01", "kit_lot_id": "MERCODIA_LOT_SYNTH_01", "low_conc_nmol_L": 0.05, "low_conc_recovery_pct": 97.4, "mid_conc_nmol_L": 1.00, "mid_conc_recovery_pct": 101.2, "diluted_high_conc_nmol_L": 5.00, "diluted_high_conc_recovery_pct": 102.0, }, "Siemens": { "kit_catalog_id": "SIEMENS-ADVIA-03649928", "kit_lot_id": "SIEMENS_LOT_SYNTH_01", "low_conc_nmol_L": 0.05, "low_conc_recovery_pct": 94.8, "mid_conc_nmol_L": 1.00, "mid_conc_recovery_pct": 96.0, "diluted_high_conc_nmol_L": 5.00, "diluted_high_conc_recovery_pct": 97.5, }, } ins_hla_panels = { "donor_issuer_id": DEFAULT_INS_CANONICAL_ISSUER_ID, "HLA-DRB1*04:01": { "peptide_tested": "GSLQPLAIEGSLQKRGIV", "binding_assay_verified": True, "mutant_binding_gain_fold": 1.05, "donor_ids": ["T1D_DON_001", "T1D_DON_002", "T1D_DON_003", "T1D_DON_004"], "donor_count": 4, "reactive_donor_ids": [], "reactive_donors": 0, "max_elispot_sfu": 8.0, "max_fold_vs_wt": 1.1, }, "HLA-A*02:01": { "peptide_tested": "SLQPLAIEGSL", "binding_assay_verified": True, "mutant_binding_gain_fold": 1.02, "donor_ids": ["T1D_DON_005", "T1D_DON_006", "T1D_DON_007", "T1D_DON_008"], "donor_count": 4, "reactive_donor_ids": [], "reactive_donors": 0, "max_elispot_sfu": 5.0, "max_fold_vs_wt": 1.0, }, "HLA-A*11:01": { "peptide_tested": "LAIEGSLQK", "binding_assay_verified": True, "mutant_binding_gain_fold": 1.08, "donor_ids": ["T1D_DON_009", "T1D_DON_010", "T1D_DON_011", "T1D_DON_012"], "donor_count": 4, "reactive_donor_ids": [], "reactive_donors": 0, "max_elispot_sfu": 6.0, "max_fold_vs_wt": 1.05, }, } cuff_conj = { "sCR1_v2": { "protein_lot_id": "SCR1_SYNTH_LOT_01", "conjugation_yield_pct": 88.5, "peg_kda": 3.4, "unpaired_ecd_cys": 0, "free_thiol_mol_per_mol": 0.02, }, "THBD-M406L": { "protein_lot_id": "THBD_SYNTH_LOT_01", "conjugation_yield_pct": 91.0, "peg_kda": 3.4, "unpaired_ecd_cys": 0, "free_thiol_mol_per_mol": 0.01, }, "CD200-ECD": { "protein_lot_id": "CD200_SYNTH_LOT_01", "conjugation_yield_pct": 86.0, "peg_kda": 20.0, "unpaired_ecd_cys": 0, "free_thiol_mol_per_mol": 0.02, }, } return { "shield": { "evidence_tier": "SYNTHETIC_FIXTURE", "target_arm_id": "B", "product_id": "ISLET1_DESIGN_B_V090", "lot_id": "SYNTH_SHIELD_LOT_001", "bank_id": "MCB_B_SYNTH_01", "bank_origin": "allogeneic_hiPSC", "manifest_sha256": EXPECTED_ARM_MANIFEST_SHA256, "construct_manifest_sha256": sh_csha, "design_a_exposed": False, "study_id": "SHIELD_PK_SEL_Q28D_SYNTH_001", "upstream_lot_evidence_record": _make_evidence_record_v2( record_id="REC_G34_SYNTH_SHIELD_001", gate_source=CANONICAL_UPSTREAM_GATE34_SOURCE, product_id="ISLET1_DESIGN_B_V090", lot_id="SYNTH_SHIELD_LOT_001", bank_id="MCB_B_SYNTH_01", bank_origin="allogeneic_hiPSC", construct_manifest_sha256=sh_csha, ), "live_gate32_debris_recall_record": _make_evidence_record_v2( record_id="REC_LIVE_G32_DEBRIS_SYNTH_SHIELD_001", gate_source=CANONICAL_LIVE_GATE32_DEBRIS_RECALL_SOURCE, product_id="ISLET1_DESIGN_B_V090", lot_id="SYNTH_SHIELD_LOT_001", bank_id="MCB_B_SYNTH_01", bank_origin="allogeneic_hiPSC", construct_manifest_sha256=sh_csha, extra_fields={ "debris_recall_verdict": "PASS_DEBRIS_RECALL_FULL_CREDIT", "debris_recall_l95_suppressed_frac": 0.78, "residual_class2_recall_u95_frac": 0.22, "unrelated_recall_preserved": True, }, ), "current_assay_evidence_record": _make_evidence_record_v2( record_id="REC_G36_SHIELD_SYNTH_001", gate_source=CANONICAL_GATE36_MODULE_SOURCES["shield"], product_id="ISLET1_DESIGN_B_V090", lot_id="SYNTH_SHIELD_LOT_001", bank_id="MCB_B_SYNTH_01", bank_origin="allogeneic_hiPSC", construct_manifest_sha256=sh_csha, extra_fields={ "study_id": "SHIELD_PK_SEL_Q28D_SYNTH_001", "format_id": "FULLY_HUMAN_FAB_KIH_COMMON_LC_HIGG1_LALAPG_LS", "dosing_regimen": "Q28D", "timed_pk_day": 28, "human_pk_qualified": True, "periodic_pk_converged": True, "gmp_lot_count": 3, "donor_hla_dq_panel_n": 8, "off_target_negative_states_tested": 7, "on_target_kd_u95_nm": 1.0, "off_target_kd_l95_um": 15.0, "selectivity_ratio_l95": 15000.0, "peak_free_nm": 611.3188, "plasma_trough_free_nm": 431.1056, "dln_trough_free_nm": 109.4573, "reported_off_target_peak_ro_pct": 3.9159, "fc_adcc_cdc_pct": 0.0, "tcell_inhibition_l95_pct": 78.0, "apc_cytotoxicity_u95_pct": 1.2, "sec_mals_monomer_pct": 97.5, "ce_sds_heterodimer_pct": 96.8, }, ), "format_id": "FULLY_HUMAN_FAB_KIH_COMMON_LC_HIGG1_LALAPG_LS", "regimen_id": "Q28D", "timed_pk_day": 28, "measured_human_pk_verified": True, "periodic_pk_converged": True, "gmp_lot_count": 3, "donor_hla_dq_panel_n": 8, "off_target_negative_states_tested": 7, "on_target_kd_u95_nm": 1.0, "off_target_kd_l95_um": 15.0, "selectivity_ratio_l95": 15000.0, "peak_free_nm": 611.3188, "plasma_trough_free_nm": 431.1056, "dln_trough_free_nm": 109.4573, "reported_off_target_peak_ro_pct": 3.9159, "fc_adcc_cdc_pct": 0.0, "tcell_inhibition_l95_pct": 78.0, "apc_cytotoxicity_u95_pct": 1.2, "sec_mals_monomer_pct": 97.5, "ce_sds_heterodimer_pct": 96.8, }, "ins": { "evidence_tier": "SYNTHETIC_FIXTURE", "target_arm_id": "Y", "product_id": "ISLET1_DESIGN_Y_V3", "lot_id": "SYNTH_INS_LOT_001", "bank_id": "MCB_Y_SYNTH_01", "bank_origin": "allogeneic_hiPSC", "manifest_sha256": EXPECTED_ARM_MANIFEST_SHA256, "construct_manifest_sha256": ins_csha, "design_a_exposed": False, "study_id": "INS_L82I_DAY1_HLA_PEPTIDOMICS_SYNTH_001", "upstream_lot_evidence_record": _make_evidence_record_v2( record_id="REC_G34_SYNTH_INS_001", gate_source=CANONICAL_UPSTREAM_GATE34_SOURCE, product_id="ISLET1_DESIGN_Y_V3", lot_id="SYNTH_INS_LOT_001", bank_id="MCB_Y_SYNTH_01", bank_origin="allogeneic_hiPSC", construct_manifest_sha256=ins_csha, ), "current_assay_evidence_record": _make_evidence_record_v2(