Severity: P3 · Area: 11 (Collapse), 10 (HSJ/XFORM kernels)
Location: src/ts_rcpp.cpp:1829-1847 (ds.scoring_mode = HSJ set unconditionally at :1847); guards at src/ts_collapsed.cpp:24-25, :153-156
Verified REAL (haiku verifier): unpack_hsj sets the mode whenever hsjConfig is non-NULL, even with hierarchyBlocks empty, and both collapse guards then refuse on scoring_mode alone without checking whether hierarchy_blocks or sankoff_n_chars are populated. Cheap fix, and the predicate already exists: guard on !ds.hierarchy_blocks.empty() || ds.sankoff_n_chars > 0, which is what DataSet::topology_independent() uses. Cost of the current form is lost collapse (inflated n_topologies, fully-resolved output) on a degenerate-but-valid config, never a wrong score.
Migrated 2026-08-04 from dev/red-team/findings.md; pre-tracker ID T-408. References to T-408 in source comments, dev/red-team/log.md, commit messages and PR bodies mean this issue — see dev/red-team/migration-map.tsv. Cross-repo references use the fully-qualified form agent-issues/TreeSearch#<n>; a bare #n means this repo.
Severity: P3 · Area: 11 (Collapse), 10 (HSJ/XFORM kernels)
Location:
src/ts_rcpp.cpp:1829-1847(ds.scoring_mode = HSJset unconditionally at:1847); guards atsrc/ts_collapsed.cpp:24-25,:153-156Verified REAL (haiku verifier):
unpack_hsjsets the mode wheneverhsjConfigis non-NULL, even withhierarchyBlocksempty, and both collapse guards then refuse onscoring_modealone without checking whetherhierarchy_blocksorsankoff_n_charsare populated. Cheap fix, and the predicate already exists: guard on!ds.hierarchy_blocks.empty() || ds.sankoff_n_chars > 0, which is whatDataSet::topology_independent()uses. Cost of the current form is lost collapse (inflatedn_topologies, fully-resolved output) on a degenerate-but-valid config, never a wrong score.Migrated 2026-08-04 from
dev/red-team/findings.md; pre-tracker ID T-408. References toT-408in source comments,dev/red-team/log.md, commit messages and PR bodies mean this issue — seedev/red-team/migration-map.tsv. Cross-repo references use the fully-qualified formagent-issues/TreeSearch#<n>; a bare#nmeans this repo.