Simplified token matching, SKU-based alert state tracking, and alert CLI #2

Merged
clanker merged 1 commit from feature/simplified-matching-alert-state into main 2026-09-13 23:01:40 +00:00
Member

Overview

Implements a simplified matching engine and SKU-keyed alert state tracking with alert management CLI options and comprehensive documentation.

Changes

  • Token-Normalized Matching Engine: Replaced regex lookaround parsing with clean token normalization (f" {kw} " in normalize(text)), handling word boundaries, trademarks (™/®), punctuation, and exact SKUs seamlessly.
  • Dedicated alert_state Table: Keys alert state strictly by permanent SKU (5007xxx). New SKUs with the same product title trigger independent alerts automatically.
  • Directional Price Drop Alerts: Alerts only on initial qualified drop or deeper price drops, ignoring upward price rebounds below target.
  • Auto-Reset on Price Hikes: Resets alert state when a price climbs above target so future drops re-trigger.
  • Smart DB Logging: Only writes to price_history when price actually changes, avoiding 75,000 redundant rows/month.
  • CLI Commands: Added --alerts to review active alert records and --clear-alerts to reset all alert states.
  • Documentation: Updated README.md with a guide on reviewing, setting, and automating alerts.
### Overview Implements a simplified matching engine and SKU-keyed alert state tracking with alert management CLI options and comprehensive documentation. ### Changes - **Token-Normalized Matching Engine**: Replaced regex lookaround parsing with clean token normalization (`f" {kw} " in normalize(text)`), handling word boundaries, trademarks (`™`/`®`), punctuation, and exact SKUs seamlessly. - **Dedicated `alert_state` Table**: Keys alert state strictly by permanent SKU (`5007xxx`). New SKUs with the same product title trigger independent alerts automatically. - **Directional Price Drop Alerts**: Alerts only on initial qualified drop or deeper price drops, ignoring upward price rebounds below target. - **Auto-Reset on Price Hikes**: Resets alert state when a price climbs above target so future drops re-trigger. - **Smart DB Logging**: Only writes to `price_history` when price actually changes, avoiding 75,000 redundant rows/month. - **CLI Commands**: Added `--alerts` to review active alert records and `--clear-alerts` to reset all alert states. - **Documentation**: Updated `README.md` with a guide on reviewing, setting, and automating alerts.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Home/Microcenter-Monitor!2
No description provided.