feat(speculation): add best-first speculation path generator - #516
Draft
sbalabanov wants to merge 1 commit into
Draft
feat(speculation): add best-first speculation path generator#516sbalabanov wants to merge 1 commit into
sbalabanov wants to merge 1 commit into
Conversation
Implements the Generator seam of the standard Speculator (see doc/rfc/submitqueue/speculation.md): a pull-based stream of candidate speculation paths over one queue snapshot, consumed by the Allocator. - generator: the Generator/PathIterator contract — lazy, snapshot-scoped, ctx-aborted; candidates never repeat and never contradict resolved facts. - generator/bestfirst: prices every path by the probability that all of its dependency assumptions hold — resolved deps pinned as facts, Merging/Cancelling priced as modal certainties, undecided deps scored via the injected scorer (once per batch per run) — and yields candidates in exact non-increasing price order through lazy add/shift enumeration merged across heads by one max-heap. Dependencies are normalized into canonical queue order so path IDs stay stable across runs; ties are deterministic. - doc/rfc/submitqueue/speculation-generator.md: design doc with the pricing model, enumeration scheme, a step-by-step two-run worked example, and future refinements (relaxation, unblocking weight, sensitivity pruning). Also regenerates storage/mock/request_batch_store_mock.go, whose committed header predated generation via 'make mocks' and kept check-mocks red. Co-Authored-By: Claude Fable 5 <[email protected]>
|
|
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
Implements the Generator seam of the standard Speculator (see
doc/rfc/submitqueue/speculation.md): a pull-based stream of candidate
speculation paths over one queue snapshot, consumed by the Allocator.
ctx-aborted; candidates never repeat and never contradict resolved facts.
dependency assumptions hold — resolved deps pinned as facts,
Merging/Cancelling priced as modal certainties, undecided deps scored via
the injected scorer (once per batch per run) — and yields candidates in
exact non-increasing price order through lazy add/shift enumeration merged
across heads by one max-heap. Dependencies are normalized into canonical
queue order so path IDs stay stable across runs; ties are deterministic.
model, enumeration scheme, a step-by-step two-run worked example, and
future refinements (relaxation, unblocking weight, sensitivity pruning).
Also regenerates storage/mock/request_batch_store_mock.go, whose committed
header predated generation via 'make mocks' and kept check-mocks red.
Co-Authored-By: Claude Fable 5 [email protected]
Test Plan
Issues