fix-claim-lifecycle

Fix: claim lifecycle (wg reset + wg retry + dispatcher)

Metadata

Statusdone
Assignedagent-994
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:opus
Created2026-04-28T22:24:06.307397955+00:00
Started2026-04-28T22:45:29.371319831+00:00
Completed2026-04-28T23:09:41.615301385+00:00
Tagsbug,fix,claims, eval-scheduled
Eval score0.76
└ blocking impact0.78
└ completeness0.75
└ coordination overhead0.80
└ correctness0.78
└ downstream usability0.75
└ efficiency0.78
└ intent fidelity0.85
└ style adherence0.80

Description

Description

Implement the approach chosen in design-claim-lifecycle. Read that task's log first via wg show design-claim-lifecycle for the chosen approach, file paths, and schema notes.

Bugs being fixed:

  • bug-reset-leaves-stale-claims.md: wg reset leaves stale claimed_by → dispatcher silently skips
  • bug-retry-doesnt-clear-stale-downstream-claims.md: wg retry doesn't propagate to downstream → silent stall on fan-out workflows

Also fix the misleading hint in wg service status output (currently says "check agent configuration" when the real cause is stale claims).

Validation

  • Failing tests written first (TDD), one per bug: - test_wg_reset_clears_stale_claims: tasks reset → claimed_by is null → dispatcher spawns fresh agents - test_wg_retry_clears_downstream_claims_on_dead_agents: retry upstream → transitive downstream claims to dead agents are cleared
  • (If heartbeat option chosen) test_dispatcher_heartbeat_unclaims_dead_agents: claim with non-running agent_id → dispatcher unclaims at next tick
  • Repro from bug-reset doc steps 1–6 produces fresh agent spawns (NOT "spawned=0")
  • Repro from bug-retry doc steps 1–6 produces downstream agent spawn after upstream completes
  • wg service status hint is updated to mention stale claims as a possibility
  • cargo build + cargo test pass
  • Permanent smoke scenarios added under tests/smoke/scenarios/ with owners list including this task id
  • cargo install --path . was run before claiming done

Depends on

Required by

Log