Skip to content

quest: settle the moq-mux Clock boundary - #4700

Merged
kixelated merged 2 commits into
quest/m1/test-flakes-2/READMEfrom
quest/plan-clock-boundary
Oct 2, 2026
Merged

kixelated merged 2 commits into
quest/m1/test-flakes-2/READMEfrom
quest/plan-clock-boundary

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Settles the open decision that review of #4693 added to mux-live-import-clock.

How does std::time::Instant in moq-mux's public API (Clock::at, the json/binary timed writes) handle the switch?

  • ✅ Convert at the boundary: public inputs stay std::time::Instant, so it stays on main
  • Change the public types: a break on dev

Public API: none. Wire: none.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

MERGE (head 3873e5ddeb6cac2a4e9480de81d32cb384371a87)

Settles the open Instant-boundary choice that #4693 left for the maintainer: convert at the boundary on main (public inputs stay std::time::Instant), reject a typed break on dev. Docs-only; matches the PR decision checklist.

Checks

  1. Decision text matches code surface. On the quest base / main, Clock::at(epoch: Instant, wall: SystemTime), capture/stamp, and json/binary update/append take std::time::Instant / Timed<_, Instant>; Clock is re-exported from moq-mux; moq_net::Timed docs still say moq-mux uses std::time::Instant. "Public API: none" is correct for the boundary-convert path.
  2. Background facts still hold. ts/fmp4 live_import and flv import still std::thread::sleep(idle) with a 300 ms case; gap goes through Anchor → Clock::now() → std::time::Instant::elapsed(). moq-mux: run the TS SI debounce test on the paused clock #4687 on this line dropped SI Capture's crate::Clock for a private web_async::time::Instant debounce only — Clock itself is still std::time::Instant.
  3. No contradictions or broken refs. Settled paragraph is the prior recommended option; rejected alternative is explicit; #4687 / #4693 cites are consistent with the review thread.

Blocking

None.

Non-blocking

  1. CI — Quest passed; Check / Test still pending at review time (expected for a single markdown quest settle).
  2. Implementer note (inherited, not a defect) — when coding the child, convert in Clock::at and capture/stamp so "ahead of now" / elapsed comparisons stay on one Instant type after the private epoch moves.

This is an automated review, not the maintainer's decision
(Written by Grok)

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed 1ab08a5 (full plan diff; the latest base merge leaves this decision unchanged).

No actionable bugs found. quest/m1/test-flakes-2/mux-live-import-clock.md:33–38 resolves the previous API-boundary prerequisite: preserve the public std::time::Instant inputs while changing the private epoch.

Direction is sound and keeps the change smaller than a caller-wide type migration. The surrounding code confirms both boundaries matter: Clock::at (rs/moq-mux/src/clock.rs:89) and timed JSON/binary writes through Clock::stamp (json.rs:225,309; binary.rs:182,257). The implementation should convert captured instants as well as the constructor epoch, with the future-capture check and elapsed time using the same clock; retain the fixed wall mapping.

Verification: static plan, public API, import-helper, and prior-review inspection only. No builds or tests run. This decision does not yet verify paused-clock behavior or WASM compatibility.

(Written by review (OpenAI))

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging. Settles the moq-mux Clock boundary in mux-live-import-clock: public inputs (Clock::at, timed json/binary writes) stay std::time::Instant and convert to the private web_async epoch internally, so no public API change and it stays on main. Merged the line base in; Codex and CI clean. Implementation note from Codex for whoever picks it up: convert captured instants as well as the constructor epoch, so the future-capture check and elapsed time read the same clock.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit bbc16bb into quest/m1/test-flakes-2/README Oct 2, 2026
4 checks passed
@kixelated
kixelated deleted the quest/plan-clock-boundary branch October 2, 2026 03:12
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