Skip to content

refactor(speculation): move the scorer in with the rest of speculation - #625

Open
behinddwalls wants to merge 1 commit into
mainfrom
preetam/scorer-under-speculation
Open

refactor(speculation): move the scorer in with the rest of speculation#625
behinddwalls wants to merge 1 commit into
mainfrom
preetam/scorer-under-speculation

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The Speculator is composed from a generator, an allocator and a scorer, but only two of the three lived under submitqueue/extension/speculation/. The scorer sat at the top level as if it were a peer of storage or the change provider, which it is not: there is no scoring stage, and nothing outside the speculation generator has ever asked it for a price. The tree implied a seam that does not exist.

What?

submitqueue/extension/scorer/ becomes submitqueue/extension/speculation/scorer/, taking its contract, heuristic, composite, fake and mock with it. Import paths and BUILD files follow; no code changes.

The mocks Makefile target listed the old path explicitly. It is dropped rather than repointed, because the ./submitqueue/extension/speculation/... pattern already on that line now covers it.

Test Plan

bazel test //submitqueue/... //service/... — 53 tests pass
make gazelle — BUILD files regenerated
make mocks — unchanged output from the new path

Stack

  1. @ refactor(speculation): move the scorer in with the rest of speculation #625
  2. feat(speculation): predict a batch's outcome from its scorer price and its builds #626

## Summary

### Why?

The Speculator is composed from a generator, an allocator and a scorer, but only two of the three lived under `submitqueue/extension/speculation/`. The scorer sat at the top level as if it were a peer of storage or the change provider, which it is not: there is no scoring stage, and nothing outside the speculation generator has ever asked it for a price. The tree implied a seam that does not exist.

### What?

`submitqueue/extension/scorer/` becomes `submitqueue/extension/speculation/scorer/`, taking its contract, `heuristic`, `composite`, `fake` and `mock` with it. Import paths and BUILD files follow; no code changes.

The `mocks` Makefile target listed the old path explicitly. It is dropped rather than repointed, because the `./submitqueue/extension/speculation/...` pattern already on that line now covers it.

## Test Plan

✅ `bazel test //submitqueue/... //service/...` — 53 tests pass
✅ `make gazelle` — BUILD files regenerated
✅ `make mocks` — unchanged output from the new path
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.

1 participant