fix(ai): surface combined PixelRAG replay actions
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-10 10:29:54 +08:00
parent 6edae04e62
commit 22cffbeef8
5 changed files with 54 additions and 24 deletions

View File

@@ -467,6 +467,21 @@ def build_pixelrag_rag_candidate_replay_readback(
"platforms": sorted({str(item.get("platform") or "unknown") for item in all_candidates}),
}
if not all_candidates:
next_machine_action = "run_pixelrag_visual_capture_worker"
elif invalid_count and not eligible_count:
next_machine_action = "fix_invalid_pixelrag_receipts"
elif eligible_count and source_contract_fallback_count:
next_machine_action = "run_ocr_vlm_replay_and_source_contract_replay"
elif source_contract_fallback_count:
next_machine_action = "run_source_contract_replay_for_platform_probe_worker_receipts"
elif visual_barrier_count and not eligible_count:
next_machine_action = "run_platform_probe_or_use_structured_api"
elif eligible_count:
next_machine_action = "run_ocr_vlm_replay_then_promotion_gate"
else:
next_machine_action = "refresh_pixelrag_visual_capture_receipt"
return {
"success": invalid_count == 0,
"policy": POLICY,
@@ -490,27 +505,7 @@ def build_pixelrag_rag_candidate_replay_readback(
"blocked_pages_are_not_product_data": True,
"platform_probe_worker_receipts_are_source_contract_candidates": True,
},
"next_machine_action": (
"run_pixelrag_visual_capture_worker"
if not all_candidates
else (
"fix_invalid_pixelrag_receipts"
if invalid_count and not eligible_count
else (
"run_source_contract_replay_for_platform_probe_worker_receipts"
if source_contract_fallback_count and not eligible_count
else (
"run_platform_probe_or_use_structured_api"
if visual_barrier_count and not eligible_count
else (
"run_ocr_vlm_replay_then_promotion_gate"
if eligible_count
else "refresh_pixelrag_visual_capture_receipt"
)
)
)
)
),
"next_machine_action": next_machine_action,
"controlled_apply": {
"network_call": False,
"db_write": False,