Parallel Multi-Consent mode (#333) added about 1,000 lines of shell — bdc-cohort-workflow.sh (713) and hv-dataqc-cohort.sh (292) — with no automated tests. The Python side of that PR did get tests, and the live COPDGene run gives real confidence the happy path works, so this is follow-up rather than a gap that should have blocked it.
Two areas are worth targeting specifically, because they are where a silent error is both plausible and expensive:
Parallelism arithmetic. CONSENT_PARALLELISM defaults to min(#cgs, max(1, floor(vCPU / JOBS))). The interaction between --jobs and --consent-parallelism already produced one review finding (division by zero on --jobs 0) and one docs/implementation mismatch. It is pure arithmetic on inputs, so it is cheap to test and easy to get subtly wrong.
Status aggregation. The mapping from per-consent result.env files to overall_status, and from there to the exit code, decides whether Seven Bridges sees a task as successful. A subshell bug in exactly this area — OVERALL_STATUS="FAIL" set inside a subshell and never propagating, so QC reported overall=PASS on failed steps — was already found and fixed once by hand in b287e81. That class of bug is invisible until someone reads a manifest.
Both are testable with a harness that stubs bdc-workflow.sh and feeds fixture result.env files, without needing BDC, real data, or credentials. bats or plain pytest driving the script through subprocess would both work.
Related: #297 (move bdc-workflow.sh entrypoint logic to Python) points the same direction — if that lands, some of this becomes Python-testable instead.
Parallel Multi-Consent mode (#333) added about 1,000 lines of shell —
bdc-cohort-workflow.sh(713) andhv-dataqc-cohort.sh(292) — with no automated tests. The Python side of that PR did get tests, and the live COPDGene run gives real confidence the happy path works, so this is follow-up rather than a gap that should have blocked it.Two areas are worth targeting specifically, because they are where a silent error is both plausible and expensive:
Parallelism arithmetic.
CONSENT_PARALLELISMdefaults tomin(#cgs, max(1, floor(vCPU / JOBS))). The interaction between--jobsand--consent-parallelismalready produced one review finding (division by zero on--jobs 0) and one docs/implementation mismatch. It is pure arithmetic on inputs, so it is cheap to test and easy to get subtly wrong.Status aggregation. The mapping from per-consent
result.envfiles tooverall_status, and from there to the exit code, decides whether Seven Bridges sees a task as successful. A subshell bug in exactly this area —OVERALL_STATUS="FAIL"set inside a subshell and never propagating, so QC reportedoverall=PASSon failed steps — was already found and fixed once by hand inb287e81. That class of bug is invisible until someone reads a manifest.Both are testable with a harness that stubs
bdc-workflow.shand feeds fixtureresult.envfiles, without needing BDC, real data, or credentials. bats or plain pytest driving the script through subprocess would both work.Related: #297 (move
bdc-workflow.shentrypoint logic to Python) points the same direction — if that lands, some of this becomes Python-testable instead.