feat: release 2.1.0 with optional Flash final AI review

Default Flash final review to off and persist the setting across the UI,
MCP, SDK and queued tasks. Keep execution separate from test verdicts.

Bundle UI fonts and licenses to remove Google Fonts from startup builds.
Align backend/frontend versions and document installation and upgrades.
This commit is contained in:
chenmingxuan committed 2026-10-23 12:36:56 +08:00
1 parent b584dae80a
commit 83bcfd54d5
52 files changed
+898 -33

No files matched your search

@@ -951,6 +951,51 @@ def test_human_review_overrides_every_report_preserves_ai_and_invalidates_batch_
assert outcome_file.read_text(encoding="utf-8") == original
def test_skipped_flash_review_is_consistent_in_history_reports_and_human_review(
client, isolated, monkeypatch
):
from artemis.runtime import case_result
monkeypatch.setattr(case_result, "TRACES_PATH", reports.TRACES_PATH)
batch = service.create_batch(payload())
job = isolated.jobs(batch["id"])[0]
isolated.save_job({**job, "status": "completed"})
folder = reports.TRACES_PATH / job["session_id"]
folder.mkdir(parents=True)
result = {
"status": "inconclusive",
"reason": "执行完成 · 未做 AI 判定",
"evidence": [],
"verification_skipped": True,
}
(folder / "run_outcome.json").write_text(
json.dumps({"task_status": "completed", "tests": {}, "test_result": result}),
encoding="utf-8",
)
for item in (
client.get("/api/automation/history").json()["items"][0],
client.get(f"/api/automation/batches/{batch['id']}").json()["jobs"][0],
client.get(f"/api/automation/reports/{job['session_id']}").json(),
):
assert item["status"] == "completed"
assert item["test_result"] == {**result, "source": "system"}
assert reports.session_report(job["session_id"])["verdict"] == "未做 AI 判定"
paths = reports.export_session(job["session_id"])
workbook = load_workbook(next(path for path in paths if path.suffix == ".xlsx"))
assert "未做 AI 判定" in [
cell.value for row in workbook["任务结果"].iter_rows() for cell in row
]
doc = Document(next(path for path in paths if path.suffix == ".docx"))
assert "未做 AI 判定" in "\n".join(paragraph.text for paragraph in doc.paragraphs)
reviewed = client.put(
f"/api/automation/reports/{job['session_id']}/review",
json={"status": "passed", "reason": "已人工核对"},
).json()
assert reviewed["test_result"]["source"] == "human"
assert reviewed["test_result"]["ai_result"] == {**result, "source": "system"}
assert reviewed["verdict"] == "测试通过(人工确认)"
def test_review_rejects_active_missing_invalid_and_packing_tasks(client, isolated, monkeypatch):
job = isolated.jobs(service.create_batch(payload())["id"])[0]
url = f"/api/automation/reports/{job['session_id']}/review"