Skip to content

feat(speculation): add parity default impls for the speculation seams#332

Open
behinddwalls wants to merge 1 commit into
preetam/int/storage-build-lookupfrom
preetam/int/speculation-parity-impls
Open

feat(speculation): add parity default impls for the speculation seams#332
behinddwalls wants to merge 1 commit into
preetam/int/storage-build-lookupfrom
preetam/int/speculation-parity-impls

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The speculation seam contracts (enumerator, selector, prioritizer, limits) have no real implementations yet — only mocks and programmable fakes. Integrating the seams into the orchestrator needs defaults that reproduce the existing single-chain behavior exactly (one speculative path per batch: the full dependency chain, promoted and admitted unconditionally), so the pipeline can switch to tree-driven speculation with zero behavior change and the e2e suite staying green. The path scorer — the one seam with a real model rather than a parity stub — is split into its own follow-up change for focused review.

What?

Five impl packages under submitqueue/extension/speculation/, each a plain New(...) constructor returning the contract interface (no factories, no queue routing — that stays in wiring):

  • enumerator/chain — one path per batch: {Base: deps in order, Head: batch}; structure only, controller stamps status.
  • selector/all — promotes every candidate path.
  • prioritizer/sticky — sticky slots: running/prioritized paths hold their slot, top-scored selected paths fill free budget, never preempts; deterministic tie-break for stable rounds.
  • dependencylimit/static, prioritizationlimit/static — fixed limits injected at construction.

Test Plan

make gazelle && make fmt && bazel test //submitqueue/extension/speculation/.... Unit coverage: chain ordering (incl. empty deps), candidate-only selection, sticky budget accounting (running paths consume slots, zero-free floor, tie-break determinism across permutations), static limit passthrough.

Issues

Stack

  1. feat(speculation): add enumerator + dependency-limit extensions #315
  2. feat(speculation): add path scorer extension #316
  3. feat(speculation): add selector + selection-limit extensions #317
  4. feat(speculation): add prioritizer + prioritization-limit extensions #320
  5. feat(storage,entity): path identity + speculation path→build mapping store #331
  6. @ feat(speculation): add parity default impls for the speculation seams #332
  7. feat(speculation): add probability path scorer #333

## Summary

### Why?

The speculation seam contracts (enumerator, selector, prioritizer, limits) have no real implementations yet — only mocks and programmable fakes. Integrating the seams into the orchestrator needs defaults that reproduce the existing single-chain behavior exactly (one speculative path per batch: the full dependency chain, promoted and admitted unconditionally), so the pipeline can switch to tree-driven speculation with zero behavior change and the e2e suite staying green. The path scorer — the one seam with a real model rather than a parity stub — is split into its own follow-up change for focused review.

### What?

Five impl packages under `submitqueue/extension/speculation/`, each a plain `New(...)` constructor returning the contract interface (no factories, no queue routing — that stays in wiring):

- `enumerator/chain` — one path per batch: `{Base: deps in order, Head: batch}`; structure only, controller stamps status.
- `selector/all` — promotes every candidate path.
- `prioritizer/sticky` — sticky slots: running/prioritized paths hold their slot, top-scored selected paths fill free budget, never preempts; deterministic tie-break for stable rounds.
- `dependencylimit/static`, `prioritizationlimit/static` — fixed limits injected at construction.

## Test Plan

✅ `make gazelle && make fmt && bazel test //submitqueue/extension/speculation/...`. Unit coverage: chain ordering (incl. empty deps), candidate-only selection, sticky budget accounting (running paths consume slots, zero-free floor, tie-break determinism across permutations), static limit passthrough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant