V10.530 暫停 recover-stale 主操作入口
All checks were successful
CD Pipeline / deploy (push) Successful in 1m8s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m8s
This commit is contained in:
@@ -124,7 +124,7 @@ def test_competitor_feeder_persists_all_match_attempt_outcomes():
|
||||
assert "ROW_NUMBER() OVER (PARTITION BY p.id" not in recovery_source
|
||||
assert "candidate_limit" in recovery_source
|
||||
retryable_source = source.split("def _fetch_retryable_candidate_skus", 1)[1].split(
|
||||
"def _fetch_expired_identity_skus", 1
|
||||
"def preview_retryable_candidate_revalidation", 1
|
||||
)[0]
|
||||
for status in (
|
||||
"'low_score'",
|
||||
@@ -152,8 +152,15 @@ def test_competitor_feeder_persists_all_match_attempt_outcomes():
|
||||
assert "COALESCE(la.hard_veto, false) = false" in retryable_source
|
||||
assert "match_diagnostic_json->>'comparison_mode'" in retryable_source
|
||||
assert "?| array[" in retryable_source
|
||||
assert "candidate_attempt AS" in retryable_source
|
||||
assert "FROM candidate_attempt la" in retryable_source
|
||||
assert "JOIN LATERAL" in retryable_source
|
||||
assert "ORDER BY pr.timestamp DESC, pr.id DESC" in retryable_source
|
||||
assert "latest_price.price AS momo_price" in retryable_source
|
||||
assert "ROW_NUMBER() OVER (PARTITION BY p.id" not in retryable_source
|
||||
assert "lm.rn = 1" not in retryable_source
|
||||
latest_attempt_source = retryable_source.split("latest_attempt AS", 1)[1].split(
|
||||
"SELECT\n lm.product_id", 1
|
||||
"candidate_attempt AS", 1
|
||||
)[0]
|
||||
assert "cma.best_competitor_product_id IS NOT NULL" not in latest_attempt_source
|
||||
assert "la.best_competitor_product_id IS NOT NULL" in retryable_source
|
||||
|
||||
@@ -518,6 +518,7 @@ def test_ai_product_pick_agent_uses_real_competitor_data_and_dashboard_action():
|
||||
assert "@ai_bp.route('/api/ai/pchome-match/backfill', methods=['POST'])" in route_source
|
||||
assert "@ai_bp.route('/api/ai/pchome-match/refresh-stale', methods=['POST'])" in route_source
|
||||
assert "@ai_bp.route('/api/ai/pchome-match/recover-stale', methods=['POST'])" in route_source
|
||||
assert 'PCHOME_STALE_RECOVERY_ENABLED' in route_source
|
||||
assert "@ai_bp.route('/api/ai/pchome-match/backfill/status', methods=['GET'])" in route_source
|
||||
assert "_build_pchome_backfill_coverage_payload" in route_source
|
||||
assert "_build_pchome_revalidation_preview_payload" in route_source
|
||||
@@ -569,19 +570,19 @@ def test_ai_product_pick_agent_uses_real_competitor_data_and_dashboard_action():
|
||||
assert "/api/ai/product-picks/generate" in template
|
||||
assert "/api/ai/pchome-match/backfill" in template
|
||||
assert "/api/ai/pchome-match/refresh-stale" in dashboard_template
|
||||
assert "/api/ai/pchome-match/recover-stale" in dashboard_template
|
||||
assert "/api/ai/pchome-match/recover-stale" not in dashboard_template
|
||||
assert "/api/ai/pchome-match/backfill/status" in dashboard_template
|
||||
assert "PCHOME MATCH BACKFILL" in dashboard_template
|
||||
assert "data-pchome-backfill-trigger" in dashboard_template
|
||||
assert "data-pchome-refresh-stale-trigger" in dashboard_template
|
||||
assert "data-pchome-recover-stale-trigger" in dashboard_template
|
||||
assert "data-pchome-recover-stale-trigger" not in dashboard_template
|
||||
assert "刷新過期 120 筆" in dashboard_template
|
||||
assert "救援過期 40 筆" in dashboard_template
|
||||
assert "救援過期 40 筆" not in dashboard_template
|
||||
dashboard_js = (ROOT / "web/static/js/page-dashboard-v2.js").read_text(encoding="utf-8")
|
||||
assert "loadPchomeBackfillStatus" in dashboard_js
|
||||
assert "window.backfillPchomeMatches" in dashboard_js
|
||||
assert "window.refreshStalePchomeMatches" in dashboard_js
|
||||
assert "window.recoverStalePchomeMatches" in dashboard_js
|
||||
assert "window.recoverStalePchomeMatches" not in dashboard_js
|
||||
assert "formatBackfillCoverageSummary" in dashboard_js
|
||||
assert "formatBackfillLimitedCount" in dashboard_js
|
||||
assert "status.coverage" in dashboard_js
|
||||
|
||||
Reference in New Issue
Block a user