Skip to content

docs(stovepipe): rewrite workflow RFC around poll/ingest/greenness design#275

Merged
behinddwalls merged 1 commit into
mainfrom
preetam/stovepipe-workflow-rfc
Jun 26, 2026
Merged

docs(stovepipe): rewrite workflow RFC around poll/ingest/greenness design#275
behinddwalls merged 1 commit into
mainfrom
preetam/stovepipe-workflow-rfc

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

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.

Test Plan

Issues

Stack

  1. @ docs(stovepipe): rewrite workflow RFC around poll/ingest/greenness design #275
  2. feat(stovepipe): add Request entity, Ingest RPC, and thin ingest controller #276
  3. feat(stovepipe): add storage extension with RequestStore + RequestURIStore (MySQL) #277

…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.
@behinddwalls behinddwalls force-pushed the preetam/stovepipe-workflow-rfc branch from 20b9d7d to 6305146 Compare June 26, 2026 05:24
@behinddwalls behinddwalls marked this pull request as ready for review June 26, 2026 05:25
@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners June 26, 2026 05:25
@behinddwalls behinddwalls merged commit 9f0e678 into main Jun 26, 2026
27 checks passed
@behinddwalls behinddwalls deleted the preetam/stovepipe-workflow-rfc branch June 26, 2026 14:52
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants