Repository navigation
test(differential): run the native adapter against a stand-in backend (closes the 30 uncovered lines on upstream PR 70) - #319
Conversation
Codecov reported 30 uncovered lines on this branch, all in `src/analysis/differential.jl`: the adapter that turns a CompositionalDA result into result rows. CompositionalDA is not in the General registry, so CI cannot install it, and only the refusal path ran. - `differential_abundance(...; native_backend=nothing)` calls a module. The default is the `CompositionalDA` this session loaded, or the by-name refusal when it loaded none. Production behaviour is unchanged. - `_is_composition_error` translates the `CompositionError` of the backend in use. - `diagnostics.native_method.package` reports the name of the module that produced the numbers, so a stand-in record cannot read as a package record. `test/support/native_da_stub.jl` has the two entry points, the column names and the verdict strings of the package. Its `qvalue` is not `bh_adjust(pvalue)`, so a second BH pass is visible, and its structural rows carry NaN as the package leaves them. `test/unit/test_differential_native.jl` gains four testsets that run on every checkout: the seam, the ALDEx2 wiring, the ANCOM-BC wiring and the refusal order. The comparisons against the real package stay, and still skip with a message when the package is absent. Measured with Julia 1.12.5, `--code-coverage=user --compiled-modules=no`, `test/runtests.jl differential differential_native`: 1159 pass, 13 skipped; every instrumented line this branch adds to `differential.jl` is covered (52 of 52). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZoTPXfxg1C85rVNx78
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
## What this changes The notes for upstream [JoshuaJewell/MetaManifold-WebUI#70](JoshuaJewell/MetaManifold-WebUI#70) said that the two patches were never run. That is no longer true for the first patch. - `notes/0004-pr70-native-adapter-test-seam.patch` is now the commit that was run and pushed: `3ed1dfb`, open as draft [hyperpolymath/MetaManifold-WebUI#319](hyperpolymath/MetaManifold-WebUI#319). - `notes/pr70-coverage-and-cicd.md` has a new status section at the top. It records the measured results, the changes against the first draft, and why PR 70 has no Codex review and no governance comment. - `notes/README.md` marks `0005-pr70-coverage-gates-and-estate-lanes.patch` as not applied, never run, and stale against the new `0004`. - The word `ponsbot` is corrected. No such fleet member exists in gitbot-fleet or in standards. pons asinorum is a built-in row of the Hypatia grid. ## Measured results recorded in the note | check | result | | --- | --- | | patch line coverage of `src/analysis/differential.jl`, CI flags | 52 of 52 added lines covered | | real CompositionalDA v0.3.0 developed into a scratch copy | 1367 pass, 11 skipped | | full unit suite | 3618 pass, 25 skipped, 1 error (needs the R package `dada2`, absent in the sandbox) | | planted mutants | 12 of 12 killed | ## Not changed The `0005` patch file itself. It stays as the record of the first draft. --- _Generated by [Claude Code](https://claude.ai/code/session_0136P7ZoTPXfxg1C85rVNx78)_ Co-authored-by: Claude <noreply@anthropic.com>
…verage (#17) ## What this changes Follow-up to [#16](#16). That note said the WebUI change was open as a draft. The change is now merged, and the upstream result is known. - `notes/pr70-coverage-and-cicd.md`: [hyperpolymath/MetaManifold-WebUI#319](hyperpolymath/MetaManifold-WebUI#319) is merged. The head of upstream [JoshuaJewell/MetaManifold-WebUI#70](JoshuaJewell/MetaManifold-WebUI#70) is `1832f5c`. - The upstream `CI` run passed at that head. - Codecov reports patch coverage 100% (66 of 66 lines, 0 missing; it was 33 of 63) and project coverage 75.88% (base 75.73%). Source: the public Codecov API for PR 70, read at 2026-11-10 20:25 UTC. - `notes/README.md`: the index row for the `0004` patch says the same. Two files change. No patch file changes. --- _Generated by [Claude Code](https://claude.ai/code/session_0136P7ZoTPXfxg1C85rVNx78)_ Co-authored-by: Claude <noreply@anthropic.com>



Change and reason
Codecov reported 52.38% patch coverage on JoshuaJewell/MetaManifold-WebUI#70, with 30 lines missing. All 30 lines are in
src/analysis/differential.jl. They are the adapter that turns a CompositionalDA result into result rows.The cause is real. CompositionalDA is not in the General registry, so CI cannot install it. In CI, only the refusal path ran.
This change makes the adapter reachable in CI:
differential_abundance(...; native_backend=nothing)calls a module. The default is theCompositionalDAthat the session loaded, or the by-name refusal when the session loaded none. Production behaviour does not change._is_composition_errortranslates theCompositionErrorof the backend in use.diagnostics.native_method.packagereports the name of the module that produced the numbers. A record from the stand-in saysNativeDAStub, so it cannot read as a record from the package.test/support/native_da_stub.jlis a stand-in with the two entry points, the column names and the verdict strings of the package. Itsqvalueis notbh_adjust(pvalue), so a second BH pass is visible. Its structural rows carry NaN, as the package leaves them.test/unit/test_differential_native.jlgains four testsets that run on every checkout: the seam, the ALDEx2 wiring, the ANCOM-BC wiring and the refusal order.The comparisons against the real package stay. They still skip with a message when the package is absent.
This pull request targets the branch of upstream PR 70. A merge here updates that pull request.
Validation
Julia 1.12.5, R 4.3.3 (Ubuntu 24.04
r-base-core), all commands from the repository root.Coverage, with the same flags as CI:
Result: 1159 pass, 13 skipped, 0 fail. I compared the
.covfile withgit diffagainst the merge base with upstreammain(89be534). Every instrumented line that this branch adds tosrc/analysis/differential.jlis covered: 52 of 52.Real package. In a scratch copy I ran
Pkg.developonhyperpolymath/CompositionalDA.jlat9903e76(v0.3.0) and ran the same command. Result: 1367 pass, 11 skipped, 0 fail. The two real-package testsets ran and agreed with the adapter.Full unit suite:
julia --project=. -t 2 test/runtests.jl. Result: 3618 pass, 25 skipped, 1 error. The error istest_provenance.jl:479: "package 'dada2' is not installed in the R library in use". My sandbox does not have the R packages thatrenv.lockinstalls in CI. The test does not touch this change.Planted mutants. I ran 12 deliberate corruptions of the adapter, one at a time, against
test/runtests.jl differential_native. The baseline passed. The suite killed 12 of 12:estimatetaken from the wrong columnlog(10)in place oflog(2)CompositionErrornot translatedaldex_effecttaken from the wrong columnThe runner is not part of this change. It counts a kill only when the suite reaches its
Test Summaryand reports a failure.Not run: the integration tests, the server tests and the frontend tests. No workflow runs on this pull request:
ci.ymlon this branch starts only for pull requests intomain. The full CI and Codecov run on the upstream pull request, so the Codecov number is not confirmed until PR 70 runs again.Scope
Project.toml,Manifest.toml,renv.lock,codecov.ymlor any workflow.Contribution checks
be7792f.)🤖 Generated with Claude Code
https://claude.ai/code/session_0136P7ZoTPXfxg1C85rVNx78