Skip to content

refactor: remove unreachable scored batch and request states#437

Merged
behinddwalls merged 2 commits into
mainfrom
preetam/remove-scored-states
Jul 24, 2026
Merged

refactor: remove unreachable scored batch and request states#437
behinddwalls merged 2 commits into
mainfrom
preetam/remove-scored-states

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

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.

## 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
behinddwalls marked this pull request as ready for review July 23, 2026 23:17
@behinddwalls
behinddwalls requested review from a team and sbalabanov as code owners July 23, 2026 23:17
@behinddwalls
behinddwalls merged commit 325ee00 into main Jul 24, 2026
15 checks passed
@behinddwalls
behinddwalls deleted the preetam/remove-scored-states branch July 24, 2026 16:27
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.
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