The guard at
genotools/ancestry/model.py:687
is what stops Birch.fit receiving a (0, 3) array when the reference panel has
no CAS samples. In 1.x that call was unguarded and raised
ValueError: Found array with 0 sample(s) — a real user hit it with an
HGDP + 1KG panel (#202), and it would have hit any panel without CAS.
No test covers it. Nothing under tests/ exercises _predict_admixed with a
panel lacking CAS, so the fix is real but ungated: deleting the if would not
turn the suite red.
Per CLAUDE.md, the test should be revert-checked — break the guard at the
production call site, confirm the new test fails, restore — rather than driving a
helper that happens to sit nearby.
Related: the hardcoded "CAS" label itself is #293.
The guard at
genotools/ancestry/model.py:687is what stops
Birch.fitreceiving a(0, 3)array when the reference panel hasno
CASsamples. In 1.x that call was unguarded and raisedValueError: Found array with 0 sample(s)— a real user hit it with anHGDP + 1KG panel (#202), and it would have hit any panel without
CAS.No test covers it. Nothing under
tests/exercises_predict_admixedwith apanel lacking
CAS, so the fix is real but ungated: deleting theifwould notturn the suite red.
Per
CLAUDE.md, the test should be revert-checked — break the guard at theproduction call site, confirm the new test fails, restore — rather than driving a
helper that happens to sit nearby.
Related: the hardcoded
"CAS"label itself is #293.