Uh oh!
There was an error while loading. Please reload this page.
feat(orchestrator): compose per-queue speculators and turn speculation on - #508
Open
behinddwalls wants to merge 1 commit into
Open
feat(orchestrator): compose per-queue speculators and turn speculation on#508behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
behinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 4, 2026 04:46
628e4f8 to
74850fdComparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
from
August 4, 2026 04:46
dfb687a to
2b97a64Comparebehinddwalls
marked this pull request as ready for review
August 4, 2026 04:47
This was referenced Aug 4, 2026
behinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 4, 2026 05:11
74850fd to
b3d4549Comparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
2 times, most recently
from
August 5, 2026 03:15
93573ae to
1492c63Comparebehinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 5, 2026 03:15
b3d4549 to
2eaab0eComparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
from
August 5, 2026 03:26
1492c63 to
23b4741Comparebehinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 5, 2026 03:26
2eaab0e to
563a58dComparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
from
August 5, 2026 03:38
23b4741 to
88bb6b3Comparebehinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 5, 2026 03:38
563a58d to
98c0912Comparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
from
August 5, 2026 03:44
88bb6b3 to
d9beb4dComparebehinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 5, 2026 03:44
98c0912 to
bc71c77Comparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
from
August 5, 2026 04:12
d9beb4d to
42b8e81Comparebehinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 5, 2026 04:12
bc71c77 to
e8fdda1Compare…n on ## Summary ### Why? Everything below this commit landed inert: the orchestrator passed the speculate run a placeholder that proposes nothing, so no path was ever funded and no speculative build started. The machinery is all reviewed; nothing configures it per queue or switches it on. ### What? This is the activation switch. Per-queue profiles gain a `Scorer` and a `Speculator`: each queue's speculator is composed from its own scorer as `standard.New(bestfirst.New(scorer), sticky.New(budget))`, with a factory adapter beside the existing ones so routing stays in the wiring layer, and `main.go` swaps the placeholder for `profiles.SpeculatorFactory()`. The scorer profiles are the policy knobs: the baseline scores everything 0.5, test-queue buckets by lines changed, and e2e-test-queue exercises the composite scorer. Every scorer is wrapped by `scorerfake` so a change URI carrying a failure marker forces a scoring error end-to-end. The build budget is a wiring-level constant (4 concurrent builds per queue) with a TODO to move it onto `entity.QueueConfig`. With this commit, paths are funded, builds run per path, and batches finalize from their paths — the whole stack goes live in one revertable step. ## Test Plan ✅ `bazel build //...`, `make fmt`, `make gazelle` ✅ `make e2e-test` — the full pipeline lands changes end-to-end with per-path speculation on.
behinddwallsforce-pushed
the
preetam/speculation-wiring
branch
from
August 5, 2026 04:57
e8fdda1 to
00a94c1Comparebehinddwallsforce-pushed
the
preetam/speculation-finalization
branch
from
August 5, 2026 04:57
42b8e81 to
26ae2d9Compare
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 freeto 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?
Everything below this commit landed inert: the orchestrator passed the speculate run a placeholder that proposes nothing, so no path was ever funded and no speculative build started. The machinery is all reviewed; nothing configures it per queue or switches it on.
What?
This is the activation switch. Per-queue profiles gain a
Scorerand aSpeculator: each queue's speculator is composed from its own scorer asstandard.New(bestfirst.New(scorer), sticky.New(budget)), with a factory adapter beside the existing ones so routing stays in the wiring layer, andmain.goswaps the placeholder forprofiles.SpeculatorFactory().The scorer profiles are the policy knobs: the baseline scores everything 0.5, test-queue buckets by lines changed, and e2e-test-queue exercises the composite scorer. Every scorer is wrapped by
scorerfakeso a change URI carrying a failure marker forces a scoring error end-to-end. The build budget is a wiring-level constant (4 concurrent builds per queue) with a TODO to move it ontoentity.QueueConfig.With this commit, paths are funded, builds run per path, and batches finalize from their paths — the whole stack goes live in one revertable step.
Test Plan
✅
bazel build //...,make fmt,make gazelle✅
make e2e-test— the full pipeline lands changes end-to-end with per-path speculation on.Stack