cleandataengineering.aiAgent Harness, drawn simply
You are here: Testing › Spec coverage

Agent Harness Tutorial · Testing

Coverage: which promise was proved

Line coverage says which code ran. Spec coverage says which promise was proved. Every test names the spec statements it discharges; the gate collects those names and builds a map of every promise the agent owes, and whether a passing test proves it.

pytestevery testJUnit+ the ids it dischargesAssurance mapper statementowed · exercised · not exercised · failing
"Not exercised" is the line worth reading.
AgentSpec statements owedHarness duties
Claims assistant64 of 64 proved81 owed: 54 proved by a test, 23 accepted gaps (each with a reason), 4 not applicable
Reference agent185 of 185 proved81 owed: 66 proved, 12 accepted gaps, 3 not applicable

pytest-cov is to adopt as a ratchet, never as the target. Scenario coverage may only go up.