Repository navigation
Description
What is measured
src/analysis/analysis.jl:574-582:
try
_ensure_r() || return _no_significance()
_alpha_significance_r(values, labels, sample_ids; pairwise, paired_samples)
catch e
e isa RBusyError || rethrow()
@warn "Alpha significance skipped: the R runtime is busy with a pipeline run"
_no_significance()
endand analysis.jl:564:
_no_significance() = (nothing, DataFrame(group1=String[], group2=String[], p=Float64[]))There are two independent paths to _no_significance(): R/vegan failing to load
(_ensure_r() returning false, itself only a @warn at the RCall.reval site)
and the R lock being held by a concurrent pipeline run (RBusyError).
Why this matters
The fallback is indistinguishable from a real negative result. A caller
receives (nothing, <empty DataFrame>). A consumer that renders "no significant
pairwise differences" from an empty table, or that counts rows with p < 0.05,
produces exactly the same output whether:
- every comparison was computed and none was significant, or
- nothing was computed at all because R was busy or vegan was missing.
The only trace is a @warn in the log. Nothing in the returned value carries the
distinction, so it cannot survive into a report, an export, or the UI.
This is the scientifically-dangerous class rather than the crash class: the
numbers come out, they look fine, and they are wrong in a way that can reach a
published result. A transient lock contention — which by construction happens
only under concurrent load, i.e. exactly when a real analysis is running — would
silently convert "significant" into "nothing to report".
Acceptance criteria
- The return type can represent "not computed" distinctly from "computed,
nothing significant" — e.g. a status field, amissingomnibus distinct
from a computed-but-null one, or a dedicated result struct. - Every consumer of
alpha_significancehandles the not-computed case
explicitly; none renders it as a negative finding. - Any surface that presents significance (report, export, UI) states that
the test was not run when it was not run. - A test asserts the distinction by forcing
RBusyErrorand confirming the
result is not equal to a genuine all-non-significant result. - Decide whether
RBusyErrorshould instead wait longer or retry rather
than degrade —R_WAIT_SECONDS[]already bounds the wait, and silently
dropping a statistical test on lock contention may be the wrong default.
Filed as an issue rather than fixed inline per the standing rule that a new
finding does not block a merge. Related: the DANGER-banner machinery already
treats statistical validity as the thing worth shouting about; this path
bypasses it.
Activity
fix(server): log an unreadable config at warn, not error
fix(server): log an unreadable config at warn, not error
fix: separate a significance test that did not run from a null result