Sink nodes: a real multi-sink recording surface (replace the single observe index) #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The only observation mechanism the engine has today is the single
observe: usizeindex on
Harness(crates/aura-engine/src/harness.rs:91).Harness::runreturnsVec<Option<Vec<Scalar>>>(harness.rs:213) — exactly one node's per-cycle row.There is no sink concept at all, even though C8/C18 and the glossary define a sink as
"a pure consumer node with no output that persists a stream into the run registry —
the sole recording and observability mechanism."
This blocks multi-sink: a single run can record exactly one stream, so the milestone's
goal (multi-producer / multi-consumer / multi-sink in all combinations) is
structurally unreachable.
Scope
Replace the single-
observeaffordance with real sink nodes:output: vec![]) bound to oneor more producer fields via the existing
Edge/Targetwiring.Pure infrastructure — no trading domain (no position table, no broker, no equity).
Design questions (needs a spec — this is a cycle, not a mechanical edit)
recording buffers vs. a trait method on the node vs. downcast.
runreturn shape: per-sink streams keyed by node index (or sink name).observe: usizeis removed outright or kept as the degenerate single-sink case.Invariants (must hold)
C1 (deterministic, no per-cycle heap alloc on the hot path beyond the recording
buffers), C7 (four scalar kinds, SoA), C8 (sink = node with no output), C18 (the sink
is the recording mechanism).