Repository navigation
feat(server): supersede cached verdicts when record metadata changes - #2431
Merged
Merged
Conversation
Signed-off-by: Tibor Kircsi <[email protected]>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…nged Signed-off-by: Tibor Kircsi <[email protected]>
csirmazbendeguz
approved these changes
Oct 29, 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.
Part of #2343. Does not close it: the "and only those" criterion needs scoping by fact group, which follows in a second PR.
A verdict is reached on the metadata as it stood, and nothing marked it stale when that metadata moved. A scan completing or a signature failing left the old verdict being served as current. Now the write that changes the metadata supersedes the record's verdicts in the same transaction, so the record is withheld until it has been evaluated again rather than served on evidence that moved.
Both read paths already key off
EvaluatedPolicyStatuses, so the newsupersededstatus needs no query changes: the gate stops serving the record because it requires a verdict in that set, and the reconciler re-selects it because it selects records without one.Only effective changes count. The reconciler re-reports the same scan result and re-asserts the same claim on every pass, and invalidating on each would leave the verdict table never settling. The comparison covers exactly the fields
server/policy/meta.goprojects, excluding the timestamps: those record when the node last looked rather than what it concluded, andGetRecordsNeedingScanbounds onscan_reports.updated_atto schedule rescans, so they cannot be frozen instead.Six writers, two of which were not in the issue's list of five:
UpdateSignatureVerification, which marks a signer failed once it stops appearing in a verification run, andDeleteIdentityClaim, where a fact changes by a row disappearing rather than changing.Docs: a new "When a Record's Metadata Changes" section, sibling to the existing explanation of what a policy edit does to verdicts.