Skip to main content
Version: Next

Test coverage

Measured on 2026-09-25 at commit 374e6469e43c, by the release that published this site.

The whole test suite covers 96.8% of the workspace's 34,931 statements. The unit layer alone reaches 85.3%, and the integration layer's instrumented binary 95.0%; the two overlap, so the total is every profile merged rather than either of them added up.

Every number on this page comes from a coverage profile. Module tests produce the unit profiles. Integration coverage comes from two sources: real CLI processes running against disposable repositories, and public API scenarios that combine parsing, configuration, scanning, and rewriting. The measured production scope includes the CLI and all six current public Go modules. The current CCME module has its own public API driver because the CLI still uses the previous major version internally.

The report keeps unit, integration, and combined coverage separate. Combined coverage counts each statement once and marks it covered when either layer reaches it. It supplies the README badge. The integration gate uses only the integration profiles; unit tests cannot satisfy it. A stable release of the measured modules requires both integration and combined coverage to reach 95%. A release candidate publishes its figures without that minimum.

Before calculating a total, the report checks that every expected module and production block is present and that profile provenance matches the run. Missing profiles, mixed revisions, and omitted subpackages fail the report rather than reducing its denominator. The badge and this page are therefore the same number, taken from the same run: the one that gated the release which published this site.

The container cache may reuse a profile when the complete test input layer is byte-for-byte identical: the module, its workspace providers, test-report tool and declared fixtures all participate in that key. A following layer stamps the current source commit only after that identity check. The stamp therefore says the measurement applies to this commit; it does not claim the test process ran again merely because documentation changed. A changed test input misses the cached layer and runs the suite before it can receive a fresh stamp.

By module​

Module / packageStatementsCoveredCoverage
pkg/ccme1,3381,33099.4%
pkg/config1,1981,16897.5%
the module itself1,0961,07598.1%
watch1029391.2%
pkg/manifest20220099.0%
pkg/models46846799.8%
pkg/scanner1,4741,44598.0%
pkg/writer3,5543,46297.4%
services/dispat25,13224,26696.6%
the module itself11100.0%
internal/app6,5156,31296.9%
internal/changelog44242997.1%
internal/cli1,4341,41698.7%
internal/cond525198.1%
internal/config3,2033,13497.8%
internal/envname77100.0%
internal/execution3,5803,36093.9%
internal/filter20720699.5%
internal/fsx392974.4%
internal/github20119697.5%
internal/gitx2,1452,06496.2%
internal/globx424197.6%
internal/graph11211098.2%
internal/httpx836375.9%
internal/ignore6464100.0%
internal/install22822498.2%
internal/model7070100.0%
internal/plan4,1344,01797.2%
internal/release1,4031,35896.8%
internal/script525198.1%
internal/selfupdate64861494.8%
internal/webhook19718895.4%
internal/workspaceenv27326195.6%
tools1,5651,48695.0%
namingcheck16614184.9%
testreport1,3991,34596.1%

Coverage measures executed statements, not whether every requirement is correct. The requirement matrix also tracks release-safety cases such as lock failure, interrupted publication, configuration inheritance, and consumer recovery. An uncovered statement may represent a missing workflow or an error path; inspect the profile before deciding whether a new test is useful. A high combined percentage does not prove the integration gate passed. The per-package test inventory (what each package's suite actually asserts) is in Architecture / Testing, and what the suite did rather than what it reached is in test results.

Reproducing​

The whole measurement is three commands from the monorepo root, and they are the ones the release workflow runs:

dispat run tests --since all # every module's profile and go test -json log, into coverage/
dispat exec coverage-badge # merges the profiles; writes the badge JSON and the summary table
dispat exec test-report # writes packages/docs/data/report.json, read by this page

Every one of them is a build of Dockerfile.gotest, so none needs a Go toolchain on the machine running it.

--since all is not optional. A run selected by a --since window tests part of the monorepo, so a total from it would be a number about whichever packages happened to change. That is why the badge is computed by the release workflow rather than by the per-commit test workflow.

Rebuilding this site with packages/docs/data/report.json in place is what puts the figures back on the page; without one, the prose stays and the tables are left out.

What each layer contributes​

Module tests exercise focused behavior, using both real resources and test doubles where appropriate. The CLI integration suite drives the compiled binary and checks Git state, log events, execution order, signals, and recovery. Its public API scenarios scan manifests, rewrite them, and rescan the result, including failures that must preserve the original files.

DISPAT_COVERDIR enables CLI coverage collection, while the test runner collects public API coverage. Without these settings, ordinary local tests run without coverage instrumentation. The release gate collects both sources into one integration profile and compares its production statement inventory with the unit profiles. The suite's own status and per-area summary are in test results, with the claim-by-claim matrix in the test plan.