FRAMEWORK ARCHITECTUREADVANCED · LESSON 32 / 36~6 min read

The 8-check broker pre-flight chain.

Airline pre-flight checklists exist because cockpits are stressful and procedures save you under stress. Every commercial flight runs through the same fixed sequence — fuel, weight, weather, instruments, crew briefing, alternates, departure clearance, takeoff readiness — before the wheels move. The framework's broker pre-flight chain is the same idea applied to order placement. Eight checks, fixed sequence, default-refuse semantics. Every order placed through the dashboard runs the gauntlet; orders that fail any check are refused at preview time, before the place button enables. The chain is the framework's most consequential single piece of code — most of the discipline lives or dies in broker_guard.py.

The eight checks in order

#CheckRefuses when
1Audit freshnessAudit data older than BROKER_STALE_MAX_SECONDS (default 900s = 15min)
2R:R floorStructural R:R below 2.0:1 (per Lesson 4)
3Position size capMax-shares math exceeds available risk-budget OR per-name cap
4Sector + sleeve concentrationAdding this trade pushes any of: sector cap, Sports Cars sleeve cap, Sovereignty Cap (per L13/L14/L21)
5Macro tapeSPY pre-market ≤ −1.5% OR VIX > 30 OR drawdown ≥ 7% (per L11/L15)
6Catalyst proximityEarnings within 3 sessions OR FOMC within 90-min window (per L19/L23)
7Options-level enforcementOptions entry but Level 1-2 only allowed (no naked, no complex)
8HMAC-token + rate-limit + cooldown + dollar-capBracketing safety: token mismatch / rate exceeded / cooldown active / order $ exceeds session cap

Order matters. Earlier checks gate the later ones. If audit freshness fails (#1), the chain stops there — no point computing R:R off stale data. If R:R fails (#2), no point checking sector concentration. The cascade exits at the first refusal.

⌬ Pre-flight gate simulator
1 Audit freshness
2 R:R floor (≥ 2.0)
3 Position size cap
4 Sector + sleeve concentration
5 Macro tape
6 Catalyst proximity
7 Options-level enforcement
8 HMAC + rate + cooldown + $cap
First refusalnone
Place button stateENABLED
All 8 checks pass. Order is allowed. Chain exited cleanly; place button enables. Override toggle exists but isn't needed when no refusal fires.
Uncheck any box — that's the first refusal. Earlier failures stop the cascade; later checks aren't even computed. The cascade is ordered by reliability and cost — fast/cheap checks first, expensive lookups last.

The override mechanism

Every check has an override toggle. The override:

The journal review at year-end almost always shows that overrides made things worse, not better, by a margin most users find uncomfortable. The data is undeniable; the framework's job is to make the override visible without making it impossible. The trader retains agency; the journal forecloses self-deception.

Why default-refuse instead of default-allow

This is an architectural commitment. A system that defaults to "allow unless someone speaks up" requires the trader to remember every reason to refuse. They'll forget some. A system that defaults to "refuse unless every check explicitly passes" requires the math to actively earn each yes. The math doesn't forget. Same reasoning that puts default-refuse on every airline pre-flight: the cost of a missed check on the dangerous direction is asymmetric.

The audit log

Every gate decision (pass, refuse, override) writes to the broker_log. The log is queryable per-gate, per-name, per-session. Useful patterns it surfaces over time:

The real lesson

Eight checks, fixed sequence, default-refuse. The framework's pre-flight chain is the most consequential code in the dashboard because it's the gate every order passes through. Override exists, logs, and produces a year-end honest record. The trader who runs this chain weekly for a year accumulates a forensic adherence audit no other retail product produces. The math doesn't forget; the journal makes the pattern undeniable.


Related: L12 — 13 risk pillars · L22 — journal canonical

← LESSON 31
The 10 AI surfaces
LESSON 33 →
Performance accounting