landing-pending stalls the queue: a clean land does not clear it, and a reopened ticket carrying it is skipped by every session #382

Closed
opened 2026-11-20 03:29:13 +00:00 by ben · 4 comments
Owner

What happens

Minting the landing-pending label (#359, gap A) stalls a consumer's queue in two ways. Seen on this tracker and on policy-generators on 2026-11-19, both at pin 9fd804b.

1. A verified land does not clear the label. The ticket stays closed with landing-pending, so list-ready-tasks.sh counts it as an unmet dependency for ever.

  • policy-generators #64: closed 23:15:32Z, landing-pending added 23:15:44Z, its three commits are on main, run 760 on bens-mac-04 ended completed at 23:17:21Z. The label was still on at 00:36Z. Its dependants #65, #68 and #70 were ready-for-agent and every swarm run from 23:17Z logged no-ready-tasks.
  • This tracker: #371 and #374 are closed, on main, and still carried the label at 00:36Z.

2. A reopened stranded close keeps the label, and its name makes every session skip the ticket. landing_ticket_label reads the first label starting landing-, and policy_ticket_landing refuses any that is not on the allowlist. So landing_mode_for fails and the session runner logs cannot resolve how it lands; skipped. There is no TTL on this.

  • This tracker's #373: closed 20:48Z, land rolled back and reopened ready-for-session 20:57Z, still carrying landing-pending. bens-mac-04 skipped it 17 times from 21:15Z to 00:35Z; matou-workstation and elitebook-03 skipped it too.

What was done by hand

The landing-pending label was deleted from both trackers at about 00:37Z on 2026-11-20 (an interactive session, Claude with Ben, which had minted it on both the day before). That takes it off #64, #371, #373 and #374 and makes gap A inert again, as it was before the mint. Gap B (re-arming dependants) is not affected.

Not yet known

Why landing_promote_landed did not clear the label on a clean land. Two things to check: whether the commits named on the SANDCASTLE_ATTEMPT line are the same shas that reach main, and whether the call is reached on the clean-land path at all.

Fix

  • Clear the label on every verified land, and prove it on a real run.
  • Strip the label in landing_reopen_stranded_closes.
  • Either rename the label so it does not start with landing-, or make landing_ticket_label ignore it.

Checks

  • Offline test: a reopened stranded close no longer carries the label.
  • Offline test: landing_mode_for resolves a ticket that carries the label.
  • On a live consumer with the label minted: a ticket that lands loses the label within the same run, and its dependant is picked on the next run.

Do not mint the label on any consumer until this is fixed.

## What happens Minting the `landing-pending` label (#359, gap A) stalls a consumer's queue in two ways. Seen on this tracker and on policy-generators on 2026-11-19, both at pin `9fd804b`. **1. A verified land does not clear the label.** The ticket stays closed with `landing-pending`, so `list-ready-tasks.sh` counts it as an unmet dependency for ever. - policy-generators #64: closed 23:15:32Z, `landing-pending` added 23:15:44Z, its three commits are on `main`, run 760 on `bens-mac-04` ended `completed` at 23:17:21Z. The label was still on at 00:36Z. Its dependants #65, #68 and #70 were `ready-for-agent` and every swarm run from 23:17Z logged `no-ready-tasks`. - This tracker: #371 and #374 are closed, on `main`, and still carried the label at 00:36Z. **2. A reopened stranded close keeps the label, and its name makes every session skip the ticket.** `landing_ticket_label` reads the first label starting `landing-`, and `policy_ticket_landing` refuses any that is not on the allowlist. So `landing_mode_for` fails and the session runner logs `cannot resolve how it lands; skipped`. There is no TTL on this. - This tracker's #373: closed 20:48Z, land rolled back and reopened `ready-for-session` 20:57Z, still carrying `landing-pending`. `bens-mac-04` skipped it 17 times from 21:15Z to 00:35Z; `matou-workstation` and `elitebook-03` skipped it too. ## What was done by hand The `landing-pending` label was deleted from both trackers at about 00:37Z on 2026-11-20 (an interactive session, Claude with Ben, which had minted it on both the day before). That takes it off #64, #371, #373 and #374 and makes gap A inert again, as it was before the mint. Gap B (re-arming dependants) is not affected. ## Not yet known Why `landing_promote_landed` did not clear the label on a clean land. Two things to check: whether the commits named on the `SANDCASTLE_ATTEMPT` line are the same shas that reach `main`, and whether the call is reached on the clean-land path at all. ## Fix - Clear the label on every verified land, and prove it on a real run. - Strip the label in `landing_reopen_stranded_closes`. - Either rename the label so it does not start with `landing-`, or make `landing_ticket_label` ignore it. ## Checks - Offline test: a reopened stranded close no longer carries the label. - Offline test: `landing_mode_for` resolves a ticket that carries the label. - On a live consumer with the label minted: a ticket that lands loses the label within the same run, and its dependant is picked on the next run. Do not mint the label on any consumer until this is fixed.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: ready-for-agent. This is a two-way door: the fix is a change to root harness code (landing-lib.sh and its policy helpers — none under the protected .sandcastle//.forgejo/ paths, so a swarm worker may edit it), it is fully revertible by a later commit, and it is provable by two offline tests the reporter already specified (a reopened stranded close no longer carries the label; landing_mode_for resolves a ticket that carries it). It is on none of the one-way-door items (no credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend). The report is filed by the maintainer, already carries bug + priority, confirms the defect on two live trackers at pin 9fd804b, and names the exact code paths — verified against the current tree: landing_ticket_label returns the first landing-* label, POLICY_TICKET_LANDING_LABELS defaults to pr only (so landing-pending fails policy_ticket_landing → landing_mode_for rc 1 → skip), and landing_promote_landed owns the clean-land clear that is not firing.

Agent Brief

Category: bug
Summary: landing-pending stalls a consumer's queue two ways — a verified land never clears it, and because its name starts with landing- every session refuses to resolve how the ticket lands and skips it.

Current behavior:

  1. Clean land does not clear the label. When a ticket's commits reach main, the landed issue keeps landing-pending, so the ready-task lister counts the closed issue as a forever-unmet dependency and its dependants never get picked (policy-generators #64 → #65/#68/#70 starved; this tracker #371/#374).
  2. A reopened stranded close keeps the label and becomes unpickable. The function that reads a ticket's landing label returns the first landing-*-prefixed label; landing-pending is not on the landing allowlist (POLICY_TICKET_LANDING_LABELS, default pr), so the landing-mode resolver returns rc 1 and the session runner logs cannot resolve how it lands; skipped, with no TTL. This tracker's #373 was skipped 17+ times across three hosts.

Desired behavior:

  • Every verified land clears landing-pending from the landed issue within the same run.
  • Reopening a stranded close strips landing-pending so the reopened ticket is immediately pickable.
  • A ticket carrying landing-pending resolves its landing mode normally — either the label no longer begins with landing-, or the landing-label reader ignores it — so it is never mistaken for a landing-authority override.

Key interfaces:

  • The clean-land promotion path (the success counterpart of the stranded-close reopener) must clear the landing-pending label; investigate why it does not fire today — check whether the commit shas named on the attempt line match those reaching main, and whether the call is reached on the clean-land branch at all.
  • The stranded-close reopen path must strip the landing-pending label before re-labelling the ticket for the pipeline.
  • The landing-label reader / landing-mode resolver must not treat the landing-pending marker as a landing-authority label (rename off the landing- prefix, or exclude it explicitly). LANDING_PENDING_LABEL is the single source of the label string — route any exclusion through it.

Acceptance criteria:

  • Offline test: a reopened stranded close no longer carries the landing-pending label.
  • Offline test: the landing-mode resolver resolves (does not rc-1 / skip) a ticket that carries the landing-pending label.
  • Offline test proving the clean-land path clears the label from the landed issue.
  • The three lib changes each update their test in the same commit; 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).
  • A docs/journal/ entry and the affected STATUS.md/GOTCHAS surface are updated in the same commit per CLAUDE.md, if project state changes.

Out of scope:

  • Gap B (re-arming dependants) — tracked separately; this ticket is gap A only.
  • Minting landing-pending on any consumer. The label is currently unminted on all trackers (deleted by hand 2026-11-20T00:37Z); keep it that way until this lands. The report's third check ("on a live consumer with the label minted, a landed ticket loses the label within the same run") therefore cannot be run by the agent and is not an acceptance gate here — it is the human re-mint verification that the fix unblocks. The three offline tests above are the contract.
> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `ready-for-agent`. This is a two-way door: the fix is a change to root harness code (`landing-lib.sh` and its policy helpers — none under the protected `.sandcastle/`/`.forgejo/` paths, so a swarm worker may edit it), it is fully revertible by a later commit, and it is **provable by two offline tests the reporter already specified** (a reopened stranded close no longer carries the label; `landing_mode_for` resolves a ticket that carries it). It is on none of the one-way-door items (no credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend). The report is filed by the maintainer, already carries `bug` + `priority`, confirms the defect on two live trackers at pin `9fd804b`, and names the exact code paths — verified against the current tree: `landing_ticket_label` returns the first `landing-*` label, `POLICY_TICKET_LANDING_LABELS` defaults to `pr` only (so `landing-pending` fails `policy_ticket_landing` → `landing_mode_for` rc 1 → skip), and `landing_promote_landed` owns the clean-land clear that is not firing. ## Agent Brief **Category:** bug **Summary:** `landing-pending` stalls a consumer's queue two ways — a verified land never clears it, and because its name starts with `landing-` every session refuses to resolve how the ticket lands and skips it. **Current behavior:** 1. **Clean land does not clear the label.** When a ticket's commits reach `main`, the landed issue keeps `landing-pending`, so the ready-task lister counts the closed issue as a forever-unmet dependency and its dependants never get picked (policy-generators #64 → #65/#68/#70 starved; this tracker #371/#374). 2. **A reopened stranded close keeps the label and becomes unpickable.** The function that reads a ticket's landing label returns the first `landing-*`-prefixed label; `landing-pending` is not on the landing allowlist (`POLICY_TICKET_LANDING_LABELS`, default `pr`), so the landing-mode resolver returns rc 1 and the session runner logs `cannot resolve how it lands; skipped`, with no TTL. This tracker's #373 was skipped 17+ times across three hosts. **Desired behavior:** - Every verified land clears `landing-pending` from the landed issue within the same run. - Reopening a stranded close strips `landing-pending` so the reopened ticket is immediately pickable. - A ticket carrying `landing-pending` resolves its landing mode normally — either the label no longer begins with `landing-`, or the landing-label reader ignores it — so it is never mistaken for a landing-authority override. **Key interfaces:** - The clean-land promotion path (the success counterpart of the stranded-close reopener) must clear the landing-pending label; investigate why it does not fire today — check whether the commit shas named on the attempt line match those reaching `main`, and whether the call is reached on the clean-land branch at all. - The stranded-close reopen path must strip the landing-pending label before re-labelling the ticket for the pipeline. - The landing-label reader / landing-mode resolver must not treat the landing-pending marker as a landing-authority label (rename off the `landing-` prefix, or exclude it explicitly). `LANDING_PENDING_LABEL` is the single source of the label string — route any exclusion through it. **Acceptance criteria:** - [ ] Offline test: a reopened stranded close no longer carries the landing-pending label. - [ ] Offline test: the landing-mode resolver resolves (does not rc-1 / skip) a ticket that carries the landing-pending label. - [ ] Offline test proving the clean-land path clears the label from the landed issue. - [ ] The three lib changes each update their test in the same commit; 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`). - [ ] A `docs/journal/` entry and the affected `STATUS.md`/`GOTCHAS` surface are updated in the same commit per CLAUDE.md, if project state changes. **Out of scope:** - Gap B (re-arming dependants) — tracked separately; this ticket is gap A only. - Minting `landing-pending` on any consumer. The label is currently unminted on all trackers (deleted by hand 2026-11-20T00:37Z); keep it that way until this lands. The report's third check ("on a live consumer with the label minted, a landed ticket loses the label within the same run") therefore cannot be run by the agent and is **not** an acceptance gate here — it is the human re-mint verification that the fix unblocks. The three offline tests above are the contract.

swarm-claim host=matou-dev-server-01 run=29037
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=29037 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #382 — verdict unauthenticated

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

close-report for #382 — status success

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

envelope
{
  "issue": 382,
  "status": "success",
  "commits": [
    "77abd0f8ce7a922f6413ecd1c90c69cb5448fc77"
  ],
  "changed_files": [
    "landing-lib.sh",
    "tests/landing-lib-test.sh",
    "STATUS.md",
    "docs/GOTCHAS.md",
    "docs/gotchas/382-landing-pending-stalls-the-queue.md",
    "docs/journal/2026-11-20-382.md"
  ],
  "tests": [
    {
      "command": "bash tests/landing-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Offline test: a reopened stranded close no longer carries the landing-pending label": "tests/landing-lib-test.sh check '#382 a reopened stranded close drops landing-pending (DELETE label 71)' — landing_reopen_stranded_closes now removes LANDING_PENDING_LABEL before relabelling (landing-lib.sh)",
    "Offline test: the landing-mode resolver resolves (does not rc-1/skip) a ticket that carries the landing-pending label": "tests/landing-lib-test.sh checks '#382 landing_mode_for RESOLVES (rc 0, push default) a ticket carrying only landing-pending' and '#382 landing_ticket_label ignores the landing-pending marker' — landing_ticket_label excludes LANDING_PENDING_LABEL from the landing-* scan (landing-lib.sh)",
    "Offline test proving the clean-land path clears the label from the landed issue": "tests/landing-lib-test.sh checks '#382 gap A: a REBASE-landed close (commits not reachable by SHA) still clears landing-pending' and '#359 gap A: a landed close clears its landing-pending mark (DELETE label 71)' — landing_promote_landed now clears the mark when the success close still reads closed (landing-lib.sh)",
    "The three lib changes each update their test in the same commit; the full offline suite passes": "commit 77abd0f8ce7a922f6413ecd1c90c69cb5448fc77 updates landing-lib.sh + tests/landing-lib-test.sh together (194 checks green); full suite green except the pre-existing environment-only tests/provision-lib-test.sh red (df /var/lib docker probe), which fails identically on a clean tree and is outside this slice",
    "A docs/journal entry and the affected STATUS.md/GOTCHAS surface are updated in the same commit per CLAUDE.md, if project state changes": "same commit adds docs/journal/2026-11-20-382.md and docs/gotchas/382-landing-pending-stalls-the-queue.md + its index row in docs/GOTCHAS.md, and folds the STATUS.md #359 row to #359/#382 (mint now safe after re-vendor)"
  },
  "summary": "Clear landing-pending on every verified land (keyed on issue state, not the rebase-defeated by-SHA check), strip it on #283 reopen, and exclude it from the landing-mode resolver so a ticket carrying it is no longer skipped.",
  "blockers": []
}
**close-report** for #382 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261120034547-1076409` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 382, "status": "success", "commits": [ "77abd0f8ce7a922f6413ecd1c90c69cb5448fc77" ], "changed_files": [ "landing-lib.sh", "tests/landing-lib-test.sh", "STATUS.md", "docs/GOTCHAS.md", "docs/gotchas/382-landing-pending-stalls-the-queue.md", "docs/journal/2026-11-20-382.md" ], "tests": [ { "command": "bash tests/landing-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 }, { "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh", "exit_code": 0 } ], "criteria": { "Offline test: a reopened stranded close no longer carries the landing-pending label": "tests/landing-lib-test.sh check '#382 a reopened stranded close drops landing-pending (DELETE label 71)' — landing_reopen_stranded_closes now removes LANDING_PENDING_LABEL before relabelling (landing-lib.sh)", "Offline test: the landing-mode resolver resolves (does not rc-1/skip) a ticket that carries the landing-pending label": "tests/landing-lib-test.sh checks '#382 landing_mode_for RESOLVES (rc 0, push default) a ticket carrying only landing-pending' and '#382 landing_ticket_label ignores the landing-pending marker' — landing_ticket_label excludes LANDING_PENDING_LABEL from the landing-* scan (landing-lib.sh)", "Offline test proving the clean-land path clears the label from the landed issue": "tests/landing-lib-test.sh checks '#382 gap A: a REBASE-landed close (commits not reachable by SHA) still clears landing-pending' and '#359 gap A: a landed close clears its landing-pending mark (DELETE label 71)' — landing_promote_landed now clears the mark when the success close still reads closed (landing-lib.sh)", "The three lib changes each update their test in the same commit; the full offline suite passes": "commit 77abd0f8ce7a922f6413ecd1c90c69cb5448fc77 updates landing-lib.sh + tests/landing-lib-test.sh together (194 checks green); full suite green except the pre-existing environment-only tests/provision-lib-test.sh red (df /var/lib docker probe), which fails identically on a clean tree and is outside this slice", "A docs/journal entry and the affected STATUS.md/GOTCHAS surface are updated in the same commit per CLAUDE.md, if project state changes": "same commit adds docs/journal/2026-11-20-382.md and docs/gotchas/382-landing-pending-stalls-the-queue.md + its index row in docs/GOTCHAS.md, and folds the STATUS.md #359 row to #359/#382 (mint now safe after re-vendor)" }, "summary": "Clear landing-pending on every verified land (keyed on issue state, not the rebase-defeated by-SHA check), strip it on #283 reopen, and exclude it from the landing-mode resolver so a ticket carrying it is no longer skipped.", "blockers": [] } ``` </details>
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/dev-factory#382
No description provided.