qcthat hex logoAudit-Ready R Package Qualification with {qcthat}

Natalia Andriychuk
Jon Harmon

{qcthat} generates qualification reports from your test suite

Our R packages drive real decisions

R PACKAGES REPORTS DECISIONS & ACTIONS gsm.mapping 🔒 🔒 gsm.core 🔒 🔒 gsm.kri 🧭 Decisions ⚡ Actions

Qualification

🛡️ Assurance 📄 Documentation 🔗 Traceability

Cartoon of a person buried under a pile of paperwork, waving a white flag

Why we had to change

1 ⏳ Qualification documents often created after development 2 🔗 Development team manually maps specifications to functions and evidence 3 🔁 Repeated for every new release

Drawbacks of the approach

📈 Validation debt piles up delays releases & increases risk 1 🔍 Deferred work makes it hard to reconstruct what was tested and why 2 🔀 Manual docs drift out of sync with the code 3 🚫 Teams skip updates to avoid re-qualification 4

Cartoon of a person completely buried under paperwork and R package hex stickers, with only a hand and white flag sticking out

The standard R package lifecycle generates evidence but lacks traceability

R packages might do what you need, but you’ll need proof

  • Many R packages are developed on GitHub
  • Lots of information here, but not clear how it connects

Modern R packages use {testthat} for robust automated testing

  • Industry-standard testing framework
  • Confirms functions behave as expected and keep working after changes
  • Activate with usethis::use_testthat()

CI/CD pipelines ensure code integrity on every commit

  • GitHub Actions run tests on every push (usethis::use_github_action())
  • Failures caught long before code reaches production
  • Standard practice for well-maintained R packages

Standard {testthat} scripts provide the evidence of implementation

  • Every test run produces machine-readable results: pass, fail, skip, or warning
  • Proves that code works

But: A passing test suite doesn’t prove which requirement was met

  • {testthat} shows what was tested, not why
  • No built-in link between GitHub issue and its tests
  • Reviewers must manually reconstruct the mapping

{qcthat} connects issues to tests for continuous qualification

Connecting tests to issues is straightforward

  • Add (#123) or (#84, #132) (issue numbers) to test_that() description to tag test to issue

{qcthat} Reports are easy to generate

  • QCPackage() generates a full report linking issues to tagged tests
  • Organized by milestone; tests nested under linked issues
  • Filter to subsets: QCCompletedIssues(), QCPR(), QCMilestones()

The “Issue-Test Matrix” shows the connections between issues and tests

User Acceptance Testing (UAT) is integrated directly into tests

  • ExpectUserAccepts() creates GitHub issues requiring manual sign-off

User Acceptance Testing (UAT) is integrated directly into tests

  • UAT issues = children of originating requirement issue
  • UAT issue closed → test passes

Automated bots bring qualification reports directly to the Pull Request

  • GitHub Action comments on every PR with reports:
    • PR-Associated Issues
    • Completed Issues
    • Milestone
    • UAT
  • Reviewers see qualification status before merging
  • Reports update automatically as the PR changes

Immutable artifacts are automatically attached to GitHub Releases

  • Completed Issues and Milestone reports embedded in GitHub Release description
  • Each release carries its own qualification evidence
  • Version-controlled and tamper-evident by design

github.com/Gilead-Public/qcthat/releases/latest

You can add {qcthat} to your package today

  • pak::pak("Gilead-Public/qcthat")
  • qcthat::use_qcthat()
  • Tag your tests: test_that("Thing works (#123)", ...)
  • Experimental: qcthat::Skill_TagTestsWithIssues()
    • Tell an agent “tag tests with issues”

{qcthat} transforms qualification from a retrospective burden into a seamless byproduct of development

Packages are qualified continuously

Qualification is a byproduct of development, not a separate phase
🏷️ Tag tests to issues as you write them 1 🔍 Reports flag untested issues & unlinked tests 2 📄 Qualification docs filled automatically on release 3 ♻️ every change

Cartoon of a person completely buried under paperwork and R package hex stickers, with only a hand and white flag sticking out

Cartoon of a person breaking free from a pile of paperwork and package hexes, holding up the qcthat hex and an AUTOMATION banner

Thank you! Questions?

Additional Content

Registry

org repo internal? version release-url release-date qualification-url qualification-date
Gilead-BioStats gsm yes v1.6.0 release ↗ 2023-04-05 qualification ↗ 2023-08-28
Gilead-BioStats gsm yes v1.7.1 release ↗ 2023-04-28 qualification ↗ 2023-08-28
Gilead-BioStats gsm.app yes v2.5.3 release ↗ 2025-08-20 qualification ↗ 2025-08-22
Gilead-BioStats gsm.app yes v2.6.1 release ↗ 2025-09-24 qualification ↗ 2025-10-01
Gilead-BioStats gsm.core yes v1.0.0 release ↗ 2025-03-14 qualification ↗ 2025-04-21
Gilead-BioStats gsm.core yes v1.1.0 release ↗ 2025-04-11 qualification ↗ 2025-04-21
Gilead-BioStats gsm.kri yes v1.0.0 release ↗ 2025-03-14 qualification ↗ 2025-03-14
Gilead-BioStats gsm.kri yes v1.1.0 release ↗ 2025-04-14 qualification ↗ 2025-04-21
Gilead-BioStats gsm.mapping yes v1.0.0 release ↗ 2025-03-14 qualification ↗ 2025-03-14
Gilead-BioStats gsm.mapping yes v1.0.1 release ↗ 2025-04-11 qualification ↗ 2025-04-21
Gilead-BioStats gsm.reporting yes v1.0.0 release ↗ 2025-03-14 qualification ↗ 2025-03-14
Gilead-BioStats gsm.reporting yes v1.0.1 release ↗ 2025-04-15 qualification ↗ 2025-04-21
Sample rows from qualified-releases.csv: 76 qualified internal releases across 9 packages

Auto-qualification workflow

⏱ GHA Trigger: nightly / manual ⚙️ Setup R environment & install dependencies 1 📄 Load CSV registry & discover internal packages 2 🔍 For each package: check latest release 3 already qualified or PR exists ✨ new release found 🌿 Create branch · Generate qualification doc Validate links · Update CSV registry 4 🚀 Commit, push & open PR · assign reviewer 5 ✅ Done NO HUMAN INTERVENTION

Automated qualification PR

Automated qualification pull request screenshot

Qualification status update

GSM dashboard screenshot