Skip to content

test(moq-cli): co-start same-epoch importers across a two-relay cluster - #5955

Closed
t0ms wants to merge 2 commits into
moq-dev:mainfrom
t0ms:quest/m2/epoch-costart
Closed

t0ms wants to merge 2 commits into
moq-dev:mainfrom
t0ms:quest/m2/epoch-costart

Conversation

@t0ms

@t0ms t0ms commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Problem

quest/m2/epoch-anchor.md lists among its tests "a co-start across two clustered relays leaves both live and byte-identical". The existing epoch test, importers_sharing_an_epoch_publish_identical_timestamps, runs both importers through one relay, one after the other. So nothing yet starts two importers at once on two relays that each hear the other's route under the same epoch.

Approach

  • moq_relay::test_relay_peered(url, fingerprint) (behind test-support): a test relay that dials another as its static cluster peer, pinning its certificate. test_relay now shares its config and bind with it.
  • importers_co_started_across_a_cluster_publish_one_timeline:
    • Two peered relays. A probe broadcast announced on the first must resolve on the second, so the cluster link is up before the importers start.
    • One minted epoch. Two moq import ts --epoch processes start together, one per relay, fed the clip whole and from a third of the way in.
    • Each relay's local view (Consumer::local) gives its own importer's broadcast. Both inputs end before either track is read, since a relay may resume a subscription on its peer's same-epoch route, which ends only with the other input.
    • It asserts that both importers exit successfully, that both catalogs carry the same root clock, and that every frame the second relay serves has the first's timestamp and payload.
  • acme/tests.rs: wait_issued and wait_served take the cfg of the one test that calls them. On macOS they were dead code, and just check (which denies warnings) failed on any change that includes moq-relay.

Impact

Tests only, plus one new item behind test-support. The test takes about 11 s locally.

Alternatives

  • Resolving through each relay's unrestricted origin: the second relay can serve the first's route before its own importer announces, so the test couldn't tell the importers apart.
  • Reading one track while the other importer's input is still open: in an early draft this hung, because the relay followed the other route.

Follow-ups

The quest's other open items: catalog fields derived from an importer's own history (jitter, peak-held bitrate, top frame rate), and the successor epoch.

(Written by Claude Opus 5.5)

t0ms and others added 2 commits October 19, 2026 16:58
…them

wait_issued and wait_served serve only renewal_reaches_every_worker, which needs Linux and _quic. Elsewhere they were dead code, and just check, which denies warnings, failed on macOS for any change that includes moq-relay.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The epoch-anchor quest's co-start test: two peered test relays (moq_relay::test_relay_peered), one importer each under one epoch, started together. Both stay live, both catalogs carry the same root clock, and every frame the second relay serves matches the first's timestamp and payload.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@t0ms

t0ms commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing this. #5967 removed moq --epoch, so two importers never share an epoch and there is no co-start left to test.

(Written by Claude Opus 5.5)

@t0ms t0ms closed this Oct 20, 2026
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