feat(speculation): add parity default impls for the speculation seams#332
Open
behinddwalls wants to merge 1 commit into
Open
feat(speculation): add parity default impls for the speculation seams#332behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
This was referenced Jul 10, 2026
## Summary
### Why?
The speculation seam contracts (enumerator, selector, prioritizer, limits) have no real implementations yet — only mocks and programmable fakes. Integrating the seams into the orchestrator needs defaults that reproduce the existing single-chain behavior exactly (one speculative path per batch: the full dependency chain, promoted and admitted unconditionally), so the pipeline can switch to tree-driven speculation with zero behavior change and the e2e suite staying green. The path scorer — the one seam with a real model rather than a parity stub — is split into its own follow-up change for focused review.
### What?
Five impl packages under `submitqueue/extension/speculation/`, each a plain `New(...)` constructor returning the contract interface (no factories, no queue routing — that stays in wiring):
- `enumerator/chain` — one path per batch: `{Base: deps in order, Head: batch}`; structure only, controller stamps status.
- `selector/all` — promotes every candidate path.
- `prioritizer/sticky` — sticky slots: running/prioritized paths hold their slot, top-scored selected paths fill free budget, never preempts; deterministic tie-break for stable rounds.
- `dependencylimit/static`, `prioritizationlimit/static` — fixed limits injected at construction.
## Test Plan
✅ `make gazelle && make fmt && bazel test //submitqueue/extension/speculation/...`. Unit coverage: chain ordering (incl. empty deps), candidate-only selection, sticky budget accounting (running paths consume slots, zero-free floor, tie-break determinism across permutations), static limit passthrough.
2551cf4 to
bbc4956
Compare
e32cca4 to
71ed933
Compare
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?
The speculation seam contracts (enumerator, selector, prioritizer, limits) have no real implementations yet — only mocks and programmable fakes. Integrating the seams into the orchestrator needs defaults that reproduce the existing single-chain behavior exactly (one speculative path per batch: the full dependency chain, promoted and admitted unconditionally), so the pipeline can switch to tree-driven speculation with zero behavior change and the e2e suite staying green. The path scorer — the one seam with a real model rather than a parity stub — is split into its own follow-up change for focused review.
What?
Five impl packages under
submitqueue/extension/speculation/, each a plainNew(...)constructor returning the contract interface (no factories, no queue routing — that stays in wiring):enumerator/chain— one path per batch:{Base: deps in order, Head: batch}; structure only, controller stamps status.selector/all— promotes every candidate path.prioritizer/sticky— sticky slots: running/prioritized paths hold their slot, top-scored selected paths fill free budget, never preempts; deterministic tie-break for stable rounds.dependencylimit/static,prioritizationlimit/static— fixed limits injected at construction.Test Plan
✅
make gazelle && make fmt && bazel test //submitqueue/extension/speculation/.... Unit coverage: chain ordering (incl. empty deps), candidate-only selection, sticky budget accounting (running paths consume slots, zero-free floor, tie-break determinism across permutations), static limit passthrough.Issues
Stack