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

@behinddwalls behinddwalls 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

Issues

Stack

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

Comment thread submitqueue/extension/speculation/speculator/README.md Outdated
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 19ee301 to 8dcd084 Compare July 29, 2026 18:12
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch 2 times, most recently from e8a2e32 to 2d2d88b Compare July 29, 2026 22:31
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 2d2d88b to 75716e5 Compare July 29, 2026 22:41
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 75716e5 to 3ab1bc3 Compare July 29, 2026 23:08
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 3ab1bc3 to 63e838f Compare July 29, 2026 23:18
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 63e838f to 3ea3843 Compare July 29, 2026 23:18
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch 2 times, most recently from a6cdd82 to 3e1c931 Compare July 30, 2026 07:31
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 3e1c931 to 861ba77 Compare July 31, 2026 18:50
## 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`
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 7de9d1f to 519151b Compare August 4, 2026 05:11
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