Skip to content

feat(platform): add pipeline.Construct engine - #403

Open
JamyDev wants to merge 4 commits into
mainfrom
jamy/platform-pipeline
Open

feat(platform): add pipeline.Construct engine#403
JamyDev wants to merge 4 commits into
mainfrom
jamy/platform-pipeline

Conversation

@JamyDev

@JamyDev JamyDev commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduces platform/pipeline with the typed Construct[D] engine
  • Stage[D] struct declares pipeline topology as a typed table (key, name, consumer group, controller constructor, optional DLQ)
  • Engine builds topic registry, creates primary + DLQ consumers, eagerly constructs all controllers, pairs DLQ stages automatically
  • Returns a lifecycle.Component for ordered start/stop
  • Options: TopicNames, Classifiers, PublishOnly, ExtraComponents
  • Pure addition — no existing code changes

Step 2 of the Modular Queue Wiring RFC. Stacked on #402.

Test plan

  • 10 unit tests: single stage, DLQ pairing, multiple stages, empty stages error, controller creation failure, DLQ creation failure, publish-only topics, topic name overrides, resolveTopicName table test, dlqTopicKey, buildTopicConfigs
  • bazel test //platform/pipeline:go_default_test passes
  • make gazelle — BUILD.bazel in sync
  • make fmt — code formatted

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Issues

https://linear.app/uber/issue/CODEM-209/example-figure-out-a-better-structure-for-wiring-up

Stack

Comment thread platform/pipeline/pipeline.go Outdated
Comment thread platform/pipeline/pipeline.go Outdated
@JamyDev
JamyDev force-pushed the jamy/platform-pipeline branch from 2f0f1bc to 4d99045 Compare July 30, 2026 05:44
@JamyDev
JamyDev added this pull request to the merge queue Jul 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to invalid changes in the merge commit Jul 30, 2026
Base automatically changed from jamy/platform-lifecycle to main July 30, 2026 06:06
JamyDev and others added 2 commits July 29, 2026 23:06
## Summary

- Introduces `platform/pipeline` with the typed `Construct[D]` engine
- `Stage[D]` struct declares pipeline topology as a typed table (key, name, consumer group, controller constructor, optional DLQ)
- Engine builds topic registry, creates primary + DLQ consumers, eagerly constructs all controllers, pairs DLQ stages automatically
- Returns a `lifecycle.Component` for ordered start/stop
- Options: `TopicNames`, `Classifiers`, `PublishOnly`, `ExtraComponents`
- Pure addition — no existing code changes

Step 2 of the [Modular Queue Wiring RFC](https://github.com/uber/submitqueue/blob/main/doc/rfc/submitqueue/modular-queue-wiring.md). Stacked on #402.

## Test plan

- [x] 10 unit tests: single stage, DLQ pairing, multiple stages, empty stages error, controller creation failure, DLQ creation failure, publish-only topics, topic name overrides, resolveTopicName table test, dlqTopicKey, buildTopicConfigs
- [x] `bazel test //platform/pipeline:go_default_test` passes
- [x] `make gazelle` — BUILD.bazel in sync
- [x] `make fmt` — code formatted

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass engine-produced values (TopicRegistry, TopicKey, ConsumerGroup)
to Stage.New and Stage.DLQ via StageContext. Controllers need the
registry for publishing to downstream stages and the topic key/group
for their own identity — these are engine-owned, not host-provided
Deps.

DLQ StageContext automatically derives the DLQ topic key (appending
"_dlq") and consumer group (appending "-dlq") from the primary
stage's values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JamyDev and others added 2 commits July 29, 2026 23:06
Address review feedback:
- ConsumerGroup is now documented as service-wide (e.g. "orchestrator"),
  not per-stage (e.g. "orchestrator-start").
- DLQ handler is now required on every stage — the queue infrastructure
  always creates a DLQ topic, so not processing it silently accumulates
  messages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass the consumer gate through to both primary and DLQ consumers.
Defaults to noop gate when not set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JamyDev
JamyDev force-pushed the jamy/platform-pipeline branch from 4d99045 to 4ba94aa Compare July 30, 2026 06:06
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.

2 participants