fix(scheduler): eliminate intake double-create (+ fmt normalize) #207
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/intake-task-no-duplicate"
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?
Fixes the intake double-create regression that #206 introduced, and clears the inherited fmt drift on
main.The fix (
a336f17) — verified correct#206 made
cmd_intake_taskcreate_taskand the scheduler tickcreate_taskagain → two tasks per intake, with the returned id being the orphaned-queued copy. This branch makes intake create the task once and the scheduler claim the existing task:TaskRequestcarries the pre-createdtask_idcmd_intake_taskpasses itcreate_task, keepspick_agent→claim_task(task_id, agent)Empirically verified (built + ran the daemon):
intake-taskonce → exactly one task, statusclaimed, and its id equals the id returned to the caller. Unit test assertstasks.len()==1; both intake integration tests pass.fmt (
b812c1e) — separate commitcargo fmt --allnormalized 4 files (scheduler/socket/multi_agent_board/store-lib):main's fmt gate was already red from drift inherited via earlier Phase-3 merges. Kept separate from the logic fix; bringsfmt --all --checkgreen.Gates
cargo fmt --all --checkclaimed, returned-id == routed task🤖 Generated with Claude Code