swarm harness: stranded closes persist after #2104/#2106/#2112 — #2100 and #2102 closed pre-land, never promoted, and #2102 built without #2100 #2119

Closed
opened 2026-10-31 04:18:08 +00:00 by ben · 1 comment
Owner

Symptom

Two more stranded closes on 2026-10-31, after #2104 / #2106 / #2112 landed:

Ticket Closed (UTC) Worker commit Worker branch Promoted to main?
#2100 02:16:49 d1de7bfd sandcastle/worker/20261030-204811-23d7d8 no (checked 03:15)
#2102 02:41:48 01b44d6d sandcastle/worker/20261031-022408-03ae8b no

Both close-reports say success and "pre-land — the host promotes it to main only after its post-run verify, #193/#283". Neither was promoted; main stayed at c9a71e0f (#2099). No comment on either issue records a failed post-run verify, and the #283 stranded-close reconcile did not reopen them.

Knock-on: #2102's native dependency on #2100 counted the (closed) issue as satisfied, so #2102 was built without #2100 underneath — the two worker commits are siblings off c9a71e0f.

Earlier in the same arc, #2097 and #2099 stranded the same way (#2104, run 57327) and had to be reopened by hand.

Evidence the code was fine

Stacked by hand on current main in PR #2118: clean cherry-picks; app unit suite 2335/2335, vue-tsc clean, helper Go tests pass, prove-script test passes. So the post-run verify (if it ran) should have passed — the promote step was dropped, or the verify failed silently.

Wanted

  • Find why the host did not promote these two branches (runs for 20261030-204811 and 20261031-022408).
  • The #283 reconcile must reopen a closed issue whose close-report commit is not reachable from origin/main after the promote window.
  • A dependency must not count as satisfied while its close-report commit is unreachable from main.
## Symptom Two more **stranded closes** on 2026-10-31, after #2104 / #2106 / #2112 landed: | Ticket | Closed (UTC) | Worker commit | Worker branch | Promoted to `main`? | |---|---|---|---|---| | #2100 | 02:16:49 | `d1de7bfd` | `sandcastle/worker/20261030-204811-23d7d8` | no (checked 03:15) | | #2102 | 02:41:48 | `01b44d6d` | `sandcastle/worker/20261031-022408-03ae8b` | no | Both close-reports say `success` and "pre-land — the host promotes it to `main` only after its post-run verify, #193/#283". Neither was promoted; `main` stayed at `c9a71e0f` (#2099). No comment on either issue records a failed post-run verify, and the #283 stranded-close reconcile did not reopen them. Knock-on: #2102's native dependency on #2100 counted the (closed) issue as satisfied, so #2102 was **built without #2100 underneath** — the two worker commits are siblings off `c9a71e0f`. Earlier in the same arc, #2097 and #2099 stranded the same way (#2104, run 57327) and had to be reopened by hand. ## Evidence the code was fine Stacked by hand on current `main` in PR #2118: clean cherry-picks; app unit suite 2335/2335, vue-tsc clean, helper Go tests pass, prove-script test passes. So the post-run verify (if it ran) should have passed — the promote step was dropped, or the verify failed silently. ## Wanted - Find why the host did not promote these two branches (runs for 20261030-204811 and 20261031-022408). - The #283 reconcile must reopen a closed issue whose close-report commit is not reachable from `origin/main` after the promote window. - A dependency must not count as satisfied while its close-report commit is unreachable from `main`.

close-report — landed on main (push mode)

What landed: idss 7bd8a9bc (STATUS.md + re-vendor FACTORY_REF 40d60ac→4dc855d), vendoring dev-factory backport/idss-2119 4dc855d (off the pin 40d60ac). landing-lib.sh + tests/landing-lib-test.sh updated; FACTORY_MANIFEST no churn; drift-gate OK.

Why the two branches were not promoted (Wanted #1)

Confirmed in landing-lib.sh — not a sink-read gap this time. In push mode the host promotes with git push origin HEAD:main (landing_push_main_with_rescue). When the worker's commit never reached the runner HEAD (the mirror dropped it), that push is a silent no-op — git returns 0 (Everything up-to-date) — so landing_stage returns 0, main stays put, and the run proceeds down the success path. The two landing_reopen_stranded_closes calls in run-swarm.sh are both wired to the failure exits (verify-breach, land-parked) only, so neither ran — exactly the observed signature: closed success, main at c9a71e0f, no failed-verify comment, reconcile silent. A real rollback would have commented; it did not, because there was no rollback — the promote just advanced nothing.

The reconcile now reopens on the success path (Wanted #2)

landing_stage re-runs landing_reopen_stranded_closes on its own success path, gated on a new LANDING_PROMOTE_CLEAN signal that landing_push_main_with_rescue sets only on a first-try fast-forward/no-op push (SHA-preserving) and clears on the rebase ladder. The gate is essential: a rebase landing rewrites the worker SHAs onto main, where a by-SHA reachability check would false-reopen genuinely-landed work. It reads the exported EXECUTE_ATTEMPTS_FILE the failure-path reconciles already use and refetches origin/main first (a sibling host may have promoted the commit). Logic lives in the lib; run-swarm.sh stays at 199 code lines under its stage-extraction cap.

A dependency no longer counts a stranded close as satisfied (Wanted #3)

Fixed at the source rather than in the lister: a no-op-promote strand is now reopened in its own run, so the blocker is OPEN — and the lister's existing closed-blocker check already refuses an open blocker as satisfied — before any dependent run lists it. So #2102-built-without-#2100 cannot recur. This is deliberately not a lister-side git merge-base reachability probe: such a probe would permanently starve any dependent of a blocker whose commit was rebased/squashed onto main (SHA divergence), a worse failure than the bug. Reopening-at-source enforces the same invariant for every consumer, not just list-ready-tasks.sh.

Proof

Red-before-green in landing-lib-test.sh (+6, 121→127): the flag is set on a first-try push and cleared on a rebase landing; a no-op promote with an unreachable claimed commit reopens the stranded close on the success path (PATCH /issues/7); a commit that is on main is left closed (no false green); pr mode never sets the flag so never runs the success-path reconcile. Also green: run-swarm-stages (budget), run-swarm-landing, ticket-landing, list-ready-tasks, check-harness-drift (OK @ 4dc855d).

#2100/#2102 themselves are recovered by the human's hand-stacked PR #2118 — I did not reopen them here, to avoid racing that recovery.

Ruled by agent under ADR 0174 — veto anytime. Revertible: git revert 7bd8a9bc + reset backport/idss-2119. Provable: the vendored red-before-green suite.

## close-report — landed on `main` (push mode) **What landed:** idss `7bd8a9bc` (STATUS.md + re-vendor `FACTORY_REF` `40d60ac`→`4dc855d`), vendoring dev-factory `backport/idss-2119` `4dc855d` (off the pin `40d60ac`). `landing-lib.sh` + `tests/landing-lib-test.sh` updated; `FACTORY_MANIFEST` no churn; drift-gate OK. ### Why the two branches were not promoted (Wanted #1) Confirmed in `landing-lib.sh` — **not** a sink-read gap this time. In push mode the host promotes with `git push origin HEAD:main` (`landing_push_main_with_rescue`). When the worker's commit never reached the runner HEAD (the mirror dropped it), that push is a silent **no-op** — git returns 0 (`Everything up-to-date`) — so `landing_stage` returns 0, `main` stays put, and the run proceeds down the **success** path. The two `landing_reopen_stranded_closes` calls in `run-swarm.sh` are both wired to the **failure** exits (verify-breach, land-parked) only, so neither ran — exactly the observed signature: `closed success`, `main` at `c9a71e0f`, **no** failed-verify comment, reconcile silent. A real rollback would have commented; it did not, because there was no rollback — the promote just advanced nothing. ### The reconcile now reopens on the success path (Wanted #2) `landing_stage` re-runs `landing_reopen_stranded_closes` on its **own success path**, gated on a new `LANDING_PROMOTE_CLEAN` signal that `landing_push_main_with_rescue` sets **only** on a first-try fast-forward/no-op push (SHA-preserving) and clears on the rebase ladder. The gate is essential: a rebase landing rewrites the worker SHAs onto `main`, where a by-SHA reachability check would **false-reopen genuinely-landed work**. It reads the exported `EXECUTE_ATTEMPTS_FILE` the failure-path reconciles already use and refetches `origin/main` first (a sibling host may have promoted the commit). Logic lives in the lib; `run-swarm.sh` stays at 199 code lines under its stage-extraction cap. ### A dependency no longer counts a stranded close as satisfied (Wanted #3) Fixed **at the source** rather than in the lister: a no-op-promote strand is now reopened **in its own run**, so the blocker is **OPEN** — and the lister's existing closed-blocker check already refuses an open blocker as satisfied — before any dependent run lists it. So #2102-built-without-#2100 cannot recur. This is deliberately **not** a lister-side `git merge-base` reachability probe: such a probe would **permanently starve** any dependent of a blocker whose commit was rebased/squashed onto `main` (SHA divergence), a worse failure than the bug. Reopening-at-source enforces the same invariant for every consumer, not just `list-ready-tasks.sh`. ### Proof Red-before-green in `landing-lib-test.sh` (+6, 121→127): the flag is **set** on a first-try push and **cleared** on a rebase landing; a no-op promote with an unreachable claimed commit **reopens** the stranded close on the success path (`PATCH /issues/7`); a commit that **is** on `main` is left closed (no false green); **pr mode** never sets the flag so never runs the success-path reconcile. Also green: `run-swarm-stages` (budget), `run-swarm-landing`, `ticket-landing`, `list-ready-tasks`, `check-harness-drift` (OK @ `4dc855d`). #2100/#2102 themselves are recovered by the human's hand-stacked **PR #2118** — I did **not** reopen them here, to avoid racing that recovery. **Ruled by agent under ADR 0174 — veto anytime.** Revertible: `git revert 7bd8a9bc` + reset `backport/idss-2119`. Provable: the vendored red-before-green suite.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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/idss#2119
No description provided.