feat(example): per-queue extension wiring; retire buildrunner/noop#193
Open
behinddwalls wants to merge 1 commit into
Open
feat(example): per-queue extension wiring; retire buildrunner/noop#193behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
behinddwalls
commented
Jun 4, 2026
| // Trigger records the desired outcome for a new build (decided from a marker | ||
| // token in the head changes) and returns its unique build ID. The base changes | ||
| // and metadata are ignored. | ||
| func (r *runner) Trigger(_ context.Context, _ []entity.Change, head []entity.Change, _ entity.BuildMetadata) (entity.BuildID, error) { |
Collaborator
Author
There was a problem hiding this comment.
what if trigger itself falils
Collaborator
Author
There was a problem hiding this comment.
| // Status returns the outcome recorded for the build at Trigger time. Unknown | ||
| // build IDs default to succeeded, keeping the runner best-case for builds it did | ||
| // not create. | ||
| func (r *runner) Status(_ context.Context, buildID entity.BuildID) (entity.BuildStatus, entity.BuildMetadata, error) { |
Collaborator
Author
There was a problem hiding this comment.
can we make buildID in certain way so we don't have maintain the state and can be just driven by what buildID contains
Collaborator
Author
There was a problem hiding this comment.
Done — the runner is now stateless. Trigger encodes the terminal outcome into the BuildID (e.g. fake-build-fail-7), and Status derives the result purely from the BuildID it's given — the per-build outcome map + mutex are gone, so any runner instance can answer Status for an ID minted by any other (even across controllers/processes). Fixed in #197 (the file moved there after the split).
7c72f1e to
603dcc4
Compare
603dcc4 to
43f3258
Compare
3471964 to
d292387
Compare
43f3258 to
b0be135
Compare
348a546 to
dd07845
Compare
b0be135 to
903c210
Compare
## Summary ### Why? Demonstrate SubmitQueue's core premise — per-queue pluggable extensions — in the example orchestrator, rather than wiring one implementation for every queue, and make the fakes drivable end-to-end. Also document where factory implementations and queue routing belong. Stacked on the fakes PR, which adds the extension/*/fake packages this PR wires in. ### What? - Queue-major registry in example main.go: queueExtensions (one queue's full impl set) + queueRegistry (queue -> profile, with a default). Six thin Factory adapters resolve impls by Config.QueueName — all routing lives here in the wiring layer. - Per-queue profiles: test-queue (heuristic over lines changed), e2e-test-queue (composite scorer, no-conflict), plus a new e2e-conflict-error-queue that always fails conflict analysis. Edge integrations + build runner share a baseline; scorer/analyzer are wrapped by the decorator fakes (score-error marker / failing predicate). - Retire buildrunner/noop (subsumed by buildrunner/fake); switch the build controller unit test to buildfake. - queues.yaml: register e2e-conflict-error-queue. - CLAUDE.md: extensions hold contracts + impls only — factory implementations and routing live in the wiring layer; plus a TODO to evaluate promoting the registry into submitqueue/core later. ## Test Plan - ✅ `make test` — 44/44 unit tests - ✅ `make e2e-test` — 1/1 - ✅ `make integration-test` — 7/7 - ✅ `make check-gazelle` / `make check-tidy` — clean - ✅ Live stack (`make local-submitqueue-start`): Ping OK; gateway rejects unknown queues; validated end-to-end — scorer passthrough (test-queue), scorer error (`?sq-fake=score-error` -> "fake: marked score error"), and conflict error (e2e-conflict-error-queue -> "fake: injected analyze error").
dd07845 to
7b45cdb
Compare
903c210 to
c98548e
Compare
JamyDev
approved these changes
Jun 5, 2026
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?
Demonstrate SubmitQueue's core premise — per-queue pluggable extensions —
in the example orchestrator, rather than wiring one implementation for
every queue, and make the fakes drivable end-to-end. Also document where
factory implementations and queue routing belong.
Stacked on the fakes PR, which adds the extension/*/fake packages this PR
wires in.
What?
full impl set) + queueRegistry (queue -> profile, with a default). Six
thin Factory adapters resolve impls by Config.QueueName — all routing
lives here in the wiring layer.
e2e-test-queue (composite scorer, no-conflict), plus a new
e2e-conflict-error-queue that always fails conflict analysis. Edge
integrations + build runner share a baseline; scorer/analyzer are wrapped
by the decorator fakes (score-error marker / failing predicate).
controller unit test to buildfake.
implementations and routing live in the wiring layer; plus a TODO to
evaluate promoting the registry into submitqueue/core later.
Test Plan
make test— 44/44 unit testsmake e2e-test— 1/1make integration-test— 7/7make check-gazelle/make check-tidy— cleanmake local-submitqueue-start): Ping OK; gateway rejectsunknown queues; validated end-to-end — scorer passthrough (test-queue),
scorer error (
?sq-fake=score-error-> "fake: marked score error"), andconflict error (e2e-conflict-error-queue -> "fake: injected analyze
error").
Stack