refactor(aura-ingest): fuse drain_trace taps via join_on_ts; doc the cadence rule
drain_trace now joins its four recording-sink taps through aura-engine's join_on_ts instead of a hand-rolled per-tap HashMap, resolving the #93 zip-by-index panic at its source: the four taps fire at different cardinalities (breakout one bar short via cold Delay(1); bars_since_open filtered by Session), so a positional zip misaligns or panics. The BarTrace mapping stays a thin layer with its caller-side defaults unchanged (held->0.0, bars_since_open->-1, breakout->false) — the engine reports presence, the consumer interprets absence. Behaviour is byte-preserved: the gated GER40 tests (ger40_breakout_real, ger40_breakout_blueprint, open_ohlc_seam) stay green against the real archive. The Recorder doc gains a prose note on the multi-tap cadence rule (join on ts, never by index), pointing at join_on_ts by name rather than rustdoc link since aura-std does not depend on aura-engine. Verified: cargo build/test/clippy --workspace --all-targets clean; the _by_ts hand-rolled join is gone (acceptance grep empty). closes #93
This commit is contained in:
@@ -14,6 +14,13 @@ use std::sync::mpsc::Sender;
|
||||
/// the newest value of every column and sends the row to `tx`; it returns `None`
|
||||
/// (records, forwards nothing) and `None` during warm-up until all columns have a
|
||||
/// value.
|
||||
///
|
||||
/// Multiple taps fire at their own node's cadence, so their recorded streams have
|
||||
/// different lengths and different firing instants. To fuse several taps into one
|
||||
/// trace, join on the recorded timestamp — never by positional index, which
|
||||
/// misaligns the columns or panics. The engine's report layer ships a `join_on_ts`
|
||||
/// helper (in `aura-engine`) for exactly this; it is named in prose rather than
|
||||
/// linked because `aura-std` does not depend on `aura-engine`.
|
||||
pub struct Recorder {
|
||||
kinds: Vec<ScalarKind>,
|
||||
tx: Sender<(Timestamp, Vec<Scalar>)>,
|
||||
|
||||
Reference in New Issue
Block a user