Skip to content

Declare cited-source on the verification types (sw/unit/sys-verification) + a native 'named-test-exists' check — make requirement→test evidence drift-checked #556

Description

@avrabe

From applying the methodology on relay (test-level traceability work, pulseengine.eu#89). Two affordances would make the requirement → verification → actual test chain mechanically drift-proof, instead of prose-backed.

1. Declare cited-source on the verification types

cited-source (kind: file, sha256-stamped, drift-checked by rivet validate / rivet check sources) is a great mechanism — but it's only declared on requirement-ish types. On a verification artifact it's rejected:

INFO: [FV-RELAY-HAL-005] field 'cited-source' is not defined in schema for type 'sw-verification'
  ... declared fields [method, preconditions, priority, steps]

A verification artifact is exactly where a hash-stamped pointer to the test source file belongs: "this requirement is verified by the tests in crates/X/src/lib.rs, hash f5f98a…", and rivet validate flags drift the moment that file changes without a re-stamp — i.e., the evidence can't silently rot.

Ask: declare cited-source under fields: for sw-verification, unit-verification, sys-verification, sw-integration-verification, sys-integration-verification in the aspice/common preset. (It already round-trips cleanly — rivet check sources even computes the hash — it's just not declared there.)

2. A native check: a named-test step must actually run a test

A common verification shape is fields.steps[].run: "cargo test -p X some_test_name" to tie a requirement clause to a specific test. But cargo test -p X typo exits 0 with "0 passed" when the filter matches nothing — so a renamed/removed/typo'd test name silently keeps the requirement 'verified'. I worked around it in relay's gate script (require ≥1 test result: ok. N passed with N≥1 for a named-filter step), but it belongs in rivet so every project gets it for free.

Ask: a rivet check oracle (e.g. verification-evidence) that, for automated-test steps whose command names a specific test filter, asserts the named test exists / ran — or at least a documented convention + helper. Language-specific (cargo/pytest/…) test-name extraction is the hard part; even a "step names a filter but command-runner reports 0 ran → error" heuristic would catch the silent-drift case.

Why it matters

On relay, rivet validate is PASS with 113 warnings, many of the form "requirement should be verified by at least one verification measure" — requirements with no verifies edge at all — and the verifications that exist map to crate-level commands, not specific tests. Closing #1+#2 turns the trace from "prose says test T covers req R" into "rivet proves test T exists, ran, and its file hasn't drifted." That's the difference between a traceability matrix an assessor trusts and one they have to re-audit by hand.

Context: pulseengine.eu#89 (agent methodology retrospective), relay PR #221 (the test-level demonstration + gate stopgap).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions