Repository navigation
Commit e1b7c7b
authored
docs(rfc): add speculation design (#230)
## Summary
Capture how SubmitQueue speculates before the interfaces land.
Speculation is modeled as two layers: **decision seams** — enumeration
and **scoring** *describe* the tree of possible bets, selection and
prioritization *act* on it — and **signal-driven limit policies** that
decide *how much* to allow at each step (dependency limit, selection
limit, prioritization limit), scaling with the build system's resources.
A path's score is dynamic — recomputed as dependencies land, fail, or
have their builds pass — not frozen at enumeration.
Covers: the problem (dependent batches serialize behind multi-minute
builds), the Base/Head path-and-tree model, where speculation sits in
the orchestrator pipeline, the status-vs-action ownership split, the
dependency limit as an eligibility gate (batches wait for predecessors
to land rather than trimming their base), dynamic rescoring, and how
prioritization rations the queue's builds against its budget.
Design only; entities, store, and extension interfaces follow in later
PRs in this stack. Adds doc/rfc/submitqueue/speculation.md and links it
from the RFC index.
### Changes since review
Reframed from two seams (enumeration + selection) to describe/act
decisions + limits, addressing @sbalabanov's review:
- selector resource-awareness → the new **prioritization** layer owns
the queue-wide build budget; the selector stays a pure per-batch policy
- "variable depth, not a single knob" → the **dependency limit** is a
signal-driven policy, not a constant
- clarified the dependency limit is an **eligibility gate** on active
in-flight dependencies (a batch waits until predecessors land), not a
base trim
- **dynamic scoring**: split scoring out of enumeration into a
**scorer** that recomputes each path's score as dependencies
land/fail/pass — enumeration is now structure-only
- entire tree persisted (the selector reads all path statuses + scores,
so it can cancel a path it earlier asked to build); the redundant
fallback path is cancelled on a winning bet; slash-free example names;
trimmed impl-detail bullets
- recorded as open: extending rescoring to weigh how long a batch has
waited
## Test Plan
Doc-only. Rendered locally; ASCII diagrams and tables verified; no
hard-wrapped prose.
## Issues
## Stack
1. @ #230
1. #231
1. #2321 parent a59cf13 commit e1b7c7b
2 files changed
Lines changed: 236 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments