fix(crawler): relocate pixelrag receipt file paths
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
This commit is contained in:
@@ -314,6 +314,29 @@ def test_pixelrag_visual_evidence_readback_warns_when_missing(tmp_path):
|
||||
assert payload["next_machine_action"] == "run_pixelrag_visual_capture_worker"
|
||||
|
||||
|
||||
def test_pixelrag_visual_evidence_readback_relocates_copied_receipt_paths(tmp_path):
|
||||
from services.pixelrag_crawler_integration_service import build_pixelrag_visual_evidence_readback
|
||||
|
||||
receipt_path = _write_capture_receipt(tmp_path, platform="pchome", manifest_id="copied")
|
||||
receipt = json.loads(receipt_path.read_text(encoding="utf-8"))
|
||||
receipt["files"] = [
|
||||
{"kind": "fullpage_screenshot", "path": "/host/runtime/fullpage.png"},
|
||||
{"kind": "tile", "path": "/host/runtime/tiles/tile_000.png"},
|
||||
{"kind": "tile", "path": "/host/runtime/tiles/tile_001.png"},
|
||||
]
|
||||
receipt_path.write_text(json.dumps(receipt), encoding="utf-8")
|
||||
|
||||
payload = build_pixelrag_visual_evidence_readback(
|
||||
artifact_root=tmp_path,
|
||||
platform="pchome",
|
||||
manifest_id="copied",
|
||||
)
|
||||
|
||||
assert payload["status"] == "ok"
|
||||
assert payload["summary"]["missing_file_count"] == 0
|
||||
assert all(item["exists"] for item in payload["latest_receipt"]["files"])
|
||||
|
||||
|
||||
def test_pixelrag_visual_evidence_readback_route_returns_payload(tmp_path, monkeypatch):
|
||||
from flask import Flask
|
||||
from routes import system_public_routes as routes
|
||||
|
||||
Reference in New Issue
Block a user