Skip to content

Commit fe1535e

Browse files
mivertowskiclaude
andcommitted
feat(core): live actor introspection streaming (v1.1)
Per spec section 3.2, add streaming metrics API for sub-millisecond freshness debugging of stalled NSAI reasoning chain actors. New types (additive — existing pull API unchanged): - LiveMetrics — observation record (HLC ts, queue depth, EWMA rates, p50/p99 latency, state size, GPU util, tenant_id) - IntrospectionStream — subscription dispatcher with per-actor and global buckets via tokio mpsc::unbounded_channel; auto-prunes broken receivers; monotonic subscription IDs - SubscriberHandle — interval-gated sender (slow subscribers safe) - MetricAggregator — Send+Sync with configurable EWMA alpha (default 0.2), seeds EWMA with first observation, consumes deltas on snapshot - LatencyHistogram — 1024-slot ring buffer with sort-on-read p50/p99 - SubscribeMetricsRequest (24B, #[repr(C)]) — H2K wire format - LiveMetricsEvent (72B, #[repr(C)] w/ explicit padding) — K2H wire format - Compile-time size assertions for ABI stability 42 new tests + 5 pre-existing = 47 introspection tests passing. 782 ringkernel-core lib tests pass total. Backward compatible: ActorIntrospection pull API untouched, tick() support for coordinator calls, all existing tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e33ffd3 commit fe1535e

1 file changed

Lines changed: 1494 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)