feat(stovepipe): add the ValidationFact entity and its create-only queue-scoped store - #552
Merged
Merged
Conversation
…eue-scoped store Facts record how broken a scope was at a commit, keyed by (queue, uri, project) and immutable once written. Nothing writes them yet; the record controller adopts them next.
roychying
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
August 7, 2026 21:55
behinddwalls
reviewed
Aug 7, 2026
behinddwalls
approved these changes
Aug 7, 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.
Why?
recordcurrently derives greenness straight fromrequest.Stateand writes nothing durable beyond the queue's last-green bookmark. The record RFC (#394) calls for an immutable ValidationFact per validated commit — "how broken was this scope at this URI?" — with every decision after the fact is written reading the fact rather than the request.This PR adds the entity, the store contract, and the MySQL implementation.
What?
entity.ValidationFact— identity(queue, uri, project); carriesDegree,RequestID,CreatedAt. PlusDegreeGreen/DegreeBrokenconstants andIsGreen(), so the float comparison lives in one place instead ofDegree == 0at call sites.ValidationFactStore—Create(returnsErrAlreadyExists) andGet(returnsErrNotFound). NoUpdate: facts are create-only and first-writer-wins, so the first fact for an identity is the permanent answer.validation_fact.sql, wired into the queue-scopedStorageaggregate.Test Plan
Issue