docs(rfc): record the speculation path generation design - #512
Merged
behinddwalls merged 0 commit intoAug 5, 2026
Merged
Conversation
behinddwalls
force-pushed
the
preetam/speculation-generator-rfc
branch
3 times, most recently
from
August 5, 2026 02:19
cc49cdf to
2253ce4
Compare
behinddwalls
force-pushed
the
preetam/speculation-generator-rfc
branch
from
August 5, 2026 03:15
2253ce4 to
a053d14
Compare
behinddwalls
merged commit Aug 5, 2026
a053d14
into
preetam/speculation-finalization
15 checks passed
behinddwalls
force-pushed
the
preetam/speculation-finalization
branch
from
August 5, 2026 03:15
93573ae to
1492c63
Compare
behinddwalls
temporarily deployed
to
stack-rebase
August 5, 2026 03:15 — with
GitHub Actions
Inactive
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 default Generator's design lives only in the bestfirst package README, written for readers of the implementation. The design deserves a decision doc: what the generator promises, how it ranks and lazily generates paths, and which alternatives were considered and rejected — including the forward decision-tree rewrite and the DAG-chain variant, so the reasoning is on record before anyone proposes them again.
What?
Adds doc/rfc/submitqueue/speculation-generator.md: a plain-English RFC for the existing best-first generator. It grounds everything in one worked queue — A, B, C fully connected plus an independent D — draws every batch's possible paths as literal trees with scores computed by plain multiplication, walks generation step by step (start from each batch's most likely path, flip outward, two follow-up variants per returned path), separates the multiplied score from the stored logarithmic ranking value, shows the same queue across two runs (a known outcome stops being a guess while path identity survives), and defines the edge cases and the deterministic tie order. Alternatives considered and rejected: enumerate-and-sort (2^n cost), a forward decision tree per batch (same output, more queue work, pure churn), and trees over DAG-derived dependency chains (batches store direct conflicts only, so per-run chain derivation destabilizes path identity — the dependency-closure problem). speculation.md links to the RFC from the Generator bullet and the extension-API pointers.