Implement blocked-on-dependency in triage, pre-flight, and director auto-resume #872

Open
opened 2026-07-09 21:49:53 +00:00 by coilyco-ops · 0 comments
Member

Depends on upstream contract

This issue depends on the agentic-os contract issue that freezes the marker syntax and wake semantics for blocked-on-dependency.

Upstream dependency in prose: do not invent the blocker-pointer format here. Wait for the agentic-os contract issue to land, then implement against that exact shape.

Why here

All three enforcement points named in the research brief live in ward today:

  • Classifier / startup triage: cmd/ward/agent_director_triage.go
  • Headless pre-flight wording and NO-GO handling: cmd/ward/agent.go
  • Durable queue / wake behavior: cmd/ward/agent_director.go

cli-guard currently has a mode ceiling and a preflight seam, but it does not own the durable backlog ledger or cross-repo wake loop, so this behavior belongs in ward first.

Scope

1. Classifier detection

Teach startup triage to recognize the contract-defined blocker marker and classify the issue as:

  • existing mode: usually headless
  • readiness: blocked-on-dependency
  • blocker pointer: the concrete upstream issue ref

Fail closed if the marker is missing, malformed, or ambiguous.

2. Pre-flight reasoning

Update headless pre-flight so a blocked-headless issue is no longer explained as a generic human consult/fork.

Desired behavior:

  • It should distinguish "needs a human decision" from "correctly scoped, waiting on upstream".
  • The visible result can still be a no-launch outcome, but the reason text must read as defer-and-wake, not bounce-to-human.
  • If the product wants a new explicit verdict beyond GO / NO-GO / WRONG-REPO, add it deliberately and thread it through parsing, comments, and dispatch decline classification.

3. Director ledger and wake loop

Add readiness + blocker metadata to the durable backlog ledger and make the director re-queue blocked dependents when the upstream issue closes.

Recommendation from research:

  • Implement this in the existing polling loop, not as a webhook system.
  • Reuse the ledger model already used for queued, dispatched, failed, blocked, and pre-launch requeue paths.
  • Keep wake idempotent. If two directors observe the same unblocking transition, reservation logic should prevent duplicate useful work, but tests should prove it.

Acceptance

  • A triaged issue with a valid blocker marker is recognized as blocked-on-dependency and not treated as plain consult.
  • Headless pre-flight explains the state as machine-blocked / auto-resumable, not as a human design fork.
  • A blocked dependent issue is not dispatched while its blocker is open.
  • When the blocker closes, the dependent is re-entered into the headless queue with no human re-triage.
  • Restarting the director does not lose blocker metadata or wake behavior.
  • Duplicate wake observation is harmless and does not create duplicate effective work.

Testing notes

  • The original motivating case, ward#124, closed on 2026-07-09, so tests should use fixtures or a synthetic blocker/dependent pair rather than rely on that live issue.
  • Add tests around malformed markers, stale blockers, multiple dependents on one blocker, and double-observed wakes.

Downstream / non-goals

  • Do not open a cli-guard follow-up just to mirror this behavior unless a real non-ward consumer appears.
  • Native Forgejo issue-dependency edges can be explored later, but they are not required for the first implementation.

Filed by ward agent advisor cross-repo fan-out from coilyco-flight-deck/agentic-os#282 (part 2 of 2, ward#424). Upstream dependency: coilyco-flight-deck/agentic-os#394.

— Codex, via ward agent

## Depends on upstream contract This issue depends on the `agentic-os` contract issue that freezes the marker syntax and wake semantics for `blocked-on-dependency`. Upstream dependency in prose: do **not** invent the blocker-pointer format here. Wait for the `agentic-os` contract issue to land, then implement against that exact shape. ## Why here All three enforcement points named in the research brief live in `ward` today: - **Classifier / startup triage**: `cmd/ward/agent_director_triage.go` - **Headless pre-flight wording and NO-GO handling**: `cmd/ward/agent.go` - **Durable queue / wake behavior**: `cmd/ward/agent_director.go` `cli-guard` currently has a mode ceiling and a preflight seam, but it does **not** own the durable backlog ledger or cross-repo wake loop, so this behavior belongs in `ward` first. ## Scope ### 1. Classifier detection Teach startup triage to recognize the contract-defined blocker marker and classify the issue as: - existing mode: usually `headless` - readiness: `blocked-on-dependency` - blocker pointer: the concrete upstream issue ref Fail closed if the marker is missing, malformed, or ambiguous. ### 2. Pre-flight reasoning Update headless pre-flight so a blocked-headless issue is no longer explained as a generic human consult/fork. Desired behavior: - It should distinguish **"needs a human decision"** from **"correctly scoped, waiting on upstream"**. - The visible result can still be a no-launch outcome, but the reason text must read as **defer-and-wake**, not bounce-to-human. - If the product wants a new explicit verdict beyond `GO` / `NO-GO` / `WRONG-REPO`, add it deliberately and thread it through parsing, comments, and dispatch decline classification. ### 3. Director ledger and wake loop Add readiness + blocker metadata to the durable backlog ledger and make the director re-queue blocked dependents when the upstream issue closes. Recommendation from research: - Implement this in the **existing polling loop**, not as a webhook system. - Reuse the ledger model already used for `queued`, `dispatched`, `failed`, `blocked`, and pre-launch requeue paths. - Keep wake idempotent. If two directors observe the same unblocking transition, reservation logic should prevent duplicate useful work, but tests should prove it. ## Acceptance - A triaged issue with a valid blocker marker is recognized as blocked-on-dependency and not treated as plain consult. - Headless pre-flight explains the state as machine-blocked / auto-resumable, not as a human design fork. - A blocked dependent issue is not dispatched while its blocker is open. - When the blocker closes, the dependent is re-entered into the headless queue with no human re-triage. - Restarting the director does not lose blocker metadata or wake behavior. - Duplicate wake observation is harmless and does not create duplicate effective work. ## Testing notes - The original motivating case, `ward#124`, closed on **2026-07-09**, so tests should use fixtures or a synthetic blocker/dependent pair rather than rely on that live issue. - Add tests around malformed markers, stale blockers, multiple dependents on one blocker, and double-observed wakes. ## Downstream / non-goals - Do **not** open a `cli-guard` follow-up just to mirror this behavior unless a real non-ward consumer appears. - Native Forgejo issue-dependency edges can be explored later, but they are not required for the first implementation. --- Filed by `ward agent advisor` cross-repo fan-out from coilyco-flight-deck/agentic-os#282 (part 2 of 2, ward#424). Upstream dependency: coilyco-flight-deck/agentic-os#394. <!-- ward-agent-signature --> — Codex, via `ward agent`
coilyco-ops added
P3
and removed
P2
labels 2026-07-10 09:00:35 +00:00
coilyco-ops added
P4
and removed
P3
labels 2026-07-14 06:50:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#872
No description provided.