prompt: a worker self-marks blocked-on-landing when it stops on a not-yet-landed dependency (#359 Gap B worker side) #362

Open
opened 2026-11-19 14:54:02 +00:00 by matou-build-agent · 2 comments

What

The #359 machinery is in place: close-report stamps a push-mode close
landed-pending, list-ready-tasks.sh treats a dependency as unmet while it
carries that marker, and on a verified land landing_rearm_landing_blocked_dependents
re-arms every open dependent that carries both agent-blocked and
blocked-on-landing. The distinct blocked-on-landing marker is what tells a
self-clearing dependency block apart from a human hand-off, so the re-arm never
touches a plain agent-blocked.

The one piece #359 could not land itself: the worker must apply
blocked-on-landing
when it stops specifically because a dependency's work is
not yet on main. That application lives in the prompt hand-off path
(prompts/prompt.md's {{HANDOFF_RULES}}, generated by
prompt-render-lib.sh from policy-lib.sh's policy_trigger_guidance /
HUMAN_LABELS) — a high-blast-radius prompt edit that renders into every
consumer's prompt (CLAUDE.md), so #359 filed it here per the prompt-files rule
(a ready-for-session ticket, not a swarm edit).

Desired

When a worker takes the blocked path with trigger cannot-proceed
specifically because a dependency's committed work is not yet on main (an
"unavailable dependency" of the self-clearing kind), it should add the
blocked-on-landing label in addition to agent-blocked. A
cannot-proceed block for any other reason (a red outside the slice, a broken
environment) must NOT carry it — the marker's whole point is that the land seam
may lift it automatically, which is only safe for a dependency-not-landed block.

The blocked-on-landing label is already minted (onboarding/labels.json,
documented in docs/guide/07-labels.md and docs/agents/triage-labels.md).

Scope / design notes

  • This is prompt/policy design work — decide whether the instruction belongs in
    the cannot-proceed guidance (policy_trigger_guidance, renders into every
    consumer) or as a focused addition to the generated hand-off block
    (prompt_render_handoff_rules). Either way re-prove the cutover-proof render
    fixtures (onboarding/tests/onboard-lib-test.sh) byte-identical, or explain
    the wording change (CLAUDE.md).
  • Until this lands, #359 Gap A (the preventive fix) fully stops new cases by
    never handing a dependent out in the pre-land gap; Gap B's re-arm machinery is
    dormant only because nothing applies the marker yet.
  • #359 (the machinery this completes), GOTCHAS #359, ADR 0002 (landing),
    #193/#283 (push close precedes land).
## What The #359 machinery is in place: `close-report` stamps a push-mode close `landed-pending`, `list-ready-tasks.sh` treats a dependency as unmet while it carries that marker, and on a verified land `landing_rearm_landing_blocked_dependents` re-arms every open dependent that carries **both** `agent-blocked` **and** `blocked-on-landing`. The distinct `blocked-on-landing` marker is what tells a self-clearing dependency block apart from a human hand-off, so the re-arm never touches a plain `agent-blocked`. The one piece #359 could not land itself: **the worker must apply `blocked-on-landing`** when it stops specifically because a dependency's work is not yet on `main`. That application lives in the prompt hand-off path (`prompts/prompt.md`'s `{{HANDOFF_RULES}}`, generated by `prompt-render-lib.sh` from `policy-lib.sh`'s `policy_trigger_guidance` / `HUMAN_LABELS`) — a high-blast-radius prompt edit that renders into every consumer's prompt (CLAUDE.md), so #359 filed it here per the prompt-files rule (a `ready-for-session` ticket, not a swarm edit). ## Desired When a worker takes the blocked path with trigger **cannot-proceed** *specifically because a dependency's committed work is not yet on `main`* (an "unavailable dependency" of the self-clearing kind), it should add the `blocked-on-landing` label **in addition to** `agent-blocked`. A cannot-proceed block for any other reason (a red outside the slice, a broken environment) must NOT carry it — the marker's whole point is that the land seam may lift it automatically, which is only safe for a dependency-not-landed block. The `blocked-on-landing` label is already minted (`onboarding/labels.json`, documented in `docs/guide/07-labels.md` and `docs/agents/triage-labels.md`). ## Scope / design notes - This is prompt/policy design work — decide whether the instruction belongs in the `cannot-proceed` guidance (`policy_trigger_guidance`, renders into every consumer) or as a focused addition to the generated hand-off block (`prompt_render_handoff_rules`). Either way re-prove the cutover-proof render fixtures (`onboarding/tests/onboard-lib-test.sh`) byte-identical, or explain the wording change (CLAUDE.md). - Until this lands, #359 Gap A (the preventive fix) fully stops *new* cases by never handing a dependent out in the pre-land gap; Gap B's re-arm machinery is dormant only because nothing applies the marker yet. ## Related - #359 (the machinery this completes), GOTCHAS #359, ADR 0002 (landing), #193/#283 (push close precedes land).
Author
Member

Blocked on #359 landing first — the prompt edit cannot be done safely yet

Session finding (standing session on matou-workstation, landing mode push). I
checked main before touching anything and the ticket's stated preconditions do
not hold there:

  • blocked-on-landing is minted nowhere. It is not in
    onboarding/labels.json, not in docs/guide/07-labels.md, not in
    docs/agents/triage-labels.md, and appears in no code on main. The ticket's
    "Scope / design notes" assert it is "already minted … documented in" those
    files — that is not true on main.
  • The #359 machinery is not on main. There is no landed-pending stamping
    in close-report-lib.sh, no dependency-unmet handling keyed to that marker in
    list-ready-tasks.sh, and no landing_rearm_landing_blocked_dependents in
    landing-lib.sh.
  • #359 itself is still open (agent-working + ready-for-agent) — its work
    has not landed.

#362's only deliverable is a prompt instruction telling a blocked worker to add
blocked-on-landing. That instruction renders into every consumer's prompt
(the {{HANDOFF_RULES}} / policy_trigger_guidance blast radius). Landing it now
would ship, fleet-wide, a reference to a label minted in no repo: a worker that
hit the case would resolve an empty label id and fail to park correctly, and the
marker would be inert anyway because #359's re-arm seam is not on main. That is
shipping a provably-broken instruction, so it is not a two-way door I can land.

With some irony, this is the exact bug class #359/#362 exists to fix: a dependent
reached before its dependency's committed work is on main. #362 carried no
Forgejo dependency on #359
, which is why the session queue dispatched it into
the pre-land gap.

Action taken (two-way doors only)

  1. Added a Forgejo issue-dependency: #362 is now blocked-by #359.
    session-runner.sh skips a ticket with any open dependency (line ~479,
    "never run on an unverified frontier"), and that skip is explicitly not an
    attempt — so #362 will not be re-dispatched or burn attempts until #359 lands
    and closes, at which point it re-enters the session lane automatically. This
    is the self-clearing route (not a human hand-off), so the ticket stays
    ready-for-session — fittingly, exactly the distinction blocked-on-landing
    is meant to encode.
  2. No code edited, nothing pushed, ticket left open.

Design recommendation for the eventual #362 session (after #359 lands)

The two candidate homes both render fleet-wide, and that is fine: the
blocked-on-landing + land-seam-rearm mechanism is harness-universal (vendored
close-report / list-ready-tasks / landing-lib), not product-specific, so
naming the label in shared prompt text is blast-radius-safe either way.

  • prompt_render_handoff_rules (the generated hand-off block) is the better
    register fit. That block is where label-application mechanics already live
    ("add the ONE hand-off label … whose trigger matches", plus the label_id curl
    examples). A focused addition there — "if you stopped specifically because a
    dependency's committed work is not yet on main, also add
    blocked-on-landing in addition to the cannot-proceed label; the land seam
    re-arms you automatically when it lands" — slots in beside the existing
    label-swap step and can refer to the cannot-proceed label generically (never
    hardcode agent-blocked: it is the repo's HUMAN_LABELS mapping for that
    trigger).
  • policy_trigger_guidance cannot-proceed is the alternative. Its text
    already enumerates "an unavailable dependency" as a cannot-proceed sub-case, so
    the instruction is topically at home — but that function is purely descriptive
    (one wrapped sentence per trigger), and adding a conditional second-label
    action mixes registers.

Lean: the hand-off block, with the exact wording pinned to #359's final contract
(the re-arm keys on an open dependent carrying both agent-blocked and
blocked-on-landing). Either way, re-prove the cutover-proof render fixtures
(onboarding/tests/onboard-lib-test.sh) byte-identical or explain the wording
change, per CLAUDE.md's prompt-skeleton rule.

Ruled by agent under ADR 0174 — veto anytime. Proof: blocked-on-landing absent
from onboarding/labels.json / docs/guide/07-labels.md /
docs/agents/triage-labels.md and all code on main; #359 state open;
session-runner.sh dependency gate at the pick loop.

## Blocked on #359 landing first — the prompt edit cannot be done safely yet Session finding (standing session on `matou-workstation`, landing mode `push`). I checked `main` before touching anything and the ticket's stated preconditions do not hold there: - **`blocked-on-landing` is minted nowhere.** It is **not** in `onboarding/labels.json`, **not** in `docs/guide/07-labels.md`, **not** in `docs/agents/triage-labels.md`, and appears in no code on `main`. The ticket's "Scope / design notes" assert it is "already minted … documented in" those files — that is not true on `main`. - **The #359 machinery is not on `main`.** There is no `landed-pending` stamping in `close-report-lib.sh`, no dependency-unmet handling keyed to that marker in `list-ready-tasks.sh`, and no `landing_rearm_landing_blocked_dependents` in `landing-lib.sh`. - **#359 itself is still open** (`agent-working` + `ready-for-agent`) — its work has not landed. #362's only deliverable is a prompt instruction telling a blocked worker to add `blocked-on-landing`. That instruction renders into **every consumer's prompt** (the `{{HANDOFF_RULES}}` / `policy_trigger_guidance` blast radius). Landing it now would ship, fleet-wide, a reference to a label minted in no repo: a worker that hit the case would resolve an empty label id and fail to park correctly, and the marker would be inert anyway because #359's re-arm seam is not on `main`. That is shipping a provably-broken instruction, so it is not a two-way door I can land. With some irony, this is the exact bug class #359/#362 exists to fix: a dependent reached before its dependency's committed work is on `main`. #362 carried **no Forgejo dependency on #359**, which is why the session queue dispatched it into the pre-land gap. ### Action taken (two-way doors only) 1. Added a Forgejo issue-dependency: **#362 is now blocked-by #359.** `session-runner.sh` skips a ticket with any open dependency (line ~479, "never run on an unverified frontier"), and that skip is explicitly *not* an attempt — so #362 will not be re-dispatched or burn attempts until #359 lands and closes, at which point it re-enters the session lane automatically. This is the self-clearing route (not a human hand-off), so the ticket stays `ready-for-session` — fittingly, exactly the distinction `blocked-on-landing` is meant to encode. 2. No code edited, nothing pushed, ticket left open. ### Design recommendation for the eventual #362 session (after #359 lands) The two candidate homes both render fleet-wide, and that is fine: the `blocked-on-landing` + land-seam-rearm mechanism is harness-universal (vendored `close-report` / `list-ready-tasks` / `landing-lib`), not product-specific, so naming the label in shared prompt text is blast-radius-safe either way. - **`prompt_render_handoff_rules` (the generated hand-off block)** is the better register fit. That block is where label-*application* mechanics already live ("add the ONE hand-off label … whose trigger matches", plus the `label_id` curl examples). A focused addition there — "if you stopped specifically because a dependency's committed work is not yet on `main`, **also** add `blocked-on-landing` in addition to the cannot-proceed label; the land seam re-arms you automatically when it lands" — slots in beside the existing label-swap step and can refer to the cannot-proceed label generically (never hardcode `agent-blocked`: it is the repo's HUMAN_LABELS mapping for that trigger). - **`policy_trigger_guidance cannot-proceed`** is the alternative. Its text already enumerates "an unavailable dependency" as a cannot-proceed sub-case, so the instruction is topically at home — but that function is purely *descriptive* (one wrapped sentence per trigger), and adding a conditional second-label *action* mixes registers. Lean: the hand-off block, with the exact wording pinned to #359's final contract (the re-arm keys on an open dependent carrying **both** `agent-blocked` **and** `blocked-on-landing`). Either way, re-prove the cutover-proof render fixtures (`onboarding/tests/onboard-lib-test.sh`) byte-identical or explain the wording change, per CLAUDE.md's prompt-skeleton rule. Ruled by agent under ADR 0174 — veto anytime. Proof: `blocked-on-landing` absent from `onboarding/labels.json` / `docs/guide/07-labels.md` / `docs/agents/triage-labels.md` and all code on `main`; #359 state `open`; `session-runner.sh` dependency gate at the pick loop.
Author
Member

Ruled by agent under ADR 0174 — routing to a human for a design ruling (veto anytime)

Standing session on matou-workstation, landing mode push, run after #359 landed.

I investigated #362 against the now-landed #359 code and found that its stated
preconditions are not merely "not ready yet" (the state the prior session at
2026-11-19T15:00:53Z deferred on) but are contradicted by the design #359
actually landed
. Completing #362 as written would reverse a deliberate,
documented #359 decision, so this is a design-authority call, not an unattended
two-way-door edit.

Timeline

The prior session correctly refused to ship #362 while #359 was unlanded and added
a Forgejo dependency (#362 blocked-by #359) so the session queue would re-dispatch
it after #359 landed — the self-clearing route. #359 has since landed and
closed
(commit c1baa88; gap A + gap B machinery is on main), so #362
re-entered the session lane and was dispatched to me. But #359 did not land the
marker-based contract the prior session's recommendation assumed; it landed the
opposite one.

What #362 assumes vs. what #359 landed

#362 (What) states the re-arm is landing_rearm_landing_blocked_dependents, keying
on "both agent-blocked and blocked-on-landing," and that
blocked-on-landing "is already minted (onboarding/labels.json, documented in
docs/guide/07-labels.md and docs/agents/triage-labels.md)." On origin/main
(c1baa88):

  • There is no landing_rearm_landing_blocked_dependents. The landed re-arm is
    landing_rearm_dependants (landing-lib.sh:904). It keys on the native
    Forgejo dependency DAG
    (/issues/<n>/blocks), agent-blocked, and an "every
    other blocker now met" count gate (landing-lib.sh:914-921). It does not
    reference blocked-on-landing.
  • blocked-on-landing is minted nowhere — not in onboarding/labels.json, not
    in docs/guide/07-labels.md, not in docs/agents/triage-labels.md, and in no
    .sh. The marker #359 actually uses is landing-pending (on the dependency),
    and even that mint is still owed per consumer.
  • Gap B is therefore not "dormant because nothing applies the marker yet"
    (#362, Scope). It is live and keyed on the native DAG — exactly as the #359
    journal records.

Why this is a human ruling, not a mechanical edit

The #359 journal's "Options ruled" is explicit (docs/journal/2026-11-19-359.md):

For B the ticket offered (1) re-arm on land or (2) a distinct block label; (1)
was taken
— it needs no prompt-skeleton re-render (the high-blast-radius
path), keying instead on the native dependency the DAG already carries.

#362 asks to implement option (2) — the distinct blocked-on-landing label,
applied by a worker via a {{HANDOFF_RULES}} / policy_trigger_guidance prompt
re-render — i.e. the option #359 deliberately rejected precisely to avoid that
high-blast-radius prompt path.

Critically, #362's own requirement — "a cannot-proceed block for any other reason
must NOT carry it … the re-arm never touches a plain agent-blocked" — can only be
met by making the re-arm require the marker. That narrows the currently-live
gap B: until blocked-on-landing is minted on every push consumer (pull-only,
GOTCHAS 4) and the re-rendered prompt reaches them, no ticket carries the
marker, so gap B would re-arm nothing — an interim regression of the exact hot
bug #359 just fixed (7 stranded dependents on policy-generators). There is no
purely-additive version: keeping the native-DAG re-arm and adding the marker
leaves the marker functionally inert (native-DAG already covers marked tickets);
the only way the marker tightens is to replace the native-DAG check, which
regresses.

So completing #362 requires a human to choose between two coherent end-states:

  1. Keep #359 as landed (native-DAG re-arm). Then #362 is largely superseded —
    close it; the cost is leaving the narrow false-re-arm case unguarded (a native
    dependant parked agent-blocked for a non-dependency reason whose last native
    blocker then lands would be wrongly re-armed).
  2. Adopt the marker-gated re-arm (#362's vision): mint blocked-on-landing on
    every push consumer, change landing_rearm_dependants to require it, re-render
    the prompt (high blast radius), and accept the interim gap-B dormancy during the
    pull-only rollout.

Both are revertible code, but choosing to reverse a deliberate, just-landed,
documented ruling — and to narrow a live fix for a hot bug during a multi-consumer
rollout — is a design-authority call (CLAUDE.md: prompt-skeleton / policy changes
are "design work, not mechanical edits"). Once ruled, the implementation itself
(whichever option) is ordinary two-way-door work a session can complete.

No code changed

Read-only investigation; no commits, nothing pushed. Evidence: landing-lib.sh:904-928
(landing_rearm_dependants), docs/journal/2026-11-19-359.md ("Options ruled" /
Gap B), onboarding/labels.json (no blocked-on-landing), #359 state closed.

Why human

A design ruling is required before any code can land: does #359's gap B stay on
the native-DAG re-arm it deliberately chose (option 1 — then close #362 as
superseded), or switch to the distinct-blocked-on-landing-marker approach #362
describes (option 2)?
Option 2 reverses a documented #359 decision, requires
minting blocked-on-landing across every push consumer (pull-only) plus a
high-blast-radius prompt re-render, and narrows the live gap-B fix (interim
dormancy for a hot bug) during rollout. That trade-off is the human residue — not
an agent's call. I am relabelling ready-for-session → ready-for-human rather
than leaving it in the session lane, because the blocker is no longer self-clearing
(#359 has landed): another session would only re-derive this same contradiction and
burn an attempt.

## Ruled by agent under ADR 0174 — routing to a human for a design ruling (veto anytime) Standing session on `matou-workstation`, landing mode `push`, run after #359 landed. I investigated #362 against the **now-landed** #359 code and found that its stated preconditions are not merely "not ready yet" (the state the prior session at 2026-11-19T15:00:53Z deferred on) but are **contradicted by the design #359 actually landed**. Completing #362 as written would *reverse* a deliberate, documented #359 decision, so this is a design-authority call, not an unattended two-way-door edit. ### Timeline The prior session correctly refused to ship #362 while #359 was unlanded and added a Forgejo dependency (#362 blocked-by #359) so the session queue would re-dispatch it after #359 landed — the self-clearing route. #359 **has since landed and closed** (commit `c1baa88`; gap A + gap B machinery is on `main`), so #362 re-entered the session lane and was dispatched to me. But #359 did not land the marker-based contract the prior session's recommendation assumed; it landed the *opposite* one. ### What #362 assumes vs. what #359 landed #362 (What) states the re-arm is `landing_rearm_landing_blocked_dependents`, keying on "**both** `agent-blocked` **and** `blocked-on-landing`," and that `blocked-on-landing` "is already minted (`onboarding/labels.json`, documented in `docs/guide/07-labels.md` and `docs/agents/triage-labels.md`)." On `origin/main` (`c1baa88`): - There is **no** `landing_rearm_landing_blocked_dependents`. The landed re-arm is `landing_rearm_dependants` (`landing-lib.sh:904`). It keys on the **native Forgejo dependency DAG** (`/issues/<n>/blocks`), `agent-blocked`, and an "every other blocker now met" count gate (`landing-lib.sh:914-921`). It does **not** reference `blocked-on-landing`. - `blocked-on-landing` is minted **nowhere** — not in `onboarding/labels.json`, not in `docs/guide/07-labels.md`, not in `docs/agents/triage-labels.md`, and in no `.sh`. The marker #359 actually uses is `landing-pending` (on the *dependency*), and even that mint is still owed per consumer. - Gap B is therefore **not** "dormant because nothing applies the marker yet" (#362, Scope). It is **live** and keyed on the native DAG — exactly as the #359 journal records. ### Why this is a human ruling, not a mechanical edit The #359 journal's "Options ruled" is explicit (`docs/journal/2026-11-19-359.md`): > For B the ticket offered (1) re-arm on land or (2) a distinct block label; **(1) > was taken** — it needs no prompt-skeleton re-render (the high-blast-radius > path), keying instead on the native dependency the DAG already carries. #362 asks to implement option **(2)** — the distinct `blocked-on-landing` label, applied by a worker via a `{{HANDOFF_RULES}}` / `policy_trigger_guidance` prompt re-render — i.e. the option #359 deliberately rejected precisely to avoid that high-blast-radius prompt path. Critically, #362's own requirement — "a cannot-proceed block for any other reason must NOT carry it … the re-arm never touches a plain `agent-blocked`" — can only be met by making the re-arm **require** the marker. That **narrows** the currently-live gap B: until `blocked-on-landing` is minted on every push consumer (pull-only, GOTCHAS 4) **and** the re-rendered prompt reaches them, no ticket carries the marker, so gap B would re-arm **nothing** — an interim regression of the exact hot bug #359 just fixed (7 stranded dependents on `policy-generators`). There is no purely-additive version: keeping the native-DAG re-arm *and* adding the marker leaves the marker functionally inert (native-DAG already covers marked tickets); the only way the marker *tightens* is to *replace* the native-DAG check, which regresses. So completing #362 requires a human to choose between two coherent end-states: 1. **Keep #359 as landed** (native-DAG re-arm). Then #362 is largely superseded — close it; the cost is leaving the narrow false-re-arm case unguarded (a native dependant parked `agent-blocked` for a *non-dependency* reason whose last native blocker then lands would be wrongly re-armed). 2. **Adopt the marker-gated re-arm** (#362's vision): mint `blocked-on-landing` on every push consumer, change `landing_rearm_dependants` to require it, re-render the prompt (high blast radius), and accept the interim gap-B dormancy during the pull-only rollout. Both are revertible code, but choosing to reverse a deliberate, just-landed, documented ruling — and to narrow a live fix for a hot bug during a multi-consumer rollout — is a design-authority call (CLAUDE.md: prompt-skeleton / policy changes are "design work, not mechanical edits"). Once ruled, the implementation itself (whichever option) is ordinary two-way-door work a session can complete. ### No code changed Read-only investigation; no commits, nothing pushed. Evidence: `landing-lib.sh:904-928` (`landing_rearm_dependants`), `docs/journal/2026-11-19-359.md` ("Options ruled" / Gap B), `onboarding/labels.json` (no `blocked-on-landing`), #359 state `closed`. ## Why human A design ruling is required before any code can land: **does #359's gap B stay on the native-DAG re-arm it deliberately chose (option 1 — then close #362 as superseded), or switch to the distinct-`blocked-on-landing`-marker approach #362 describes (option 2)?** Option 2 reverses a documented #359 decision, requires minting `blocked-on-landing` across every push consumer (pull-only) plus a high-blast-radius prompt re-render, and narrows the live gap-B fix (interim dormancy for a hot bug) during rollout. That trade-off is the human residue — not an agent's call. I am relabelling `ready-for-session` → `ready-for-human` rather than leaving it in the session lane, because the blocker is no longer self-clearing (#359 has landed): another session would only re-derive this same contradiction and burn an attempt.
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.

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