Skip to content

feat(entity): give speculation paths an assigned identity#337

Open
behinddwalls wants to merge 1 commit into
mainfrom
preetam/ext/speculation-path-id
Open

feat(entity): give speculation paths an assigned identity#337
behinddwalls wants to merge 1 commit into
mainfrom
preetam/ext/speculation-path-id

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The speculation seams being introduced up-stack (path scorer, selector, prioritizer) and durable links from other entities (a path→build mapping) all need to refer to one specific path inside a batch's speculation tree. Restating the full Base/Head split in every seam output couples those contracts to path structure and forces consumers to compare ordered slices; a single opaque identity lets each seam return only what matters — a path ID plus its verdict — and gives durable links a stable key to hang on.

What?

entity.SpeculationPathInfo gains ID: assigned by the controller when the path entry is first persisted, immutable thereafter, and unique within its tree. Its format is the controller's choice and carries no meaning — it is never parsed. Everything outside the tree names a path by this ID. The tree store persists it transparently through the JSON paths column, so the change is additive with no schema migration.

Test Plan

bazel test //submitqueue/entity/... — entity suite passes; the field rides the existing JSON round-trip in the tree store.

Issues

Stack

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

## Summary

### Why?

The speculation seams being introduced up-stack (path scorer, selector, prioritizer) and durable links from other entities (a path→build mapping) all need to refer to one specific path inside a batch's speculation tree. Restating the full Base/Head split in every seam output couples those contracts to path structure and forces consumers to compare ordered slices; a single opaque identity lets each seam return only what matters — a path ID plus its verdict — and gives durable links a stable key to hang on.

### What?

`entity.SpeculationPathInfo` gains `ID`: assigned by the controller when the path entry is first persisted, immutable thereafter, and unique within its tree. Its format is the controller's choice and carries no meaning — it is never parsed. Everything outside the tree names a path by this ID. The tree store persists it transparently through the JSON `paths` column, so the change is additive with no schema migration.

## Test Plan

✅ `bazel test //submitqueue/entity/...` — entity suite passes; the field rides the existing JSON round-trip in the tree store.
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.

2 participants