Skip to content

AdditionTree()'s concavity argument is inert for the returned topology when numeric, but *not* inert when "profile" — and min_steps is never passed at all. #5

Description

@ms609

Severity: P3 · Area: 9 (Wagner)

Location: R/AdditionTree.R:109-117 (searchArgs omits min_steps), src/ts_wagner.cpp:524-544 (placement uses the EW proxy fitch_indirect_length_cached) versus :589 (score_tree, the only consumer of ds.concavity/min_steps)

Tip placement never consults the weighting: the insertion DFS scores candidate edges with an equal-weights Fitch proxy, and concavity/min_steps enter only in the final score_tree call, after the topology is already fixed. Since IW versus EW does not change block structure, the returned tree is identical. searchArgs additionally omits min_steps entirely (ts_wagner_tree's default is IntegerVector()), so a finite concavity scores with min_steps = 0 — which corrupts only result$score, and AdditionTree discards that. Reproduced by the orchestrator (seed 42, three datasets): AdditionTree(ds, concavity = Inf)$edge is identical() to concavity = 10 and to concavity = 3 for Longrich2010 (20 tips), Vinther2008 (23) and Wills2012 (55) — 6/6 identical. concavity = "profile" changes the topology on all three, but not through weighting: PrepareDataProfile (R/AdditionTree.R:76) recodes, dedups and strips the data first. So one documented value is a silent no-op and another is data-transforming, while the Rd example is AdditionTree(inapplicable.phyData[["Longrich2010"]], concavity = 10), implying it matters. Fix, at the maintainer's discretion: document the EW-proxy placement contract explicitly on concavity, or pass min_steps and use the weighted scorer for placement — the latter changes start trees and so needs an A/B. Verified REAL (haiku verifier confirmed the mechanism by reading the placement path; the falsifiable identical() core was re-run by the orchestrator, since the verifier had reasoned to it rather than executing it). Staleness discharged: R/AdditionTree.R's last functional commit (78b74147, 2026-06-19) predates the R 4.5 install used for the repro, built 2026-07-07.


Migrated 2026-08-04 from dev/red-team/findings.md; pre-tracker ID T-369. References to T-369 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:9Red-team focus area 9in-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