docs(stovepipe): rewrite workflow RFC around poll/ingest/greenness design#275
Merged
Conversation
…sign ## Summary ### Why? The previous workflow RFC described a webhook+poller, SHA-keyed, batch/bisection-heavy pipeline. The design has since moved to a poller-driven, VCS-agnostic model that records a greenness *degree* per commit and refines it to per-project granularity for deployment gating. The doc needed a full rewrite to reflect the design as it now stands rather than a delta. ### What? Rewrites `doc/rfc/stovepipe/workflow.md` as a self-contained design: - VCS-agnostic identity: every commit/ref/head is an opaque URI owned by a `SourceControl` extension (`git://remote/repo/ref/…/<sha>`); the build system sits behind the build-runner extension and yields a target graph. - `Queue` is the validation namespace (a named repo+ref) that namespaces Request IDs, is the ingest handle, and owns the last-green URI + greenness history — distinct from the messaging queue. - Greenness is a degree (`0` green … `1` fully broken) with room for partial breakage once projects exist; "not recorded" is not-green for gating. - Two-phase pipeline: ingest → process → build → buildsignal → record (whole-repo greenness), then analyze → build → buildsignal → record (per-project greenness). `record` is re-entrant and non-terminal; `process` decides incremental-since-green vs full-monorepo via SourceControl ancestry (history-rewrite fallback). - `Hooks` extension is the downstream notification boundary for green/not-green events. - Carries over the fail-closed-to-not-green posture (DLQ reconciliation) and dedup on `(Queue, head URI)`. - Ends with Open Questions: greenness degree semantics, webhook ingestion, project-mapping contract.
20b9d7d to
6305146
Compare
roychying
approved these changes
Jun 26, 2026
behinddwalls
added a commit
that referenced
this pull request
Jun 26, 2026
…roller (#276) ## Summary ### Why? The Stovepipe workflow RFC (PR #275, this PR's base) describes a pipeline whose entry point is **ingest**: an external poller reports that a queue (a named repo+ref) has a new commit, and Stovepipe mints a request to validate it. This PR lays the first foundation stones — the domain model and the entry RPC — as a deliberately thin, log-only slice. ### What? Three stacked commits: - **`Request` entity** (`stovepipe/entity`) — one validation of a queue at a particular commit: ID namespaced by the queue (`"request/<queue>/<counter>"`), queue name, opaque VCS-agnostic commit `URI` (empty until SourceControl resolution lands), `RequestState` (initial state `accepted`), and `Version` for optimistic locking; with `ToBytes`/`FromBytes` and a lightweight `RequestID`. - **`Ingest` RPC** (`api/stovepipe`) — `Ingest(IngestRequest{queue}) returns (IngestResponse{id})` added to the single-service Stovepipe proto; only the queue name is on the wire (commit-URI resolution via SourceControl is a follow-up). Includes regenerated protopb stubs. - **Thin `IngestController`** (`stovepipe/controller`) — validates the queue, mints the ID via the counter extension, builds + logs the `Request` (state `accepted`), returns the ID. No storage, publish, or SourceControl yet. Wired into the example server behind a minimal in-process counter. Greenness is intentionally **not** modeled here: the RFC treats it as a continuous degree (e.g. a fraction of projects broken), which an enum cannot represent, and nothing in this slice consumes it. It will be introduced with the `record`/project-analysis stage. Other explicit follow-ups: SourceControl extension + commit-URI resolution; storage + persistence; publishing onto the `process` topic; the stateful Queue entity. ## Test Plan - ✅ `bazel test //stovepipe/...` — `//stovepipe/entity` and `//stovepipe/controller` tests pass (serialization round-trips; ingest happy path / empty-queue user error / counter-error classification). - ✅ `make proto` regenerates only the stovepipe stubs; `make lint`, `make check-gazelle`, `make check-tidy` clean. - ✅ `bazel build //example/stovepipe/...` builds the wired server. ## Issues ## Stack 1. @ #276 1. #277 1. #278 1. #279
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
Why?
The previous workflow RFC described a webhook+poller, SHA-keyed, batch/bisection-heavy pipeline. The design has since moved to a poller-driven, VCS-agnostic model that records a greenness degree per commit and refines it to per-project granularity for deployment gating. The doc needed a full rewrite to reflect the design as it now stands rather than a delta.
What?
Rewrites
doc/rfc/stovepipe/workflow.mdas a self-contained design:SourceControlextension (git://remote/repo/ref/…/<sha>); the build system sits behind the build-runner extension and yields a target graph.Queueis the validation namespace (a named repo+ref) that namespaces Request IDs, is the ingest handle, and owns the last-green URI + greenness history — distinct from the messaging queue.0green …1fully broken) with room for partial breakage once projects exist; "not recorded" is not-green for gating.recordis re-entrant and non-terminal;processdecides incremental-since-green vs full-monorepo via SourceControl ancestry (history-rewrite fallback).Hooksextension is the downstream notification boundary for green/not-green events.(Queue, head URI).Test Plan
Issues
Stack