Repository navigation
refactor(time)!: use Wall for public Rust wall times - #6298
Conversation
Quest-Claim: bc09b5644f6cf635
Preserve numeric encodings while making range boundaries explicit. Keep the API and range choices in the draft quest PR. Co-Authored-By: GPT-6 <noreply@openai.com>
Document the portable CLI timestamp range and keep the draft quest status within its supported schema. Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Maintainer decision from planning in #6346, recorded in
With that, (Written by Claude Opus 5.5) |
# Conflicts: # rs/hang/MIGRATE.md # rs/moq-cli/MIGRATE.md # rs/moq-hls/MIGRATE.md # rs/moq-mux/MIGRATE.md # rs/moq-net/MIGRATE.md # rs/moq-relay/MIGRATE.md # rs/moq-tokio/MIGRATE.md
…ange Expiries and auth times are only compared against now, so a value past 2554 saturates to the last representable Wall and one before 1970 to the epoch. PeerIdentity::expiry, request_for and the auth claim and grant decoders become infallible again, and rcgen's default year-4096 certificates are admitted. Retire the wall-time quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # rs/moq-net/MIGRATE.md # rs/moq-relay/MIGRATE.md # rs/moq-tokio/MIGRATE.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e71d8bd070
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review (Written by Claude Opus 5.5) |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
RFC 3550 lets a sender without a wall clock report NTP time zero, which str0m exposes as 1900. Refuse such a report at the boundary by ignoring it, keeping the track on arrival time, instead of ending the ingest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
1 similar comment
|
@codex review (Written by Claude Opus 5.5) |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # rs/moq-net/MIGRATE.md
# Conflicts: # rs/moq-hls/MIGRATE.md # rs/moq-mux/MIGRATE.md # rs/moq-net/MIGRATE.md
Resolve moq-auth against patterns-only access (#6448): keep Patterns for publish/subscribe and Wall for claim times, and drop the removed generic Key::decode while keeping Wall in verify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging. Uses Wall for public Rust wall times, as the maintainer chose. CI is green, the current head has a non-Grok review, and (Written by Claude Opus 5.5) |
# Conflicts: # rs/moq-mux/MIGRATE.md # rs/moq-net/MIGRATE.md # rs/moq-relay/MIGRATE.md
# Conflicts: # rs/hang/MIGRATE.md # rs/moq-auth/MIGRATE.md
|
Merged (Written by Claude Opus 5.5) |
Carry the Wall times through #6510's Denial and Instant::now renames, and keep both MIGRATE.md entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests read moq_clock::wall() instead of SystemTime::now(), so the clippy test build denied the stale #[expect]s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # quest/m1/time/wall.md # rs/moq-hls/MIGRATE.md # rs/moq-hls/src/export/renditions.rs # rs/moq-hls/src/export/segments.rs # rs/moq-mux/MIGRATE.md # rs/moq-relay/src/acme.rs
Problem
Finishes quest/m1/time/wall.md. Public Rust wall times still expose platform-dependent
SystemTime, while the ambient clock suppliesmoq_clock::Wall.Approach
Migrate wall APIs in hang, mux, HLS, QUIC, relay and tokio, plus the auth claims/grants and the epoch wall view, which the quest's inventory omitted. Update every in-tree consumer. Third-party formatters, serde_with and str0m convert at their boundaries. Per-crate clippy ratchets ban
SystemTimewherever that boundary is absent.Auth and relay share the optional
moq_clock::serde::UnixSecondsadapter. It writes the same integer seconds as serde_with'sTimestampSeconds<i64>and decodes by saturating to Wall's range.Wall::saturating_addbacks it, the certificate expiry, andmoq auth signtimestamps.Decisions
Settled by the maintainer (2026-10-22, recorded in moq-dev/moq#6346 and on this PR):
Wall, and one before 1970 becomesWall::UNIX_EPOCH. No representable now compares differently against the saturated value.tls::PeerIdentity::expiry, the authClaims/Grant/Peerdecoders, andmoq_relay::auth::request_forstay infallible, and rcgen's default year-4096 certificates are admitted again (the integration fixtures use rcgen's default expiry, as on main).Epoch::time()returnsResult<Wall, OutOfRange>, so a limited wall view never invalidates a valid UUIDv7 identity. Epoch bytes, text and the numeric FFI getter keep the full 48-bit range.Dropped from the earlier draft: the fallible
PeerIdentity::expiry, falliblerequest_for, the auth decode range refusal, and the CLI's 1970-2554 argument limit (--expires/--issuedpast 2554 now saturate; negatives are still refused, as on main).Public API and wire impact
Breaking Rust APIs, each covered under How to migrate:
catalog::Clock::wall_clock,echo::Arrival::{wall,new}.Clock::{at,wall_clock},catalog::Timebase::place.export::Renditions::anchor.TimeSource::now,TokenLog::check_and_insert.session::View::started.tls::PeerIdentity::expiryreturnsOption<Wall>(saturating).Claims::{expires,issued,not_before}and builders,Grant::expires,request::Peer::expires(saturating decode).Epoch::timereturnsResult<Wall, OutOfRange>.Behavior only: moq-rtc ignores a sender report outside the wall range.
Additive: moq-clock gains
Wall::saturating_addand an optionalserdefeature withserde::UnixSeconds.Wire: none. One JSON value moves: the relay's auth request reports a certificate expiry past 2554 as
18446744074(the saturatedWall) instead of the certificate's own date. Protocol encodings, drafts, versions, JSON units and integer/null shapes are unchanged. FFI and bindings are unchanged, so no binding, JS or doc sync is needed beyond removing the relay auth doc's range note. JS auth already reads the full numeric range.How to migrate
PRs no longer write
MIGRATE.md, so these notes moved here from each package's## Unreleasedlist.catalog::Clock::wall_clockandecho::Arrival::{wall,new}usemoq_clock::Wallin place ofSystemTime. Read the ambient wall withmoq_clock::wall(), convert a third-partySystemTimewithWall::try_from, and convert back withSystemTime::fromat that API's boundary. Times outside 1970-2554 fail withTimestampOverflow; catalog and echo JSON units are unchanged.Clock::{at,wall_clock}andcatalog::Timebase::placeusemoq_clock::Wallin place ofSystemTime. Passmoq_clock::wall()for the current wall, useWall::try_from(system_time)?for a third-party timestamp, and convert returned values withSystemTime::fromonly at a third-party boundary. The portable wall range is 1970-2554; catalog encodings are unchanged.export::Renditions::anchorusemoq_clock::Wallinstead ofSystemTime. Passmoq_clock::wall()for now, convert third-party timestamps withWall::try_from, and passwall.into()to formatters that takeSystemTime. HLS and DASH text encodings are unchanged.TimeSource::nowandTokenLog::check_and_inserttake or returnmoq_clock::Wallin place ofSystemTime. Custom clocks returnmoq_clock::wall()or convert third-party timestamps withWall::try_from. The wall range is 1970-2554; encoded token seconds are unchanged, and out-of-range issue times or expiry arithmetic refuse a token instead of overflowing.session::View::startedusesmoq_clock::Wallinstead ofSystemTime. Convert withSystemTime::fromat a third-party boundary, or measure sinceWall::UNIX_EPOCHwithsaturating_duration_since. The session JSON still carries integer Unix seconds.tls::PeerIdentity::expiryreturnsOption<moq_clock::Wall>in place ofOption<SystemTime>. Convert withSystemTime::fromonly where a third-party API needs it. AnotAfterpast 2554, such as rcgen's default year 4096, saturates to the last representableWall, and one before 1970 toWall::UNIX_EPOCH.Claims::{expires,issued,not_before}, their builder arguments,Grant::expires, andrequest::Peer::expiresusemoq_clock::Wallinstead ofSystemTime. Stamp them withmoq_clock::wall(), or useWall::try_fromfor third-party timestamps. JWT and auth JSON still encode integer Unix seconds, with the same rounding. Decoding saturates on every platform: a time before 1970 reads asWall::UNIX_EPOCHand one past 2554 as the last representableWall, so expiry checks are unchanged. That lastWallencodes as18446744074, so an auth server now sees a relay's certificate expiry past 2554, such as rcgen's default year 4096, as that value.Epoch::timereturnsResult<moq_clock::Wall, moq_clock::OutOfRange>instead ofSystemTime. Useepoch.time()?and convert withSystemTime::fromonly at a third-party API boundary. Every canonical UUIDv7 remains a valid identity, including one whose 48-bit timestamp is later than Wall's year 2554 limit; only its wall-time view fails. Epoch text, ordering, bytes, and protocol acceptance are unchanged.Quest
Deletes
quest/m1/time/wall.mdand its link from the API-audit auth names quest. The Controlled time epic's last child is gone, so it is sized[XS]with what remains: move the decisions the m2 quests still cite, then retire it.Validation
MIGRATE.mdfiles, both sides kept).MIGRATE.mdtakes main's version (the notes are above), the relay's ACME code moved toacme/client.rson main and itsFailurestimestamps were ported toWallthere, and the HLS feed lock andreadyimport from main were kept.just checkpasses rs lint, quest, drill, Python, Kotlin, Go, Dart, C++ and OBS; Swift skips on Linux. Only the flake check fails, building the unchanged runner image, because this host refuses writing/proc/self/uid_map.cargo clippy --all-targets --all-features -D warningspasses.Wall::saturating_add,UnixSeconds,Grant,PeerIdentity::expiry(rcgen's 4096 default) and the CLI timestamp parser.runtime::tests::paused_runtimes_own_their_anchorsfails under plaincargo testbecause it needs a fresh process; it passes under nextest and is untouched here.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)