armed & monitored · async python · fail-closed by design

Real-time signal.
Sub-second response.

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.

View the source How it works ↓
3–6sdetection loop
0.36sparallel apply wave
6isolated warm carts
$0hard spend ceiling

The pipeline

Four stages, fully async, each built to fail gracefully.

01

Detect

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.

02

Extract

Configurable regex extraction, deduped against a persistent seen-store, with a tweet-age window that discards stale drops.

03

Race

A pool of isolated HTTP sessions, each pre-warmed with product and fresh nonces, refreshed every 4 minutes. Codes are applied in parallel waves.

04

Guard

Before any order: re-read the cart total. Not $0? Abort. Transient failures retry with backoff; final failures are discarded instantly.

Engineering notes

The parts that made it survive a real, adversarial drop.

Retry taxonomy

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.

Session isolation

Only WordPress auth cookies are kept — cart and WooCommerce session cookies are stripped, so all six workers race independent carts.

Rate-limit fallback

Timeline ↔ search alternation with automatic failover. One throttled queue never takes detection offline.

Async core

asyncio + httpx throughout: detection, racing, and session refresh run concurrently with no blocking calls in the hot path.

Tested & linted

Pure-function core (form parsing, retry classification, totals) covered by pytest; ruff-clean; CI on every push.

Deploy anywhere

launchd on macOS, systemd or Docker Compose on Linux — one command each, auto-restart and background log rotation included.

Built to fail closed

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.