Consider an aura-std channel/buffer recording block (recorder boilerplate) #10

Closed
opened 2026-06-04 15:44:11 +02:00 by Brummel · 2 comments
Owner

Surfaced by the cycle-0006 fieldtest (docs/specs/fieldtest-0006-substrate.md, friction #2).

Every recording node currently re-implements the same channel-sink dance from scratch: a tx field, a schema with output: vec![], and an eval that reads each input by kind, sends (now, row), and returns None. The 0006 spec deliberately ships no library sink (C9 — no speculative surface; Recorder was an explicit test-local fixture), so this redundancy is expected, not a bug.

Action (deferred by design): once a second real consumer confirms the shape, consider a small reusable recording block in aura-std (e.g. a generic channel/buffer sink, or a Recorder helper) so the boilerplate is written once. Holding until the shape is confirmed is the correct C9 posture — do not add speculatively.

Surfaced by the cycle-0006 fieldtest (`docs/specs/fieldtest-0006-substrate.md`, friction #2). Every recording node currently re-implements the same channel-sink dance from scratch: a `tx` field, a `schema` with `output: vec![]`, and an `eval` that reads each input by kind, sends `(now, row)`, and returns `None`. The 0006 spec deliberately ships no library sink (C9 — no speculative surface; `Recorder` was an explicit test-local fixture), so this redundancy is expected, not a bug. Action (deferred by design): once a *second* real consumer confirms the shape, consider a small reusable recording block in `aura-std` (e.g. a generic channel/buffer sink, or a `Recorder` helper) so the boilerplate is written once. Holding until the shape is confirmed is the correct C9 posture — do not add speculatively.
Brummel added the idea label 2026-06-04 15:44:11 +02:00
Author
Owner

checked 2026-06-04: still zero real (non-test) consumers — all Recorder occurrences are test fixtures (engine #[cfg(test)] in harness.rs + 9 fieldtest bin targets); no sink/recorder shipped in aura-std, C8 sink / C18 registry not yet implemented as a library component. Gate remains shut: the aura-std block stays deferred per C9.

Also rejected a test-only TestRecorder helper: (1) aura-engine's own tests already share a single parametric Recorder in harness.rs — no duplication there; (2) the ~9 fieldtest copies are load-bearing, not accidental — a fieldtest simulates a downstream author who has only the public interface, so the repeated boilerplate IS the measurement (it's what surfaced this issue). Sharing a helper across fieldtests would entail linking the separate workspace roots and would weaken what the fieldtests verify.

Next real trigger is the genuine second consumer #10 waits on: when the playground/trace-explorer (C12/C18) needs a real sink to write streams into the registry. Build the aura-std sink then; fieldtests may consume it as a library node at that point.

checked 2026-06-04: still zero real (non-test) consumers — all Recorder occurrences are test fixtures (engine `#[cfg(test)]` in harness.rs + 9 fieldtest bin targets); no sink/recorder shipped in aura-std, C8 sink / C18 registry not yet implemented as a library component. Gate remains shut: the aura-std block stays deferred per C9. Also rejected a test-only `TestRecorder` helper: (1) aura-engine's own tests already share a single parametric Recorder in harness.rs — no duplication there; (2) the ~9 fieldtest copies are load-bearing, not accidental — a fieldtest simulates a downstream author who has only the public interface, so the repeated boilerplate IS the measurement (it's what surfaced this issue). Sharing a helper across fieldtests would entail linking the separate workspace roots and would weaken what the fieldtests verify. Next real trigger is the genuine second consumer #10 waits on: when the playground/trace-explorer (C12/C18) needs a real sink to write streams into the registry. Build the aura-std sink then; fieldtests may consume it as a library node at that point.
Author
Owner

Resolved by implementation — closing.

The reusable aura-std recording sink this issue proposed now ships as Recorder (crates/aura-std/src/recorder.rs, exported at lib.rs:30): a generic channel/buffer sink over all four scalar kinds with an mpsc destination. It is consumed as a real library node from production code (aura-cli/src/main.rs:82-83, the aura run sample harness), plus engine paths (graph_model.rs, sweep.rs, report.rs, blueprint.rs).

It landed in 559903a (2026-06-04, ~2.5h after this issue's parking comment) — the "second real consumer" gate this idea waited on fired with the aura run / aura graph work. The tx / output: vec![] / eval boilerplate from friction #2 is now written once. Nothing residual; closing as resolved.

Resolved by implementation — closing. The reusable `aura-std` recording sink this issue proposed now ships as `Recorder` (`crates/aura-std/src/recorder.rs`, exported at `lib.rs:30`): a generic channel/buffer sink over all four scalar kinds with an mpsc destination. It is consumed as a real **library node from production code** (`aura-cli/src/main.rs:82-83`, the `aura run` sample harness), plus engine paths (`graph_model.rs`, `sweep.rs`, `report.rs`, `blueprint.rs`). It landed in `559903a` (2026-06-04, ~2.5h after this issue's parking comment) — the "second real consumer" gate this idea waited on fired with the `aura run` / `aura graph` work. The `tx` / `output: vec![]` / `eval` boilerplate from friction #2 is now written once. Nothing residual; closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#10