Repository navigation
fix(tokio): honor durations set on parsed configs - #5493
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
|
Duration implementation is complete at (Written by GPT-6) |
# Conflicts: # rs/moq-tokio/src/connection.rs
The flags lost their parser defaults, and with them the [default: X] line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughSelected Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
|
Merge summary for head e9cb3ce.
Public API: ten (Written by Claude Opus 5.5) |
Adapts main's new tests to Option<Duration>: the relay web drain fixture's listen.timeout and the refused TCP dial test's backoff, timeout, and race. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: b6e9a5b.
No actionable bugs found. Option correctly separates unset from explicit zero; resolution keeps explicit CLI/environment values ahead of typed fields and defaults without manufacturing parser values. The shared eleven-knob regression coverage and documented Rust API migration are appropriate, and binding adaptations preserve their existing external representations.
Compared the current base-relative patch with the previously inspected e9cb3ce, accounting for main imports. Production changes are equivalent; the added drain/refused-dial fixture adaptations retain their intended zero-timeout behavior.
Verification: static review of configuration resolution, serialization, callers/bindings and tests. No repository tests or builds run; the PR description's validation refers to its earlier head.
|
Re-enqueued at The queue dropped the previous head on a real semantic conflict, not a flake: the merge_group The new head merges main and adapts the two tests main added against the old types: that fixture now sets Validation: (Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-enqueued at (Written by Claude Opus 5.5) |
Problem
Ten moq-tokio duration fields ignored values set in code after CLI parsing or a settings merge. Usage stored each parser default as if the flag had been given, so it beat the typed field, and a parse left the skipped typed field at
Duration::ZERO, which could not be told apart from unset.Approach
The typed fields become
Option<Duration>. Each knob resolves the flag or environment value actually given, then the typed field, then the default. Thefallback/resolve/explicitmachinery incli::Durationloses its callers and is deleted, leaving it the humantime parser. One test macro covers the precedence for all eleven duration knobs (the ten here plus #5350's backofftimeout): parsed, merged round-trip, zero and nonzero, a given flag still winning, and a config built in code.Since the flags have no parser default,
--helpno longer printed[default: X]for them. Each flag now carries a one-line help that states its default, which also gives these flags a description they never had.Public API
Breaking, Rust only (
moq-tokio):connect::Config::raceDurationOption<Duration>connect::Config::resolution_delayDurationOption<Duration>connect::Config::timeoutDurationOption<Duration>listen::Config::timeoutDurationOption<Duration>quic::Config::idle_timeoutDurationOption<Duration>quic::Config::keep_aliveDurationOption<Duration>Backoff::initialDurationOption<Duration>Backoff::maxDurationOption<Duration>connection::Goaway::handoverDurationOption<Duration>websocket::Config::delayDurationOption<Duration>Defaultstill holdsSome(default)for each, matching #5350'sBackoff::timeout.Noneuses the default;Some(Duration::ZERO)keeps each knob's zero behavior. TheResolvedstructs (connect,quic,websocket) andlisten::Config::resolved_timeoutkeep their types.Unchanged: CLI flag names, environment variables, TOML keys, the C ABI (
moq.h), moq-ffi records, hand-written bindings, and the wire.Rebased on #5484
#5484 removed the WebSocket-to-QUIC upgrade and reworked
client.rs,connection.rs, andwebsocket.rs. Merged main in and re-checked each knob:raceis the Happy Eyeballs stagger between resolved addresses; fix(tokio)!: keep the transport that won the connect race #5484 did not touch it.delayis still QUIC's head start, skipped while a server is remembered as a WebSocket win. fix(tokio)!: keep the transport that won the connect race #5484 moved theforgeton a QUIC win into the race itself; zero still means no head start.handovernow caps only a peer GOAWAY handover. The client-initiated upgrade handover that also read it is gone.timeoutbounds the dial and handshake only, since no upgrade outlives the attempt anymore.The only conflict was in upgrade tests #5484 deleted; its new
quic_winning_cancels_the_websocket_dialtest now setswebsocket.delay = Some(Duration::ZERO). Thedoc/setup/upgrade.mdentry still holds against main: #5350 is unreleased, sobackoff.timeoutstays in the list.Decisions
Picked by the iterating agent, without a prompt:
--helpwithout a parser value).--backoff-timeout.default = "...": rejected, it reintroduces the bug.Validation
Final head
e9cb3ceb294f7725c669218eee079253648a5cc9, merged with main at20ca8a651.just check origin/main: every Rust test passed in at least one of two runs. Each run stopped on a tracked load flake, never in code this PR touches: run one on the uring teardown close (passed alone), run two on the auth-refresh clock tests (passed in run one).just checkruns after Rust passed when run directly: bench, quest, drill sensitivity, Python, Kotlin, Go, Dart, C++, shell, TOML, and GitHub lint.moq-relay --helpshows each duration flag's description and default.Follow-ups
None from this PR.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code