Repository navigation
chore(server): drop the unused SupersedePolicyEvaluations from DatabbaseAPI - #2433
Merged
Merged
Conversation
…seAPI Signed-off-by: Tibor Kircsi <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
adamtagscherer
approved these changes
Oct 30, 2026
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.
Description
Follow-up to #2432.
SupersedePolicyEvaluationswas ontypes.DatabaseAPIand onDBwith no production caller: all six metadata writers call the unexportedsupersedePolicyEvaluationsinside their own transaction, and only tests went through the exported one.It is not merely unused but unusable for the purpose. A caller reaching it through the interface has no transaction to share, so the metadata write and its invalidation would commit separately — the failure #2343 rules out under "atomic with the write". Being on
DatabaseAPIalso meant every fake had to stub it.A reader of
DatabaseAPIwould otherwise have no indication that invalidation happens at all, so the explanation moves to where the behaviour is rather than disappearing: the scan, signature and identity writer interfaces each say that a write changing what a policy can read supersedes that group's verdicts in the same transaction.Changes
SupersedePolicyEvaluationsfromtypes.DatabaseAPIand fromgorm.DB, and thefakeSignatureDBstub it required.supersedePolicyEvaluationswhy it takes a transaction and is not on the interface.SetRecordSigned.Closes #2343