Commit Graph
1 Commits
Author SHA1 Message Date
Claude c1793426de refactor(streams): add StreamSource, StreamRowMerge and StreamCacheBuilder seams
Three Phase 0 seams, each with the current database behaviour as its only
backend:

- StreamSource: the stream row, this node's streams_servers row and the
  stream options a node reads before running a stream. The launcher
  (live, VOD and LLOD starts), MonitorCommand, ProxyCommand, ScannerCommand
  and live.php's fanout proxy hand-off ran these queries themselves.
- StreamRowMerge: MAIN's side of a node's runtime state. StreamStateWriter's
  SQL backend now calls it; later it merges `stream.state` events keyed by
  the reporting node. eventFields() keeps only runtime columns and redacts
  the source URL.
- StreamCacheBuilder: the stream_<id> cache entry (columns, server rows,
  the direct-source rule), extracted from cron:cache_engine so the R2
  stream delta can build the same shape.

OndemandCommand's stop path also still wrote streams_servers and signals
with raw SQL. It now uses StreamStateWriter and SignalDispatcher, like the
rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Es8UhyPS8MNjuYTagqfGWi
2026-09-25 10:07:47 +00:00