feat(prioritization): add prioritizer + prioritization-limit extensions#318
Draft
behinddwalls wants to merge 1 commit into
Draft
feat(prioritization): add prioritizer + prioritization-limit extensions#318behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
This was referenced Jul 8, 2026
a091730 to
5e6a56f
Compare
db9cd8a to
e36260b
Compare
Add the prioritizer seam and its limit counterpart from the speculation RFC, as vendor-agnostic extension interfaces under submitqueue/extension/prioritization/. Prioritization is queue-wide and lives at the build stage, not per batch inside speculate, so it sits in its own prioritization/ family rather than under speculation/. prioritizer: the queue-wide policy that rations a shared build budget across every in-flight batch. Bound to its queue at construction, it takes no arguments — the store is the source of truth, so it reads the queue's pending builds and each build's path score from storage (read access injected at its Factory), ranks them by score plus any fairness policy, and returns the admitted subset that fits the queue's concurrent-build budget. It never writes; dispatching the admitted builds is the controller's job. limit: the "how much" policy bounding how many builds the queue runs at once — the queue's concurrent-build budget and the ultimate cap on speculation's demand on CI. Injected into the prioritizer at construction and called by it; the value is dynamic, not a fixed constant. Each follows the repo extension contract: Factory.For(Config) (T, error) with Config carrying only QueueName. Includes READMEs, gomock packages, and programmable fakes. Interfaces only; concrete impls and controller wiring are deferred.
5e6a56f to
e89bb7c
Compare
e36260b to
65c01c4
Compare
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.
Add the prioritizer seam and its limit counterpart from the speculation RFC, as vendor-agnostic extension interfaces under submitqueue/extension/prioritization/.
Prioritization is queue-wide and lives at the build stage, not per batch inside speculate, so it sits in its own prioritization/ family rather than under speculation/.
prioritizer: the queue-wide policy that rations a shared build budget across every in-flight batch. Bound to its queue at construction, it takes no arguments — the store is the source of truth, so it reads the queue's pending builds and each build's path score from storage (read access injected at its Factory), ranks them by score plus any fairness policy, and returns the admitted subset that fits the queue's concurrent-build budget. It never writes; dispatching the admitted builds is the controller's job.
limit: the "how much" policy bounding how many builds the queue runs at once — the queue's concurrent-build budget and the ultimate cap on speculation's demand on CI. Injected into the prioritizer at construction and called by it; the value is dynamic, not a fixed constant.
Each follows the repo extension contract: Factory.For(Config) (T, error) with Config carrying only QueueName. Includes READMEs, gomock packages, and programmable fakes. Interfaces only; concrete impls and controller wiring are deferred.
Stack