Skip to content

docs(rfc): record the speculation path generation design - #512

Merged
behinddwalls merged 0 commit into
preetam/speculation-finalizationfrom
preetam/speculation-generator-rfc
Aug 5, 2026
Merged

docs(rfc): record the speculation path generation design#512
behinddwalls merged 0 commit into
preetam/speculation-finalizationfrom
preetam/speculation-generator-rfc

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

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.

@behinddwalls
behinddwalls force-pushed the preetam/speculation-generator-rfc branch 3 times, most recently from cc49cdf to 2253ce4 Compare August 5, 2026 02:19
@behinddwalls behinddwalls changed the title docs(rfc): speculation path generation as a best-first tree walk docs(rfc): record the speculation path generation design Aug 5, 2026
@behinddwalls
behinddwalls force-pushed the preetam/speculation-generator-rfc branch from 2253ce4 to a053d14 Compare August 5, 2026 03:15
@behinddwalls
behinddwalls merged commit a053d14 into preetam/speculation-finalization Aug 5, 2026
15 checks passed
@behinddwalls
behinddwalls force-pushed the preetam/speculation-finalization branch from 93573ae to 1492c63 Compare August 5, 2026 03:15
@behinddwalls
behinddwalls deleted the preetam/speculation-generator-rfc branch August 5, 2026 03:15
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