Documentation
¶
Overview ¶
wire-assert reads a JSONL wire log (as emitted by IBKR_WIRE_LOG_PATH) and evaluates one named invariant against the frames produced after a given byte offset. Exit 0 = pass; non-zero = fail with a one-screen failure report on stderr.
The script that drives this binary (scripts/wire-smoke.sh) captures the wire log's size before invoking a CLI command, then passes that size as --since-offset so the check only sees frames produced by THIS command — not the daemon's boot chatter or earlier commands.
Adding a new invariant: add a case to dispatch(), implement a CheckFunc, document it in the catalogue below. No plug-in machinery; the binary is a single switch statement on purpose.
Catalogue:
quote-spy — reqMktData SPY STK + tickPrice within budget
chain-iv-source — ≥1 OPTION_COMPUTATION (msg 21) with non-NaN IV
gamma-noflag — gamma --no-wait returns terminal status, never pending
gamma-premarket-derived — in loose mode, the gamma envelope reports
derived_iv_legs > 0 (proves BS-IV fallback fired)
regime-subs — MarketDataType notice for each of VIX/VIX3M/HYG/SPY/USDJPY
account-summary — reqAccountSummary OUT + accountSummary IN
status-handshake — at least one MarketDataType notice (58) inbound