Skip to content

fix(commerce): secondary enrichment for pages without JSON-LD (FIX-IF-04) - #108

Merged
Likhithsai2580 merged 5 commits into
masterfrom
auto/round-20260922T0154-fix-04
Sep 22, 2026
Merged

Likhithsai2580 merged 5 commits into
masterfrom
auto/round-20260922T0154-fix-04

Conversation

@Likhithsai2580

Copy link
Copy Markdown
Member

Lands FIX-IF-04 (card t_0c9b81ca). Secondary commerce enrichment for pages lacking JSON-LD. CI green on this branch.

Likhithsai2580 added 5 commits September 22, 2026 08:44
Adds extract_price_from_html_patterns() as a structured fallback when
JSON-LD/OpenGraph/microdata extraction finds no price. Targets known
e-commerce HTML patterns (data-price attributes, price class spans,
itemprop meta tags, currency symbols near digits in first 8KB).

Key properties:
- ONLY fires when primary extraction returns no price (fallback, not replacement)
- ONLY sets price + currency — never merchant, rating, or other facts
- Marked source="extracted_from_text" for provenance transparency
- Rejects unreasonable prices (<=0 or >=10M)
- Preserves structured currency symbols ($, €, £, ¥, ₹, Rs., INR, etc.)

Verified: build clean, 9 new unit tests covering data-price, class spans,
itemprop meta, currency preservation, fallback gating (does not fire
when JSON-LD/microdata present), non-product pages, and unreasonable
price rejection.
Pattern 4 (price text extraction) now requires a currency symbol AND
a price-related class/data attribute. This prevents false positives
from body text like "costs about $2" while preserving detection of
product-price spans with currency symbols.

Removed itemprop from pattern 4 (microdata parser handles those).
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d166dda6-ab52-45a8-8b50-c0060306e58d

📥 Commits

Reviewing files that changed from the base of the PR and between c7e0e45 and 19b5f77.

📒 Files selected for processing (9)
  • check_amazon_content.py
  • check_amazon_fetch.py
  • check_amazon_html.py
  • check_amazon_patterns.py
  • check_commerce.py
  • check_fetcher_test.py
  • check_shopping.py
  • check_shopping_detail.py
  • services/gateway/src/main.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Likhithsai2580
Likhithsai2580 merged commit 13baf88 into master Sep 22, 2026
7 checks passed
@Likhithsai2580
Likhithsai2580 deleted the auto/round-20260922T0154-fix-04 branch September 22, 2026 08:21
@Likhithsai2580
Likhithsai2580 restored the auto/round-20260922T0154-fix-04 branch September 22, 2026 14:55
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