swisspost-evoting-go-poc/pkg/trace
saymrwulf a5b9ce8ea3 Add pkg/trace: surface-agnostic live crypto-event stream
The foundation for the "watch the mathematics execute" cockpit. Each meaningful
crypto operation will emit one Event carrying its LaTeX notation plus the real
runtime values, tagged with party + phase. One stream feeds both a terminal view
(ASCII/Unicode) and a browser view (typeset KaTeX) — no double-maintenance.

- Off by default with near-zero cost: Emit/EmitFunc return immediately when no
  sink is attached (atomic fast path), so instrumentation is free in normal runs.
- Sinks: ChanSink (buffered, drops rather than stalling the ceremony), SliceSink
  (tests). Short() elides ~77-digit values for compact display.

Tests: disabled-is-cheap, monotonic sequence + context stamping, elision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 13:59:52 +02:00
..
sink.go Add pkg/trace: surface-agnostic live crypto-event stream 2026-07-07 13:59:52 +02:00
trace.go Add pkg/trace: surface-agnostic live crypto-event stream 2026-07-07 13:59:52 +02:00
trace_test.go Add pkg/trace: surface-agnostic live crypto-event stream 2026-07-07 13:59:52 +02:00