refactor(entity)!: speculation paths carry assumptions, not bets - #473
Open
behinddwalls wants to merge 1 commit into
Open
refactor(entity)!: speculation paths carry assumptions, not bets#473behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
Rename the speculation path model from betting vocabulary to assumptions, so the terms explain themselves without a glossary: a path assumes an outcome for every dependency and builds the batch under those assumptions; when a dependency resolves against an assumption, the path is refuted. "The assumption was violated" is ordinary engineering speech, where "the bet was broken" needed the metaphor explained first. DependencyBetType becomes DependencyAssumption, dropping the Type suffix that made every field read bet.Bet. DependencyBet becomes PathDependency — one dependency of a path's head plus what the path assumes about it — so SpeculationPath.Dependencies mirrors Batch.Dependencies one level richer, and nothing stutters. The values change with the names: included/excluded/dropped become succeeds/fails/ignored. Succeeds and Fails mirror BatchStateSucceeded and BatchStateFailed, so resolving an assumption against a batch's state is a direct comparison rather than a translation; Fails covers a cancelled dependency too, which also does not succeed. Ignored replaces Dropped because the value means the path makes no assumption at all — its outcome neither gates the merge nor refutes the path — where "dropped" described what relaxation did to it rather than what the path now believes. Path IDs hash these values, so every path ID changes. That is safe only because nothing persists them yet: there is no path store, no schema, and no controller reads them. The window closes once speculation is wired up. CandidatePath.RankingScore is left implementation-defined: higher sorts first, on a scale the Generator chooses, meaningful only within the run. Consumers order by it without interpreting it. The RFC drops its copied Go declarations in favour of prose and links to the packages, so the two cannot drift — the copies had already gone stale on Version's type and the timestamp field names. Its relaxation section used "drop" and "ignore" for the same thing and now uses one, and the Generator contract states that ranking is implementation-defined rather than mandating one implementation's scale. Also drops the stale "depth bound" from the Speculator's Factory doc and README. Lazy generation removed the 2^n cost the bound existed to cap, so nothing injects one.
behinddwalls
marked this pull request as ready for review
July 30, 2026 07:32
This was referenced Jul 30, 2026
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.
Rename the speculation path model from betting vocabulary to assumptions, so the terms explain themselves without a glossary: a path assumes an outcome for every dependency and builds the batch under those assumptions; when a dependency resolves against an assumption, the path is refuted. "The assumption was violated" is ordinary engineering speech, where "the bet was broken" needed the metaphor explained first.
DependencyBetType becomes DependencyAssumption, dropping the Type suffix that made every field read bet.Bet. DependencyBet becomes PathDependency — one dependency of a path's head plus what the path assumes about it — so SpeculationPath.Dependencies mirrors Batch.Dependencies one level richer, and nothing stutters.
The values change with the names: included/excluded/dropped become succeeds/fails/ignored. Succeeds and Fails mirror BatchStateSucceeded and BatchStateFailed, so resolving an assumption against a batch's state is a direct comparison rather than a translation; Fails covers a cancelled dependency too, which also does not succeed. Ignored replaces Dropped because the value means the path makes no assumption at all — its outcome neither gates the merge nor refutes the path — where "dropped" described what relaxation did to it rather than what the path now believes.
Path IDs hash these values, so every path ID changes. That is safe only because nothing persists them yet: there is no path store, no schema, and no controller reads them. The window closes once speculation is wired up.
CandidatePath.RankingScore is left implementation-defined: higher sorts first, on a scale the Generator chooses, meaningful only within the run. Consumers order by it without interpreting it.
The RFC drops its copied Go declarations in favour of prose and links to the packages, so the two cannot drift — the copies had already gone stale on Version's type and the timestamp field names. Its relaxation section used "drop" and "ignore" for the same thing and now uses one, and the Generator contract states that ranking is implementation-defined rather than mandating one implementation's scale.
Also drops the stale "depth bound" from the Speculator's Factory doc and README. Lazy generation removed the 2^n cost the bound existed to cap, so nothing injects one.
Stack