feat: add official Codex skill and harden task execution
Install and update artemis-use with task diagnostics and plugin guidance. Preserve cross-device file receipts, review canonical reports, guard stage transitions and reduce small history summaries. Improve exploration lifecycle, request recovery and browser live connections.
This commit is contained in:
1 parent
2328a4df0c
commit
e1ea099592
128 files changed
+4944
-700
No files matched your search
@@ -232,6 +232,38 @@ async def test_rerun_includes_user_edited_preconditions(service, monkeypatch):
|
||||
assert "已连接测试网络" in enqueue.call_args.args[0].goal
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("field", ["goal", "preconditions"])
|
||||
async def test_unresolved_case_never_reserves_run_or_creates_batch(service, monkeypatch, field):
|
||||
from apps.admin_console.services import automation_service
|
||||
|
||||
enqueue = AsyncMock()
|
||||
monkeypatch.setattr("apps.admin_console.routers.tasks.run_task", enqueue)
|
||||
monkeypatch.setattr(automation_service, "store", service.repository.database)
|
||||
session = service.create(CreateExploration(goal="探索", request_id="create"))
|
||||
draft = {"name": "旧版用例", "goal": "检查页面", field: "报告保存到 ${报告位置}"}
|
||||
service.repository.save_case(session["id"], CaseDraft(**draft), 0, "save")
|
||||
with pytest.raises(ValueError, match=r"未填写参数.*\$\{报告位置\}"):
|
||||
await service.validate(session["id"], ValidateCaseRequest(request_id="validate", version=1))
|
||||
with pytest.raises(ValueError, match="未填写参数"):
|
||||
service.create_case_batch(session["id"], CaseBatchRequest(request_id="batch", version=1))
|
||||
enqueue.assert_not_called()
|
||||
assert service.repository.runs(session["id"]) == []
|
||||
assert service.repository.database.records("batch") == []
|
||||
assert service.repository.case(session["id"])["version"] == 1
|
||||
|
||||
# A saved correction can use the same admission request ID; rejection created no run.
|
||||
service.repository.save_case(
|
||||
session["id"],
|
||||
CaseDraft(name="可执行", goal="检查页面,报告保存到本次任务 trace"),
|
||||
1,
|
||||
"edit",
|
||||
)
|
||||
enqueue.return_value = {"status": "queued"}
|
||||
await service.validate(session["id"], ValidateCaseRequest(request_id="validate", version=2))
|
||||
enqueue.assert_awaited_once()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("profile", ["flash", "pro"])
|
||||
def test_case_batch_creates_only_an_idempotent_draft_with_bound_resources(
|
||||
service, monkeypatch, profile
|
||||
|
||||
Reference in new issue
Block a user