Skip to content

fix(scraper): RRP sanity guardrail and always-record manual confirmations - #65

Merged
mikeknight85 merged 1 commit into
mainfrom
fix/rrp-guardrails
Aug 15, 2026
Merged

fix(scraper): RRP sanity guardrail and always-record manual confirmations#65
mikeknight85 merged 1 commit into
mainfrom
fix/rrp-guardrails

Conversation

@mikeknight85

Copy link
Copy Markdown
Owner

Summary

Code-level fixes for the reproducible parts of #55:

  • consensus discards an "original price" below the resolved standard price or more than 10x above it — generic strikethrough/was-style selectors can match unrelated page numbers (financing text, bundle offers, related-product cards) and nothing sanity-checked them before recording
  • confirming a price in troubleshoot/re-scan now always records a fresh history row, even when the confirmed price is unchanged, so stale products get repopulated (the re-scan flow already performs a full fetch -> extract -> display pass)

The remaining question in #55 — why the specific JB Hi-Fi RRP values fluctuated — needs the reporting instance's retailer_configs row and scrape traces; the guardrail neutralizes the failure mode either way.

Validation

  • backend build and tests

Part of #55

…ions

Original-price candidates come partly from generic strikethrough/'was'-style
selectors that can match unrelated numbers (financing text, bundle offers,
related-product cards), and their consensus had no plausibility check — so
the recorded RRP jumped between stray values. Consensus now discards an
original price below the resolved standard price or more than 10x above it.

Manual confirmations (troubleshoot/re-scan) previously did nothing when the
selected price equaled the latest recorded one; they now always record a
fresh history row and refresh the anchor and extraction method, which is what
repopulates a stale product.

Part of #55
@mikeknight85
mikeknight85 merged commit 86bd7e6 into main Aug 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant