Repository navigation
perf: resolve each stored review once per publication gate run - #342
Open
vinceblock99 wants to merge 1 commit into
Open
vinceblock99 wants to merge 1 commit into
vinceblock99 wants to merge 1 commit into
Conversation
For every managed change without an attestation, the publication gate asks whether a stored review covers it. Each of those questions re-read the whole review inventory and then verified and validated the review again, although none of that depends on which change is asking. Validation rebuilds the review's retained source view, so a batch of M changes covered by one review cost M full validations. One gate evaluation now reads the inventory once and resolves each review once: its signature and supersession chain, and its SHACL outcome. Later changes reuse the result. The decision for each change and the limitation text it reports are unchanged: a review that fails still blocks, and explains, every change it covers.
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.
Problem
For every managed change without an attestation, the publication gate asks whether a stored review covers it. Each of those questions re-read the whole review inventory and then verified and validated the review again, although none of that depends on which change is asking.
Validation rebuilds the review's retained source view, so a batch of M changes covered by one review cost M full validations.
Fix
One gate evaluation now reads the inventory once and resolves each review once: its signature and supersession chain, and its SHACL outcome. Later changes reuse the result.
The decision for each change and the limitation text it reports are unchanged. A review that fails still blocks every change it covers, and each of them says why.
Tests
publication_review::tests::gate:cargo test -p atomic-repository --features review-shacl --lib -- publication_review provenance_gate: 64 passed, 0 failed. Without the feature: 22 passed, 0 failed.cargo clippy -p atomic-repository --all-targets -- -D warnings, with and withoutreview-shacl: clean.