armed & monitored · async python · fail-closed by design
BALON Sentinel watches a live post feed, extracts promo codes the moment they appear, and races them through pre-warmed checkout sessions in parallel — engineered for the moment everything is on fire: rate limits, 500s, and a stampede of buyers.
Four stages, fully async, each built to fail gracefully.
Polls the target every few seconds. Every Nth poll switches to search — a separate rate-limit queue — so an exhausted queue never stalls the pipeline.
Configurable regex extraction, deduped against a persistent seen-store, with a tweet-age window that discards stale drops.
A pool of isolated HTTP sessions, each pre-warmed with product and fresh nonces, refreshed every 4 minutes. Codes are applied in parallel waves.
Before any order: re-read the cart total. Not $0? Abort. Transient failures retry with backoff; final failures are discarded instantly.
The parts that made it survive a real, adversarial drop.
Every apply response is classified as transient or final. Valid codes under server strain get retried with backoff; dead codes are dropped in one attempt.
Only WordPress auth cookies are kept — cart and WooCommerce session cookies are stripped, so all six workers race independent carts.
Timeline ↔ search alternation with automatic failover. One throttled queue never takes detection offline.
asyncio + httpx throughout: detection, racing, and session refresh run concurrently with no blocking calls in the hot path.
Pure-function core (form parsing, retry classification, totals) covered by pytest; ruff-clean; CI on every push.
launchd on macOS, systemd or Docker Compose on Linux — one command each, auto-restart and background log rotation included.
Automation around money must fail closed. The checkout path re-reads the cart total immediately before ordering and aborts unless it is exactly $0 (or under a configured ceiling). There is no code path that can spend money.
Educational portfolio project. Use only where you are authorized; respect the terms of service of every platform and store involved. No warranty.