feat: release 2.4.0 with original cases and automatic human review
This commit is contained in:
1 parent
baf069854b
commit
4dc2057d43
66 files changed
+1390
-206
No files matched your search
@@ -601,6 +601,45 @@ async def test_status_reports_external_global_owner_without_ipc_connection():
|
||||
assert result["goal"] == "CLI task: inspect settings"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("recorded", [True, False])
|
||||
async def test_status_uses_the_active_sessions_model(recorded):
|
||||
owner = DeviceLockOwner(
|
||||
pid=24680,
|
||||
process_created_at=1234.5,
|
||||
token="active-owner-token",
|
||||
device_id="emulator-5554",
|
||||
description="active task",
|
||||
acquired_at="2026-08-24T00:00:00+00:00",
|
||||
session_id="active",
|
||||
ingress="web",
|
||||
)
|
||||
state.queue_items.append(
|
||||
{"session_id": "active", "status": "running", "runtime_overrides": {"model": "terra"}}
|
||||
)
|
||||
with (
|
||||
patch.object(TaskQueueService, "ensure_worker_running"),
|
||||
patch(
|
||||
"apps.admin_console.routers.tasks.DeviceExecutionLock.get_active_owner",
|
||||
return_value=owner,
|
||||
),
|
||||
patch(
|
||||
"apps.admin_console.routers.tasks.DeviceExecutionLock.get_active_owners",
|
||||
return_value={},
|
||||
),
|
||||
patch("apps.admin_console.routers.tasks.session_repo") as repo,
|
||||
patch("apps.admin_console.routers.tasks.model_service") as models,
|
||||
):
|
||||
repo.get_latest_session.return_value = None
|
||||
repo.get_session_by_id.return_value = None
|
||||
repo.get_recorded_model_info_map.return_value = (
|
||||
{"active": {"id": "terra-recorded", "provider": "openai"}} if recorded else {}
|
||||
)
|
||||
models.get_active_model_info.return_value = {"id": "global", "provider": "openai"}
|
||||
result = await get_status()
|
||||
assert result["model_info"]["id"] == ("terra-recorded" if recorded else "terra")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cancel_task_triggers_next_pending_task():
|
||||
executed_goals = []
|
||||
|
||||
Reference in new issue
Block a user