Severity: P3 · Area: 11 (Collapse), 10 (HSJ/XFORM kernels)
Location: R/MaximizeParsimony.R:1711-1716; guard relied upon at src/ts_collapsed.cpp:153-157; emitter at src/ts_rcpp.cpp:225-260
The block does TreeLength(structure(outTrees, class = "multiPhylo"), ...) on the post-collapse trees. Verified REAL as latent (opus verifier): src/ts_rcpp.cpp:2238 calls compute_collapsed_flags_aggressive, which returns all-zero for ScoringMode::HSJ/XFORM at ts_collapsed.cpp:153-157 — before the total_words == 0 star branch and before the has_na delegation — and tree_to_collapsed_edge contracts exactly the flagged nodes, so all-zero flags is the only reason outTrees stay binary here. There is no useXform guard on the collapse block (:1629), no post-hoc binary check, and the length(outTrees) == 0L fallback treeTpl is binary. Both predicted failure modes were driven with the T-330 test fixture (whose EW arm genuinely collapses, nEdge 10 -> 8): mixed nEdge -> Error: Trees have different numbers of edges (10, 8); uniform nEdge -> silent wrong number (TreeLength(<1 polytomous tree>, ds, inapplicable = "xform", hierarchy = h) returned 1 against a binary reference of 2; the EW control returned 0 for a tree whose char 1 0,0,0,1,1,1 forces >= 1 step). Held P3, and filed separately from T-400 for one reason only: T-400's root-cause fix converts this from silent garbage into a hard error inside MaximizeParsimony() on its own output, so it still needs its own handling and must not be assumed closed by T-400's patch. Whoever lifts T-330's HSJ/XFORM no-op (the documented next step for that fix) must revisit this call site in the same change.
Migrated 2026-08-04 from dev/red-team/findings.md; pre-tracker ID T-401. References to T-401 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:
R/MaximizeParsimony.R:1711-1716; guard relied upon atsrc/ts_collapsed.cpp:153-157; emitter atsrc/ts_rcpp.cpp:225-260The block does
TreeLength(structure(outTrees, class = "multiPhylo"), ...)on the post-collapse trees. Verified REAL as latent (opus verifier):src/ts_rcpp.cpp:2238callscompute_collapsed_flags_aggressive, which returns all-zero forScoringMode::HSJ/XFORMatts_collapsed.cpp:153-157— before thetotal_words == 0star branch and before thehas_nadelegation — andtree_to_collapsed_edgecontracts exactly the flagged nodes, so all-zero flags is the only reasonoutTreesstay binary here. There is nouseXformguard on the collapse block (:1629), no post-hoc binary check, and thelength(outTrees) == 0LfallbacktreeTplis binary. Both predicted failure modes were driven with the T-330 test fixture (whose EW arm genuinely collapses,nEdge10 -> 8): mixednEdge->Error: Trees have different numbers of edges (10, 8); uniformnEdge-> silent wrong number (TreeLength(<1 polytomous tree>, ds, inapplicable = "xform", hierarchy = h)returned1against a binary reference of2; the EW control returned0for a tree whose char 10,0,0,1,1,1forces >= 1 step). Held P3, and filed separately from T-400 for one reason only: T-400's root-cause fix converts this from silent garbage into a hard error insideMaximizeParsimony()on its own output, so it still needs its own handling and must not be assumed closed by T-400's patch. Whoever lifts T-330's HSJ/XFORM no-op (the documented next step for that fix) must revisit this call site in the same change.Migrated 2026-08-04 from
dev/red-team/findings.md; pre-tracker ID T-401. References toT-401in 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.