R/TaxonInfluence.R:183,190 — matrix(Distance(tree, result), length(result)) assumes a fixed (length(result), length(tree)) dimension ordering from TreeDist::Distance. The opus finder found TreeDist's orientation actually differs by code path: (3,2) for matched leaf labels vs (2,3) for mismatched. TaxonInfluence's real use case is always the mismatched-labels path, so this is currently correct by luck, not by contract — a future call with matched labels, or a user-supplied Distance function, would silently transpose the matrix while outer(resWeights, refWeights) does not, misaligning the weights.
Verified REAL as a latent fragility (haiku verifier, code-read) — not currently reachable via the documented usage path.
Fix: assert or normalize the dimension ordering explicitly rather than relying on an undocumented upstream convention.
Filed by /red-team area 14 (opus finder, 2026-08-05).
R/TaxonInfluence.R:183,190—matrix(Distance(tree, result), length(result))assumes a fixed(length(result), length(tree))dimension ordering fromTreeDist::Distance. The opus finder found TreeDist's orientation actually differs by code path:(3,2)for matched leaf labels vs(2,3)for mismatched.TaxonInfluence's real use case is always the mismatched-labels path, so this is currently correct by luck, not by contract — a future call with matched labels, or a user-suppliedDistancefunction, would silently transpose the matrix whileouter(resWeights, refWeights)does not, misaligning the weights.Verified REAL as a latent fragility (haiku verifier, code-read) — not currently reachable via the documented usage path.
Fix: assert or normalize the dimension ordering explicitly rather than relying on an undocumented upstream convention.
Filed by /red-team area 14 (opus finder, 2026-08-05).