fix(ai): surface combined PixelRAG replay actions
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:
@@ -210,6 +210,40 @@ def test_pixelrag_rag_candidate_replay_prefers_worker_source_contract_handoff(tm
|
||||
)
|
||||
|
||||
|
||||
def test_pixelrag_rag_candidate_replay_combines_ready_and_source_contract_actions(tmp_path):
|
||||
from services.pixelrag_rag_candidate_replay_service import (
|
||||
build_pixelrag_rag_candidate_replay_readback,
|
||||
)
|
||||
|
||||
visual_root = tmp_path / "visual"
|
||||
worker_root = tmp_path / "worker"
|
||||
_write_receipt(
|
||||
visual_root,
|
||||
platform="shopee_tw",
|
||||
manifest_id="shopee-ok",
|
||||
title="Shopee 防曬乳",
|
||||
url="https://shopee.tw/search?keyword=sunscreen",
|
||||
)
|
||||
_write_platform_probe_worker_receipt(
|
||||
worker_root,
|
||||
platform="coupang_tw",
|
||||
manifest_id="coupang-403",
|
||||
barrier_type="access_denied",
|
||||
)
|
||||
|
||||
payload = build_pixelrag_rag_candidate_replay_readback(
|
||||
artifact_root=visual_root,
|
||||
platform_probe_worker_receipt_root=worker_root,
|
||||
platform=("shopee_tw", "coupang_tw"),
|
||||
)
|
||||
|
||||
assert payload["summary"]["eligible_count"] == 1
|
||||
assert payload["summary"]["source_contract_fallback_count"] == 1
|
||||
assert payload["next_machine_action"] == (
|
||||
"run_ocr_vlm_replay_and_source_contract_replay"
|
||||
)
|
||||
|
||||
|
||||
def test_pixelrag_rag_candidate_replay_cli_outputs_machine_readable_json(tmp_path):
|
||||
_write_receipt(
|
||||
tmp_path,
|
||||
|
||||
Reference in New Issue
Block a user