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

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
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 519151b to 64e1f19 Compare August 5, 2026 03:15
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 64e1f19 to 65441ce Compare August 5, 2026 03:25
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 65441ce to 37beb52 Compare August 5, 2026 03:37
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 37beb52 to 0e29952 Compare August 5, 2026 03:43
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 0e29952 to cfe0fcf Compare August 5, 2026 04:11
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from cfe0fcf to 7181ddc Compare August 5, 2026 04:57
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 7181ddc to c071dee Compare August 5, 2026 17:05
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from c071dee to 88dc49e Compare August 5, 2026 17:28
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from 88dc49e to b703f0f Compare August 5, 2026 19:05
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from b703f0f to 439428f Compare August 6, 2026 02:15
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch 2 times, most recently from 825087c to a5a33f0 Compare August 6, 2026 03:04
@behinddwalls
behinddwalls force-pushed the preetam/speculation-standard branch from a5a33f0 to dcd477e Compare August 6, 2026 03:17
## 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 dcd477e to 7f0f25a Compare August 6, 2026 03:32
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