Coverage
Coverage in Roboticks is requirement coverage, not source-line coverage. The question is “is every requirement confirmed by a passing test on this SHA?”, not “how many source lines did the test suite touch?”. Both are useful; only the first is what an auditor asks about.The state machine
Every requirement is in exactly one of five states per SHA:| State | Defined as |
|---|---|
gap | No RequirementLink rows exist for this requirement on this SHA. |
unconfirmed | ≥1 link exists; no run has produced a result yet. |
confirmed | ≥1 link exists; all linked tests passed on this SHA; no prior-confirmed state was lost. |
partial | ≥1 link exists; at least one linked test passed and at least one failed. |
regression | The most recent run on the parent branch (e.g. main) had this requirement confirmed; this SHA shows at least one failure on a confirming test. |
Calculation inputs
For a given SHA, the inputs are:- The requirement set in scope (the current
roboticks/requirements.yamlor the snapshot for a release SHA). - The RequirementLink rows in scope (the union of source-code-derived, manual, and accepted LLM links).
- The JUnit XML output of the test run on this SHA.
- The prior coverage state on the parent branch’s last successful run (for regression detection).
Examples
Single requirement, single test
| Event | Requirement state |
|---|---|
REQ-014 created, no test exists | gap |
@confirms("REQ-014") added on test_estop (not yet run) | unconfirmed |
| Run passes | confirmed |
| Code change breaks the test | regression |
| Fix lands, test passes again | confirmed |
Single requirement, two tests
| Event | Requirement state |
|---|---|
| Both tests passing | confirmed |
| One passes, one fails | partial |
| Both fail | partial (or regression if the requirement was confirmed previously) |
| One is removed, the other passes | confirmed |
Requirement that has never been confirmed
| Event | Requirement state |
|---|---|
| Two confirming tests; both fail on first ever run | partial |
| One then passes | partial (still one failing) |
| The failing one is fixed | confirmed |
regression is reserved for requirements that were once confirmed. A first-time partial is just partial — no regression alarm.
Regression detection
Regression detection runs against the parent branch’s last successful Roboticks run, defined as:- For a PR, the base branch.
- For a push to a release branch, the prior commit on the same branch.
- For the first run on a new branch, the inherited state from the branch’s fork point.
confirmed in that reference run and is partial or has a failing confirming test in the current run, it becomes regression. This is the strongest negative signal Roboticks emits — it shows up red in the Check Run and the matrix, and is called out separately in the summary.
Hierarchy rollup
Parent requirements (those with descendants) get their state from their children:| All descendants are… | Parent is… |
|---|---|
confirmed (with non-test verification methods excluded) | confirmed |
Any gap | gap |
Any regression | regression |
Any partial (no gap or regression) | partial |
Mixed unconfirmed + confirmed (no failures) | partial |
All unconfirmed | unconfirmed |
test (i.e. inspection, analysis, demonstration) are excluded from rollup — they don’t drag a parent down to gap just because Roboticks can’t verify them by test. See Hierarchy.
Multi-repo rollup
A Roboticks project can host requirements that are confirmed by tests in multiple repos. The rollup is the same — a requirement isconfirmed if any confirming test in any linked repo passes on the current SHA of its repo.
A push to one repo only re-runs its tests; results from the other repos are read from their last-known-good run. See Multi-repo projects for the freshness rules.
Coverage percentage
The dashboard summary shows a per-requirement-type percentage:verification_method: test. Inspection / analysis / demonstration requirements are reported separately as out-of-band verification.
A weighted variant — ”% of ASIL-D requirements confirmed” — drives some auditor-facing dashboards. See Standards overview for the integration.
Live vs snapshot coverage
The matrix has a snapshot selector. The numbers it shows depend on which mode:| Mode | What “confirmed” means |
|---|---|
| Live | Current state on the default branch’s latest run. Updated continuously. |
| Snapshot | State at the moment the snapshot was cut. Immutable, never updates. |
Where coverage updates trigger
| Trigger | What re-runs |
|---|---|
| New test run completes (PR or push) | Update RequirementLink rows from JUnit, recompute states for the touched repo, recompute rollups. |
| Inline YAML edited and pushed | Re-ingest, then recompute states (a new requirement starts at gap). |
| ReqIF re-import | Same as above. |
| Link manually added in dashboard | Recompute coverage for the affected requirement. |
| Snapshot cut | Freeze the current state into the snapshot. Live state continues from there. |
Re-computing coverage
For investigation, the CLI can recompute coverage from artifacts:Next
Matrix
The UI that renders these states.
Gaps
What to do with a
gap.Change-impact
Affected-requirements detection per PR.
Snapshotting
Per-release coverage immutability.