Implement dual-layer quality and compliance gateways - #740
Implement dual-layer quality and compliance gateways#740google-labs-jules[bot] wants to merge 15 commits into
Conversation
…e links and strict block gates
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
equipose | c23f428 | Commit Preview URL Branch Preview URL |
Aug 07 2026, 03:08 AM |
|
[CI/CD Fix] We analyzed the failure in the CI Check 'setup' (check_run_id: 92650022042). What HappenedThe - name: Install Playwright Browsers
run: npx playwright install --with-depsThis failed because the The Fix
The local unit tests were run and validated to pass perfectly. The changes have been pushed to the branch. |
|
[CI/CD Fix] Summary of ChangesThe Investigation
Resolution
|
|
[CI/CD Fix] What HappenedThe
The Fix
|
|
[CI/CD Fix] What HappenedThe
How We Fixed It
|
|
[CI/CD Fix] What HappenedThe The FixAdded a Verification
|
|
[CI/CD Fix] We investigated why the This failure was due to the Since the traceability matrix script only processes |
|
[CI/CD Fix] What HappenedThe
The FixWe upgraded the file path mapping logic in
This guarantees that all test files (both Unit and E2E) correctly normalize to identical relative paths (e.g., |
…n issues in traceability matrix job
|
[CI/CD Fix] We identified and resolved the core issue causing the What HappenedIn the previous workflow run, the The FixTo solve this robustly and improve pipeline efficiency, we optimized the CI workflow:
This optimization speeds up the CI pipeline, ensures a bulletproof Vitest execution context, and allows the RTM generator to successfully verify and construct the clinical traceability matrix. |
|
[CI/CD Fix] We verified the local reproduction and resolved status of the Summary of InvestigationThe failure of Resolution Applied
All unit tests and linting suites compile and pass successfully with 100% health. No further changes are required. |
…ceability_matrix job
|
[CI/CD Fix] What HappenedThe
How We Fixed It
|
…d add diagnostic parsing logs
|
[CI/CD Fix] Summary of Changes
Local Verification
|
|
[CI/CD Fix] The CI/CD pipeline has now successfully completed with 100% passing check runs (including unit tests, E2E tests, coverage metrics, and the Requirements Traceability Matrix validation)! Summary of Changes
Verification Results
|
|
[CI/CD Fix] What ChangedWe analyzed the codebase and the workflow context around the
|
|
[CI/CD Fix] What Changed & Root Cause Analysis
The local unit tests, linter, and build checks have been fully verified to pass with 100% success. |
|
[CI/CD Fix] We have successfully performed local verification and checked the robustness of the quality and compliance gateways. Summary of Accomplishments & Verification
The verified updates have been committed and pushed to the pull request branch. |
|
[CI/CD Fix] Findings & Root Cause Analysis of
|
Why We Are Making This Change
In clinical research software, ensuring both statistical correctness and strict adherence to clinical requirements is paramount. Previously, our testing pipeline lacked hard blocks against code coverage regressions or unmapped clinical requirements. This created a risk where untested execution paths or unvalidated regulatory requirements could silently slip into production, threatening the clinical validation status of our releases.
To eliminate this vulnerability, this PR introduces a robust, dual-layer quality and compliance gateway that programmatically blocks any pull request containing untested code paths or missing clinical requirement verifications.
Key Decisions and Rationale
Hard-Failing Code-Density Check:
@vitest/coverage-v8invitest.config.tswith strict minimum coverage thresholds. Added a localnpm run test:coveragescript.Automated Requirements Traceability Matrix (RTM):
scripts/generate-rtm.mjs) that maps documented clinical requirements to automated test suites.[file.spec.ts#Lline](./file.spec.ts#Lline)) to the test locations, facilitating frictionless external audits.Strict Validation Fail-Safes in CI/CD:
.github/workflows/ci.ymlto run coverage and requirement verification sequentially. Added local-only validation flags (--lenient/--local) to avoid blocking offline local environments while preserving strict enforcement in the CI environment.Detailed Changes
1. Code Quality & Test Coverage
vitest.config.tsto utilize@vitest/coverage-v8for comprehensive coverage reporting."test:coverage"and"verify:compliance"topackage.jsonto empower developers to run compliance checks locally before pushing.2. Compliance Mapping & Validation Engine (
scripts/generate-rtm.mjs)process.exit(1)) if any requirement is unmapped, untested, or failing.3. CI/CD Pipeline Adjustments (
.github/workflows/ci.yml)actions/upload-artifactto capture and store the final Requirements Traceability Matrix (RTM.md) for every pipeline run.