Repository navigation
Fix validated-statistics run summaries 500 (invalid GROUP BY aggregation) - #218
Conversation
#193) Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…nifold-webui # Conflicts: # README.md # config/defaults/pipeline.yml # frontend/src/api/types.ts # frontend/src/components/PipelineStages.tsx # frontend/src/components/differentialTable.ts # src/analysis/differential.jl Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The squash merges of #196-#207 left main unable to build: PR-branch conflict resolutions overwrote each other's differential method registry, dropped the compositional include and cladistics routes, duplicated the clade-cumulus include and frontend panel import, and corrupted _differential_settings_error. - MetaManifold.jl: restore analysis/compositional.jl, include clade_cumulus.jl once; server.jl includes routes/cladistics.jl and routes/clade_cumulus.jl. - differential.jl: rebuild the 9-method registry and DifferentialConfig union (mn/dm optimiser + mc_samples), restore ancom_bc/aldex2/ songbird and multinomial dispatch branches alongside the two-part models; routes build the union config; config validation regains the mn/dm cross-key rules. - Frontend: union DifferentialMethod/config/diagnostics types, restore cladistics client imports, alias the cladistics panel so it no longer collides with the clade-cumulus panel, restore per-method CSV config lines and PipelineStages entries for all nine methods. - Tests that pinned pre-union method lists and the 11-column CSV are updated to the union reality. Frontend: tsc clean, bun test 87/87, production build passes. Julia: exercised by CI (no Julia runtime in the authoring sandbox). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…nifold-webui # Conflicts: # config/defaults/pipeline.yml # frontend/src/api/types.ts # frontend/src/components/PipelineStages.test.ts # frontend/src/components/PipelineStages.tsx # frontend/src/components/differentialTable.ts # frontend/src/views/StudyView.tsx # src/analysis/differential.jl # src/server/routes/analysis.jl # test/unit/test_differential.jl Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…nifold-webui # Conflicts: # README.md Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…nifold-webui Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…d GROUP BY SQL
_validated_duckdb_counts selected bare count columns beside
GROUP BY <feature>, which DuckDB rejects with a BinderError, so
POST /studies/{study}/runs/{run}/statistics/summaries returned 500
and step 'Run validated-statistics tests first' failed on every
branch. Fetch rows ordered by feature and sum rows sharing a
feature in Julia BigInt instead: SQL SUM over HUGEINT counts would
overflow exactly the values this path exists to keep exact
(the test sums 2^126 + 2^126).
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 5
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 |
Fork governance
🟣 critical · commit
Hypatia scan: 133 finding(s)
panic-attack assail: 19 finding(s)
pons asinorum: 10 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. |
…res; dedupe cladistics routes - exact_summaries _summarise returned an exact 0 for a zero-count feature; the storage contract (and both test assertions) define an unobserved feature's proportion as undefined (nothing), never a substituted zero. summary_to_display renders it as such instead of calling exact_value(nothing). - server.jl included routes/cladistics.jl twice (parallel repair residue), re-registering every cladistics route. - test_validated_statistics: the integral-float token case cannot be expressed through a Dict round-trip (JSON3.write(1.0) emits an integer token), so 1.0 joins 1e0 as raw-body cases; the server-side rejection they exercise is unchanged. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…ependent reference computes The handwritten assertions expected nothing for a zero-count feature in a positive-total sample, contradicting both the implementation (since #199) and the independent Python fractions verifier, which computes Fraction(0, total) = 0/1. Only a zero total leaves proportions undefined. Aligns the two assertions; implementation reverted to the plain exact_relative_abundance call. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…equest text JSON3 collapses integral float tokens (1.0, 1e0) to integers when parsing, so the parsed-body check in _json_exact_count can never see them and the endpoint accepted them with 200. _reject_float_count_tokens scans the raw body to the top-level counts member and refuses any numeric token that is not a plain integer token (strings skipped and validated separately after parsing), restoring the fail-closed contract the tests assert. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
|



Follow-up to #214:
mainCI still fails at 'Run validated-statistics tests first'.Root cause (reproduced against DuckDB locally):
_validated_duckdb_countsselected bare count columns besideGROUP BY <feature>:so
POST /api/v1/studies/{study}/runs/{run}/statistics/summariesreturned 500 andtest_validated_statistics.jl:180failed on every branch.Fix: fetch rows
ORDER BY featureand sum rows sharing a feature in JuliaBigInt. Aggregating in SQL is not an option:SUMover HUGEINT counts overflows exactly the values this path exists to keep exact (the test sums 2^126 + 2^126). Per-cell missing/negative/non-integer validation is unchanged; the cell budget is now checked on aggregated features.Julia evidence is CI on this PR (no Julia runtime in the authoring sandbox; the SQL failure itself was reproduced with Python duckdb 2.0.0).