Skip to content

P0019 commit-tested-line

Rule: A commit says how it was tested in a Tested: trailer.

Code P0019 (stable, never reused)
Id commit-tested-line
Category commits
Source spirit_level
Fix by hand
Needs git installed

Level per tier

Tier Level Reason
small off
small-workspace off
medium off
big off
ai warn an agent says how it tested, or that it did not; a warning while branches begun before the rule land
embedded off
ui off
egui off
units-strict off
units-paranoid off

Parameters

Name Type Default Meaning
trailer string "Tested" the trailer key that says how the commit was tested
base string "main" the branch work merges into; commits in base..HEAD are checked

Why

A commit that says how it was tested lets a reviewer weigh it and lets the next reader trust it. An untested change that says so is honest; one that says nothing looks tested. Agents in particular report outcomes as done; a Tested: line makes the claim checkable.

Reject frames longer than the buffer

Tested: just test --changed; the new frame_len test fails without the fix.

The lint checks each commit of the branch (Commits and landing) for a Tested: trailer with a value.

How to fix

End the message with Tested: <what ran>: the command, the reproducer, the bench. Nothing ran: Tested: not tested, and what could not be done (needs the board). On the branch, git commit --amend or a rebase rewrites the message.

Configure

[lints.commit-tested-line]
level = "deny"
trailer = "Tested"
base = "main"
reason = "why this project wants it at this level"

Allow one finding in the code with // spirit-level: allow(commit-tested-line) <reason> (waivers); the code works there too, as in [lints.P0019].