feat(speculation): add speculation tree builder with power set path generation#87
Closed
behinddwalls wants to merge 1 commit into
Closed
feat(speculation): add speculation tree builder with power set path generation#87behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
60fd969 to
4c2393d
Compare
…eneration Why: The speculate controller had a TODO stub with no speculation logic. We need the core algorithm that generates all possible futures for a batch based on its predecessors to enable speculative builds. What: - Add SpeculationPath entity with explicit Base/Head fields, replacing the flat []string path and removing SpeculationPathInfo from Build - Add SpeculationPathAction enum values: schedule, cancel, land - Implement GenerateTree in core/speculation that produces 2^N paths via bitmask power set enumeration, sorted most-optimistic first - Wire GenerateTree into the speculate controller (empty deps for now)
4c2393d to
b02c580
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.
Summary
SpeculationPathentity with explicitBase/Headfields, replacingSpeculationPathInfoinBuildand the flat[]stringinSpeculationInfoSpeculationPathActionenum values:schedule,cancel,landGenerateTreeincore/speculationthat produces 2^N speculation paths via bitmask power set enumeration, sorted most-optimistic firstGenerateTreeinto the speculate controller (empty deps for now, to be extended when batch controller provides dependencies)Test plan
action=schedule,score=0make gazelle && make test— all 20 tests pass