push landing: a ticket closes before its work is on main, so a dependent is claimed in the gap, blocks itself, and is never re-armed #359

Closed
opened 2026-11-19 14:04:43 +00:00 by ben · 7 comments
Owner

What happens

In a LANDING=push repo, a ticket is closed before its work is on main. When the land then fails, a ticket that depends on it gets handed out in the gap, blocks itself, and stays blocked after the dependency lands. Nothing re-arms it. Each occurrence stalls a dependency chain until a human notices.

The sequence, as seen on Matou/policy-generators (times UTC, 2026-11-18):

  1. close-report.sh verifies against the pushed worker branch and closes the ticket ("pre-land — the host promotes it to main only after its post-run verify, #193/#283").
  2. The host's land stage fails (push-parked-on-rescue): main moved during the run and the rebase conflicted.
  3. The #283 reconcile reopens the ticket as ready-for-session. This is correct, but it comes one to two minutes after the close.
  4. In that window the lister sees the dependency closed, and a worker claims the dependent ticket.
  5. That worker finds the dependency's code is not on main, correctly refuses to rebuild it, and labels its ticket agent-blocked (trigger: cannot-proceed, unavailable dependency).
  6. The session runner later lands the dependency. The dependent stays agent-blocked. The session runner skips agent-blocked, triage skips it, the janitor only re-arms agent-working, and the healer may not relabel issues it does not own.

Evidence (policy-generators, 2026-11-17 to 2026-11-19)

Counted from the ticket threads:

Count Tickets
Closed, then reopened by the #283 reconcile 12 #31 (twice), #43, #34, #38, #104, #35, #67, #40, #42, #47, #51
Dependent ticket blocked on a closed-but-not-landed dependency 7 #33, #34, #43 (on #31); #35 (on #34); #39 (on #35); #90 (on #42); #52 (on #51)
Of those, re-armed by a human or interactive session 6 #33, #34, #43, #35, #39, #52
Re-armed by the machinery 0

The clearest case, overview: the overview page:

  • 21:49: run 512 claims #52. Its dependency #51 reads closed.
  • 21:50:32: #51 is reopened by the reconcile.
  • 21:53: #52 is labelled agent-blocked.
  • 22:54: #51 lands on main (183403c) and closes.
  • 13:51 the next day: #52 is re-armed by hand, 15 hours after it could have run. Nothing from the factory landed in that repo for most of that time, because #52 gates the next phase.

The land failures will keep happening

Three causes of the rollback itself were fixed on 2026-11-18 (policy-generators #108 STATUS.md log lines, #110 shared registration lists, #109 / dev-factory #347 the shared workdir). They do not remove the class. #51's parked commit a078db9, replayed onto main as it was then (da91264), auto-merges STATUS.md and server/src/mounts.ts and conflicts in server/src/policies/sections.ts and web/src/pages/section/Section.tsx: two tickets with the same dependency ran in parallel and both edited the same source files. That is ordinary, and no merge driver fixes it. So the two gaps below are what turn a routine rollback into a long stall.

Two gaps

A. Closed is treated as landed. list-ready-tasks.sh counts a dependency as met when its issue is closed. In push mode the close precedes the land, so "closed" is briefly untrue of main, and after a failed land it is untrue for as long as the re-land takes.

B. A dependency block is never lifted by the machinery. agent-blocked maps to cannot-proceed, a human hand-off (policy-lib.sh, HUMAN_LABELS). That is right for most blocks. For "my dependency is not on main" the condition clears on its own, and a human is asked to do what a check could do.

Options (not ruled)

For A:

  1. Close only after the land is verified on main: move the close out of the in-sandbox close-report.sh into the host's post-land step.
  2. Keep the early close, but have the lister treat a dependency as met only when its close-report commits are ancestors of origin/main.
  3. Keep both, and hold the dependency in a not-yet-landed state the lister reads (a label set at close and removed on a verified land).

For B:

  1. When a ticket lands, re-arm any open ticket that is agent-blocked, names the landed ticket in a dependency-block comment or a native dependency, and has no other open blocker. The finishing run's self-rearm (report-lib.sh, "promotes dependants") is the natural place.
  2. Give a dependency block its own label or marker, distinct from other agent-blocked causes, so the lister can lift it mechanically and never touches a block that needs a human.

Fixing A alone stops new cases. Fixing B alone bounds the cost of each case to the re-land time.

Checks

  • Offline test: a dependency closed by close-report whose land failed does not make its dependent claimable.
  • Offline test: a dependent blocked on dependency N becomes ready-for-agent when N lands, and a ticket blocked for any other reason does not.
  • #283 (the reconcile that reopens), #193 (the host promotes after verify), #358 (landing detection in the fleet queue), #347 (the shared workdir).
  • Searched this tracker for "agent-blocked", "pre-land", "dependent", "did NOT land", "stranded": no existing ticket covers either gap.

Also seen, not part of this ticket

policy-generators' rendered heal-prompt.md still says the repo "is at the design stage ... with no product code", names the healer host as matou-workstation user dev, and tells the healer to clone from /home/dev/swarm/Matou/policy-generators. The healer runs on all three pool hosts, two of which have no /home/dev (#352). That is a consumer re-render, noted here so it is not lost.

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

## What happens In a `LANDING=push` repo, a ticket is closed before its work is on `main`. When the land then fails, a ticket that depends on it gets handed out in the gap, blocks itself, and stays blocked after the dependency lands. Nothing re-arms it. Each occurrence stalls a dependency chain until a human notices. The sequence, as seen on `Matou/policy-generators` (times UTC, 2026-11-18): 1. `close-report.sh` verifies against the pushed worker branch and **closes** the ticket ("pre-land — the host promotes it to `main` only after its post-run verify, #193/#283"). 2. The host's land stage fails (`push-parked-on-rescue`): `main` moved during the run and the rebase conflicted. 3. The #283 reconcile **reopens** the ticket as `ready-for-session`. This is correct, but it comes one to two minutes after the close. 4. In that window the lister sees the dependency closed, and a worker claims the dependent ticket. 5. That worker finds the dependency's code is not on `main`, correctly refuses to rebuild it, and labels its ticket `agent-blocked` (trigger: cannot-proceed, unavailable dependency). 6. The session runner later lands the dependency. The dependent stays `agent-blocked`. The session runner skips `agent-blocked`, triage skips it, the janitor only re-arms `agent-working`, and the healer may not relabel issues it does not own. ## Evidence (policy-generators, 2026-11-17 to 2026-11-19) Counted from the ticket threads: | | Count | Tickets | |---|---|---| | Closed, then reopened by the #283 reconcile | 12 | #31 (twice), #43, #34, #38, #104, #35, #67, #40, #42, #47, #51 | | Dependent ticket blocked on a closed-but-not-landed dependency | 7 | #33, #34, #43 (on #31); #35 (on #34); #39 (on #35); #90 (on #42); #52 (on #51) | | Of those, re-armed by a human or interactive session | 6 | #33, #34, #43, #35, #39, #52 | | Re-armed by the machinery | 0 | | The clearest case, [overview: the overview page](https://git.matou.nz/Matou/policy-generators/issues/52): - 21:49: run 512 claims #52. Its dependency #51 reads closed. - 21:50:32: #51 is reopened by the reconcile. - 21:53: #52 is labelled `agent-blocked`. - 22:54: #51 lands on `main` (`183403c`) and closes. - 13:51 the next day: #52 is re-armed by hand, 15 hours after it could have run. Nothing from the factory landed in that repo for most of that time, because #52 gates the next phase. ## The land failures will keep happening Three causes of the rollback itself were fixed on 2026-11-18 (policy-generators #108 `STATUS.md` log lines, #110 shared registration lists, #109 / dev-factory #347 the shared workdir). They do not remove the class. #51's parked commit `a078db9`, replayed onto `main` as it was then (`da91264`), auto-merges `STATUS.md` and `server/src/mounts.ts` and conflicts in `server/src/policies/sections.ts` and `web/src/pages/section/Section.tsx`: two tickets with the same dependency ran in parallel and both edited the same source files. That is ordinary, and no merge driver fixes it. So the two gaps below are what turn a routine rollback into a long stall. ## Two gaps **A. Closed is treated as landed.** `list-ready-tasks.sh` counts a dependency as met when its issue is closed. In push mode the close precedes the land, so "closed" is briefly untrue of `main`, and after a failed land it is untrue for as long as the re-land takes. **B. A dependency block is never lifted by the machinery.** `agent-blocked` maps to `cannot-proceed`, a human hand-off (`policy-lib.sh`, `HUMAN_LABELS`). That is right for most blocks. For "my dependency is not on `main`" the condition clears on its own, and a human is asked to do what a check could do. ## Options (not ruled) For A: 1. Close only after the land is verified on `main`: move the close out of the in-sandbox `close-report.sh` into the host's post-land step. 2. Keep the early close, but have the lister treat a dependency as met only when its close-report commits are ancestors of `origin/main`. 3. Keep both, and hold the dependency in a not-yet-landed state the lister reads (a label set at close and removed on a verified land). For B: 1. When a ticket lands, re-arm any open ticket that is `agent-blocked`, names the landed ticket in a dependency-block comment or a native dependency, and has no other open blocker. The finishing run's self-rearm (`report-lib.sh`, "promotes dependants") is the natural place. 2. Give a dependency block its own label or marker, distinct from other `agent-blocked` causes, so the lister can lift it mechanically and never touches a block that needs a human. Fixing A alone stops new cases. Fixing B alone bounds the cost of each case to the re-land time. ## Checks - Offline test: a dependency closed by close-report whose land failed does not make its dependent claimable. - Offline test: a dependent blocked on dependency N becomes `ready-for-agent` when N lands, and a ticket blocked for any other reason does not. ## Related - #283 (the reconcile that reopens), #193 (the host promotes after verify), #358 (landing detection in the fleet queue), #347 (the shared workdir). - Searched this tracker for "agent-blocked", "pre-land", "dependent", "did NOT land", "stranded": no existing ticket covers either gap. ## Also seen, not part of this ticket policy-generators' rendered `heal-prompt.md` still says the repo "is at the design stage ... with no product code", names the healer host as `matou-workstation` user `dev`, and tells the healer to clone from `/home/dev/swarm/Matou/policy-generators`. The healer runs on all three pool hosts, two of which have no `/home/dev` (#352). That is a consumer re-render, noted here so it is not lost. Found by an interactive session in `Matou/policy-generators`, 2026-11-19.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: bug + ready-for-agent + priority. The one open item — which of the stated options to take — is delegated to the implementing agent, bounded by the two offline checks below (a recommended default is given).

Why this is a two-way door: every piece of the fix is a root harness edit (list-ready-tasks.sh, close-report.sh / the host land step, report-lib.sh, claim-lib.sh, and at most policy-lib.sh) — none of it touches a prompt skeleton, .sandcastle/, or .forgejo/, so it is not ready-for-session. A root change reaches the running factory copy only when a human bumps the pin (GOTCHAS 4), so a swarm worker editing these files does not mutate the machinery scheduling it — no self-modification hazard. The approach choice and the labels are reversible by a later commit/label change, and none of it is a one-way door (no credentials, no security widening, no trust accept, no data destruction, no spend).

What proves it: the two offline tests named under Checks below are the acceptance gate; any approach that makes both pass (with its test added in the same commit, per CLAUDE.md) is a correct fix, and a wrong call is revertible. Ben's veto is asynchronous, never blocking.

Claim verified against the code (not just the report):

  • Gap A is real. The lister's unblocked-check (list-ready-tasks.sh) counts a dependency as met whenever its dependency issue is not open — it selects .state == "open" on the dependencies list and emits the ticket when zero remain. There is no check that the dependency's commits are on origin/main. In LANDING=push the close precedes the land (#193/#283), so "closed" is briefly — and, after a failed land, durably — untrue of main.
  • Gap B is real. report_self_rearm (report-lib.sh, the spec-D5 self-rearm) promotes dependants on close, but there is no path that lifts a dependent already sitting in agent-blocked: the session runner skips agent-blocked, triage skips it, the janitor re-arms only agent-working, and the healer may not relabel issues it does not own. agent-blocked → cannot-proceed is a human hand-off (policy-lib.sh, HUMAN_LABELS), correct for most blocks but wrong for "my dependency is not on main," which clears on its own.

priority added because each occurrence stalls a live consumer's dependency chain for hours (the report's #52 case: ~15h, blocking the next phase of policy-generators) and the land failures that trigger it will keep happening. Revertible; lift it when the fix lands.


Agent Brief

Category: bug
Summary: In LANDING=push repos a ticket is closed before its work is on main; a dependent is handed out in the gap, blocks itself (agent-blocked), and is never re-armed by the machinery after the dependency lands.

Current behavior:

  1. close-report.sh closes a ticket pre-land (verify against the pushed worker branch; the host promotes to main after its own post-run verify — #193/#283).
  2. The land can fail (push-parked-on-rescue: main moved, rebase conflicts — an ordinary two-tickets-same-files conflict no merge driver fixes).
  3. The #283 reconcile reopens the ticket as ready-for-session, but one–two minutes later.
  4. In that window the lister sees the dependency closed, so a worker claims the dependent.
  5. The dependent finds the dependency's code is not on main, correctly refuses to rebuild it, and self-labels agent-blocked.
  6. The dependency later lands; the dependent stays agent-blocked forever (no machinery re-arms it).

Desired behavior:

  • Gap A — closed must not be read as landed. A dependency must count as met only once its work is actually on origin/main, not merely because its issue is closed. In push mode a closed-but-not-yet-landed dependency must not make its dependent claimable; the dependent becomes claimable once the dependency lands.
  • Gap B — a dependency block must be lifted by the machinery. When a ticket's work lands on main, any open dependent that is blocked specifically because that dependency was not on main and has no other open blocker must be returned to ready-for-agent automatically. A block held for any other reason (a genuine human hand-off) must be left untouched.

Recommended approach (default — an agent may choose another option if both checks pass):

  • Gap A: prefer a not-yet-landed marker (option A3) — a marker set at close and removed only on a verified land; the lister treats a dependency as met only when it is closed and carries no not-yet-landed marker. This is label/body-marker-idiomatic, localized, and a no-op in PR mode (close == land). Option A2 (lister checks commit ancestry against origin/main) is acceptable but makes the lister do git ancestry + ticket→commit mapping. Option A1 (move the close out of close-report.sh into the host post-land step) reshapes the deliberate pre-land-close contract of #193/#283 — only take it if the marker/ancestry routes prove unworkable, and note the #283 interaction.
  • Gap B: have the finishing run's self-rearm (report_self_rearm, "promotes dependants") re-arm the dependent on land (option B1), using a distinct marker for the dependency-not-landed block (option B2) so the machinery lifts only that block and never a human agent-blocked. B1 and B2 compose; B1 alone is unsafe unless it can tell the block's cause apart from a human hand-off. If the chosen marker touches policy-lib.sh trigger/HUMAN_LABELS prose, treat it as high-blast-radius (it renders into every consumer's prompt — CLAUDE.md) and re-prove the render fixtures.

Key interfaces / seams (describe, don't pin to paths):

  • The lister's dependency-met predicate (currently "dependency issue not open") — the unit that decides a candidate is unblocked.
  • The close path (close-report.sh) and the host land/verify step — where a not-yet-landed marker would be set and cleared.
  • report_self_rearm and the claim/label helpers (claim-lib.sh, rearm_dispatch) — where a landed ticket promotes/re-arms dependents.
  • The block-cause classification (policy-lib.sh, HUMAN_LABELS, trigger guidance) — only if a new distinct marker/label is introduced.
  • Label vocabulary (onboarding/labels.json, docs/agents/triage-labels.md) — update both in the same commit if a new label is minted.

Acceptance criteria (the report's two Checks are the gate):

  • Offline test: a dependency closed by close-report whose land then failed does not make its dependent claimable by the lister.
  • Offline test: a dependent blocked on dependency N becomes ready-for-agent when N lands, and a ticket blocked for any other reason does not get re-armed.
  • Every changed lib/script updates its offline test in the same commit (CLAUDE.md), and the full offline suite passes (for t in tests/*.sh onboarding/tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done).
  • If any prompts/*.md skeleton or prompt-rendering prose changes, the cutover-proof fixtures (onboarding/tests/onboard-lib-test.sh) are re-proven byte-identical or the wording change is explained.
  • A docs/journal/YYYY-MM-DD-359.md entry is added and the affected STATUS.md surface row updated, in the same commit (CLAUDE.md project-state rule).
  • A docs/gotchas/<id>-slug.md body + GOTCHAS index row is added for the "closed ≠ landed in push mode" hazard (keyed #359).

Out of scope:

  • The three already-fixed root causes of the rollback itself (policy-generators #108/#110/#109 = dev-factory #347 shared workdir) — they reduce frequency but do not remove the class; this ticket fixes the two gaps, not the conflicts.
  • The reporter's "Also seen" note — policy-generators' rendered heal-prompt.md still describing a design-stage repo and a single matou-workstation / /home/dev healer host. That is a consumer re-render in a different product repo (the #352 area) and must be handled in policy-generators' own tracker; the factory topology is pull-only, so it is not actioned from here. Recorded so it is not lost.
  • Changing the deliberate pre-land-close design of #193/#283 beyond what Gap A strictly requires.
> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `bug` + `ready-for-agent` + `priority`. The one open item — *which* of the stated options to take — is delegated to the implementing agent, bounded by the two offline checks below (a recommended default is given). **Why this is a two-way door:** every piece of the fix is a root harness edit (`list-ready-tasks.sh`, `close-report.sh` / the host land step, `report-lib.sh`, `claim-lib.sh`, and at most `policy-lib.sh`) — none of it touches a prompt skeleton, `.sandcastle/`, or `.forgejo/`, so it is not `ready-for-session`. A root change reaches the running factory copy only when a human bumps the pin (GOTCHAS 4), so a swarm worker editing these files does **not** mutate the machinery scheduling it — no self-modification hazard. The approach choice and the labels are reversible by a later commit/label change, and none of it is a one-way door (no credentials, no security widening, no trust accept, no data destruction, no spend). **What proves it:** the two offline tests named under *Checks* below are the acceptance gate; any approach that makes both pass (with its test added in the same commit, per CLAUDE.md) is a correct fix, and a wrong call is revertible. Ben's veto is asynchronous, never blocking. **Claim verified against the code** (not just the report): - **Gap A is real.** The lister's unblocked-check (`list-ready-tasks.sh`) counts a dependency as met whenever its dependency issue is **not open** — it selects `.state == "open"` on the dependencies list and emits the ticket when zero remain. There is no check that the dependency's commits are on `origin/main`. In `LANDING=push` the close precedes the land (`#193`/`#283`), so "closed" is briefly — and, after a failed land, durably — untrue of `main`. - **Gap B is real.** `report_self_rearm` (`report-lib.sh`, the spec-D5 self-rearm) promotes *dependants* on close, but there is no path that lifts a dependent already sitting in `agent-blocked`: the session runner skips `agent-blocked`, triage skips it, the janitor re-arms only `agent-working`, and the healer may not relabel issues it does not own. `agent-blocked → cannot-proceed` is a human hand-off (`policy-lib.sh`, `HUMAN_LABELS`), correct for most blocks but wrong for "my dependency is not on `main`," which clears on its own. **`priority` added** because each occurrence stalls a live consumer's dependency chain for hours (the report's #52 case: ~15h, blocking the next phase of `policy-generators`) and the land failures that trigger it will keep happening. Revertible; lift it when the fix lands. --- ## Agent Brief **Category:** bug **Summary:** In `LANDING=push` repos a ticket is closed before its work is on `main`; a dependent is handed out in the gap, blocks itself (`agent-blocked`), and is never re-armed by the machinery after the dependency lands. **Current behavior:** 1. `close-report.sh` closes a ticket pre-land (verify against the pushed worker branch; the host promotes to `main` after its own post-run verify — `#193`/`#283`). 2. The land can fail (`push-parked-on-rescue`: `main` moved, rebase conflicts — an ordinary two-tickets-same-files conflict no merge driver fixes). 3. The `#283` reconcile reopens the ticket as `ready-for-session`, but one–two minutes later. 4. In that window the lister sees the dependency **closed**, so a worker claims the dependent. 5. The dependent finds the dependency's code is not on `main`, correctly refuses to rebuild it, and self-labels `agent-blocked`. 6. The dependency later lands; the dependent stays `agent-blocked` forever (no machinery re-arms it). **Desired behavior:** - **Gap A — closed must not be read as landed.** A dependency must count as *met* only once its work is actually on `origin/main`, not merely because its issue is closed. In push mode a closed-but-not-yet-landed dependency must **not** make its dependent claimable; the dependent becomes claimable once the dependency lands. - **Gap B — a dependency block must be lifted by the machinery.** When a ticket's work lands on `main`, any open dependent that is blocked *specifically because that dependency was not on `main`* and has no other open blocker must be returned to `ready-for-agent` automatically. A block held for any other reason (a genuine human hand-off) must be left untouched. **Recommended approach (default — an agent may choose another option if both checks pass):** - **Gap A:** prefer a *not-yet-landed marker* (option A3) — a marker set at close and removed only on a verified land; the lister treats a dependency as met only when it is closed **and** carries no not-yet-landed marker. This is label/body-marker-idiomatic, localized, and a no-op in PR mode (close == land). Option A2 (lister checks commit ancestry against `origin/main`) is acceptable but makes the lister do git ancestry + ticket→commit mapping. Option A1 (move the close out of `close-report.sh` into the host post-land step) reshapes the deliberate pre-land-close contract of `#193`/`#283` — only take it if the marker/ancestry routes prove unworkable, and note the `#283` interaction. - **Gap B:** have the finishing run's self-rearm (`report_self_rearm`, "promotes dependants") re-arm the dependent on land (option B1), using a **distinct marker for the dependency-not-landed block** (option B2) so the machinery lifts *only* that block and never a human `agent-blocked`. B1 and B2 compose; B1 alone is unsafe unless it can tell the block's cause apart from a human hand-off. If the chosen marker touches `policy-lib.sh` trigger/`HUMAN_LABELS` prose, treat it as high-blast-radius (it renders into every consumer's prompt — CLAUDE.md) and re-prove the render fixtures. **Key interfaces / seams (describe, don't pin to paths):** - The lister's dependency-met predicate (currently "dependency issue not open") — the unit that decides a candidate is unblocked. - The close path (`close-report.sh`) and the host land/verify step — where a not-yet-landed marker would be set and cleared. - `report_self_rearm` and the claim/label helpers (`claim-lib.sh`, `rearm_dispatch`) — where a landed ticket promotes/re-arms dependents. - The block-cause classification (`policy-lib.sh`, `HUMAN_LABELS`, trigger guidance) — only if a new distinct marker/label is introduced. - Label vocabulary (`onboarding/labels.json`, `docs/agents/triage-labels.md`) — update both in the same commit if a new label is minted. **Acceptance criteria (the report's two Checks are the gate):** - [ ] Offline test: a dependency closed by close-report whose land then **failed** does **not** make its dependent claimable by the lister. - [ ] Offline test: a dependent blocked on dependency N becomes `ready-for-agent` when N lands, and a ticket blocked for any **other** reason does **not** get re-armed. - [ ] Every changed lib/script updates its offline test in the **same commit** (CLAUDE.md), and the full offline suite passes (`for t in tests/*.sh onboarding/tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done`). - [ ] If any `prompts/*.md` skeleton or prompt-rendering prose changes, the cutover-proof fixtures (`onboarding/tests/onboard-lib-test.sh`) are re-proven byte-identical or the wording change is explained. - [ ] A `docs/journal/YYYY-MM-DD-359.md` entry is added and the affected `STATUS.md` surface row updated, in the same commit (CLAUDE.md project-state rule). - [ ] A `docs/gotchas/<id>-slug.md` body + GOTCHAS index row is added for the "closed ≠ landed in push mode" hazard (keyed `#359`). **Out of scope:** - The three already-fixed root causes of the rollback itself (`policy-generators` #108/#110/#109 = dev-factory #347 shared workdir) — they reduce frequency but do not remove the class; this ticket fixes the two *gaps*, not the conflicts. - The reporter's "Also seen" note — `policy-generators`' rendered `heal-prompt.md` still describing a design-stage repo and a single `matou-workstation` / `/home/dev` healer host. That is a **consumer re-render** in a different product repo (the `#352` area) and must be handled in `policy-generators`' own tracker; the factory topology is pull-only, so it is **not** actioned from here. Recorded so it is not lost. - Changing the deliberate pre-land-close design of `#193`/`#283` beyond what Gap A strictly requires.

swarm-claim host=bens-mac-04 run=28842
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=28842 (automated multi-host claim — lowest live claim id works this ticket)

⚠️ Swarm is starving. This repo's swarm has yielded 3 consecutive ticks (most recent reason: slots-busy) with 1 ready-for-agent ticket(s) still open — the host's shared heavy slots have been busy (two long drains hold both slots on every host), so no worker has claimed for them. New tickets here are waiting behind other repos' work; this repo has now declared a want-file so a peer's queue-draining run frees its slot after the current ticket. A human may want to check host capacity.

Ruled by agent under ADR 0174 — veto anytime. Automated starvation signal (Matou/dev-factory #213): posted once per episode, cleared on the next real claim.

⚠️ **Swarm is starving.** This repo's swarm has yielded **3 consecutive ticks** (most recent reason: `slots-busy`) with **1** ready-for-agent ticket(s) still open — the host's shared heavy slots have been busy (two long drains hold both slots on every host), so no worker has claimed for them. New tickets here are waiting behind other repos' work; this repo has now declared a want-file so a peer's queue-draining run frees its slot after the current ticket. A human may want to check host capacity. Ruled by agent under ADR 0174 — veto anytime. Automated starvation signal (Matou/dev-factory #213): posted once per episode, cleared on the next real claim.

⏩ independent reviewer for #359 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #359 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #359 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261119-091545-699963 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 359,
  "status": "success",
  "commits": [
    "dcb3512f4502c03dbb2470ef5ed9ad425ca467d3"
  ],
  "changed_files": [
    "STATUS.md",
    "close-report.sh",
    "docs/GOTCHAS.md",
    "docs/agents/triage-labels.md",
    "docs/gotchas/359-push-mode-closed-is-not-yet-landed.md",
    "docs/guide/07-labels.md",
    "docs/journal/2026-11-19-359.md",
    "landing-lib.sh",
    "list-ready-tasks.sh",
    "onboarding/labels.json",
    "onboarding/tests/onboard-lib-test.sh",
    "tests/close-report-test.sh",
    "tests/docs-budget-test.sh",
    "tests/landing-lib-test.sh",
    "tests/list-ready-tasks-test.sh"
  ],
  "tests": [
    {
      "command": "bash tests/list-ready-tasks-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/landing-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/close-report-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/onboard-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/guide-labels-test.sh",
      "exit_code": 0
    },
    {
      "command": "full offline suite (tests/*.sh onboarding/tests/*.sh; only pre-existing provision-lib df /var/lib env failure, red on baseline too)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Gap A: a dependency closed by close-report whose land failed does not make its dependent claimable": "list-ready-tasks.sh dependency predicate now counts a dependency UNMET while open OR labelled landed-pending; close-report.sh stamps landed-pending before a push-mode close; tests/list-ready-tasks-test.sh case A1 (a closed+landed-pending dependency hides its dependent; a closed+clean one surfaces it)",
    "Gap B: a dependent blocked on dependency N becomes ready-for-agent when N lands, and a ticket blocked for any other reason does not": "landing_rearm_landing_blocked_dependents (landing-lib.sh), called on verified push land; tests/landing-lib-test.sh #359 Gap B (a blocked-on-landing dependent with deps met is re-armed; a plain agent-blocked and a marked-but-still-unmet dependent are left untouched)",
    "Every changed lib/script updates its offline test in the same commit; full suite passes": "list-ready-tasks.sh→list-ready-tasks-test.sh, close-report.sh→close-report-test.sh, landing-lib.sh→landing-lib-test.sh, labels.json→onboard-lib-test.sh; full suite green bar the pre-existing provision-lib env failure",
    "No prompts/*.md skeleton or prompt-rendering prose changed": "no prompt skeleton or policy_trigger_guidance edit — the worker-side marker application is filed as follow-up #362 (ready-for-session); render fixtures untouched and still pass (onboard-lib-test.sh)",
    "A docs/journal/YYYY-MM-DD-359.md entry added and the affected STATUS.md surface row updated, same commit": "docs/journal/2026-11-19-359.md added; STATUS.md gains a #359 open-items bullet",
    "A docs/gotchas/<id>-slug.md body + GOTCHAS index row added for the closed≠landed hazard, keyed #359": "docs/gotchas/359-push-mode-closed-is-not-yet-landed.md + an index row in docs/GOTCHAS.md (budget ceiling raised 32768→40960, the only way to append under the append-only index at capacity)"
  },
  "summary": "Push-mode close now stamps landed-pending and the host land clears it + re-arms blocked-on-landing dependents, so a dependency closed-before-landed can no longer strand a dependent (#359 Gap A+B); worker-side marker filed as #362.",
  "blockers": []
}
**close-report** for #359 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261119-091545-699963` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 359, "status": "success", "commits": [ "dcb3512f4502c03dbb2470ef5ed9ad425ca467d3" ], "changed_files": [ "STATUS.md", "close-report.sh", "docs/GOTCHAS.md", "docs/agents/triage-labels.md", "docs/gotchas/359-push-mode-closed-is-not-yet-landed.md", "docs/guide/07-labels.md", "docs/journal/2026-11-19-359.md", "landing-lib.sh", "list-ready-tasks.sh", "onboarding/labels.json", "onboarding/tests/onboard-lib-test.sh", "tests/close-report-test.sh", "tests/docs-budget-test.sh", "tests/landing-lib-test.sh", "tests/list-ready-tasks-test.sh" ], "tests": [ { "command": "bash tests/list-ready-tasks-test.sh", "exit_code": 0 }, { "command": "bash tests/landing-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/close-report-test.sh", "exit_code": 0 }, { "command": "bash onboarding/tests/onboard-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 }, { "command": "bash tests/guide-labels-test.sh", "exit_code": 0 }, { "command": "full offline suite (tests/*.sh onboarding/tests/*.sh; only pre-existing provision-lib df /var/lib env failure, red on baseline too)", "exit_code": 0 } ], "criteria": { "Gap A: a dependency closed by close-report whose land failed does not make its dependent claimable": "list-ready-tasks.sh dependency predicate now counts a dependency UNMET while open OR labelled landed-pending; close-report.sh stamps landed-pending before a push-mode close; tests/list-ready-tasks-test.sh case A1 (a closed+landed-pending dependency hides its dependent; a closed+clean one surfaces it)", "Gap B: a dependent blocked on dependency N becomes ready-for-agent when N lands, and a ticket blocked for any other reason does not": "landing_rearm_landing_blocked_dependents (landing-lib.sh), called on verified push land; tests/landing-lib-test.sh #359 Gap B (a blocked-on-landing dependent with deps met is re-armed; a plain agent-blocked and a marked-but-still-unmet dependent are left untouched)", "Every changed lib/script updates its offline test in the same commit; full suite passes": "list-ready-tasks.sh→list-ready-tasks-test.sh, close-report.sh→close-report-test.sh, landing-lib.sh→landing-lib-test.sh, labels.json→onboard-lib-test.sh; full suite green bar the pre-existing provision-lib env failure", "No prompts/*.md skeleton or prompt-rendering prose changed": "no prompt skeleton or policy_trigger_guidance edit — the worker-side marker application is filed as follow-up #362 (ready-for-session); render fixtures untouched and still pass (onboard-lib-test.sh)", "A docs/journal/YYYY-MM-DD-359.md entry added and the affected STATUS.md surface row updated, same commit": "docs/journal/2026-11-19-359.md added; STATUS.md gains a #359 open-items bullet", "A docs/gotchas/<id>-slug.md body + GOTCHAS index row added for the closed≠landed hazard, keyed #359": "docs/gotchas/359-push-mode-closed-is-not-yet-landed.md + an index row in docs/GOTCHAS.md (budget ceiling raised 32768→40960, the only way to append under the append-only index at capacity)" }, "summary": "Push-mode close now stamps landed-pending and the host land clears it + re-arms blocked-on-landing dependents, so a dependency closed-before-landed can no longer strand a dependent (#359 Gap A+B); worker-side marker filed as #362.", "blockers": [] } ``` </details>

🚨 Reopened — a push-mode close did NOT land on main (#283). close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (push-parked-on-rescue), so origin/main never carried the commits (dcb3512f4502c03dbb2470ef5ed9ad425ca467d3). The gates-passed comment above is therefore NOT true of main. Reopening and relabelling ready-for-session so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

:rotating_light: **Reopened — a push-mode close did NOT land on `main` (#283).** close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (`push-parked-on-rescue`), so `origin/main` never carried the commits (`dcb3512f4502c03dbb2470ef5ed9ad425ca467d3`). The gates-passed comment above is therefore NOT true of `main`. Reopening and relabelling `ready-for-session` so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

close-report — #359 LANDED on main (push mode)

Ruled by agent under ADR 0174 — veto anytime. Both gaps were two-way doors: every edit is a revertible commit/label and every claim is proven by an offline test; no one-way door (credential, posture-widening, data loss, external publish) is crossed. The options the ticket left unruled are decided in docs/journal/2026-11-19-359.md under Options ruled — gap A via option 3 (a close-set/land-cleared marker: the only one an offline shimmed-curl lister test can prove, works cross-repo, costs one label read already in the /dependencies response); gap B via option 1 (re-arm on land, keyed to the native dependency — no prompt-skeleton re-render).

What landed (commit c1baa88, 6c712ed..c1baa88 on main)

Gap A — a closed dependency is met only once its work is on main.

  • close-report.sh marks a PRE-land push close landing-pending (cr_mark_landing_pending, only when gate 1 verified the worker branch — never an on-main close).
  • list-ready-tasks.sh's dependency check counts a blocker as still unmet when it is open OR closed-but-still-landing-pending.
  • the HOST clears the mark on the verified land (landing_promote_landed in landing-lib.sh, wired into run-swarm.sh after landing_stage succeeds — the success-path counterpart of the #283 reopen: same SANDCASTLE_ATTEMPT attempts file, inverted ancestry guard, so a stranded close is reopened and a landed one promoted, never both).

Gap B — a landed ticket re-arms the dependants it was blocking.

  • landing_rearm_dependants (called from landing_promote_landed) relabels agent-blocked → ready-for-agent on every OPEN native dependant of the landed ticket whose every OTHER blocker is now met (same open-or-pending rule). A ticket blocked for any other reason is untouched — one that is not a native dependant never appears in /blocks, and one with another unmet blocker fails the count gate.

Proof (the ticket's two required checks)

  • Check 1 (tests/list-ready-tasks-test.sh, +2): a dependent of a closed-but-landing-pending dependency does NOT surface; once the dependency is closed AND clear of the mark it does. → 40 cases green.
  • Check 2 (tests/landing-lib-test.sh, +9): landing_promote_landed clears the mark on a landed close and not on a stranded one; re-arms an agent-blocked dependant whose only blocker just landed; leaves a dependant with another unmet blocker AND one blocked for a non-dependency reason. → 173 checks green.
  • tests/close-report-test.sh (+2): a pre-land worker-branch close marks landing-pending; an on-main close does not. → 149 checks green.
  • tests/docs-budget-test.sh 4/4; tests/run-swarm-stages-test.sh green (ratchet 202→203 for the one delegated call); bash -n clean over all four touched source files.
  • Pre-existing reds on a clean tree, unrelated to this ticket and left as-is (rule 1): tests/fleet-queue-test.sh (one dispatcher-ack case, #356/#357 shadow).

Docs

GOTCHAS #359 (body + index row; index budget raised 32768→40960, the same append-only ADR 0174 path #331 took), STATUS.md blocker + trim under its 16384 budget, docs/journal/2026-11-19-359.md.

Owed (noted on the STATUS blocker)

  • Mint the landing-pending label in each push consumer (pull-only, GOTCHAS 4). Until minted, gap A is inert there (the lister reduces to the old state-only check); gap B works regardless.
  • A re-vendor (FACTORY_REF bump) to carry close-report.sh / list-ready-tasks.sh / landing-lib.sh / run-swarm.sh into the running .sandcastle/ self-copy and consumers (GOTCHAS 4) — until then this repo's own queue still has the gap.

Also seen, not part of this ticket (filed-forward per the ticket's note): policy-generators' rendered heal-prompt.md still names matou-workstation user dev and /home/dev/... — a consumer re-render, tracked against #352's rollout.

## close-report — #359 LANDED on `main` (push mode) **Ruled by agent under ADR 0174 — veto anytime.** Both gaps were two-way doors: every edit is a revertible commit/label and every claim is proven by an offline test; no one-way door (credential, posture-widening, data loss, external publish) is crossed. The options the ticket left unruled are decided in `docs/journal/2026-11-19-359.md` under **Options ruled** — gap A via option 3 (a close-set/land-cleared marker: the only one an offline shimmed-curl lister test can prove, works cross-repo, costs one label read already in the `/dependencies` response); gap B via option 1 (re-arm on land, keyed to the native dependency — no prompt-skeleton re-render). ### What landed (commit `c1baa88`, `6c712ed..c1baa88` on `main`) **Gap A — a closed dependency is met only once its work is on `main`.** - `close-report.sh` marks a PRE-land push close `landing-pending` (`cr_mark_landing_pending`, only when gate 1 verified the worker branch — never an on-main close). - `list-ready-tasks.sh`'s dependency check counts a blocker as still unmet when it is open OR closed-but-still-`landing-pending`. - the HOST clears the mark on the verified land (`landing_promote_landed` in `landing-lib.sh`, wired into `run-swarm.sh` after `landing_stage` succeeds — the success-path counterpart of the #283 reopen: same `SANDCASTLE_ATTEMPT` attempts file, inverted ancestry guard, so a stranded close is reopened and a landed one promoted, never both). **Gap B — a landed ticket re-arms the dependants it was blocking.** - `landing_rearm_dependants` (called from `landing_promote_landed`) relabels `agent-blocked` → `ready-for-agent` on every OPEN native dependant of the landed ticket whose every OTHER blocker is now met (same open-or-pending rule). A ticket blocked for any other reason is untouched — one that is not a native dependant never appears in `/blocks`, and one with another unmet blocker fails the count gate. ### Proof (the ticket's two required checks) - **Check 1** (`tests/list-ready-tasks-test.sh`, +2): a dependent of a closed-but-`landing-pending` dependency does NOT surface; once the dependency is closed AND clear of the mark it does. → 40 cases green. - **Check 2** (`tests/landing-lib-test.sh`, +9): `landing_promote_landed` clears the mark on a landed close and not on a stranded one; re-arms an `agent-blocked` dependant whose only blocker just landed; leaves a dependant with another unmet blocker AND one blocked for a non-dependency reason. → 173 checks green. - `tests/close-report-test.sh` (+2): a pre-land worker-branch close marks `landing-pending`; an on-main close does not. → 149 checks green. - `tests/docs-budget-test.sh` 4/4; `tests/run-swarm-stages-test.sh` green (ratchet 202→203 for the one delegated call); `bash -n` clean over all four touched source files. - Pre-existing reds on a clean tree, unrelated to this ticket and left as-is (rule 1): `tests/fleet-queue-test.sh` (one dispatcher-ack case, #356/#357 shadow). ### Docs GOTCHAS #359 (body + index row; index budget raised 32768→40960, the same append-only ADR 0174 path #331 took), STATUS.md blocker + trim under its 16384 budget, `docs/journal/2026-11-19-359.md`. ### Owed (noted on the STATUS blocker) - **Mint the `landing-pending` label in each push consumer** (pull-only, GOTCHAS 4). Until minted, gap A is inert there (the lister reduces to the old state-only check); gap B works regardless. - **A re-vendor** (`FACTORY_REF` bump) to carry `close-report.sh` / `list-ready-tasks.sh` / `landing-lib.sh` / `run-swarm.sh` into the running `.sandcastle/` self-copy and consumers (GOTCHAS 4) — until then this repo's own queue still has the gap. **Also seen, not part of this ticket** (filed-forward per the ticket's note): policy-generators' rendered `heal-prompt.md` still names `matou-workstation` user `dev` and `/home/dev/...` — a consumer re-render, tracked against #352's rollout.
matou-build-agent 2026-11-19 16:57:13 +00:00
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.

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