mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(mcp): flow_server i_will_work_on forwards steps — completes #172
#172 (4c397e1) added IWillWorkOnRequest.steps, the flow_dev route
threading, the _dev_steps_gate, and the developer prompt — but never
updated the roboco-flow MCP tool. flow_server.i_will_work_on exposed
only (task_id, plan) and posted only those, so the agent's tool could
not transmit steps. Every fresh dev claim hit the gate's
incomplete_input missing=['steps'] with no way to satisfy it →
permanent wedge for every code task (observed in smoke-16: be-dev-1
looped ~20 times, then deadlocked — could not claim, block, or idle).
Add the steps parameter and forward it, mirroring the existing
i_will_plan/sub_tasks pattern (which is why PM i_will_plan was never
affected). Update the two body-shape tests and add a steps-passthrough
regression test.
This commit is contained in:
@@ -140,7 +140,11 @@ def test_i_will_work_on_passes_plan(flow_module: types.ModuleType) -> None:
|
||||
flow_module.i_will_work_on("task-uuid", plan="my plan")
|
||||
|
||||
args, kwargs = fake_client.post.call_args
|
||||
assert kwargs["json"] == {"task_id": "task-uuid", "plan": "my plan"}
|
||||
assert kwargs["json"] == {
|
||||
"task_id": "task-uuid",
|
||||
"plan": "my plan",
|
||||
"steps": [],
|
||||
}
|
||||
assert "/api/v2/flow/developer/i_will_work_on" in args[0]
|
||||
|
||||
|
||||
@@ -151,7 +155,28 @@ def test_i_will_work_on_plan_defaults_to_none(flow_module: types.ModuleType) ->
|
||||
flow_module.i_will_work_on("task-uuid")
|
||||
|
||||
_, kwargs = fake_client.post.call_args
|
||||
assert kwargs["json"] == {"task_id": "task-uuid", "plan": None}
|
||||
assert kwargs["json"] == {"task_id": "task-uuid", "plan": None, "steps": []}
|
||||
|
||||
|
||||
def test_i_will_work_on_passes_steps(flow_module: types.ModuleType) -> None:
|
||||
"""#172: the MCP tool must forward the steps checklist; the
|
||||
server-side _dev_steps_gate rejects a fresh claim without it, so a
|
||||
tool that drops steps wedges every code task."""
|
||||
fake_client = _make_fake_client({"status": "in_progress"})
|
||||
steps = [
|
||||
{"title": "Checkout", "description": "create branch and read README"},
|
||||
{"title": "Edit", "description": "append the timestamp comment"},
|
||||
]
|
||||
|
||||
with patch("httpx.Client", return_value=fake_client):
|
||||
flow_module.i_will_work_on("task-uuid", plan="p", steps=steps)
|
||||
|
||||
_, kwargs = fake_client.post.call_args
|
||||
assert kwargs["json"] == {
|
||||
"task_id": "task-uuid",
|
||||
"plan": "p",
|
||||
"steps": steps,
|
||||
}
|
||||
|
||||
|
||||
def test_i_am_done_sends_task_id_and_notes(flow_module: types.ModuleType) -> None:
|
||||
|
||||
Reference in New Issue
Block a user