run-swarm: stand down clean on a failed ready-list read, and name the stage on the task log (#157) #158
No reviewers
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/dev-factory!158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/157-ready-list-standdown"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #157. Brings home the patch parked on
Matou/matou-app#442 since 2026-09-06, which could not land there becauserun-swarm.shis vendored.The defect
A failed
schedule_list_ready_or_verdictended the run with a bareexit 1. The cause landed in the verdict, the runlog and swarm.db — all host-side — while theactions_logan operator reads off a red tick showed nothing between thepolicy:line andRUN exit status 1. The healer keyed that empty log to one signature and silenced it, which also silences any genuine red that later collapses onto the same blank-log signature. ~2% of matou-app's swarm ticks, signature7f647f2d78ed.#142 improved the wording inside the verdict; it touched neither the blank log nor the red.
What changed
on_exitprints one stderr line on a non-zero exit:run-swarm: RUN FAILED — exit <ec> in stage '<stage>' (reason=<reason>)[ — <captured error>].schedule_list_ready_or_verdictalready captured,SWARM_EXIT_REASON=list-ready-transient,exit 0.The judgement call
Half two converts one class of red into a clean no-op tick, which is the part worth a second opinion. The case for it: the run genuinely had no work and no fault of its own — the same posture as the existing zero-ready-tasks path, and the same shape as #1424's notify guard. The case against: a forge outage stops showing up in the red/green signal. That is exactly why half one lands with it rather than instead of it — a persistent outage now idles every tick loudly in the task log.
If you'd rather keep the red, half one alone still fixes the blank log; say so and I'll drop half two.
Verified
tests/run-swarm-stages-test.sh+2 groups (12 total). Red before green: with the fix reverted, "a red run must name its stage + reason on stderr" fails.tests/*.sh+onboarding/tests/*.sh): no failures, includingswarm-db-test.sh, which flaked under contention on an earlier run and is green here.bash -nclean.Blast radius
Vendored file — every consumer picks this up at its next
FACTORY_REFbump. matou-app#442 closes on its bump, which is queued as matou-app#580 along with the #156 prompt re-render.🤖 Generated with Claude Code