refactor: remove unreachable scored batch and request states#437
Merged
Conversation
## Summary ### Why? The dedicated score stage was removed in #435, so nothing transitions a batch into `BatchStateScored` or emits the `RequestStatusScored` request-log status anymore. They are now dead, unreachable states — the speculate controller only kept accepting `BatchStateScored` defensively for a producer that no longer exists. ### What? Removed the `BatchStateScored` and `RequestStatusScored` enum values. - `entity/batch.go`: dropped the const and its entries in `ActiveBatchStates()` and `DependencyBatchStates()`. - `entity/request_log.go`: dropped the `RequestStatusScored` const. - `speculate` controller: `startSpeculation` now switches on `BatchStateCreated` only (dropped the unreachable `BatchStateScored` case); doc comment updated to match. - Tests: dropped the speculate `from_scored` case and switched the `RequestStatusScored` sample-data usages in the request-log tests to `RequestStatusBatched`. ## Test Plan ✅ `make test` — all unit tests pass; no remaining `BatchStateScored` / `RequestStatusScored` references. Not run locally: integration and e2e (need Docker), and `//submitqueue/extension/pusher/git` (pre-existing macOS OpenSSL link issue unrelated to this change) — CI covers these on Linux.
behinddwalls
marked this pull request as ready for review
July 23, 2026 23:17
ubettigole
approved these changes
Jul 23, 2026
behinddwalls
temporarily deployed
to
stack-rebase
July 24, 2026 16:26 — with
GitHub Actions
Inactive
JamyDev
pushed a commit
that referenced
this pull request
Jul 24, 2026
## Summary ### Why? The dedicated score stage was removed in #435, so nothing transitions a batch into `BatchStateScored` or emits the `RequestStatusScored` request-log status anymore. They are now dead, unreachable states — the speculate controller only kept accepting `BatchStateScored` defensively for a producer that no longer exists. ### What? Removed the `BatchStateScored` and `RequestStatusScored` enum values. - `entity/batch.go`: dropped the const and its entries in `ActiveBatchStates()` and `DependencyBatchStates()`. - `entity/request_log.go`: dropped the `RequestStatusScored` const. - `speculate` controller: `startSpeculation` now switches on `BatchStateCreated` only (dropped the unreachable `BatchStateScored` case); doc comment updated to match. - Tests: dropped the speculate `from_scored` case and switched the `RequestStatusScored` sample-data usages in the request-log tests to `RequestStatusBatched`. ## Test Plan ✅ `make test` — all unit tests pass; no remaining `BatchStateScored` / `RequestStatusScored` references. Not run locally: integration and e2e (need Docker), and `//submitqueue/extension/pusher/git` (pre-existing macOS OpenSSL link issue unrelated to this change) — CI covers these on Linux.
JamyDev
pushed a commit
that referenced
this pull request
Jul 24, 2026
## Summary ### Why? The dedicated score stage was removed in #435, so nothing transitions a batch into `BatchStateScored` or emits the `RequestStatusScored` request-log status anymore. They are now dead, unreachable states — the speculate controller only kept accepting `BatchStateScored` defensively for a producer that no longer exists. ### What? Removed the `BatchStateScored` and `RequestStatusScored` enum values. - `entity/batch.go`: dropped the const and its entries in `ActiveBatchStates()` and `DependencyBatchStates()`. - `entity/request_log.go`: dropped the `RequestStatusScored` const. - `speculate` controller: `startSpeculation` now switches on `BatchStateCreated` only (dropped the unreachable `BatchStateScored` case); doc comment updated to match. - Tests: dropped the speculate `from_scored` case and switched the `RequestStatusScored` sample-data usages in the request-log tests to `RequestStatusBatched`. ## Test Plan ✅ `make test` — all unit tests pass; no remaining `BatchStateScored` / `RequestStatusScored` references. Not run locally: integration and e2e (need Docker), and `//submitqueue/extension/pusher/git` (pre-existing macOS OpenSSL link issue unrelated to this change) — CI covers these on Linux.
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 dedicated score stage was removed in #435, so nothing transitions a batch into
BatchStateScoredor emits theRequestStatusScoredrequest-log status anymore. They are now dead, unreachable states — the speculate controller only kept acceptingBatchStateScoreddefensively for a producer that no longer exists.What?
Removed the
BatchStateScoredandRequestStatusScoredenum values.entity/batch.go: dropped the const and its entries inActiveBatchStates()andDependencyBatchStates().entity/request_log.go: dropped theRequestStatusScoredconst.speculatecontroller:startSpeculationnow switches onBatchStateCreatedonly (dropped the unreachableBatchStateScoredcase); doc comment updated to match.from_scoredcase and switched theRequestStatusScoredsample-data usages in the request-log tests toRequestStatusBatched.Test Plan
✅
make test— all unit tests pass; no remainingBatchStateScored/RequestStatusScoredreferences.Not run locally: integration and e2e (need Docker), and
//submitqueue/extension/pusher/git(pre-existing macOS OpenSSL link issue unrelated to this change) — CI covers these on Linux.