scripts/verify_iip0041_clinical_h1_cd64t_siglec.py
Use this file in any AI chat (paste-only or attachment-capable):
Pinned raw file: https://openislet.org/files/gen-eb955f8266035aba/scripts/verify_iip0041_clinical_h1_cd64t_siglec.py · SHA-256: f004cf6d8259b8b4…
"primary_lot_id, matching course-equivalent infusion and outcome weight 1 / len(course_lot_ids) per constituent lot), and unplanned rescue repeat "
"lots (validated against an existing initial primary course, reconciled bidirectionally on exact rescue event "
"identities AND cardinalities/multiplicities between clinical cohort and raw CMC ledger so any extra, missing, "
"duplicate, or mismatched rescue lot fails closed, requiring independent verified ancestry in "
"VERIFIED_LOT_TO_BANK_MANIFEST including explicit matching wcb_id whenever declared in manifest, primary-course "
"infusion weight = 0, forced 0 primary credit on the rescued recipient), while retaining 1:1 unique recipients "
"in clinical H1; NEVER overloaded onto Blueprint H1 or Reichman's Beta(8.8, 1.2) prior."
),
"is_free_boundary": (
"H1_Blueprint, P_release_CMC, and H1_CMC_ATTEMPTED_LOT_READINESS operate strictly under chronic systemic immunosuppression "
"and are explicitly distinct from C2a strict insulin independence and from OpenIslet's IS-free cure target "
"(ZERO spillover credit to IS-free H2/H3)."
),
},
"observation_unit_and_intercurrent_event_rules": {
"primary_observation_unit": (
"1:1 unique enrolled, infused full-dose single-lot T1D recipient (each unique recipient enters the clinical H1 "
"binomial likelihood at most once; full-dose split-lot recipients receiving a complete prespecified single-lot "
"dose are eligible with cluster ancestry bound uniquely to that single lot_id/mcb_id while unused aliquots stay "
"in CMC; pooled multi-lot courses spanning >= 2 lots per recipient are tracked in CMC and excluded from primary "
"single-lot nested-cluster Gate 28-A promotion unless a prespecified multi-membership cluster model is registered)."
),
"unused_failed_and_split_lot_disposition": (
"Failed/unreleased GMP lots, released-but-uninfused lots (infusion = 0), unused split-lot aliquots (infusion = 0), "
"and pooled multi-lot courses spanning >= 2 lots per recipient are excluded from the primary single-lot clinical H1 "
"recipient denominator and logged strictly in the separate CMC Readiness Ledger via "
"evaluate_cmc_attempted_lot_readiness(...) (attempted_lots_n, released_lots_n, uninfused_released_lots_n, "
"failed_release_lots_n, infused_lot_equivalents, projected_cmc_attempted_lot_readiness, "
"measured_weighted_cmc_readiness, lot_id -> mcb_id -> recipient_id)."
),
"unified_intercurrent_event_adjudication_table": dict(GATE_28A_INTERCURRENT_EVENT_ADJUDICATION),
"repeat_infusion_rule": (
"A recipient requiring a rescue repeat full-dose infusion to achieve or restore C2b counts as a primary "
"single-infusion non-responder (0) in BOTH Gate 28-A clinical H1 and primary-lot CMC readiness (multi-infusion rescue "
"outcomes may appear only as a separate descriptive sensitivity). Pooled multi-lot courses are excluded from primary "
"single-lot Gate 28-A promotion unless a prespecified multi-membership cluster model is registered."
),
"prohibited_concomitant_therapy_rule": (
"Protocol-prohibited peri-infusion systemic glucocorticoids count deterministically as primary non-responders (0) in the "
"primary glucocorticoid-free H1 estimand (identical across protocol, side contract, DEC-120, and evaluate_gate28a_h1_promotion); "
"any steroid-exposed treatment-policy analysis is segregated strictly as a non-promoting secondary sensitivity."
),
"missingness_and_dropout_rule": (
"Lost-to-follow-up, incomplete primary follow-up (< 6 months), missing required CGM/HbA1c/SHE/C-peptide observations, "
"primary graft non-function, or pre-landmark death count deterministically as primary non-responders (0); adjudicated "
"unrelated deaths with intact pre-death stimulated C-peptide may appear only in a separate descriptive sensitivity."
),
"bank_and_lot_cluster_promotion_rule": (
"Every infused recipient MUST undergo Pass-0 unconditional raw clinical ancestry extraction across EVERY raw "
"row in recipients BEFORE follow-up, endpoint, intercurrent-event, or duplicate-recipient skipping (detecting "
"CONFLICTING_DUPLICATE_RECIPIENT_ANCESTRY and preserving missing-follow-up rows for manifest and raw-CMC "
"reconciliation across both normal and CMC-exception error-audit paths), carrying literal mcb_id and lot_id "
"linkage reconciled against a verified lot_to_mcb_manifest "
"(mapping every observed lot_id uniquely to ONE single mcb_id) AND a verified lot_to_wcb_manifest whenever ANY recipient "
"or manifest declares WCB. ALL supported manifest aliases (lot_to_mcb_manifest, lot_to_wcb_manifest, lot_to_bank_manifest) "
"are canonically bound in cohort_canonical_sha256 AND normalized/validated through ONE unified hierarchy validator in BOTH "
"cohort payloads and external VERIFIED_LOT_TO_BANK_MANIFEST records (rejecting overlapping contradictions, extra/widening "
"alias declarations, unrecognized manifest alias keys, and non-unique wcb_id -> mcb_id parentage across the combined "
"declarations). There is ZERO fallback to unverified recipient rows OR unverified inline manifests: absent "
"trusted_clinical_store, failed VERIFIED_LOT_TO_BANK_MANIFEST resolution, conflicting/widening/unrecognized bank or WCB "
"aliases (rejected BEFORE merging), non-unique WCB-to-MCB parentage (every distinct literal wcb_id MUST map to at most ONE mcb_id), "
"or missing/invalid/conflicting/mismatched manifests immediately return lot_bank_hierarchy_valid=False, "
"lot_to_mcb_manifest_verified=False, lot_to_wcb_manifest_verified=False, and null deff/n_eff/k_eff. Promotion requires resolving ALL "
"FOUR authenticated records from an independent external trusted_clinical_store (NEVER self-attested inline dicts): "
"PRESPECIFICATION_ATTESTATION and SOURCE_VERIFICATION_ATTESTATION bound to cohort_id and the full canonical cohort digest "
"(all compatibility fields, includes_reichman, primary_peer_reviewed_full_text_verified, "
"parallel_cmc_readiness_ledger_disclosed, rho_lot, rho_bank, lot_to_mcb_manifest, lot_to_wcb_manifest, "
"lot_to_bank_manifest, any extra manifest aliases, parallel_cmc_readiness_ledger_sha256, and canonical recipients — "
"injectively binding presence/absence of decision-relevant control flags and normalizing equivalent recipient "
"working_cell_bank_id <-> wcb_id aliases before hashing while preserving conflicts in the digest), VERIFIED_LOT_TO_BANK_MANIFEST, "
"and raw PARALLEL_CMC_READINESS_LEDGER bytes decoded strictly (rejecting duplicate JSON keys and non-finite numbers "
"fail-closed with null cluster outputs), passing evaluate_cmc_attempted_lot_readiness (with typed "
"CMCAncestryValidationError propagation and unconditional Pass-0-backed raw-CMC ancestry auditing so initial-validation and "
"cross-reconciliation ancestry contradictions — including WCB reuse across infused and failed-release lots, "
"canonical MCB vs recognized MCB/WCB alias conflict on any disposition, duplicate lot_id, or recipient lot/MCB/WCB "
"mismatch even when follow-up is missing or another CMC shape error occurs — all return parallel_cmc_ledger_verified=False, "
"lot_bank_hierarchy_valid=False, lot_to_mcb_manifest_verified=False, lot_to_wcb_manifest_verified=False, and null "
"deff/n_eff/k_eff), reconciling infused recipients AND exact rescue repeat-lot identities and cardinalities/multiplicities "
"bidirectionally BEFORE ordinary CMC validation can short-circuit it (0 clinical rescues = 0 CMC rescue lots; every clinically declared rescue repeat infusion MUST declare "
"an explicit canonical clinical rescue_lot_id or non-empty rescue_lot_ids list matching sorted CMC infused rescue lots "
"identically — ANY presence of an undocumented *rescue*lot* alias key such as rescue_repeat_lot_id / rescue_repeat_lot_ids [even with value None/null/empty or on intercurrent_event='NONE'] and unindexed rescue "
"declarations fail closed with UNRECOGNIZED_CLINICAL_RESCUE_LOT_ALIAS / CLINICAL_RESCUE_MISSING_EXPLICIT_LOT_ID, "
"duplicate clinical recipient rows extract raw rescue claims in Pass 0 and invalidate CMC verification "
"order-independently across all row permutations with DUPLICATE_CLINICAL_RECIPIENT_INVALIDATES_CMC_RECONCILIATION, "
"and ANY single-row or duplicate-row clinical-vs-CMC rescue identity, cardinality, omission, unindexed-rescue, or lineage contradiction [CLINICAL_CMC_RESCUE_IDENTITY_CONFLICT / CLINICAL_RESCUE_LOT_ID_MISMATCH_IN_CMC_LEDGER / CLINICAL_RESCUE_OMITTED_FROM_CMC_LEDGER / CMC_EXTRA_RESCUE_LOT_OMITTED_FROM_CLINICAL_COHORT / CONFLICTING_DUPLICATE_RECIPIENT_RESCUE] — as well as EVERY distinct Pass-0 clinical primary-lot claim across all single and duplicate rows per recipient contradicting a raw CMC non-infused disposition (RELEASED_UNINFUSED, FAILED_RELEASE, or missing/non-infused disposition) or absent/uninfused primary lot [CLINICAL_PRIMARY_LOT_CMC_DISPOSITION_CONFLICT / CLINICAL_PRIMARY_LOT_MISSING_FROM_CMC_LEDGER / CLINICAL_PRIMARY_RECIPIENT_MISSING_FROM_CMC_LOT], audited against any attested raw CMC ledger in trusted_clinical_store EVEN BEFORE returning on clinical hierarchy errors such as CONFLICTING_DUPLICATE_RECIPIENT_ANCESTRY so both contradiction classes are always collected — routes unconditionally through "
"the full fail-closed ancestry nullification path returning parallel_cmc_ledger_verified=False, "
"lot_bank_hierarchy_valid=False, lot_to_mcb_manifest_verified=False, lot_to_wcb_manifest_verified=False, "
"icc_sensitivity_report_attached=False, and null deff/n_eff/k_eff in every row permutation even when an unrelated CMC shape error occurs, and every CMC "
"primary recipient outcome MUST reconcile against a deterministically adjudicated clinical outcome with deterministic "
"ITT non-response events adjudicated to 0 BEFORE endpoint/follow-up validation), AND reconciling raw CMC row ancestry "
"across EVERY disposition (all clinically infused primary, split, and rescue lots MUST carry matching independent "
"verified ancestry in VERIFIED_LOT_TO_BANK_MANIFEST AND explicitly attest matching wcb_id or recognized alias "
"working_cell_bank_id whenever declared in VERIFIED_LOT_TO_BANK_MANIFEST; non-infused RELEASED_UNINFUSED and "
"FAILED_RELEASE rows are optional in the verified manifest but MUST NOT contradict VERIFIED_LOT_TO_BANK_MANIFEST "
"or the unified wcb_id -> mcb_id parentage tree; semantic canonicalization preserves cohort_canonical_sha256 across "
"equivalent WCB representations [working_cell_bank_id <-> wcb_id and matching top-level lot_to_wcb_manifest alongside "
"identical nested WCB declarations] while any semantic ancestry mutation, conflict, widening, or "
"lot_to_bank_manifest/unrecognized alias addition alters cohort_canonical_sha256 and fails closed); ALL structural "
"manufacturing diversity floors (distinct_gmp_lots_n >= 3, distinct_mcb_n >= 2, max_single_lot_share <= 0.40 via exact "
"context-independent Fraction); AND both posteriors on cluster-adjusted effective sample size (k_eff, n_eff) where "
"DEFF = 1 + rho_lot * ((sum(m_g^2) / n) - 1) + rho_bank * ((sum(b_c^2) / n) - 1), n_eff = n / DEFF, "
"k_eff = n_eff * (k / n), with separate additive variance-component ICC shares rho_bank = sigma_bank^2 / sigma_tot^2 "
"and rho_lot = sigma_lot^2 / sigma_tot^2 (same-lot total correlation = rho_lot + rho_bank) enforcing conservative "
"prespecified floors rho_lot >= 0.05 and rho_bank >= 0.02 AND 0 <= rho_lot, 0 <= rho_bank, "
"rho_lot + rho_bank <= 1.0 (failing closed with INVALID_ICC_SUM_EXCEEDS_ONE / INVALID_ICC_DOMAIN and null "
"deff/n_eff/k_eff if violated), PLUS mandatory attachment of the prespecified 3-scenario same-cohort "
"icc_sensitivity_report (primary_floor=(0.05, 0.02), moderate_sensitivity=(0.10, 0.05), "
"high_clustering_sensitivity=(0.15, 0.10)) and explicit 4-state icc_sensitivity_review_status "
"(ROBUST_ACROSS_ALL_THREE_PRESPECIFIED_ICC_SCENARIOS [all 3 clear -> may promote]; "
"BOUNDARY_SENSITIVE_DISCLOSED_CLEARS_PRIMARY_AND_MODERATE [primary & moderate clear, high holds -> may promote ONLY "
"with attached sensitivity report disclosing boundary_sensitive_under_high_icc=True]; "
"HOLD_FAILS_MODERATE_ICC_SENSITIVITY [moderate (0.10, 0.05) fails -> HARD HOLD, NEVER promote]; "
"HOLD_FAILS_PRIMARY_ICC_FLOOR [primary floor (0.05, 0.02) fails -> HARD HOLD]); all cluster-adjusted "
"Beta-Binomial probabilities on fractional (k_eff, n_eff) and across the 3-scenario icc_sensitivity_report "
"are prespecified decision-model quantities conditional on assumed variance-component ICCs and cohort "
"exchangeability rather than independently calibrated empirical probabilities. A heavily skewed 20+1 split or "
"single-bank 21/21 cohort fails closed."
),
},
"single_compatible_cohort_transport_rule": {
"promotion_restricted_to_single_compatible_cohort": True,
"naive_pooling_prohibited": True,
"unparameterized_hierarchical_transport_authorized": False,
"prespecified_compatibility_target": dict(GATE_28A_COMPATIBILITY_TARGET),
"rule": (
"Gate 28-A promotion of Blueprint H1 is STRICTLY RESTRICTED to a SINGLE prespecified, protocol-compatible "
"infused-recipient cohort matching the exact prespecified compatibility target: "
"(1) product_class = ALLOGENEIC_GMP_SC_ISLET (strictly separate from autologous CiPSC and edited D1b-Auto-C v2 "
"whose p1 stays held at 0.62), (2) transplant_site = INTRAPORTAL_HEPATIC, (3) disease_population = TYPE_1_DIABETES, "
"(4) immunosuppression_protocol_class = DE_NOVO_CHRONIC_GLUCOCORTICOID_FREE_SYSTEMIC_IS, and "
"(5) dose_regimen = FULL_DOSE_SINGLE_INFUSION. Naive fixed-effect pooling across distinct products, sites, diseases, "
"or IS regimens is PROHIBITED, and unparameterized hierarchical transport pooling is NOT authorized under Gate 28-A. "
"Mixed-cohort intervals/posteriors are descriptive sensitivities only."
),
},
"durability_horizon": ">= 6 months (>= 180 days) sustained adjudicated HbA1c < 7.0%, CGM TIR > 70%, 0 SHEs, and quantitative stimulated C-peptide+ under chronic glucocorticoid-free IS.",
"cmc_readiness_ledger_failure_definition": (
"Logged in the separate CMC Readiness Ledger (P_release_CMC and H1_CMC_ATTEMPTED_LOT_READINESS, NOT Blueprint H1): any GMP lot failing "
"pre-infusion release specifications (viability, endocrine/beta-cell purity, static/dynamic GSIS potency, sterility/endotoxin), "
"released-but-uninfused lot disposition (infusion = 0), or unused split-lot aliquots; clinical primary graft non-function "
"(stimulated C-peptide < 0.1 ng/mL [< 33 pmol/L] by Day 90) counts as a clinical non-responder (0) in Blueprint H1."
),
"pre_registered_posterior_flip_rule": (
"Flip live Blueprint H1 from 0.88 to 0.90 IF AND ONLY IF evaluate_gate28a_h1_promotion(...) passes on a SINGLE prespecified, "
"primary-verified, compatibility-target-matched full-dose T1D post-release infused-recipient cohort (1:1 unique recipients; "
"distinct_gmp_lots_n >= 3; distinct_mcb_n >= 2; max_single_lot_share <= 0.40; unified intercurrent-event adjudication where "
"rescue repeat infusion, prohibited peri-infusion glucocorticoids, missingness/LTFU, and pre-landmark death all equal 0): "
"(1) Non-overlapping Uniform Beta(1,1) posterior P(H1 >= 0.90) >= 0.90 on cluster-adjusted (k_eff, n_eff) "
"(21/21 [90.1523%; 20/20 = 89.0581% fails] and 36/37 [90.4705%; 35/36 = 89.6369% fails] are nominal integer "
"lower bounds under unclustered DEFF=1.0 i.i.d. assumptions only; the exact continuous fractional all-success "
"Uniform transition occurs at n_eff ~= 20.854345, and exchangeability and ICC assumptions dominate near the threshold), AND "
"(2) Non-overlapping Reichman-anchored Beta(8.8,1.2) updated solely on a compatible non-Reichman cohort achieves "