Skip to content

fix(monitor): throttle stats, show slow mixer edges, and improve moq_peer counters#14

Merged
streamer45 merged 1 commit intomainfrom
node-stats
Dec 31, 2025
Merged

fix(monitor): throttle stats, show slow mixer edges, and improve moq_peer counters#14
streamer45 merged 1 commit intomainfrom
node-stats

Conversation

@streamer45
Copy link
Copy Markdown
Owner

Summary

  • Fixes node stats spam by correcting NodeStatsTracker throttling (consistent across source/sink nodes; first snapshot emitted promptly).
  • Adds structured degraded details for mixer slow-input timeouts (slow_pins, newly_slow_pins, sync_timeout_ms) and surfaces them in Monitor:
    • Node tooltip shows upstream from_node.from_pinto_pin mapping.
    • A visible edge badge (⏱️) marks degraded connections; hover shows the same slow-input context.
  • Fixes moq_peer stats so ingress from publisher clients increments input counters; forwarding to subscribers is counted as well.
  • Regenerates TS API types to include Degraded.details; tests/lint remain green.

@streamer45 streamer45 self-assigned this Dec 31, 2025
@streamer45 streamer45 enabled auto-merge (squash) December 31, 2025 10:36
@streamer45 streamer45 merged commit 42e0df9 into main Dec 31, 2025
14 checks passed
@streamer45 streamer45 deleted the node-stats branch December 31, 2025 10:45
staging-devin-ai-integration bot added a commit that referenced this pull request Mar 13, 2026
Implements all 13 actionable findings from the video feature review
(finding #11 skipped — would require core PixelFormat serde changes):

WebM muxer (webm.rs):
- Add shutdown/cancellation handling to the receive loop via
  tokio::select! on context.control_rx, matching the pattern used
  by the OGG muxer and colorbars node (fix #1, important)
- Remove dead chunk_size config field and DEFAULT_CHUNK_SIZE constant;
  update test that referenced it (fix #2, important)
- Make Seek on Live MuxBuffer return io::Error(Unsupported) instead of
  warn-and-clamp to fail fast on unexpected seek calls (fix #3, important)
- Add comment noting VP9 CodecPrivate constants must stay in sync with
  encoder config in video/mod.rs (fix #4, important)
- Make OpusHead pre_skip configurable via WebMMuxerConfig::opus_preskip_samples
  instead of always using the hardcoded constant (fix #6, minor)
- Group mux_frame loose parameters into MuxState struct (fix #12, nit)
- Fix BitReader::read() doc comment range 1..=16 → 1..=32 (fix #14, nit)

VP9 codec (vp9.rs):
- Add startup-time ABI assertion verifying vpx_codec_vp9_cx/dx return
  non-null VP9 interfaces (fix #5, minor)

Colorbars (colorbars.rs):
- Add draw_time_use_pts config option to stamp PTS instead of wall-clock
  time, more useful for A/V timing debugging (fix #7, minor)
- Document studio-range assumption in SMPTE bar YUV table comment with
  note explaining why white Y=180 (fix #13, nit)

OGG muxer (ogg.rs):
- Remove dead is_first_packet field and its no-op toggle (fix #10, minor)

Tests (tests.rs):
- Add File mode (WebMStreamingMode::File) test exercising the seekable
  temp-file code path (fix #8, minor)
- Add edge-case tests: non-keyframe first video packet and truncated/
  corrupt VP9 header — verify no panics (fix #9, minor)

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Signed-off-by: bot_apk <apk@cognition.ai>
Co-Authored-By: Staging-Devin AI <166158716+staging-devin-ai-integration[bot]@users.noreply.github.com>
streamer45 pushed a commit that referenced this pull request Mar 13, 2026
Implements all 13 actionable findings from the video feature review
(finding #11 skipped — would require core PixelFormat serde changes):

WebM muxer (webm.rs):
- Add shutdown/cancellation handling to the receive loop via
  tokio::select! on context.control_rx, matching the pattern used
  by the OGG muxer and colorbars node (fix #1, important)
- Remove dead chunk_size config field and DEFAULT_CHUNK_SIZE constant;
  update test that referenced it (fix #2, important)
- Make Seek on Live MuxBuffer return io::Error(Unsupported) instead of
  warn-and-clamp to fail fast on unexpected seek calls (fix #3, important)
- Add comment noting VP9 CodecPrivate constants must stay in sync with
  encoder config in video/mod.rs (fix #4, important)
- Make OpusHead pre_skip configurable via WebMMuxerConfig::opus_preskip_samples
  instead of always using the hardcoded constant (fix #6, minor)
- Group mux_frame loose parameters into MuxState struct (fix #12, nit)
- Fix BitReader::read() doc comment range 1..=16 → 1..=32 (fix #14, nit)

VP9 codec (vp9.rs):
- Add startup-time ABI assertion verifying vpx_codec_vp9_cx/dx return
  non-null VP9 interfaces (fix #5, minor)

Colorbars (colorbars.rs):
- Add draw_time_use_pts config option to stamp PTS instead of wall-clock
  time, more useful for A/V timing debugging (fix #7, minor)
- Document studio-range assumption in SMPTE bar YUV table comment with
  note explaining why white Y=180 (fix #13, nit)

OGG muxer (ogg.rs):
- Remove dead is_first_packet field and its no-op toggle (fix #10, minor)

Tests (tests.rs):
- Add File mode (WebMStreamingMode::File) test exercising the seekable
  temp-file code path (fix #8, minor)
- Add edge-case tests: non-keyframe first video packet and truncated/
  corrupt VP9 header — verify no panics (fix #9, minor)

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Signed-off-by: bot_apk <apk@cognition.ai>
Co-authored-by: bot_apk <apk@cognition.ai>
Co-authored-by: Staging-Devin AI <166158716+staging-devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant