claim-next-task: SWARM_RUN_ID:-0 fallback silently defeats arbitration for manual runs #468
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
From the 2026-08-12 final whole-branch review (finding I-3); upgrades the Task-4 deferred "run_number=0 collision" note. Protected path (.sandcastle) — human/controller change, not a swarm-worker ticket.
Problem:
.sandcastle/claim-next-task.shline ~22:run="${SWARM_RUN_ID:-0}". A manual invocation without SWARM_RUN_ID posts claims naming run 0, which no alive-runs list ever contains — every other host's arbitration treats the claim as dead and claims straight over it, and the next janitor sweep deletes the manual claim comment + agent-working label outright. The operator believes they hold a claim; the pool behaves as if they don't. Worse than the spec's accepted "manual sessions don't claim" risk, because invoking the machinery produces a claim that LOOKS protective and isn't.Fix: fail loud — when SWARM_RUN_ID is unset or 0, print a warning to stderr and either refuse to claim (emit
[], exit 0) or require an explicit override env (e.g. SWARM_CLAIM_FORCE=1). Add a fake-forge test. Sync to matou-app via the #250 harness manifest.Triage: added the missing category label. This is a defect report (
SWARM_RUN_ID:-0fallback silently defeats claim arbitration on manual runs) — labelledbug.ready-for-humanwas already correctly applied (protected.sandcastlecontroller path); left as-is.