main's fmt gate was red (over-indented host/last_seen in scheduler test
fixtures + drift in socket/store/tests from earlier Phase-3 merges). This
brings the branch to fmt --all --check clean so the gate passes; kept
separate from the dedup fix commit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The merged #206 created a regression: cmd_intake_task created a task
at submit time (returning id A) AND the scheduler tick created a second
task from the same request (id B, which got claimed). Two tasks per
intake, with the returned id pointing to the orphaned copy.
Fix: TaskRequest now carries the pre-created task_id. The tick drops
its create_task() call and only does pick_agent + claim_task on the
existing id. One task, one id, the returned id is the one the
scheduler routes.
- TaskRequest gains task_id field
- cmd_intake_task creates once, pushes id to queue
- scheduler tick claims via req.task_id (no create_task)
- scheduler unit test pre-creates task before submit
- multi_agent_board test verifies id in response