wire-assert

command
v2.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Command 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,
                         or a chain response carrying per-leg IV when the
                         board was already subscribed
gamma-no-wait-envelope — gamma --no-wait returns a valid typed lifecycle state
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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL