Repository navigation
feat(relay)!: cluster peers lose the egress field - #9387
Conversation
Quest-Claim: 38d59a10c5e6e07c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 45 seconds. 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 critical issues — one minor test suggestion inline.
Approach: sound. It deletes a field whose only remaining behavior was an error, and it relies on PeerObject already rejecting unknown fields. That way a stale config fails loudly and isn't silently ignored.
Reviewed changes
The review covered the whole PR: the code, tests, docs, and quest bookkeeping for dropping egress from cluster peers.
PeerAPI:egress(),with_egress(), and the stored field are removed. The deserializer, serializer,Debug, and theexpectingmessage are updated to match.DialTarget::from_peer: the egress-vs-cost and egress-zero checks are gone, and the error messages now mention onlycost.- Docs: the
Peer,Config::connect, andapi::Config::urldoc comments anddoc/bin/relay/config.mdno longer listegress. No other references to the peer field remain in the repo. Theegresswording in the drafts describes the wire cost parameter, so those lines are unaffected. - Tests: the two egress tests become one unknown-field refusal test. The malformed-list test now uses a peer that sets
costboth in the object and in the URL's?cost=. - Quests: the finished
relay-peer-egressquest and its links are removed.
claude-opus-5-5 | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the one commit added since the prior pullfrog review.
- Test assertion:
peer_egress_field_is_refusednow asserts the parse error namesegress, which addresses the earlier suggestion.
claude-sonnet-5-5 | 𝕏
…gress # Conflicts: # rs/moq-relay/src/cluster.rs
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The only commit since the last Pullfrog review merges origin/main.
- Merge of
mainintoDialTarget::from_peer:mainchanged how tokens are handled. The token is now stored asDialTarget.tokeninstead of being appended to the URL as?jwt=, and an inline?jwt=is always stripped. The merge keeps theegressremoval intact, and nopeer.egressreferences remain.
claude-opus-5-5 | 𝕏
|
quest land watch: the merge queue removed this pull request at 7382fa3 because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
Codex land fixer: The merge queue removed https://github.com/moq-dev/moq/pull/9387 at 7382fa32849d2c581f94104cf2560df9f5f12e12: it conflicts with main at 1cdc73b3a5e2411ad7686e1ece983b1c14e57364, even with the quest merge driver. Auto-merging doc/bin/relay/config.md Auto-merging quest/m1/lite07-routing/README.md Auto-merging quest/m2/README.md CONFLICT (content): Merge conflict in quest/m2/README.md Auto-merging rs/moq-relay/src/cluster.rs Automatic merge failed; fix conflicts and then commit the result. == The pull request's own checks on 7382fa32849d2c581f94104cf2560df9f5f12e12 == Its own CI ran these on the pull request, not in the merge queue. They are a signal only, and gate nothing. skipped optional Dependabot / Request landing (https://github.com/moq-dev/moq/actions/runs/45044623865/job/137276450986) skipped required Queue / Queue (https://github.com/moq-dev/moq/actions/runs/45044625723/job/137276411660) success optional Quest / Quest (https://github.com/moq-dev/moq/actions/runs/45044621520/job/137276398356) skipped optional Queue / Report Queue (https://github.com/moq-dev/moq/actions/runs/45044625723/job/137276412171) neutral optional CodeRabbit (https://coderabbit.ai?utm_source=cr_app&utm_medium=github) success optional pullfrog (https://github.com/moq-dev/moq/actions/runs/45044631809) The fixer's output ended with: quest land check: [Errno 32] Broken pipe (written by Codex) |
# Conflicts: # quest/m2/README.md
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The only commit since the last Pullfrog review merges origin/main.
- Merge of
maininto the quest READMEs: the conflict resolution inquest/m2/README.mdandquest/m1/lite07-routing/README.mddrops the links to the finishedorigin-proxy-configandrelay-peer-egressquests and keeps the prose grammatical. Theegressremoval inrs/moq-relayis unchanged.
claude-opus-5-5 | 𝕏

Closes the quest quest/m2/relay-peer-egress.md.
Problem
A moq-relay cluster peer (
cluster.connect,--cluster-connect, or ancluster.api.urlresponse) accepted anegressfield. Since moq-dev/moq#8023 its only behavior was an error unless it equalledcost, "until asymmetric routing lands", and nothing plans asymmetric routing. The maintainer decided on 2026-11-21 to remove it before 0.22 ships main's version.Approach
egressfromcluster::Peer, its object deserializer, serializer, andDebug, along with theegress-vs-costcheck inDialTarget::from_peer.Peer,Config::connect,api::Config::url, anddoc/bin/relay/config.md.egressis refused. Tests that usedwith_egressto build an invalid or round-trip peer now use other inputs.quest/m2/README.mdandquest/m1/lite07-routing/README.md.Impact
moq_relay::cluster::Peer::egress()andPeer::with_egress()are removed. Migration: drop the calls. A symmetric value never changed anything.egressis now refused as an unknown field, both at startup and in anapi.urlresponse. When the API response is invalid, the relay keeps its last good list. Migration: deleteegressfrom peer objects. Any value that was accepted before equalledcost, so routing does not change.Alternatives
egressas a reserved field that is accepted and ignored. The maintainer rejected this when planning the quest.Validation
cargo test -p moq-relay --lib -- peer cluster_connect zero_cost malformed_object: 35 passed, including the newpeer_egress_field_is_refused.just check(whole-branch selection) passed.target/debug/moq-relay <config>on a config withconnect = [{ url = "https://b.example/", cost = 2, egress = 2 }]. It exits 1 withunknown field 'egress', expected one of 'url', 'cost', 'token', 'upstream' in 'cluster.connect'. The same peer withoutegressgets past config parsing and stops later only because the test config has no TLS cert.quest/m2/README.md, where main had also dropped the finishedorigin-proxy-configlink):cargo clippy -p moq-relay --all-targets -D warningspasses andcargo nextest run -p moq-relay --libpasses 336/336.Choices for review
egress-only case fromzero_cost_peer_errorsrather than rewriting it, sinceegress = 0is now an unknown-field error that a parse test already covers.malformed_object_peer_list_preserves_current_dialnow uses a different invalid object, one that sets objectcostwhile its URL also carries?cost=. It still checks that an invalid list keeps the last good dials.Follow-ups
None.
Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm B)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, M)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 5027133, named in full once no reviewer reports a finding
Base: origin/main at 1fd8509
Risk: high,
It removes the `egress` config/API key and the public `cluster::Peer::egress` and `with_egress` items from moq-relay, so any cluster config or Rust caller still setting `egress` now fails as an unknown field, and a revert restores it cleanly, but a config that has already been deployed or released would break on upgrade.Classified: high by Claude Code, claude-haiku-5-5, low effort, session
c58e4101-a13f-4c0c-9004-c25271d4caf6Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a205e4-17f4-7c33-a6b1-2ee762eb2f92, round 1Score: 9/10,
The removal consistently updates API, configuration, serialization, validation, tests, and documentation with no actionable defects found, though builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Claude Code, claude-sonnet-5-5, medium effort, second
Session:
eec010e4-f165-4845-bd6b-5734a0985003, round 1Score: 8/10,
The removal of `egress` is clean and nothing stale references it, but the refusal is weakly tested and the breaking-change migration note was lost.Rounds: 1; first round 3 (low 3); findings 3 (low 3): fixed 0, refuted 0, open 3
Findings, open until the next round settles them:
rs/moq-relay/src/cluster.rs:4145:Test does not pin that `egress` is refused as an unknown fieldquest/m2/README.md:16:Migration note for removed `egress` lost with the deleted quest filers/moq-relay/src/cluster.rs:296:Mixed-policy error text narrowed and rewordedHead 5027133 settles the second reviewer's round 1, all refuted with no change:
cluster.rs:4145, refuted:expect_errfails the test ifegresswere ignored, and the TOML andapi.urlpaths deserialize the samePeer(the built-binary run under Validation shows the TOML path refusing it).quest/m2/README.md:16, refuted: the migration note lives in this PR's Impact section, under a!title, where the release cut reads it.cluster.rs:296, refuted: a wording change of an error no code matches; errors are never matched on.