Skip to content

Marking a sw-req 'implemented' + verified requires the full ASPICE design chain — no direct test→sw-req link, and the completeness error doesn't guide you there #350

@avrabe

Description

@avrabe

What I was doing

On a downstream project (pulseengine/synth, rivet 0.13.3, aspice schema), I shipped a batch of features and wanted to mark the corresponding sw-req artifacts implemented and keep rivet validate green — e.g. SL-TR-003 "Relocation emission for import BL instructions" (now actually implemented + tested).

What I used

  • rivet validate / rivet check (the completeness diagnostics)
  • read the existing sw-verification artifacts + the verifies-link error to reverse-engineer the required shape

The friction (in order I hit it)

  1. Flipping status: planned → implemented on a sw-req is easy, but then validate reports
    SL-TR-003 (sw-req, status: implemented) — missing: unit-verification, sw-integration-verification.
    This tells me what's missing but not how to satisfy it, and crucially not that it can't be satisfied directly.

  2. You cannot link a verification to a sw-req. I authored a unit-verification and a sw-integration-verification with verifies: SL-TR-003, pointing at the real cargo test cases. validate rejected both:

    • unit-verification verifies allowed targets: [sw-detail-design]
    • sw-integration-verification verifies allowed targets: [sw-arch-component, sw-detail-design]
      So to mark ONE sw-req verified, the ASPICE chain sw-req → sw-arch-component → sw-detail-design → {unit,integration}-verification must ALL exist. There is no shortcut for "this requirement is implemented and here are the tests that cover it."
  3. The completeness error and the link-target error don't reference each other. The "missing: unit-verification, sw-integration-verification" message never mentions that you first need sw-arch-component/sw-detail-design intermediate artifacts. I only discovered the required layering by trying the direct link and reading the rejection.

  4. Schema drift adds noise: the project's sw-req artifacts carry a crate: field that the aspice sw-req schema doesn't declare → 37+ INFO: field 'crate' is not defined in schema diagnostics on every validate, drowning the actionable errors. (Either the schema should allow a crate/component field on sw-req, or there should be an easy per-project field extension.)

What finally helped

The verifies-link target-type rejection is what actually revealed the intended layered model — it's the only message that names sw-detail-design/sw-arch-component. Everything else (the completeness "missing X-verification" list) pointed me at the wrong fix (author a verification linking to the req).

Suggestions

  • Make the completeness diagnostic for an implemented sw-req name the chain: "needs a sw-detail-design (satisfies SL-TR-003) verified by a unit-verification, and a sw-arch-component verified by a sw-integration-verification." A one-line "how to satisfy" in the error would have saved the whole detour.
  • Consider a rivet implement <id> (or rivet scaffold-verification <id>) that stubs the minimal sw-arch-component + sw-detail-design + verification artifacts wired with the correct link types, so marking shipped work as implemented is a guided step rather than reverse-engineering link target-types.
  • Provide a docs page: "minimal artifact chain to mark a sw-req verified" with a copy-pasteable example.
  • Make undeclared-field handling per-project-easy (the crate: case): a documented way to extend a built-in schema type with project fields without forking the schema.

Environment: rivet 0.13.3 (b55a9c6f), aspice + common + stpa schemas, project pulseengine/synth.

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