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:
chenmingxuan committed 2026-10-18 14:18:37 +08:00
1 parent 2328a4df0c
commit e1ea099592
128 files changed
+4944 -700

No files matched your search

@@ -87,6 +87,58 @@ async def test_complete_checker_json_does_not_request_another_verdict(status):
llm.with_structured_output.assert_not_called()
@pytest.mark.asyncio
@pytest.mark.parametrize("status", ["passed", "failed", "inconclusive"])
async def test_complete_verdict_alias_and_evidence_list_are_not_sent_for_reformatting(status):
payload = {
"verdicts": [
{
"kind": "assert",
"item_text": "检查本轮页面",
"verdict": status,
"evidence": ["步骤 2 的实际页面", "步骤 3 的对照截图"],
}
],
"test_result": _result(status),
}
llm, structured = _llm(CheckReport())
report = await _structured_report(
llm,
[AIMessage(content=json.dumps(payload))],
[SimpleNamespace(kind="assert", text="检查本轮页面")],
)
assert report.verdicts[0].status == status
assert report.verdicts[0].evidence == "步骤 2 的实际页面\n步骤 3 的对照截图"
assert report.test_result.model_dump() == payload["test_result"]
structured.ainvoke.assert_not_awaited()
llm.with_structured_output.assert_not_called()
@pytest.mark.parametrize(
"fields",
[
{"status": "failed", "verdict": "passed", "evidence": ["图 1"]},
{"verdict": "unknown", "evidence": ["图 1"]},
{"verdict": "passed", "evidence": [{"text": "图 1"}]},
{"verdict": "passed", "evidence": [1]},
],
)
def test_conflicting_or_invalid_verdict_shapes_are_not_silently_accepted(fields):
with pytest.raises(ValidationError):
CheckReport.model_validate(
{"verdicts": [{"kind": "assert", "item_text": "页面", **fields}]}
)
def test_empty_evidence_list_does_not_turn_an_unsupported_failure_into_evidence():
from artemis.agents.checker.checker import _normalize_report
report = CheckReport.model_validate(
{"verdicts": [{"kind": "assert", "item_text": "页面", "verdict": "failed", "evidence": []}]}
)
assert _normalize_report(report, []).verdicts[0].status == "inconclusive"
def test_nested_json_string_result_is_decoded_and_still_validated():
result = _result()
assert (