Skip to content

T-330's guard keys on scoring_mode rather than on whether hierarchy data actually exists, so collapse is disabled for an HSJ config with NO hierarchy blocks — a dataset where collapse is provably safe. #22

Description

@ms609

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:10Red-team focus area 10area:11Red-team focus area 11in-progressBeing fixed; claiming comment names the branchred-teamFiled by the /red-team rotationsev:lowP3: robustness / polish

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions