AC-057 Conformance caught CS-COV-001CS-COV-002CS-COV-003CS-COV-004

You do not know what your tests never reached

Change over time

How to run this card's commands yourself

1. The problem

In one sentence

A test suite passes, and nobody knows which operations, which error answers and which secured routes it never touched.

A story

A team has a green build and 40 scenarios. A review asks: “Is POST /strict/wrong-type tested?” Nobody knows. It is not. GET /strict/missing-query is called, but only with a valid query, so its 400 answer has never been seen. GET /strict/no-auth is called, but only without credentials, so no test ever proved that a valid user gets in. The build is green because it checks what it checks, and says nothing about the rest.

Why it hurts

A green run proves nothing is wrong in what was checked. The danger is in what was not. The usual gaps are the same four: a route never called, a route called only on the happy path, an error response never triggered, and a secured route never called with credentials.

  • For developers: the paths that are never run are the ones that break unnoticed: error handling, refusals and permissions.
  • For managers: “all tests pass” is not the same as “the API is tested”. Coverage numbers should say what has not been proven, not only what was run.
  • For DevOps: a coverage bar in the pipeline keeps the gaps from growing. Start by reporting, then make a gap fail the step.

Example

A small fixture spec with four operations, and a scenario set that leaves one gap of each kind:

GET  /strict/missing-query    only ever answered 200        -> happy path only; its declared 400 never triggered
GET  /strict/no-auth          only ever called WITHOUT credentials -> secured, never authenticated
POST /strict/missing-field    answered 201 and 400           -> no signal (the control)
POST /strict/wrong-type       never called                   -> never exercised

How to detect it without clrsig

  • List the operations in the spec, and for each, find a test that calls it, one that triggers each declared error, and one that sends valid credentials.
  • Count: operations in the spec against operations in the access logs of your test run.

How to fix it

The fix is more tests, chosen by the gap:

  1. Never exercised: add a scenario that calls it.
  2. Happy path only, or an error never triggered: add a step that causes each declared error (a missing parameter, a refused request).
  3. Secured, never authenticated: add a step with valid credentials, and one without.

To tell which gap matters most: start with operations that change data and with secured ones. Do not treat a rising percentage as the goal; treat the list of gaps as the work.

AC-056 Which of my tests will the change break?, AC-026 The server drifts away from its spec, AC-031 A request without credentials is accepted.

Words used on this page are explained once in the glossary.

2. How clrsig helps

Check

CS-COV-001 Never exercised, CS-COV-002 Happy path only, CS-COV-003 Error responses never triggered, CS-COV-004 Secured but never tested with credentials. State: caught, as signals. They tell you what has not been proven. They are not failures: clrsig coverage quality exits 0 whether or not it finds gaps. Add --fail-on-gaps to make a gap fail the step.

Command

Coverage accumulates in a workspace folder over the runs you give it (-w). Use a fresh folder for a repeatable result. The scenario sends POST requests to the sandbox, so it writes data there. Start the sandbox first, then from its folder:

Safety. Run this against a test server, never production. clrsig conform sends POST, PUT and DELETE requests built from the spec: start with --read-only, and take secrets from the environment (${NAME}), never from files in the repository.

clrsig run clrsig/scenarios/coverage-gaps.yaml \
  --env clrsig/environments/conform-fail.yaml \
  --spec specs/coverage/coverage.yaml -w ws
clrsig coverage quality specs/coverage/coverage.yaml -w ws

Exit code of the second command: 0, even though gaps are found. With --fail-on-gaps it is 1.

What you see

Output from clrsig v0.21.0, recorded on 2026-11-30. The report (exit code 0):

Coverage quality — coverage fixture  1.0.0
Workspace: ws  (1 run(s))
Covered 3 (75%) · Not covered 1 (25%) · Passing 3 (75%) · Failing 0 (0%) · of 4 operations

NEVER EXERCISED (1):
  POST /strict/wrong-type

HAPPY PATH ONLY — no error responses ever triggered (1):
  GET /strict/missing-query            declared errors: 400

SECURED — never tested with credentials (1):
  GET /strict/no-auth

UNTESTED ERROR PATHS (1 operations):
  GET /strict/missing-query            → 400 never triggered

3 operation(s) with gaps found — add scenarios that trigger error paths and test authenticated+unauthenticated flows

The same command with --fail-on-gaps prints the same report and exits 1.

How to read it: the first lines say what was covered. Then one list per kind of gap. POST /strict/missing-field is not listed: it was answered with 201 and 400, so it has no signal.

Where to look

  • Desktop app: the Contracts page shows each spec’s per-operation coverage and last result, with the quality signals.
  • Reports: --format json, csv, markdown or html; -o writes a file.
  • Other commands: clrsig coverage list shows accumulated coverage per spec in a workspace; clrsig coverage reset deletes it for one spec.

How clrsig helps you fix it

It turns “we have tests” into a list of operations and answers to add tests for. It does not tell you which gap is most important.

Limits

  • Coverage is recorded from the runs you give it. A run that was not recorded in the workspace does not count.
  • Coverage says which operations and answers were reached, not whether the test checked them well.

More ways

Nothing yet.

3. Video brief for Google NotebookLM

VIDEO BRIEF — AC-057 · You do not know what your tests never reached
Length: 5 to 7 minutes. Language: English. Audience: developers, with a line each for managers and DevOps.
One idea: a green run proves nothing is wrong in what was checked; the danger is in what was not.
Open with this story: A team has a green build and many scenarios. A review asks whether one operation is tested. Nobody knows. It is not. Another operation is called only with a valid query, so its 400 answer has never been seen. A secured route is called only without credentials, so no test ever proved that a valid user gets in. The build is green because it checks what it checks.
Say these facts, in this order:
1. Four usual gaps: a route never called, a route called only on the happy path, an error response never triggered, a secured route never called with credentials.
2. The fixture has four operations and one gap of each kind; the report says three of four are covered, 75 percent.
3. Never exercised: POST on the wrong-type route. Happy path only: the missing-query route, whose declared 400 was never triggered. Secured, never authenticated: the no-auth route.
4. The control, the missing-field route, answered 201 and 400 and has no signal.
5. The gaps are signals, not failures: the command exits 0 whether or not it finds gaps. Add fail-on-gaps to make a gap fail the step.
6. Coverage accumulates in a workspace folder over the runs you record; use a fresh folder for a repeatable result.
7. Fix by gap: add a call, add a step that triggers each declared error, add a step with valid credentials.
8. For managers: all tests pass is not the same as the API is tested.
9. For DevOps: start by reporting, then make a gap fail the step.
Show on screen: the four operations and their gaps, the two commands, and the report, copied exactly from the card.
Name the checks: CS-COV-001, Never exercised; CS-COV-002, Happy path only; CS-COV-003, Error responses never triggered; CS-COV-004, Secured but never tested with credentials. Say the clrsig version: v0.21.0.
Explain these words once: coverage (how much of the API your tests reached); happy path (the case where everything goes right); workspace (a folder where clrsig keeps what your runs covered); exit code (0 clean, 1 a finding, 2 setup or spec broken).
Say what clrsig does not see here: runs that were not recorded in the workspace; it does not tell you which gap matters most.
Safety line (if a write is shown): Run this against a test server, never production. clrsig conform sends POST, PUT and DELETE requests built from the spec: start with --read-only, and take secrets from the environment (${NAME}), never from files in the repository.
Finish with three recap questions:
1. Name the four kinds of gap. (Never exercised, happy path only, error responses never triggered, secured never authenticated.)
2. Does the coverage report fail the build by default? (No, it exits 0.)
3. How do you make a gap fail the step? (With fail-on-gaps.)
Tease the next video: AC-058 · The spec cannot be read.
Do not: say "contract testing" alone; say clrsig "catches everything"; invent flags, IDs or numbers; read tables aloud; use any fact that is not in the card.