feat: release 2.2.0 with PC-only tests and execution reliability fixes
Unify task scheduling and queue state, fix Android input and observation recovery, preserve screenshot paths, and match final review criteria accurately. Add collapsible copyable results and publish the complete 2.1.0 upgrade notes. Validation: 3189 backend tests, 326 frontend tests, 24 client tests, production build and quality gates.
This commit is contained in:
1 parent
fac4ccb760
commit
be6e8c2abd
79 files changed
+2263
-277
No files matched your search
@@ -23,6 +23,60 @@ from artemis.utils.notes import (
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize("operation", ["save", "append", "update"])
|
||||
@pytest.mark.parametrize("path_style", ["native", "posix"])
|
||||
def test_note_rejects_misplaced_artifact_and_accepts_exact_receipt(tmp_path, operation, path_style):
|
||||
artifact = tmp_path / "artifacts" / "android" / "截图 one.png"
|
||||
artifact.parent.mkdir(parents=True)
|
||||
artifact.write_bytes(b"evidence")
|
||||
save_note_content(tmp_path, "evidence", "original")
|
||||
note = tmp_path / "notes" / "evidence.md"
|
||||
before = note.read_bytes()
|
||||
missing = tmp_path / artifact.name
|
||||
wrong = str(missing) if path_style == "native" else missing.as_posix()
|
||||
|
||||
def write(content):
|
||||
if operation == "save":
|
||||
save_note_content(tmp_path, "evidence", content)
|
||||
elif operation == "append":
|
||||
append_note_content(tmp_path, "evidence", content)
|
||||
else:
|
||||
update_note_content(tmp_path, "evidence", "original", content)
|
||||
|
||||
with pytest.raises(ValueError, match="exact trace_path") as error:
|
||||
write(f"Screenshot: `{wrong}`。")
|
||||
assert str(artifact) in str(error.value)
|
||||
assert note.read_bytes() == before
|
||||
assert artifact.read_bytes() == b"evidence"
|
||||
write(f"Screenshot: `{artifact}`")
|
||||
assert str(artifact) in note.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_note_does_not_guess_between_duplicate_artifact_names(tmp_path):
|
||||
files = [
|
||||
tmp_path / "artifacts" / "android" / "screen.png",
|
||||
tmp_path / "artifacts" / "plugins" / "cua-driver" / "screen.png",
|
||||
]
|
||||
for path in files:
|
||||
path.parent.mkdir(parents=True)
|
||||
path.write_bytes(b"evidence")
|
||||
with pytest.raises(ValueError) as error:
|
||||
save_note_content(tmp_path, "evidence", str(tmp_path / "screen.png"))
|
||||
assert all(str(path) in str(error.value) for path in files)
|
||||
assert not (tmp_path / "notes" / "evidence.md").exists()
|
||||
|
||||
|
||||
def test_note_allows_existing_root_files_and_unknown_future_paths(tmp_path):
|
||||
artifact = tmp_path / "artifacts" / "android" / "screen.png"
|
||||
artifact.parent.mkdir(parents=True)
|
||||
artifact.write_bytes(b"artifact")
|
||||
root_file = tmp_path / "screen.png"
|
||||
root_file.write_bytes(b"different root file")
|
||||
content = f"{root_file}\n{tmp_path / 'future.png'}\n{tmp_path / 'screen.png.backup'}"
|
||||
save_note_content(tmp_path, "plan", content)
|
||||
assert read_note_content(tmp_path, "plan") == content
|
||||
|
||||
|
||||
@pytest.mark.parametrize("content", ["# 报告\n结果\n", "line\r\nsecond", ""])
|
||||
def test_verified_note_receipt_matches_actual_file_bytes(tmp_path, content):
|
||||
import hashlib
|
||||
|
||||
Reference in new issue
Block a user