Quality Gates
Purpose
Define the canonical release-quality gates for DSAMbayes v1.2.2, including commands, pass/fail criteria, and evidence requirements.
Audience
- Maintainers preparing a release candidate
- Reviewers signing off release readiness
- Engineers running local pre-merge quality checks
Gate Matrix
| Gate ID | Gate | Command | Pass Criteria | Evidence |
|---|---|---|---|---|
QG-1 |
Lint | R_LIBS_USER="$PWD/.Rlib" Rscript scripts/check.R --lint |
Exit code 0, no lint failures, no SKIP: output |
Terminal log and exit code |
QG-2 |
Style | R_LIBS_USER="$PWD/.Rlib" Rscript scripts/check.R --style |
Exit code 0, no style failures, no SKIP: output |
Terminal log and exit code |
QG-3 |
Unit tests | R_LIBS_USER="$PWD/.Rlib" R -q -e 'testthat::test_dir("tests/testthat")' |
Exit code 0, no test failures |
Terminal log and exit code |
QG-4 |
Package check | R_LIBS_USER="$PWD/.Rlib" R -q -e 'rcmdcheck::rcmdcheck(args = c("--no-manual","--compact-vignettes=gs+qpdf"))' |
No ERROR. No WARNING for release sign-off. Any NOTE requires explicit reviewer acceptance |
rcmdcheck summary and reviewer decision on NOTEs |
QG-5 |
Runner smoke: validate | R_LIBS_USER="$PWD/.Rlib" Rscript scripts/dsambayes.R validate --config config/blm_synthetic_mcmc.yaml --run-dir results/quality_gate_validate |
Exit code 0 |
CLI log and results/quality_gate_validate/00_run_metadata/config.resolved.yaml |
QG-6 |
Runner smoke: run | R_LIBS_USER="$PWD/.Rlib" Rscript scripts/dsambayes.R run --config config/blm_synthetic_mcmc.yaml --run-dir results/quality_gate_run |
Exit code 0 and core artefacts exist |
CLI log and selected artefacts under results/quality_gate_run/ |
QG-7 |
Docs build check | R_LIBS_USER="$PWD/.Rlib" Rscript -e 'pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)' |
Exit code 0 |
Build log and generated site output under docs/ |
Gate Definitions
QG-1 Lint
Command:
Fail conditions:
- Non-zero exit code
- Any lint issue reported
- Any
SKIP:output
QG-2 Style
Command:
Fail conditions:
- Non-zero exit code
- Any file reported as requiring reformat
- Any
SKIP:output
QG-3 Unit Tests
Command:
Fail conditions:
- Non-zero exit code
- Any test failure or error
QG-4 Package Check
Command:
Fail conditions:
- Any
ERROR - Any
WARNINGfor release sign-off
Escalation condition:
- Any
NOTEmust be reviewed and explicitly accepted with rationale.
QG-5 Runner Smoke: Validate
Command:
Fail conditions:
- Non-zero exit code
- Missing
results/quality_gate_validate/00_run_metadata/config.resolved.yaml
QG-6 Runner Smoke: Run
Command:
Fail conditions:
- Non-zero exit code
- Missing
results/quality_gate_run/00_run_metadata/config.resolved.yaml - Missing
results/quality_gate_run/20_model_fit/model.rds - Missing
results/quality_gate_run/30_post_run/posterior_summary.csv - Missing
results/quality_gate_run/40_diagnostics/diagnostics_report.csv
QG-7 Docs Build Check
Command:
Fail conditions:
- Non-zero exit code
- pkgdown build aborts before site generation
Command Reference
Recommended environment setup before running gates:
Optional consolidated local gate (does not replace all release gates):
scripts/check.R --all covers lint, style, tests, and coverage. It does not run rcmdcheck, runner smoke checks, or pkgdown build.
Evidence Requirements
Minimum evidence bundle per release candidate:
- Full terminal output and exit code for each gate
QG-1toQG-7. - Runner smoke artefacts under
results/quality_gate_validate/. - Runner smoke artefacts under
results/quality_gate_run/. rcmdchecksummary with explicit handling ofNOTEs.- Confirmation that no gate result is
SKIP.
Evidence review should reference:
Failure and Escalation Rules
- Any gate failure blocks release tagging.
- Do not proceed to sign-off with unresolved
ERRORorWARNING. NOTEs require written rationale and reviewer acceptance.- If a gate fails due to environment setup, fix the environment and re-run the full affected gate.
- If a gate fails due to product code, raise a remediation change and re-run from
QG-1.
Sign-off Criteria
Release sign-off requires all of the following:
QG-1toQG-7passed.- No
SKIPoutcomes across mandatory gates. - Evidence bundle completed and reviewed.
- Final decision recorded in
sign-off-template.md.