push landing: close a ticket only after the host has verified its work is on main #361

Open
opened 2026-11-19 14:53:34 +00:00 by ben · 0 comments
Owner

Held on purpose (no-triage), at Ben's request, 2026-11-19. Do not ready this while push landing: a ticket closes before its work is on main is being worked: both change the same landing files, and that ticket's in-flight approach (a not-yet-landed marker the lister reads) closes the same gap a different way. Whether this ticket is still wanted depends on what lands there. A human lifts the hold.

The change

In a LANDING=push repo, close a ticket only after the host has verified its work is on origin/main. Today close-report.sh closes it in the sandbox, against the pushed worker branch, and the host promotes the work afterwards (#193, #283).

The rule this buys: a closed ticket's work is on main. Everything that reads "closed" (the lister's dependency check, the fleet queue, a person reading the tracker) is then right without a second signal.

Why

"Closed" is untrue of main for a minute or two on every push-mode close, and for as long as the re-land takes when the land fails. On Matou/policy-generators, 2026-11-17 to 2026-11-19:

  • 12 tickets were closed and then reopened by the #283 reconcile because the land failed.
  • 7 dependent tickets were claimed in that gap, found their dependency's code missing, and blocked themselves. None was re-armed by the machinery.
  • The gates-passed comment on each of those 12 tickets says the work verified, and a later comment has to say that this was "NOT true of main".

The land failures themselves are ordinary and will continue: two tickets with the same dependency run in parallel and edit the same source file. The evidence and the timeline are on #359.

What it would look like

  1. close-report.sh runs its gates as now and records the verdict, but does not close. The ticket stays claimed (agent-working) through the land.
  2. The host's land stage runs. On a verified land it closes the ticket and posts the close comment, naming the commit on main.
  3. On a failed land it does not close and reopen. It relabels the still-open ticket ready-for-session and parks the work on the rescue branch, as now.
  4. PR mode is unchanged: there the merge is the land, so close already follows it.

What it removes

  • The gap in which a dependent can be claimed, so no worker starts a run that must back out.
  • The close-then-reopen pair and the "NOT true of main" correction comment.
  • The need for any second signal ("closed and landed") in the lister.

What to weigh

  • It reshapes the pre-land close that #193 and #283 chose on purpose. The reasons for that choice should be read first and answered here.
  • The ticket stays agent-working for longer. A host that dies between the gates and the land leaves it claimed until the janitor sweeps it, and the janitor must then tell "gates passed, land pending" from "run died mid-work".
  • The close moves from the sandbox to the host, so the host needs what the sandbox used to post the close-report (the envelope and the verdict).
  • If #359 lands a not-yet-landed marker, the lister is already correct, and this ticket becomes a simplification, not a fix. It may then not be worth the change.

Checks

  • Offline test: in push mode, a ticket whose gates passed but whose land failed is never closed, and ends ready-for-session with its work on a rescue branch.
  • Offline test: in push mode, a ticket is closed only after its commits are ancestors of origin/main.
  • Offline test: PR mode behaves as before.
  • Offline test: a run that dies after the gates and before the land is recovered, and its ticket is not left claimed.

needs_human_decision

Whether to do this at all once #359 has landed, and if so whether it replaces that ticket's marker or sits beside it.

Filed by an interactive session in Matou/policy-generators, 2026-11-19.

> **Held on purpose (`no-triage`), at Ben's request, 2026-11-19.** Do not ready this while [push landing: a ticket closes before its work is on main](https://git.matou.nz/Matou/dev-factory/issues/359) is being worked: both change the same landing files, and that ticket's in-flight approach (a not-yet-landed marker the lister reads) closes the same gap a different way. Whether this ticket is still wanted depends on what lands there. A human lifts the hold. ## The change In a `LANDING=push` repo, close a ticket only after the host has verified its work is on `origin/main`. Today `close-report.sh` closes it in the sandbox, against the pushed worker branch, and the host promotes the work afterwards (#193, #283). The rule this buys: **a closed ticket's work is on `main`.** Everything that reads "closed" (the lister's dependency check, the fleet queue, a person reading the tracker) is then right without a second signal. ## Why "Closed" is untrue of `main` for a minute or two on every push-mode close, and for as long as the re-land takes when the land fails. On `Matou/policy-generators`, 2026-11-17 to 2026-11-19: - 12 tickets were closed and then reopened by the #283 reconcile because the land failed. - 7 dependent tickets were claimed in that gap, found their dependency's code missing, and blocked themselves. None was re-armed by the machinery. - The gates-passed comment on each of those 12 tickets says the work verified, and a later comment has to say that this was "NOT true of `main`". The land failures themselves are ordinary and will continue: two tickets with the same dependency run in parallel and edit the same source file. The evidence and the timeline are on #359. ## What it would look like 1. `close-report.sh` runs its gates as now and records the verdict, but does not close. The ticket stays claimed (`agent-working`) through the land. 2. The host's land stage runs. On a verified land it closes the ticket and posts the close comment, naming the commit on `main`. 3. On a failed land it does not close and reopen. It relabels the still-open ticket `ready-for-session` and parks the work on the rescue branch, as now. 4. PR mode is unchanged: there the merge is the land, so close already follows it. ## What it removes - The gap in which a dependent can be claimed, so no worker starts a run that must back out. - The close-then-reopen pair and the "NOT true of `main`" correction comment. - The need for any second signal ("closed and landed") in the lister. ## What to weigh - It reshapes the pre-land close that #193 and #283 chose on purpose. The reasons for that choice should be read first and answered here. - The ticket stays `agent-working` for longer. A host that dies between the gates and the land leaves it claimed until the janitor sweeps it, and the janitor must then tell "gates passed, land pending" from "run died mid-work". - The close moves from the sandbox to the host, so the host needs what the sandbox used to post the close-report (the envelope and the verdict). - If #359 lands a not-yet-landed marker, the lister is already correct, and this ticket becomes a simplification, not a fix. It may then not be worth the change. ## Checks - Offline test: in push mode, a ticket whose gates passed but whose land failed is never closed, and ends `ready-for-session` with its work on a rescue branch. - Offline test: in push mode, a ticket is closed only after its commits are ancestors of `origin/main`. - Offline test: PR mode behaves as before. - Offline test: a run that dies after the gates and before the land is recovered, and its ticket is not left claimed. ## needs_human_decision Whether to do this at all once #359 has landed, and if so whether it replaces that ticket's marker or sits beside it. Filed by an interactive session in `Matou/policy-generators`, 2026-11-19.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#361
No description provided.