mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-01 07:01:41 +00:00
fix(kanban): reject direct running transitions in dashboard bulk updates
Salvages #24050 by @kronexoi. The single-task PATCH already rejects direct status='running' since it bypasses the dispatcher/claim invariant, but the bulk-update endpoint still accepted it. Aligns bulk with single by emitting an error result row for any 'running' entry.
This commit is contained in:
parent
666b66a066
commit
e8ce7b83fa
2 changed files with 36 additions and 1 deletions
|
|
@ -913,7 +913,17 @@ def bulk_update(payload: BulkTaskBody, board: Optional[str] = Query(None)):
|
|||
ok = kanban_db.unblock_task(conn, tid)
|
||||
else:
|
||||
ok = _set_status_direct(conn, tid, "ready")
|
||||
elif s in {"todo", "running", "triage"}:
|
||||
elif s == "running":
|
||||
entry.update(
|
||||
ok=False,
|
||||
error=(
|
||||
"Cannot set status to 'running' directly; "
|
||||
"use the dispatcher/claim path"
|
||||
),
|
||||
)
|
||||
results.append(entry)
|
||||
continue
|
||||
elif s in {"todo", "triage"}:
|
||||
ok = _set_status_direct(conn, tid, s)
|
||||
else:
|
||||
entry.update(ok=False, error=f"unknown status {s!r}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue