feat(stovepipe): add the record controller, advancing a queue's last-green bookmark on a successful build - #519
Open
roychying wants to merge 1 commit into
Conversation
roychying
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
August 5, 2026 22:15
…green bookmark on a successful build
roychying
force-pushed
the
chenghan.ying/stovepipe-record-controller
branch
from
August 5, 2026 23:08
72579db to
7f28a45
Compare
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?
buildsignalhas been publishing to therecordtopic already, but nothing consumes it, so the topic accumulates andQueue.LastGreenURIis never set.The visible consequence is cost: with the bookmark permanently empty,
process.deriveBuildStrategyalways returnsBuildStrategyFull, so every validation is a full-repository build even when the delta is one commit.What?
New
stovepipe/controller/record. It consumesRecord{id}, loads the request, and branches on the outcomebuildsignalalready stamped:succeededfailed,cancelledsupersededbuildsignalnever publishes it)The advance is a CAS retry loop mirroring
buildsignal'sreleaseBuildSlot, guarded byCompareRequestID: a candidate that is not strictly newer is skipped without a write, which also makes redelivery of the same request a no-op.Also wires the stage into the example server: the
recordtopic previously had noSubscription, and the controller is now registered alongside the others.One deliberate deviation: greenness is read from
request.Staterather than a persisted validation fact, because the fact store does not exist yet. This will be resolved in follow up PR.Test Plan
Issue