Repository navigation
Pin the weighted-UniFrac expectation to the library-size definition (green Julia tests on main) - #240
Conversation
`Julia tests` on `main` is red on one assertion, and it was already red when #239 merged: that PR's own `Julia tests` check failed with the same line. Dual-hierarchy CladeCumulus, ...: Test Failed at test_clade_cumulus.jl:730 Expression: ≈((jp_body.diversity.weighted_unifrac[1])[2], 0.15636363636363637) Evaluated: 0.1378181818181818 ≈ 0.15636363636363637 The expectation predates #239's `totals` plumbing. That PR's stated fix is "totals/total_a/total_b library-size denominators", and the code now divides by the 55-read library rather than the 34/20 reads that reached the tree. The value follows directly from that definition — the grafted tree contributes 0.02 (ASV_1's pendant), 0.05 (the rest of Ref_1's branch), 0.02 (ASV_2's pendant), 0.15 (the rest of Ref_2's branch) and 0.30 (the joining clade): (0.02*24 + 0.05*24 + 0.02*10 + 0.15*10 + 0.30*(34-20)) / 55 = 7.58 / 55 = 0.1378181818... which is exactly what the route returns. The assertion now states the arithmetic, so the next convention change has to argue with it rather than with a bare decimal. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Add Carrot credits or activate Agent usage billing to use Autofix |
Fork governance
🟣 critical · commit
Hypatia scan: 141 finding(s)
panic-attack assail: 17 finding(s)
pons asinorum: 8 finding(s)
rhodibot (RSR compliance): not_run — enrolled, but no report-back was received
panicbot (panic recovery, error handling): not_run — enrolled, but no report-back was received
echidnabot (formal verification: proofs/): not_run — enrolled, but no report-back was received
seambot (integration health: API routes): not_run — enrolled, but no report-back was received
finishingbot (release readiness): not_run — enrolled, but no report-back was received
accessibilitybot (WCAG on the React UI): not_run — enrolled, but no report-back was received
glambot (presentation quality): not_run — enrolled, but no report-back was received
cipherbot: not_applicable — no cryptography is implemented in this repository
sustainabot: not_applicable — fleet adapter slot reserved; no adapter exists yet (gitbot-fleet README)
Scope: static findings reported by each row's tool at the named commit. Purple, red, yellow and blue grade the worst finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run. |



mainis red onJulia tests— 5727 pass, 1 fail, 0 error — and it was already red when #239 merged: that PR's ownJulia testscheck failed on the same line.Which number is right
The expectation predates #239's own fix, which its description states as "
totals/total_a/total_blibrary-size denominators". The route now divides by each sample's 55-read library instead of the 34 and 20 reads that happened to reach the tree, which is the whole point of that change — otherwise the unplaced mass is renormalised back onto the tips.Working the fixture out from that definition, for the grafted tree of
((Ref_1:0.10{0},Ref_2:0.20{1})0.96:0.30{2},Ref_3:0.40{3}){4};with ASV_1 placed at LWR 0.60 on edge 0 (distal 0.05,pendant 0.02) and ASV_2 at LWR 1.00 on edge 1:That is exactly what the route returns, so the code agrees with its documented definition and the constant is stale. Nothing else in the block changes:
mapped_tips == 2,unplaced_reads21/35 androot.cumulative_count ≈ 110all still hold, and no other test in the suite fails.Change
One test assertion. It now spells out the arithmetic —
≈ 7.58 / 55with the edge-length derivation in a comment — so a future convention change has to argue with the definition rather than with a bare decimal. No production code is touched.Verified
The full suite on this branch is CI; locally, tree-sitter parses the edited statement and
git diffshows only the assertion. Everything else onmain(including #238's rooting tests) passed in the run that caught this.