Rate Scanner Issues — Fix & Extensions
Section titled “Rate Scanner Issues — Fix & Extensions”What changed
Section titled “What changed”Pipeline deadlock (root cause fix)
Section titled “Pipeline deadlock (root cause fix)”daily-run.sh was gating export on logs/health-check-status. Health-check Check 4 tests rates.json freshness → circular deadlock: stale rates.json → health FAIL → no export → stale. Fixed by removing the health-check gate; health-check is now observability-only. Only the anomaly-status sentinel (written by the run itself) gates export. rates.json manually restored by running rate-scanner export.
Schema fields added
Section titled “Schema fields added”province_restrictions— added toProductmodel, SQLite DDL + idempotentALTER TABLEmigration,upsert_product, and both export paths incli.py. Convention: exclusion list (empty = Canada-wide). Populated for 5 products inrates.yaml. Rendered in ops dashboard Fine Print column.notes— already in model + YAML; was not flowing to export. Added tocli.pyexport andbuild.pyfine print display.min_balance_cad— already correctly implemented end-to-end; no changes needed.
Daily status email
Section titled “Daily status email”New rate_scanner/notify.py module + rate-scanner notify CLI command. Sends plain-text summary after each pipeline run: best HISA vs inertia baseline, pipeline health/anomaly status, dashboard link. Added as Step 7 in daily-run.sh (non-fatal). EMAIL_PASSWORD SSoT: my_backup/.env (no credential duplication). python-dotenv added as explicit dependency.
$10k basis
Section titled “$10k basis”Changed HISA delta and CC debt comparison from $100k/$5k → $10k in notify.py, cli.py, and build.py.
READMEs
Section titled “READMEs”Written for /home/ta/projects/mbr/rate-scanner/ and /home/ta/projects/mbr/ops-dashboard/.
Key files changed
Section titled “Key files changed”scripts/daily-run.sh— health-check gate removed; Step 7 (notify) addedrate_scanner/models.py—province_restrictionsonProductrate_scanner/db.py— DDL, migration, upsertrate_scanner/cli.py—notes+province_restrictionsin export; $10k delta;notifycommandrate_scanner/notify.py— new moduleops-dashboard/build.py— fine print display; $10k basis for HISA + CCdata/rates.yaml—province_restrictionson 5 productstests/— 39/39 passing (newtest_product_province_restrictions_in_db+ extended fine print tests)rate-scanner/README.md,ops-dashboard/README.md— newpyproject.toml/uv.lock—python-dotenvadded
Warnings / gotchas
Section titled “Warnings / gotchas”logs/health-check-statuswill show FAILED until the next 09:00 ET cron run — self-heals oncerates.jsonis freshprovince_restrictionsuses exclusion convention (non-empty = provinces where product is NOT available). The 5 populated products are allneeds_verification: true— they’ll appear in the dashboard once verified- External utility import order matters: load
.envbeforesys.path.insert+import notify_managerto beat its module-levelload_dotenv()