Repository navigation
Description
Problem
Found by the final verifier of #740 (PR #1084). Lines cited at be2b8b4 (feat/roadmap-reprioritize).
The machine's random search never reaches the states that round 12's job fixes deal with. Those are: a person cuts or ships a release while a stopped run waits for the next poll, the start of a release that is already cut (_is_cut), a run record naming a release that has shipped and closed since (_shipped_since), and a pull-in that never landed into a release that has shipped since (_pulled_into_shipped). So random sweeps say nothing about these paths. Only the pinned replays and unit tests hold them, and nothing searches the paths next to them. No job bug was found: all 500 requested seeds passed at HEAD 77df02e.
Evidence
Sweeps at HEAD 77df02e, run through run_state_machine_as_test with hypothesis.core.global_force_seed, PYTHONHASHSEED=0, database=None, deadline=None, not derandomized, shrink kept, only too_slow suppressed, 4 processes:
- 300 examples x 40 steps, seeds 33000-33399: 400/400 passed (median 12.8 s a seed, max 23.5 s).
- 200 examples x 70 steps, seeds 34000-34099: 100/100 passed (median 22.3 s, max 41.9 s).
Control: with the (CUT, FIX_JOINED) row removed, every one of seeds 33000-33015 fails with Cut:.
Reach: I counted how often each fix's helper returned true during seed 33000 (300 x 40, unmutated). _is_cut was called 27 times and _shipped_since 7 times; _pulled_into_shipped checked 25 changes. None returned true, in 5,799 plans of which 49 were starts.
Mutants: I replaced each helper with lambda *a, **k: False (reprioritize._is_cut, reprioritize._shipped_since, reprioritize._pulled_into_shipped). Each mutant passes all 16 seeds 33000-33015 at 300 x 40. The pinned tests catch each mutant: test_a_release_cut_before_its_start_is_topped_up_with_nothing[*], test_a_run_record_naming_a_release_shipped_and_closed_since_starts_the_one_after_it[start-stopped-at-its-close] and test_a_pull_in_that_never_landed_before_its_release_shipped_is_dropped[at-its-job-record].
Why the search misses the cut case: its minimal sequence is five base steps that must be next to each other with no poll in between: start(held=[], waiting=['feature']), cut(draft=False), next_run_stops(at=1, later=True), ship(milestone_closed=False, published=True), cut(draft=False). Any other step in between polls and finishes the waiting run.
Acceptance criteria
RoadmapLifecycle(tests/test_roadmap_lifecycle_properties.py) gains rules that let a ship, and a cut, land while a stopped run waits. It also starts some examples from drawn variants of the round-12 replay prefixes.- With the new rules, each of these mutants fails at least one seed of the sweep profile, and each failure shrinks to a short named sequence:
reprioritize._is_cut,reprioritize._shipped_sinceandreprioritize._pulled_into_shipped, each replaced bylambda *a, **k: False. - The unmutated job passes at least 120 sweep seeds at 300×40.
- The gate settings (12×8) are unchanged. The new rules widen only the deep and sweep searches, and the gate's run time for the module grows by under 1 s.
uv run devops cipasses.
Key questions
- Which rules? Proposed: the ones the verifier validated.
Add a composite rule to RoadmapLifecycle so that a ship can land while a run waits:
@precondition(lambda self: self.release_pr is not None or self.merged_pr is not None)
@rule(at=st.integers(1, 16), milestone_closed=st.booleans())
def ship_while_a_run_waits(self, at: int, milestone_closed: bool) -> None:
self.next_run_stops(at, later=True)
self.ship(milestone_closed)Optionally also add a rule that makes the next few runs each stop and wait. It stores plan_stops, and run_job pops one per run, setting stops_at and rerun_now=False:
@rule(ats=st.lists(st.integers(1, 16), min_size=2, max_size=4))
def runs_keep_stopping(self, ats): self.plan_stops = list(ats)Validated in scratch subclasses:
- With
ship_while_a_run_waitsalone, the_is_cutmutant fails seed 33000 withCut:. - With both rules, it fails seeds 33000 and 33001, each shrunk to start, cut, ship_while_a_run_waits(at=1, milestone_closed=False), cut.
- The unmutated job passes 12 seeds (39000-39011, 300 x 40) with the first rule and 40 seeds (37000-37039, 300 x 40) with both.
- The
_shipped_sinceand_pulled_into_shippedmutants still survive both rules. To reach them, start some examples from drawn variants of the round-12 replay prefixes. Such an initialize rule picks a scenario family, the stop positions,milestone_closedand a truncation point, then continues at random. That version caught the_shipped_sincemutant at seed 36001 (pulled), caught the_is_cutmutant at seed 36000, and passed 120 unmutated seeds (36000-36079 at 300 x 30, 38000-38039 at 200 x 60).
Keep the gate settings (12 x 8) unchanged; these rules only widen the deep and sweep searches.
Strategic alignment
- P3: test coverage only. The pinned replays and unit tests hold every fixed path today. Without this, nothing searches the paths next to them.
- Related: feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 (PR feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) (#740) #1084), and fix(github): a rerun that reverts a stall change counts its own Status write as a person's activity, so a stall descope is quietly undone #1085 (the stall-revert job bug).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 8, 2026
Linked: #1085. Both test resume paths of the reprioritize job with
tests/test_roadmap_lifecycle_properties.py; the fixes are independent, and the second rebases. Found by the 2026-10-08 backlog review.dan-petty commentedon Oct 23, 2026
Not planned: the roadmap lifecycle machine (ship and cut) is deleted by #1952.