Skip to main content

Module speculate

Module speculate 

Source
Expand description

The speculation seam (D5): what it means to put one change on top of another.

MergeQueue is a policy — a window that grows by one and halves on failure, a dependency-aware blast radius, a refusal to land the same change twice, and a rule that only a real test failure evicts anybody. None of that policy is about text. It was written against text anyway, because the queue called choir_merge::Pipeline directly and crate::Change carried two file bodies, which is the Phase-0 abstraction its doc comment always named. The consequence was structural rather than cosmetic: nothing holding a repository could construct a queue, so the queue was composed into nothing and its test numbers were a simulation of a train rather than a train.

A state here is an opaque String. The text implementation reads it as file content; the git one reads it as a commit id. The queue reads it as neither — it moves states around, hands them to CI, and never looks inside one. That is the whole trick, and it is why this seam needs no generic parameter and no change to crate::Change.

Per the house rule, a seam is real when a conformance suite and a second implementation both pass: TextSpeculator is the extracted original and crate::git::GitSpeculator is the second.

Structs§

TextSpeculator
The original speculator: one file’s content, merged 3-way.

Enums§

Step
What a speculator did with one change.

Traits§

Speculator
How the queue puts one change on top of a speculative state.