Skip to content

feat(speculation): standard composed speculator - #451

Open
behinddwalls wants to merge 1 commit into
preetam/speculation-allocatorfrom
preetam/speculation-standard
Open

feat(speculation): standard composed speculator#451
behinddwalls wants to merge 1 commit into
preetam/speculation-allocatorfrom
preetam/speculation-standard

Conversation

@behinddwalls

@behinddwallsbehinddwalls commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The Generator ranks and the Allocator spends; something must compose them into the Speculator extension the orchestrator calls.

What?

Adds speculator/standard. It funds the queue's most promising paths first until the build budget is spent: candidates considered in descending likelihood, in-flight paths kept funded rather than restarted, finished paths never re-proposed. Pairing bestfirst with sticky yields the default speculation policy; changing either behavior means swapping a part, not writing a new Speculator.

standard adds no cancellation handling of its own and inherits it from the two parts; a test pins that a cancelled run yields the context error and no actions. Behavior is documented in standard/README.md; the speculator README keeps only the extension contract.

Test Plan

bazel test //submitqueue/extension/speculation/...

make fmt, make gazelle, make mocks

Stack

  1. docs(rfc): explain best-first speculation generation #513
  2. feat(speculation): generator contract and bestfirst impl #446
  3. feat(speculation): allocator contract and sticky impl #450
  4. @ feat(speculation): standard composed speculator #451
  5. feat(storage): speculation path set store #501
  6. feat(storage): path-build link store for per-path builds #502
  7. feat(orchestrator): dispatch builds per speculation path #503
  8. feat(orchestrator): poll builds and stop the ones nothing wants #504
  9. fix(orchestrator): mint distinct message IDs for cancel re-publishes #505
  10. feat(orchestrator): re-plan the queue from the Speculator each run #506
  11. feat(orchestrator)!: finalize batches from their speculation paths #507
  12. feat(orchestrator): compose per-queue speculators and turn speculation on #508

Comment threadsubmitqueue/extension/speculation/speculator/README.md Outdated
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 19ee301 to 8dcd084CompareJuly 29, 2026 18:12
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch 2 times, most recently from e8a2e32 to 2d2d88bCompareJuly 29, 2026 22:31
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 2d2d88b to 75716e5CompareJuly 29, 2026 22:41
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 75716e5 to 3ab1bc3CompareJuly 29, 2026 23:08
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 3ab1bc3 to 63e838fCompareJuly 29, 2026 23:18
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 63e838f to 3ea3843CompareJuly 29, 2026 23:18
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch 2 times, most recently from a6cdd82 to 3e1c931CompareJuly 30, 2026 07:31
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 3e1c931 to 861ba77CompareJuly 31, 2026 18:50
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch 2 times, most recently from 42d85d6 to 7ef0d5fCompareAugust 3, 2026 23:03
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 7ef0d5f to 7de9d1fCompareAugust 4, 2026 01:58
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 7de9d1f to 519151bCompareAugust 4, 2026 05:11
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 519151b to 64e1f19CompareAugust 5, 2026 03:15
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 64e1f19 to 65441ceCompareAugust 5, 2026 03:25
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 65441ce to 37beb52CompareAugust 5, 2026 03:37
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 37beb52 to 0e29952CompareAugust 5, 2026 03:43
@behinddwalls
behinddwallsforce-pushed the preetam/speculation-standard branch from 0e29952 to cfe0fcfCompareAugust 5, 2026 04:11
## Summary
### Why?
The Generator ranks and the Allocator spends; something must compose them into the Speculator extension the orchestrator calls.
### What?
Adds `speculator/standard`. It funds the queue's most promising paths first until the build budget is spent: candidates considered in descending likelihood, in-flight paths kept funded rather than restarted, finished paths never re-proposed. Pairing bestfirst with sticky yields the default speculation policy; changing either behavior means swapping a part, not writing a new Speculator.
standard adds no cancellation handling of its own and inherits it from the two parts; a test pins that a cancelled run yields the context error and no actions. Behavior is documented in `standard/README.md`; the speculator README keeps only the extension contract.
## Test Plan
✅ `bazel test //submitqueue/extension/speculation/...`
✅ `make fmt`, `make gazelle`, `make mocks`
Sign up for freeto 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

@behinddwalls@sbalabanov