MBR-Business-Dev — Lessons
Section titled “MBR-Business-Dev — Lessons”Insights captured during project work. Add entries as discovered.
Project folder naming: confirm before first build
Section titled “Project folder naming: confirm before first build”When a project folder is renamed (e.g. bmr/ → mbr/), the cascade includes: crontab entries, all shell scripts, all Python path references, and all KB notes referencing the old path. Catch folder naming with Talbot before the first build — a rename costs a full session.
Captured from: Hassle Threshold Engine task (2026-04-09)
Wrangler Pages: create project before first deploy
Section titled “Wrangler Pages: create project before first deploy”wrangler pages deploy fails with “Project not found” if the Cloudflare Pages project doesn’t exist yet — it does NOT create the project automatically. Always run this first:
wrangler pages project create [name] --production-branch mainThen deploy normally. Subsequent deploys to the same project name work without the create step.
Captured from: Rate Scanner Layer 1 Hardening task (2026-04-22)
Health-check sentinels must never gate the pipeline they monitor
Section titled “Health-check sentinels must never gate the pipeline they monitor”Health-check sentinels must never gate the pipeline that produces the output they check. The rate-scanner health-check monitors rates.json freshness — gating export on that sentinel creates an irrecoverable deadlock: stale output → health FAIL → no export → stale. Only sentinels written by the current run (e.g. anomaly-status) are safe to use as export gates.
Captured from: Rate Scanner Issues task (2026-05-01)
External Python utils: load your .env before importing, declare dotenv explicitly
Section titled “External Python utils: load your .env before importing, declare dotenv explicitly”When integrating an external Python utility (like notify_manager) that calls load_dotenv() at module level, load your own .env before adding the utility to sys.path and importing it — otherwise the module-level load_dotenv() fires first and misses your credentials. Also add python-dotenv as an explicit dependency in your project even if the external tool brings it transitively; uv won’t resolve transitive deps for direct import.
Captured from: Rate Scanner Issues task (2026-05-01)