← Back to Pull requests

Refactor test and coverage #248

Closed
unknown closed this pull request without merging on Feb 11, 2026 13:15 UTC
View on GitHub
unknown unknown commented on Feb 10, 2026 07:39 UTC
Author

See below for details of each commit.

Jacoco is now disabled by default in the main build. There is a message echoed during the build that informs the developer they can pass the -Dcoverage=true property to enable collection of execution data. This was meant to speed up the local development cycle. When enabled, html reports are now produced for each sub-project under build/reports/jacoco/test/html.

This PR does not actually do anything to publish the jacoco report in github, though it updates the github action to prepare the html and xml files if we want to make use of them in a future PR. Our test coverage is so poor right now, that I don't really see an immediate value to publishing it on every pull request, and this one was getting big enough as it is.

supersedes #150
fixes #144

---

commit ef7ae4293faf7f461ba59f60f5c9a4631d6bebed

build: fail build if tests fail

This will allow all tests for a given sub-project to finish, but will
abort the rest of the build.

Previously the build would finish successfully even if there were test
failures.

commit 63c2dfffc08a06e916722419d463b51f427a4091

build: Standardize test output and decouple JaCoCo coverage

Refactors the Ant build scripts across client, command, donkey, and
server projects to improve CI integration and local developer
experience.

Changes:
Decoupled Coverage: Separated unit test execution (test-run) from
code coverage instrumentation (test-coverage). Developers can now
run tests locally without the performance penalty of the JaCoCo agent
unless explicitly requested.
Standardized Output: Consolidated all test artifacts into a unified,
Gradle-compliant directory structure:
- Raw results: build/test-results/test
- HTML/XML Reports: build/reports/tests and build/reports/jacoco

Single project Usage:
- Run standard unit tests: ant test-run
- Run tests with coverage: ant test-coverage

Full Build Usage:
- Run standard unit tests: ant -f mirth-build.xml build
- Run tests with coverage: ant -f mirth-build.xml build -Dcoverage=true

commit f506683a3eee46fd67ead5cbed2d43b475710353

build: Add comprehensive clean targets and legacy cleanup

Improves build hygiene by ensuring all generated artifacts are removed
during clean operations.

Changes:
Global Clean: Added a top-level clean-all target in
mirth-build.xml that cascades to all sub-projects.
Legacy Cleanup: Introduced clean-legacy-dirs target to remove
obsolete directories (junit-reports, code-coverage-reports)
ensuring developers do not view stale reports.
Deep Clean: Updated sub-project clean targets to include
${test_classes} and ${build.dir}, preventing stale class files
from polluting subsequent builds.

commit e854921a2140e9995d8d4cb3ce0c82a0ec34613f

ci: Implement secure test result reporting via GitHub Actions

Establishes a split-workflow CI pipeline to safely run tests and report
results, complying with security best practices for public repositories.

Changes:
Build Workflow:
- Updated the Ant build command to enable coverage
(-Dcoverage=true).
- Added a "Stage Test Results" step to aggregate XML reports from
all sub-projects (client, server, donkey, etc.) while preserving
directory structure.
- Added an "Event File" job to capture PR metadata for secure
downstream processing.
Reporting Workflow:
- Created upload_test_results.yaml triggered by workflow_run.
- Implemented the privileged report publishing step separately from
the unprivileged build step.
- configured EnricoMi/publish-unit-test-result-action to ingest the
aggregated XML reports.

Security:
Uses the workflow_run pattern to allow safe PR commenting from forks
without exposing write tokens to the build environment.

Diff: 518 lines (+388 / -130) across 6 files Reviewer: kayyagari Review duration: 1776m
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 518 lines diff across 6 files
0.48
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.374
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #248"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 47.7% (MEDIUM) · Higher = larger blast radius
47.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 18.9% · Safe to merge
18.9%