Kernel: a linked pull request's closes and reopenings are read whole, and a rival is read as it stood at the merge (#672, record 0183)
Merged
DO
7d ago+653+653+012345678901234567890123456789-90-90-01234567890123456789
Closes #672, "Facts: a linked pull request's close and reopening, so that row 1 reads a rival as it stood at the merge". It follows the Factory Builder's go on the design, and #552's ruling that each close carries its actor. It holds decision record 0183, which adds to 0174 and closes 0174's open point.
What changes
| What | Now |
|---|---|
| The fact | Each linked pull request in issue-facts/1 carries close_events: each close and reopening on its own timeline, closed or reopened, with its actor ($defs/actor) and its time, a merge's close among them (trials/P-48.json) |
| Read whole | The events alternate, the first is a close, none comes before the opening, and each actor is read whole. The last is the close now: no earlier than closed_at and within max_close_lag_seconds of it, since GitHub dated an issue's ClosedEvent a second after its closedAt in P-48. With no readable limit, it must fall in closed_at's own second. A merged pull request has nothing from its merge's second on but the merge's close. Anything else, or no close events at all, defers as linked_unreadable |
| Row 1 | A rival stood closed at the first merge if its last close or reopening before that second is a close. A rival closed before the merge and reopened after it is no second link, so the reopening moves no done issue. A close or reopening in the merge's second reads as before that second |
| Simulator, explorer, examples | Every pull request they close carries its close event: the merge queue's actor for the Factory's merge, the person's otherwise. The examples, pass examples and counter-examples carry the field |
| Grounding | The rule a_pull_requests_close_and_reopening_are_timed waits on P-61. P-48's fixture shows the events, but its row in §6 does not ask about them, so P-61's row now does. #702, from the Kernel lane, adds the steps and the read to P-61's run |
Not here: the issue world never reopens a pull request, so its faults don't exercise the route this closes; the boundary tests do. An author who closes and reopens until an event falls outside the limit, or two in one second come out of order, defers the issue for good. That fails safe, as draft_events already can.
Checks
tests/test_issue.py::test_an_unreadable_linked_pull_request_defersand::test_two_links_by_hand_before_the_merge_leave_the_issue_heldgain the cases, and::test_a_link_whose_opening_merge_and_close_are_out_of_order_defersholds the opening's second. The issue simulator's and the explorer's tests close with their events.- Decision 0183's two rows name the mutants. Three older ones follow the code. All mutants of
kernel/issue.pywere killed at 60041234; the last commit adds one case and one mutant.make checksis clean apart from the record gap until 0181 and 0182 are onmain. CI runs the full verify.
Reviews
| Reader | Head | Findings | Disposition |
|---|---|---|---|
| Argon (gemini-4-argon-high) | 87363e02, six parts | None | ā |
| Muse (muse-wonder-full-1.0) | 87363e02 | 1 blocking: the issue simulator's own test closed pull requests with no close events | Fixed in a2651df5 |
| Claude review and security pass | 8c37a445 | 1 high, the same simulator test; 1 medium: requiring the last close to equal closed_at exactly would defer forever on GitHub's one-second trail; 2 low | The high and the medium are fixed. One low, a reopening in the merge's second, is pinned by a test. The other, the simulator never reopening, is named in the record |
| Astra (gpt-6-astra), first read | 27eba440 | 3 major: a merged pull request's history could contradict its merge and drop out of the hold (a regression); the lag's boundary was untested; one mutant survived its test | All fixed in 63a6f468 and 60041234 |
| Astra, second read | 60041234 | 1 major: no close events at all was untested | Fixed, with a test and a mutant |
š¤ Generated with Claude Code