feat: reconciliation and the price-tag compliance rule family
reconcile() compares one accepted identity with its tag and the catalog entry and publishes a state plus the individual signals (JAN exact, name by longest common substring, price against either the sale or the regular price). It never changes the product identity: a disagreement is a second opinion shown next to the first, and only a checksummed barcode outranks the matcher. evaluate_compliance() is the first rule family: missing_price_tag, the owner's missing_tag_group (>= 3 consecutive facings without a tag), orphan_tag, price_mismatch, plus an unreadable_tags hint. Every rule fails closed on evidence quality - a row whose tags could not be read produces "move closer", never a violation. Findings must appear in 3 of the last 5 frames before they publish, so the UI never flickers. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
faff07f252
commit
71b8bdd876
3 changed files with 708 additions and 0 deletions
|
|
@ -12,3 +12,7 @@ fastapi>=0.100.0
|
|||
uvicorn>=0.20.0
|
||||
python-multipart>=0.0.6
|
||||
requests>=2.28.0
|
||||
# macOS OCR backend (price tags); other platforms run without OCR until a
|
||||
# cross-platform backend is added - see docs/design-price-tags-and-compliance.md
|
||||
pyobjc-framework-Vision>=10; sys_platform == "darwin"
|
||||
pyobjc-framework-Quartz>=10; sys_platform == "darwin"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue