2026 04 22 Rate Scanner Layer1 Hardening
Rate Scanner — Layer 1 Hardening + Debt Expansion + Ops Dashboard
Section titled “Rate Scanner — Layer 1 Hardening + Debt Expansion + Ops Dashboard”Date closed: 2026-04-22
Code repo: /home/ta/projects/mbr/
Task file: _WorkingOn/Tasks/2026-04-08_Rate-Scanner-Layer1-Hardening.md (closed)
What Was Done
Section titled “What Was Done”Layer 1 Hardening (all 9 STANDARDS.md items — 2026-04-08)
Section titled “Layer 1 Hardening (all 9 STANDARDS.md items — 2026-04-08)”| Item | Implementation |
|---|---|
| Health Monitor | scripts/health-check.sh — cron 0 13 * * * (09:00 ET); checks DB freshness, record count ≥10, 6 expected products, rates.json updated today |
| Anomaly Detection | rate_scanner/anomaly.py — >15% rate change triggers alert + export suppression; >10% warns; configurable via config.yaml |
| Fine Print Capture | min_balance_cad, product_promo_expiry, eligibility fields added to Pydantic models + rates.yaml + rates.json export |
| Daily Ops Report | rate_scanner/ops_report.py — writes 09_Logs/Ops/YYYY-MM-DD_Rate-Scanner-Ops.md after each run |
| Alert Suppression | daily-run.sh reads health-check-status + anomaly-status sentinels before export; suppresses if either non-OK |
| notify_manager | Non-blocking wrapper; falls back to logs/notifications.log until binary installed |
| Structured Logging | [YYYY-MM-DD HH:MM:SS] LEVEL : message format; 5-run rotation; RUN STARTED/RESULT markers |
| Dry-Run Mode | --dry-run on all CLI commands + passthrough in daily-run.sh |
| Test Suite | 38/38 tests passing |
Rate Scanner Path Fix (2026-04-16)
Section titled “Rate Scanner Path Fix (2026-04-16)”Root cause: uv tool install resolves __file__ to the tool cache, not the project directory. Fix: rate_scanner/_paths.py reads MBR_ROOT and RATE_SCANNER_DATA env vars, falling back to __file__-relative defaults. daily-run.sh switched to uv run from source.
Key pattern: For cron-triggered Python tools, use uv run from source directory — not uv tool install — to avoid path resolution issues.
Debt Product Expansion (2026-04-16)
Section titled “Debt Product Expansion (2026-04-16)”22 new products added to rates.yaml + SQLite + rates.json:
credit_card_standard(6): Big 6 at 20.99% — allreference_only: truecredit_card_lowrate(6): MBNA True Line Gold 8.99% (best), TD/Scotia/BMO 12–14%heloc(5): TD 4.95% (best), RBC/BMO 5.45%mortgage_variable(1): BMO 5yr ~4.40% (needs_verification)loc_unsecured(2): TD/Scotia at Prime+3%auto_loan(2): TD/RBC at 6.99%
Ops dashboard updated with Debt Snapshot cards + inverted color logic (red = high-cost, green = low-cost).
Still missing: Big 6 fixed mortgage rates (2yr/3yr/5yr), credit union debt products.
Ops Dashboard Deployed (2026-04-22)
Section titled “Ops Dashboard Deployed (2026-04-22)”- Live at
https://mbr-ops-dashboard.pages.dev - Step 6 added to
daily-run.sh— auto-redeploys after each successful build (non-fatal) - Credentials: token from
/home/ta/utils/web/web-deploy/.env(same as Step 4)
Key Commits
Section titled “Key Commits”| Hash | Description |
|---|---|
3330968 | Layer 1 hardening — all 9 items + 37 tests |
67dfcad | Fix uv tool install path issues + ops dashboard |
1520d3d | Debt product expansion — 22 products |
f4de9bf | Ops dashboard Step 6 in daily-run.sh |
Gotchas / Watch Points
Section titled “Gotchas / Watch Points”notify_managerbinary not yet installed — alerts fall back tologs/notifications.log- Health sentinel may show FAILED if rates.json is >1 day old (e.g. after scraper outage) — clears automatically on next successful run
- Mortgage fixed rates and credit union debt products not yet catalogued