feat(traceability): preserve verification result provenance - #3088
Open
LunaMeerkats wants to merge 1 commit into
Open
LunaMeerkats wants to merge 1 commit into
LunaMeerkats wants to merge 1 commit into
Conversation
stanislaw
marked this pull request as ready for review
August 11, 2026 06:34
Contributor
Author
|
Main has moved through 0.28.1 since this opened, and GitHub now reports conflicts in 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
VerificationResultProvenancerecord 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_BYfor a direct requirement-to-result link;IS_VERIFIED_BYfollowed byHAS_RESULTfor 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-parallelizationinvoke test-unit --path tests/unit/strictdoc/core/test_traceability_index.pyinvoke lint-mypyinvoke lint-commit