Check reference

Valid requirement annotations

A trace annotation makes a specific claim about a requirement. The annotation_validity check catches references and evidence claims that the repository cannot resolve or credit in their current location.

What the check observes

The check resolves requirement IDs and validates obligation triples such as SYS-REQ-042:boundary:negative. The class must belong to the requirement, be explicitly suppressed, or be carried by a satisfying child. A test claim on ordinary production code is not interchangeable with a test carrier. Proof also distinguishes implementation annotations, verification annotations, and typed evidence; a valid-looking ID alone does not make every form legitimate.

Example: a negative case placed on the implementation

Illustrative case. The parser rejects an empty name, but the author put its negative-test claim on ParseName itself. Move the claim to the test that actually exercises the rejection. This excerpt shows annotation placement only; it is not test execution evidence.

// Production function
// Implements: SYS-REQ-042
func ParseName(input string) (string, error) { /* implementation */ }

// In the test file
// Verifies: SYS-REQ-042
// SYS-REQ-042:malformed_input:negative
func TestRejectsEmptyName(t *testing.T) { /* call and assert */ }

Resolve the finding

  1. Read the reported ID, class, evidence type, and carrier location. Correct a typo against the existing requirement and catalog, rather than inventing a replacement requirement.
  2. Confirm that the requirement governs this behavior. Put implementation claims on implementing code and verification claims on eligible tests or proof carriers.
  3. For a missing obligation, review whether it belongs in the requirement before adding it. Then refresh traces and rerun the focused check.

Run and interpret

proof audit --check annotation_validity --verbose

This is an implementation-stage error check. Run the focused audit from the project root. The audit CLI defaults to a warning failure threshold unless project configuration overrides it.

Passing establishes annotation integrity, not that a test ran or that its assertions are sufficient. Typed lemma carriers have additional eligibility and fresh-run requirements. Use the evidence and witness checks for those separate questions.

Continue from here

Check required evidence cells. Find untraced tests.

For a confusing trace finding, bring the requirement, the annotated function, and the test it is meant to represent. Bring a change to Proof.