feat: release 1.1.0 with responsive task control

This commit is contained in:
chenmingxuan committed 2026-09-24 03:31:17 +08:00
1 parent 057f0c3050
commit bfcd828fa8
37 files changed
+1601 -151

No files matched your search

+9
View File
@@ -60,6 +60,15 @@ async def test_running_batch_start_is_idempotent(monkeypatch):
assert request.call_args.args[0] == "GET"
@pytest.mark.asyncio
async def test_delete_batch_uses_the_same_backend_as_the_web_ui(monkeypatch):
request = AsyncMock(return_value={"batch_id": "batch", "status": "deleted"})
monkeypatch.setattr(tools, "_request", request)
assert (await tools.mobile_batch("delete", batch_id="batch"))["status"] == "deleted"
request.assert_awaited_once_with("DELETE", "/api/automation/batches/batch")
@pytest.mark.asyncio
async def test_download_writes_actual_binary_atomically(monkeypatch, tmp_path):
monkeypatch.setattr(tools, "EXPORT_DIR", tmp_path)
+5 -3
View File
@@ -299,11 +299,10 @@ def test_web_task_can_be_paused_and_guided_from_mcp(temp_trace_env, monkeypatch)
(trace_id, '{"device_id":"test-device"}'),
)
assert (
mobile_manage_task(action="status", trace_id=trace_id)["device_serial"] == "test-device"
)
assert mobile_manage_task(action="status", trace_id=trace_id)["device_serial"] == "test-device"
assert mobile_manage_task(action="pause", trace_id=trace_id)["status"] == "pausing"
assert (Path(temp_trace_env) / trace_id / "pause.request").exists()
assert mobile_manage_task(action="status", trace_id=trace_id)["status"] == "pausing"
control._write_atomic(
control.control_dir(trace_id) / "task_control_state.json", {"status": "task_paused"}
)
@@ -316,6 +315,9 @@ def test_web_task_can_be_paused_and_guided_from_mcp(temp_trace_env, monkeypatch)
control.consume_instructions(control.control_dir(trace_id))["instruction"]
== "先确认当前画面"
)
guidance = mobile_manage_task(action="guidance_history", trace_id=trace_id)
assert guidance["instructions"][0]["status"] == "consumed"
assert guidance["instructions"][0]["instruction"] == "先确认当前画面"
def test_mobile_manage_task_status_and_stop(temp_trace_env):