fix(runtime): release 2.7.1 with consistent ADB and failure diagnostics

This commit is contained in:
chenmingxuan committed 2026-11-05 11:40:49 +08:00
1 parent b2316ca249
commit 8bf59897bb
24 files changed
+792 -45

No files matched your search

@@ -22,6 +22,22 @@ from artemis.runtime.device_lock import DeviceBusyError
from artemis.sdk.types.exceptions import AgentError
@pytest.mark.asyncio
@pytest.mark.parametrize("status", ["failed", "completed", "cancelled"])
async def test_failure_snapshot_is_written_before_tracing_ends(tmp_path, status):
agent = object.__new__(Agent)
task = MagicMock(status=status)
context = MagicMock(execution_target="computer", execution_setup=None)
context.data_engine.base_dir = tmp_path
with patch("artemis.runtime.diagnostics.write_runtime_diagnostics") as snapshot:
await agent._finalize_tracing(task, context)
if status == "failed":
snapshot.assert_called_once_with(tmp_path, "failure", android=False)
else:
snapshot.assert_not_called()
context.data_engine.end_session.assert_called_once_with(status=status)
@pytest.mark.asyncio
async def test_trace_finalization_failure_does_not_escape():
agent = object.__new__(Agent)