Repository navigation
refactor(tokio)!: resolved config reports off as None - #8371
Conversation
Quest-Claim: 2a76169f296f2739
connect::Resolved.timeout, quic::Resolved.{idle_timeout, keep_alive}, and
Backoff::{max, timeout}() turn a configured zero into None where the text
knobs resolve; CLI/TOML/env/FFI/C keep zero = off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
A behavior-preserving refactor that finishes #8265 for moq-tokio: resolved config values now spell "off" as None instead of zero, with the conversion done once in resolve().
- Backoff accessors:
connection::Backoff::{max,timeout}()returnOption<Duration>;Nonemeans uncapped / retry forever.resolve()already mapped a configured zero toNone, so only the accessors and their test macros changed. - Dial deadline:
connect::Resolved.timeoutis nowOption<Duration>; a configured zero filters toNoneinresolve()and reachesmoq_net::reconnect::Config.timeoutdirectly, replacing the.filter(|t| !t.is_zero())inClient::init. - QUIC knobs:
quic::Resolved.idle_timeoutisOption<Duration>and goes straight to the backend transport;keep_alivenow folds a configured zero intoNone, andkeep_alive_interval()no longer re-filters it. - Zero-spelling boundaries:
moq-c,moq-ffi, GStreamer, and moq-uring convert back withunwrap_or_default(), so their external surfaces still mean0 = off. - Relay: cluster
peer_clientcheckstimeout().is_none()instead ofis_zero()— equivalent, since unset and zero both resolve toNone. - Quest:
quest/m2/tokio-resolved-options.mdand its README entry are removed.
I confirmed the boundaries are numerically identical to main: moq-quic's keep_alive_interval already treats Some(ZERO) like None, an idle timeout of Some(0) and None both disable it (max_idle_timeout / negotiate_max_idle_timeout), and the FFI/C reported defaults are unchanged. No remaining consumers of the old Duration spellings exist in the workspace, and leaving GOAWAY handover as a Duration is right since zero there is a real (immediate) window.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head: e0a1126 (base: bad28ce).
No actionable findings. The direction is sound: normalize zero-as-disabled at resolution, pass Option<Duration> into the runtime policy, and translate back only at zero-based boundaries. I traced reconnect deadlines, QUIC idle-timeout negotiation and keep-alive derivation, relay peer retries, and the C/FFI/GStreamer/io_uring conversions; the existing disabled/default behavior is preserved. Keeping GOAWAY handover as a duration also preserves its immediate-close meaning at zero.
Verification: GitHub source review only; builds and tests were not run. The updated duration tests cover unset, zero, and nonzero values. GitHub Check for this head is still in progress, so this is not a completed CI verification.

Finishes moq-dev/moq#8265 for moq-tokio: resolved values say "off" with
Option, not zero. The text knobs (CLI, TOML, env, FFI, C, GStreamer) keep0= off; the conversion happens once, inresolve().Completes
quest/m2/tokio-resolved-options.md(deleted here).Changes
connection::Backoff::{max, timeout}()returnOption<Duration>;None= uncapped / retry forever.connect::Resolved.timeoutisOption<Duration>; a configured zero resolves toNone, whichClienthands to moq-net's policy directly.quic::Resolved.idle_timeoutisOption<Duration>and goes straight to moq-quic'stransport.idle_timeout(whoseNoneis "no idle timeout");keep_alive_intervalno longer re-filters zero.quic::Resolved.keep_alivealso folds a configured zero intoNone(it already documented "None or zero" as the same thing).unwrap_or_default().Choices made without asking
handoverstays aDuration: zero there is a real window (close the old session at once), not "unlimited", and moq-net'sreconnect::Goaway.handoveris aDuration, so anOptionwould add a state with no meaning.Resolvedstructs:connect::Resolved.{race, resolution_delay}and websocketdelaytreat zero as a real (immediate) duration, andlisten::Config::resolved_timeout()already returnsOption. No change.Backoff's accessors and test macros inconnection.rs.Impact
Public API (breaking, moq-tokio):
Backoff::max(),Backoff::timeout(),connect::Resolved.timeout, andquic::Resolved.idle_timeoutbecomeOption<Duration>;quic::Resolved.keep_aliveis neverSome(ZERO).Migrate: compare against
Noneinstead ofDuration::ZERO; where a zero is needed (FFI-style "0 = off"), use.unwrap_or_default().Wire: none. FFI/C/GStreamer surfaces unchanged.
Caused by
No single PR: the zero-as-off resolution predates moq-dev/moq#8265, which fixed the moq-net side.
Checks
just checkpasses locally.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, low effort
🤖 Generated with Claude Code
(Written by Opus 5.5 with low)
Review
Rewritten by
quest reviewafter each round.01a1c083-cbec-7e12-bd0b-424fb7f64128, round 1The refactor preserves zero-as-disabled behavior across connection policy, QUIC backends, and bindings while exposing resolved values as Option; source inspection found no actionable regressions, but builds and tests were not run as instructed.