Code review - #54
Merged
Merged
Conversation
added 9 commits
August 11, 2026 06:57
D2 is proven, not argued against a throwaway mongo:7 on an isolated port rather than trusting the source trace:
OLD -> {"acknowledged":false} | adPolicy still on disk: true
modifiedCount is undefined ; `modifiedCount > 0` evaluates to false
NEW -> {"acknowledged":true,"modifiedCount":1,...} | adPolicy still on disk: false
NEW2 -> {"acknowledged":true,"modifiedCount":0,"matchedCount":0} ← second boot, clean no-op
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code review - identify bug and hot fixes - implemented on branch. Full unit testing completed.
Origin republish: egress correctness, ingest lifecycle, and telemetry fixes
Follow-up hardening pass over the stream-arch origin-republish work (#52). A review of the merged diff surfaced 28 distinct issues; this branch fixes 24 of them, with the remainder deliberately deferred and listed at the bottom.
No new features. No API or config changes. Behaviour on a healthy muxed channel is byte-identical.
Rust data plane — demuxed / raw-TS egress correctness
The origin's demuxed-ness can change under a live session, and each egress path sampled it at a different moment. That shared root cause produced four separate viewer-visible faults.
Rust data plane — ingest lifecycle and self-heal
Rust data plane — muxer / normalizer
Control plane — telemetry, migration, maintainability
Frontend — two-clock skew in stream stats
Every timestamp in the stats payload is stamped by the server, but the screen aged them against the browser clock. A machine ten seconds fast read every session as stale, so the default-open OUTPUT stage reported "draining" indefinitely while viewers were streaming; a machine behind the server rendered negative ages such as "-42s ago".
One root-cause fix: the payload carries the server clock, the client derives an offset per frame, and all six affected sites became same-clock subtractions. Two were not in the original report: the per-client connected column, and ad-break age — which previously treated a break that opened before the screen did as brand new, so the stuck-break fault could only fire after the screen had been open long enough.