Canonical definitions for project-invented terminology used in the pipeline visualization and CLAUDE.md chronicles. Every entry is cross-checked against its source CLAUDE.md before inclusion โ no paraphrases, no inventions.
A bar that closes when the price has moved a fixed percentage from the bar's open price (instead of when a clock ticks). Open-anchored, bidirectional, percentage-threshold: breach when price >= open ร (1 + threshold) or price <= open ร (1 โ threshold). Distinct from classic Nicolellis-style range bars (which use dynamic high-low distance). Variable duration โ a bar can last seconds in volatile markets or hours in calm ones. The root project identity.
Source: opendeviationbar-py/CLAUDE.md (Naming callout) ยท cross-confirmed in opendeviationbar-patterns/CLAUDE.md
The threshold unit. 1 dbps = 0.00001 = 0.001%. Example: 250 dbps = 0.25%. All threshold values across the project use dbps. Crypto thresholds: 250 / 500 / 750 / 1000. Forex thresholds: 5 / 10 / 25 / 50 (50ร tighter, reflecting forex's lower inherent volatility).
Source: opendeviationbar-py/CLAUDE.md (Terminology table)
The trade-ID alignment invariant. For consecutive bars in the same (symbol, threshold): bar[i].last_agg_trade_id + 1 == bar[i+1].first_agg_trade_id. Replaces ALL time-based gap detection. If this holds, no trades were dropped between bars. If tid_delta > 0 = gap (missing trades). If tid_delta < 0 = overlap (two writers wrote the same range).
Source: opendeviationbar-py/CLAUDE.md (Terminology table)
Bar-reset framework โ when, if ever, the bar processor's internal state resets.
Source: opendeviationbar-py/CLAUDE.md (Terminology table) ยท forex week-mode mechanics in mql5/tools/CLAUDE.md
Inline Rust gap-fill on every WebSocket trade. Detects trade-ID discontinuity (a missed event) the moment it happens and fills in sub-3 seconds via parallel REST fetch. Named after Shakespeare's quick mischievous sprite โ fast and sneaks in fixes. The first defense against gaps; everything else is a backstop.
Source: opendeviationbar-py/CLAUDE.md (Terminology table)
Resilient WebSocket reconnection. Uses exponential backoff with jitter (via the backon Rust crate) when the WS connection drops, and resets the backoff state after the connection has been stable for โฅ60 seconds. Named after the Greek giant who regained strength on contact with the earth โ a reconnection mechanism that gets stronger after reconnecting.
Source: opendeviationbar-py/scripts/CLAUDE.md (Streaming Reliability Concepts)
Per-symbol liveness monitor inside the sidecar. Tracks the timestamp of the last bar produced for each symbol; alerts via Telegram if a symbol has gone silent for โฅ30 minutes. Named after the hundred-eyed Greek giant โ watches every symbol independently.
Source: opendeviationbar-py/scripts/CLAUDE.md (Streaming Reliability Concepts)
Ring buffer overflow alerting. Detects when the dropped_bars metric increments (meaning bars were dropped because the writer can't keep up) and sends Telegram alerts. Layered throttling: first-drop alert immediately, then re-alert after every 100 more drops, with a 60-second minimum between alerts to prevent burst-fail storms. Named after the river of forgetfulness โ when bars are dropped, they're literally forgotten.
Source: opendeviationbar-py/scripts/CLAUDE.md (Streaming Reliability Concepts)
Stale trade-flow detection inside the sidecar. If the trade stream goes silent (no events for an extended period), Watchdog triggers an engine restart via recovery.py. The last-resort detector when Antaeus has reconnected the socket but no data is flowing.
Immediate dead-letter replay on ClickHouse write failure. When a batch of bars fails to write, Niffler serializes them to Parquet on local disk, then attempts immediate replay. Sub-5 second recovery. Named after the magical creature that hoards lost things โ Niffler picks up bars that would otherwise be lost.
Source: opendeviationbar-py/scripts/CLAUDE.md (Streaming Reliability Concepts)
Dead-letter ferry. If Niffler's immediate replay fails, the Parquet dead-letter files persist. Charon auto-replays them on sidecar startup AND every 5 minutes during normal operation. Named after the ferryman of the dead โ moves stuck bars across the river to ClickHouse.
Source: opendeviationbar-py/scripts/CLAUDE.md (Streaming Reliability Concepts)
fromId REST pagination for gap-fill. Given a starting trade ID, walks forward through Binance's REST aggregate-trade API in pages, anchoring on trade IDs (not timestamps) so it's zero-gap by construction. The repair tool used by Kintsugi to backfill arbitrary historical ranges. Named after Ariadne's thread โ a continuous chain back through the labyrinth.
Source: opendeviationbar-py/scripts/CLAUDE.md (Streaming Reliability Concepts)
Self-healing gap reconciliation engine. Discovers Stathera gaps via trade-ID audit (looking for tid_delta != 0 in ClickHouse) and repairs them using Ariadne pagination + Ouroboros. Named after the Japanese art of repairing pottery with gold โ the cracks are made beautiful, not hidden.
The repair flow: discover shards โ repair shard (Vision ZIP โ REST fallback โ local Parquet trust gate) โ verify (post-repair Stathera check) โ log.
Source: opendeviationbar-py/CLAUDE.md (Terminology table) ยท detailed in python/opendeviationbar/kintsugi/CLAUDE.md
The clean line between the sidecar and Kintsugi. The sidecar owns the live stream from resume_tid forward; Kintsugi owns historical gaps before resume_tid. Eliminates concurrent-writer races that recurred across 4 fix cycles in March 2026 (Issue #280). When the sidecar restarts, its resume_tid is computed from the latest committed bar in ClickHouse โ that becomes the new boundary.
Source: opendeviationbar-py/scripts/CLAUDE.md (Writer Ownership Model #280)
fatal_write_breaker)Module-level state machine that protects against cascading ClickHouse write failures. Three states:
Pattern: CLOSED โ (3 failures) โ OPEN โ (60s) โ HALF_OPEN โ (success) โ CLOSED.
Source: python/opendeviationbar/clickhouse/CLAUDE.md (Issue #108)
The forex-side Open Deviation Bar synthesis engine. Rust crate at mql5/crates/fxview-core/, internal-only (not on crates.io). Used by both fxview-sidecar (live path) and fxview-backfiller (historical path). Independent of opendeviationbar-py's opendeviationbar-core crate โ verified by grepping mql5/Cargo.toml; no opendeviationbar dependency exists. Both pipelines implement the same Open Deviation Bar concept but in separate codebases.
Modules: bars.rs (BarBuilder + CompletedBar with 200+ fields), writer.rs (ChWriter with circuit breaker + 100K-bar drop ceiling + async_insert), pending_queue.rs (forward-window labels with Abdi-Ranaldo 2017 spread estimator), bars_derived.rs (28 rolling-quantile + 13 pattern features).
Fail-fast mechanism inside TickCollector.mq5 (the MT5 Expert Advisor on the forex track). Every OnTimer cycle validates the proposed broker UTC offset across four independent signals:
TimeTradeServer() โ TimeGMT() โ authoritative in live mode.Any disagreement fires RaiseOffsetHaltAlert: modal alert + chart comment + mobile push + email + flag file. g_offset_halt blocks all subsequent tw_write_tick calls โ better to lose live ticks than silently write miscomputed UTC. Manual human flag-removal required to resume.
Source: mql5/mql5_ea/CLAUDE.md