Skip to content

feat(stovepipe): add request and request-log entity stores#269

Closed
behinddwalls wants to merge 2 commits into
mainfrom
preetam/ingest_entity_store
Closed

feat(stovepipe): add request and request-log entity stores#269
behinddwalls wants to merge 2 commits into
mainfrom
preetam/ingest_entity_store

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Summary

Why?

Stovepipe needs a persistence layer to track trunk-validation requests, mirroring SubmitQueue's two-store split by service ownership. Until now Stovepipe only had the IngestRequest queue payload and no entity stores, so the orchestrator forwarded full payloads and nothing recorded request state or customer-facing status.

What?

Adds the foundational entities and storage interfaces (plus a MySQL implementation and mocks), mirroring the SubmitQueue pattern. Identity stays the synthetic SPID ({queue}/{counter}) and everything is modeled as request + change + URIs — there is no SHA/commit entity.

  • stovepipe/entity: Request (orchestrator-owned state machine with State/Version), the RequestState enum, a thin RequestID queue payload, and an append-only RequestLog with a customer-facing RequestStatus. The existing IngestRequest stays as the gateway-to-orchestrator payload.
  • stovepipe/extension/storage: a Storage factory plus RequestStore (orchestrator-owned) and RequestLogStore (gateway-owned) interfaces, shared error sentinels, and //go:generate mockgen directives.
  • stovepipe/extension/storage/mysql: a MySQL-backed implementation with optimistic-locking conditional writes and request / request_log schemas.
  • stovepipe/extension/storage/mock: generated gomock mocks; the Makefile mocks target now includes the Stovepipe storage path.

Wiring the stores into controllers and example servers is a deliberate follow-up.

This also includes the regenerated api/submitqueue/gateway/protopb/gateway.pb.yarpc.go descriptor closure — a leftover regeneration from the already-merged PROMOTE merge-strategy change, since the gateway yarpc file embeds the transitive mergestrategy descriptor.

Test Plan

  • bazel test //stovepipe/... — all targets pass
  • make fmt, make lint-license, make gazelle — clean / idempotent
  • make proto reproduces the committed descriptors

Test Plan

Issues

Stack

  1. @ feat(stovepipe): add request and request-log entity stores #269
  2. feat(stovepipe): wire gateway Ingest to the request log #270

behinddwalls and others added 2 commits June 22, 2026 14:37
## Summary

### Why?

Stovepipe promotes an already-verified commit onto a verified branch (e.g. `verified/main`) as-is. The existing `REBASE`/`SQUASH_REBASE`/`MERGE` strategies cannot express this — they all transform the change and produce new revisions. We need a shared, VCS-neutral way for a client to ask Runway to advance a branch to an already-existing commit.

### What?

Adds `PROMOTE` (= 4) to the shared `Strategy` enum in `api/base/mergestrategy` and the matching `MergeStrategyPromote` Go entity constant in `platform/base/mergestrategy`. `PROMOTE` means "integrate the exact revision as-is, with no content transform": each backend realizes it natively (git fast-forward, Mercurial bookmark advance, Subversion/Perforce copy), so a step's output revision is the same commit the request named rather than a freshly created one. The Runway merge-queue contract README gains a "Merge strategy" section documenting the semantics.

This is contract + docs only — no producer or consumer wiring is added yet.

## Test Plan

✅ `make proto` (regenerated `api/base/mergestrategy/protopb`)
✅ `bazel build //api/base/mergestrategy/protopb //platform/base/mergestrategy`

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

### Why?

Stovepipe needs a persistence layer to track trunk-validation requests, mirroring SubmitQueue's two-store split by service ownership. Until now Stovepipe only had the `IngestRequest` queue payload and no entity stores, so the orchestrator forwarded full payloads and nothing recorded request state or customer-facing status.

### What?

Adds the foundational entities and storage interfaces (plus a MySQL implementation and mocks), mirroring the SubmitQueue pattern. Identity stays the synthetic SPID (`{queue}/{counter}`) and everything is modeled as request + change + URIs — there is no SHA/commit entity.

- `stovepipe/entity`: `Request` (orchestrator-owned state machine with `State`/`Version`), the `RequestState` enum, a thin `RequestID` queue payload, and an append-only `RequestLog` with a customer-facing `RequestStatus`. The existing `IngestRequest` stays as the gateway-to-orchestrator payload.
- `stovepipe/extension/storage`: a `Storage` factory plus `RequestStore` (orchestrator-owned) and `RequestLogStore` (gateway-owned) interfaces, shared error sentinels, and `//go:generate` mockgen directives.
- `stovepipe/extension/storage/mysql`: a MySQL-backed implementation with optimistic-locking conditional writes and `request` / `request_log` schemas.
- `stovepipe/extension/storage/mock`: generated gomock mocks; the Makefile `mocks` target now includes the Stovepipe storage path.

Wiring the stores into controllers and example servers is a deliberate follow-up.

This also includes the regenerated `api/submitqueue/gateway/protopb/gateway.pb.yarpc.go` descriptor closure — a leftover regeneration from the already-merged PROMOTE merge-strategy change, since the gateway yarpc file embeds the transitive mergestrategy descriptor.

## Test Plan

- `bazel test //stovepipe/...` — all targets pass
- `make fmt`, `make lint-license`, `make gazelle` — clean / idempotent
- `make proto` reproduces the committed descriptors
@behinddwalls

Copy link
Copy Markdown
Collaborator Author

Duplicate of #267, which is already merged into main (same branch preetam/ingest_entity_store). arh re-published this when the original PR's branch was no longer associated with an open PR. Closing as redundant.

@behinddwalls behinddwalls deleted the preetam/ingest_entity_store branch June 24, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant