feat(stovepipe): report last-green freshness - #572
Closed
mnoah1 wants to merge 6 commits into
Closed
Conversation
Callers gate deployments on a queue's last-known-green commit, so its age is the staleness of the newest thing they are allowed to ship. A queue whose green bookmark stops advancing looks healthy from the pipeline's perspective — nothing is failing — while the answer it serves silently ages, and today nothing makes that visible. Add an observability extension seam alongside the existing ones: a Reporter bound to a single queue by its Factory, whose Report emits one sample of that queue's current state. Reporting is best-effort by contract — Report returns nothing, because an observation that cannot be made must never change what the pipeline records or decides — so implementations emit their own error metrics and callers can defer a report without handling a result. The lastgreen implementation reports that age as a gauge, the first in the repo: the answer is the latest observation rather than a distribution, which the platform/metrics guidance now admits alongside a NamedGauge helper. Dating the bookmarked commit needs a timestamp SourceControl did not expose, so ChangeInfo joins that contract, returning immutable metadata about the commit a URI names rather than about the ref that points at it. The record stage, which owns the bookmark, reports after handling each message.
mnoah1
force-pushed
the
mnoah1/stovepipe-lastgreen-freshness
branch
from
August 11, 2026 22:39
b282822 to
029d68a
Compare
mnoah1
marked this pull request as ready for review
August 11, 2026 22:46
mnoah1
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
August 11, 2026 22:46
behinddwalls
requested changes
Aug 12, 2026
The Reporter interface, its Factory, and the lastgreen implementation had one implementation and one caller, and abstracted no technology choice: storage and source control were already extensions, and tally arrives as an injected scope. What remained was domain logic, which moves into the periodicmetrics controller.
Add a periodicmetrics queue stage that emits the age of a queue's last-known-green commit as a gauge. It is the one stage no other stage feeds: the deployment publishes a PeriodicMetrics message on a schedule, because the health it reports degrades while the pipeline is idle and so cannot be observed from pipeline activity alone. A failed observation acks and is counted with the step that failed; only a message violating the payload contract is rejected, so a persistently unresolvable queue cannot fill the dead-letter queue at the publishing rate. record no longer reports, which takes a source-control call off the delivery path of the stage that owns durable validation state.
Contributor
Author
|
Closing - aligned on polling for this internally. |
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.
Summary
Support periodic observations of queue health via a Reporter interface. This can be called as part of other tasks that we know will alter queue state (wired here into the record step), and also triggered separately on a periodic schedule.
SourceControl will provide one extra method to provide the timestamp of the latest green commit - this will give us a real time gauge of how much time has elapsed since the last commit was marked green.
Since this is a real time observation of current state, and not a collection of observations, a histogram does not make sense for this use case - updated docs to clarify when to use gauge vs. histogram.
Test Plan