Skip to content

Release-robust reference lookup (fixes #131): Release 98 removed all HGNC referenceGene rows - #132

Merged
adamjohnwright merged 1 commit into
mainfrom
fix-hgnc-reference-lookup
Nov 13, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
fix-hgnc-reference-lookup

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Fixes #131. Both reference-entity query sites (bulk prefetch Query 5 and the `get_reference_entity_id` fallback) keyed on an HGNC ReferenceDNASequence under `referenceGene`; Release 98 carries none (0 of 106,316 RGPs), so every protein silently lost its reference and balancing/slot-binding/identity signatures died build-wide (deltasignal specs/151 amendment 1 has the trace).

New predicate (verified identical behaviour on Release 97 and 98 Neo4j side by side): a human `ReferenceGeneProduct` (isoforms carry the label) with any `referenceGene` → return `re.stId`. Proteins resolve to the same ids the HGNC chain returned; RNAs (never matched the old chain — its 97 population was exactly RGP 15,636 + isoform 2,078, zero RNA) stay excluded by the label; viral proteins still return None, so pathogen handling is unchanged. The one behaviour delta: 189 human gene products whose HGNC rows were missing from release slices (IG V segments, UBE2O, SORCS3, CD21) now resolve — 7 of deltasignal's 125 build pathways touch any of them.

Loud failure: a build resolving zero references over ≥10 accessioned entities now raises with a named error instead of silently building a wrong network; `LNG_ALLOW_NO_REFERENCES=1` is the explicit escape hatch for a deliberately non-human build.

Acceptance gate (running next, before merge): rebuild Release 97 with this branch and compare content-identical (the specs/065 content-labelling method) against the frozen catalog `20261026-1349_8b6527e`; the 7 touched pathways get individual inspection if they differ. Then rebuild 98 and re-run the deltasignal specs/150 replication.

Note: `tests/test_network_invariants.py::TestAllPathwaysHaveContent::test_main_edges_proportional_to_best_matches[Class_I_MHC...]` fails identically on main in this environment (it reads a locally generated network — the defective 98 build); not introduced here. The rest of the suite: 771 passed.

🤖 Generated with Claude Code

…ith a referenceGene, not on HGNC rows Release 98 no longer has

Release 98 removed every HGNC referenceGene row (17,714 ReferenceGeneProducts
carried one in 97; 0 of 106,316 in 98), so both reference queries returned
None for every protein and silently disabled LNG_BALANCE_CHOICES, output-slot
binding and the set-member identity signatures build-wide (deltasignal
specs/151 amendment 1; #131).

Both query sites (prefetch Query 5 and the per-entity fallback) now select a
human ReferenceGeneProduct (isoforms carry the label) that has a referenceGene
of any database. On Release 97 this returns the same reference id as the HGNC
chain for its whole population (RGP + isoform classes; RNAs never matched and
stay excluded by the label; viral proteins still return None), plus 189 gene
products whose HGNC rows were missing from that release's slice (IG V
segments, UBE2O, SORCS3, CD21) — only 7 of deltasignal's 125 build pathways
touch any of them, and the acceptance gate is a 97 rebuild compared
content-identical against the frozen catalog 20261026-1349_8b6527e.

A build that resolves zero references over >=10 accessioned entities now
refuses with a named error instead of building quietly wrong
(LNG_ALLOW_NO_REFERENCES=1 is the deliberate-non-human escape hatch).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

G1 acceptance gate PASSED: the 92 catalog pathways rebuilt on Release 97 from this branch (build 20261113-1235_baf608b_hgncfix97, seed recorded, 92/92 complete, balancer and slot binding alive in the log) are content-identical to the frozen catalog 20261026-1349_8b6527e — zero differing pathways under the specs/065 content labelling, zero side-table row-count mismatches across every CSV of every pathway. The 189 newly-resolving references change no signature decision in our scope. Record: deltasignal specs/152 (G1).

@adamjohnwright
adamjohnwright merged commit d6d026b into main Nov 13, 2026
4 checks passed
@adamjohnwright
adamjohnwright deleted the fix-hgnc-reference-lookup branch November 13, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 98 kills get_reference_entity_id: no HGNC referenceGene links remain, so balancing and identity signatures silently die

1 participant