2.0 KiB
2.0 KiB
TIP Manual Review Queue Closure
Date: 2026-05-10 UTC Owner: Codex
Summary
The dashboard still showed Review 13374 after research resolution was complete.
This was a real workflow issue: the product research queues were closed, but stale equivalence candidates still appeared as manual review work.
Diagnosis
Live DB state before cleanup:
pending=13374approved=1987auto_approved=33464rejected=148382
The 13374 pending rows belonged to only 506 Flexoptix products.
Their product-level competitor states were already terminal:
13323pending rows had Flexoptixcompetitor_status=matched51pending rows had Flexoptixcompetitor_status=ambiguous
Therefore these rows were stale review debt, not actionable manual work.
Implemented
- Added
sql/107-close-stale-manual-review-queue.sql- closes stale pending equivalences when product-level competitor research is already terminal
- writes explicit automated reject reasons
- Hardened
maintenance:find-equivalences- only creates pending candidates for Flexoptix products with
competitor_status IN ('unknown','needs_research') - terminal states (
matched,no_valid_match,ambiguous) cannot recreate manual-review debt
- only creates pending candidates for Flexoptix products with
- Hardened Review API
- pending badge/listing only counts genuinely actionable pending rows
- stale candidates for terminal product states are not shown as manual work
Live Deployment
- Migration applied on Erik:
UPDATE 13374
- API build passed.
- Scraper build passed.
tip-apirestarted.tip-scraper-daemonrestarted.
Final Review State
approved=1987auto_approved=33464rejected=161756pending=0
Final Health Still Intact
research_resolved=16236total=16236research_resolved_pct=100- price/image/details/competitor
needs_research=0
Training Pool
Added two TIPLLM examples to training-data/tip-llm-capabilities-v1.jsonl:
- stale manual review queue closure rule
- review badge zero-count rule