The Drift Log · Certifying that code does something
Why Harness Setup Errors Must Never Count as Passing Tests
26 September 2026 · 4 min read · 826 words · established

Treating test setup failures as green checks creates false assurance. An inconclusive verdict isolates harness limits from true code defects.
A test runner fails to bind a local loopback port, catches the socket exception in a beforeAll block, logs a warning to stdout, and marks the suite complete. The pull request shows a green checkmark. The reviewer merges the code.
Nothing failed because nothing executed.
The code touched a critical boundary condition—perhaps a token revocation path or an edge case in ledger reconciliation. But the environment could not satisfy the preconditions to exercise that boundary. By treating a harness configuration error as a benign skip or an exit code 0, the pipeline converted an infrastructure blind spot into a false assurance of correctness.
This failure mode is common in modern CI pipelines. When a test harness cannot establish its required setup state, recording the run as green hides unexercised execution paths. Treating verification honestly requires an explicit middle ground between passed and failed.
The silent skip is a false assertion
Most automated test runners prioritize finishing the run over defending the validity of the contract. When a fixture fails to load, a common default is to catch the error, increment a "skipped" counter, and return zero.
Consider a simple test intended to verify that an artifact cleanly handles an expired certificate:
describe("mutual TLS validation", () => {
let cert: Buffer;
beforeEach(async () => {
// Harness tries to generate an expired test fixture
cert = await generateExpiredX509Fixture();
});
it("rejects expired leaf certificates", () => {
if (!cert) {
console.warn("Fixture generation failed, skipping.");
return;
}
const result = verifyConnection({ cert });
assert.strictEqual(result.status, "REJECTED");
});
});
If generateExpiredX509Fixture() throws because OpenSSL is missing from the container image, the test exits early. The suite passes.
From the perspective of code certification, a skipped test is not neutral. It means an invariant went unverified. If the assertion was necessary to merge the change, skipping it invalidates the premise of the test suite.
The pipeline has not proved that the code works. It has only proved that the test runner did not crash.
Distinguishing harness limits from artifact defects
A binary pass/fail model cannot handle setup failures gracefully.
If you force the harness to mark setup errors as FAILED, the team will treat CI as flaky. An engineer investigating a red build will spend twenty minutes tracing an apparent regression in the domain logic, only to discover a missing environment variable or an exhausted ephemeral port in the build container. Eventually, engineers stop taking red builds seriously.
If you mark setup errors as passing or ignored, you allow unexercised code to ship to production.
The resolution is to adopt a distinct, four-part ladder of outcomes, as outlined in the four verdicts between green tests and correct code. Specifically, the pipeline must be able to return an INCONCLUSIVE verdict.
+-------------------------------------------------------------+
| CERTIFIED - Input contract satisfied; assertions passed |
| PROVISIONAL - Executed cleanly; full matrix incomplete |
| INCONCLUSIVE - Harness preconditions failed; cannot assert |
| FAILED - Harness executed; assertions failed |
+-------------------------------------------------------------+
An INCONCLUSIVE verdict explicitly isolates harness limits from artifact defects. It states: The software did not fail, but the harness was unable to exercise the contract.
When you separate setup failures from assertion failures, you stop polluting defect metrics with harness flakiness while still blocking unverified changes from reaching production. As discussed in what inconclusive harness runs reveal about test inputs, analyzing these outcomes systematically exposes weak fixtures, fragile mocks, and under-specified input boundaries.
Enforcing harness integrity in CI
Rigorous verification requires treating the test harness as software with its own strict contracts.
In the live certification harness, a run cannot transition to an evaluated state unless all input preconditions, fixtures, and execution monitors confirm they are active. If an artifact requires an ephemeral database or a specific system capability that the environment cannot supply, the harness aborts the run and records INCONCLUSIVE.
To enforce this in your own pipelines, apply three structural constraints:
- Fail closed on fixture errors. A failure in a
beforeEachor setup hook must never return an exit code 0. It must trigger a dedicated non-zero exit state or emit structured metadata denoting an incomplete execution. - Treat dynamic skips as blocked builds. Skips should be static and auditable in source control. If a test decides at runtime to skip itself based on runtime environment checks, CI should treat that run as incomplete rather than successful.
- Record harness failures separately from regression failures. Track harness environment failures in their own metric stream. If a specific integration test consistently yields inconclusive outcomes, fix the harness infrastructure rather than disabling the test.
Monday morning audit
You do not need to rewrite your entire test runner to begin eliminating false greens. Start with a focused audit:
- Search your codebase for
try/catchblocks inside setup hooks and test helper utilities that log warnings instead of re-throwing errors. - Check your CI summary reports for tests marked as "skipped." Determine whether those skips were intentional omissions or silent fallbacks caused by missing environment variables.
- Update your pull request checks so that any run containing dynamically skipped integration tests cannot satisfy your branch protection rules without explicit override.
A test harness that reports success when it did not run is worse than no harness at all. It provides the illusion of safety while leaving the underlying failure surface untouched. Name your harness failures for what they are, record inconclusive runs explicitly, and hold your verification setup to the same standard as the code it evaluates.
Keep reading
Next in the log
- What Inconclusive Harness Runs Reveal About Test Inputs
When a test runner fails to construct valid input preconditions, reporting a code defect corrupts verification and leads to compromised production code.
- Handling Inconclusive Test Harness Runs in Merge Queues
Distinguish between artifact defects and harness setup failures in CI merge queues by routing inconclusive verification runs through policy.
- Distinguishing Provisional from Certified Artifacts in CI
A green exit code only confirms execution, not correctness. Here is how to structure CI gates between provisional and certified software.
The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.