Skip to content

refactor: remove speculation machinery#400

Merged
behinddwalls merged 2 commits into
mainfrom
preetam/int/remove-speculation
Jul 20, 2026
Merged

refactor: remove speculation machinery#400
behinddwalls merged 2 commits into
mainfrom
preetam/int/remove-speculation

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The speculation-tree track (RFC, pluggable seams, tree/path entities, tree-driven pipeline) is being abandoned. The queue keeps the naive happy-path speculate controller — it assumes every in-flight build passes and treats batch.Dependencies + [batch.ID] as the single speculation chain — and this change removes everything the speculation project layered onto main around it, so any future speculation design can start from a clean slate.

What?

  • Delete the speculation RFC (doc/rfc/submitqueue/speculation.md) and its doc/rfc/index.md entry.
  • Delete the speculation extension seams under submitqueue/extension/speculation/ (enumerator, dependencylimit, pathscorer, selector, selectionlimit, prioritizer, prioritizationlimit) with their impls, fakes, and mocks, plus their entries in the Makefile mocks target.
  • Delete the SpeculationTree / SpeculationPathBuild entities and their stores: contracts, MySQL impls, schema files, sqlmock unit tests, checked-in gomocks, the Storage interface getters, and the storage integration contract tests.
  • Remove the prioritize stage entirely — controller package, TopicKeyPrioritize, the queue-scoped DLQ re-driver (dlq/queue.go), entity.QueueID, and all orchestrator server wiring (topic row, DLQ row, prioritizerFactory, per-queue sticky prioritizer profile). The stage consumed speculation trees and had no purpose without them; nothing published to it yet.
  • Drop Build.SpeculationPathID from the entity, the build store column list, and the build schema — only tree-driven builds would have written it.
  • The speculate controller itself is untouched: main's version is still the naive one-path impl.

Test Plan

✅ make build — clean. ✅ make test — 74/74 pass. ✅ bazel build //test/e2e/... //test/integration/... — compiles. ✅ make mocks / make gazelle / make fmt — regenerated, only expected churn (storage_mock.go loses the two speculation getters). ✅ make lint / check-tidy / check-gazelle — pass on the committed tree.

Issues

@behinddwalls
behinddwalls marked this pull request as ready for review July 20, 2026 16:57
@behinddwalls
behinddwalls requested review from a team and sbalabanov as code owners July 20, 2026 16:57
## Summary

### Why?

The speculation-tree track (RFC, pluggable seams, tree/path entities, tree-driven pipeline) is being abandoned. The queue keeps the naive happy-path speculate controller — it assumes every in-flight build passes and treats batch.Dependencies + [batch.ID] as the single speculation chain — and this change removes everything the speculation project layered onto main around it, so any future speculation design can start from a clean slate.

### What?

- Delete the speculation RFC (doc/rfc/submitqueue/speculation.md) and its doc/rfc/index.md entry.
- Delete the speculation extension seams under submitqueue/extension/speculation/ (enumerator, dependencylimit, pathscorer, selector, selectionlimit, prioritizer, prioritizationlimit) with their impls, fakes, and mocks, plus their entries in the Makefile mocks target.
- Delete the SpeculationTree / SpeculationPathBuild entities and their stores: contracts, MySQL impls, schema files, sqlmock unit tests, checked-in gomocks, the Storage interface getters, and the storage integration contract tests.
- Remove the prioritize stage entirely — controller package, TopicKeyPrioritize, the queue-scoped DLQ re-driver (dlq/queue.go), entity.QueueID, and all orchestrator server wiring (topic row, DLQ row, prioritizerFactory, per-queue sticky prioritizer profile). The stage consumed speculation trees and had no purpose without them; nothing published to it yet.
- Drop Build.SpeculationPathID from the entity, the build store column list, and the build schema — only tree-driven builds would have written it.
- The speculate controller itself is untouched: main's version is still the naive one-path impl.

## Test Plan

✅ make build — clean. ✅ make test — 74/74 pass. ✅ bazel build //test/e2e/... //test/integration/... — compiles. ✅ make mocks / make gazelle / make fmt — regenerated, only expected churn (storage_mock.go loses the two speculation getters). ✅ make lint / check-tidy / check-gazelle — pass on the committed tree.
@behinddwalls
behinddwalls force-pushed the preetam/int/remove-speculation branch from b0c6156 to 9e0957f Compare July 20, 2026 17:02
actions/checkout released v4.4.0, moving the floating v4 tag off the commit our workflows pin (34e11487 = v4.3.1). zizmor's ref-version-mismatch audit now fails every workflow because the '# v4' comment no longer matches a tag pointing at the pinned SHA. Update the 13 pin comments to the exact tag v4.3.1; the pinned commit itself is unchanged.

Verified locally with zizmor 1.25.2 (the version CI pins): no findings.
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