Repository navigation
Description
What happened
A pickup took tourbot#1027 at 11:54 EDT on 2026-10-27. branch::select found issue-1027 and its open Spec PR tourbot#1505 and chose a Continuation. Selection::pr_base then replaced the given Base branch master with the PR's base:
continuing issue-1027 and its PR .../pull/1505, so the Base branch is parent-engagement/browser-testing/staging, not the given master
At 12:00 EDT a human closed #1505 after reshaping #1027 to target master. The Ticket bodies were rewritten too: "Base branch: master… never merge issue-1027." The Run kept going:
- 13:14: writing the Tickets checklist failed with
PR .../pull/1505 is closed, not open.warn_checklist(src/pull_request.rs:156) logged this as a progress step, and the Run went on. - 13:14–13:32: it dispatched tourbot#1035 and tourbot#1037 from
origin/issue-1027. It Self-merged their PRs (Drop the macOS release target and macOS CI jobs #1666, Specialize thirdshift on Linux and drop native macOS support #1665) intoissue-1027and closed both issues. That work went to a branch the Spec had just abandoned, and the Tickets were marked done. - 13:32: the Run ended "failed", with the closed PR as its cause. Its printed Recovery command resumes the old Base branch, so following it would repeat the mistake.
Command record: ~/.thirdshift/logs/Educational-Travel-Adventures/tourbot/commands/pickup/1027-20261027T115401-0400~bUnHddshqYWGtnwI.command.json
Expected
When the Spec PR is closed (or its base changes) mid-run, the Run should stop dispatching new Tickets and should not Self-merge any more Ticket PRs into the Spec branch. It should end with a cause that says the Spec was closed under it. It should not print a Recovery command that resumes the closed branch.
Proposal
- Before each Ticket dispatch, and again before each Ticket Self-merge, re-observe the Spec PR. If it is no longer open, or its base no longer matches the Base branch chosen at pickup, stop: give in-flight Tickets no new work and merge nothing more.
- Make a closed Spec PR a hard error in the checklist write, not a
warn_checklistprogress line. Other checklist write failures can stay warnings. - When the Run ends this way, leave out the Recovery command, or have it start Fresh from the given Base branch.
Regression test
Use a fake GitHub whose Spec PR flips to closed after the first Ticket is dispatched. Assert that no later Ticket is dispatched, that no Ticket PR is merged after the flip, and that the cause names the closed Spec PR.
Activity
Merge pull request #1492 from JacobStephens2/issue-1471