Skip to content

feat(traceability): preserve verification result provenance - #3088

Open
LunaMeerkats wants to merge 1 commit into
strictdoc-project:mainfrom
LunaMeerkats:test/2232-verification-result-provenance
Open

LunaMeerkats wants to merge 1 commit into
strictdoc-project:mainfrom
LunaMeerkats:test/2232-verification-result-provenance

Conversation

@LunaMeerkats

Copy link
Copy Markdown
Contributor

This adds a narrow traceability query that preserves where verification results came from. It is a foundation for #2232, without choosing result aggregation or presentation semantics yet.

The new VerificationResultProvenance record keeps the requirement actually verified, an optional generated test case, and the raw result node. TraceabilityIndex.get_verification_result_provenance() follows the two graph shapes StrictDoc already creates:

  • IS_SATISFIED_BY for a direct requirement-to-result link;
  • IS_VERIFIED_BY followed by HAS_RESULT for a generated test-case link.

The query also traverses ordinary requirement hierarchy in deterministic order. This lets a consumer distinguish a result attached to the selected requirement from one attached to a descendant. It deliberately does not normalize producer-specific statuses, mutate a requirement's own STATUS, aggregate pass/fail state, or add HTML indicators.

The integration fixture builds the real SDoc, C++, and CTest/JUnit graph. It covers direct and mediated links, a two-level requirement hierarchy, exact ordering, duplicate prevention, raw failed-result preservation, and unchanged requirement statuses.

Validation:

  • invoke test-integration --focus verification_result_provenance --no-parallelization
  • invoke test-unit --path tests/unit/strictdoc/core/test_traceability_index.py
  • targeted Ruff format and lint checks
  • invoke lint-mypy
  • invoke lint-commit

@stanislaw
stanislaw marked this pull request as ready for review August 11, 2026 06:34
@LunaMeerkats

Copy link
Copy Markdown
Contributor Author

Main has moved through 0.28.1 since this opened, and GitHub now reports conflicts in traceability_index.py and the release notes. I checked current main: no equivalent provenance query has landed, and the graph APIs used by this change are still present. Resolving the conflicts requires a one-commit rebase that combines the import changes and moves the note into the current Unreleased section.

I do not rewrite published branch history. I can open a replacement PR from current main; a maintainer would then need to close this one. Please confirm if you want me to take that route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant