Skip to content

feat(moq-net): origin::Consumer::local is public again - #9159

Merged
kixelated merged 1 commit into
mainfrom
consumer-local-public
Nov 19, 2026
Merged

kixelated merged 1 commit into
mainfrom
consumer-local-public

Conversation

@kixelated

@kixelated kixelated commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

origin::Consumer::local() is public again, with no feature gate.

Why

#9053 moved Consumer::local() behind test-support, on the belief that nothing outside moq-net's tests read it. An embedder of the relay library does: a service that records, republishes, or meters each broadcast exactly once needs to act on the node that ingests it, not on every node a cluster peer forwards it to. The local view, which hides every route a Link::Peer or Link::Upstream handle announced, is exactly that, and it has no public substitute: RouteInfo::entered_from() and origin::Source are gated too, and filtering routes by hand would need both.

Enabling test-support in a production build to reach it would also expose the other test doors (with_solicit, with_update_hold, entered_from), so the gate isn't a workable answer.

Changes

  • origin::Consumer::local() is public and ungated. The crate-private local_view() it wrapped is folded into it, and the crate's own tests call local().
  • Its doc line says who reads it.

Public API and wire impact

  • Adds moq_net::origin::Consumer::local() to the default public API. Not breaking: it was public in the last release.
  • Wire: none.

Validation

  • just check (in the dev shell) passes: 10,724 tests, including local_view_hides_peer_routes and moq-relay's cluster tests that read local().
  • No behavior change to exercise: the method's body is unchanged.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, high effort

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with high effort)

Review

Rewritten by quest review after each round.

  • Head: 733ecb6

  • Base: origin/main at f9fc03b

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1f2aa-1cba-7140-bc41-deaf1fde4862, round 1

  • Score: 10/10, The change exposes the existing local-route filter without changing behavior and updates internal references consistently; source review found no actionable defects, with builds and tests not run as instructed.

  • Rounds: 2; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

An embedder that records, republishes, or meters each broadcast once, on the
node that ingests it, needs the view of routes that entered here. It went
behind test-support in #9053 on the belief that nothing outside moq-net's tests
read it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 19, 2026 07:17

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Approach: sound. Un-gating local() and folding local_view() into it is the smallest change that restores the public API, and it avoids exposing the other test-support doors.

Reviewed changes

  • Consumer::local() is public: the test-support gate is removed and local_view() is folded into it. The body is unchanged, so behavior is identical.
  • Doc comments: the local() doc says who reads it, and the Horizon::local doc link is updated.
  • Tests: every local_view() call in origin.rs tests now uses local(). A grep finds no remaining references to the old name.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Consumer::local is now an unconditional public method. It returns a view that hides routes entered through peer or upstream links. Documentation and tests now use .local() instead of .local_view() or the test-support-gated method.

Merge Risk: Minimal · up to 733ec

This change makes a previously public method public again so relay embedders can use the locally ingested route view. It does not change wire behavior or route filtering. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'feat(moq-net): origin::Consumer::local is public again' matches the main change: Consumer::local() is made public and ungated in rs/moq-net/src/model/origin.rs. It is specific, concise, and…
Description check Passed The description explains that Consumer::local() is now public without a feature gate, why embedders need it (acting on the ingesting node only), that the crate-private local_view() is folded in, and t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title 'feat(moq-net): origin::Consumer::local is public again' matches the main change: Consumer::local() is made public and ungated in rs/moq-net/src/model/origin.rs. It is specific, concise, and names the affected crate and API.

Full details: Description check

Explanation

The description explains that Consumer::local() is now public without a feature gate, why embedders need it (acting on the ingesting node only), that the crate-private local_view() is folded in, and the API and wire impact. This directly describes the changeset.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5ceb42c8-5776-4544-8f55-604c5857c57a
Commits

Reviewing files that changed from the base of the PR and between f9fc03b and 733ecb6.

Files selected for processing: 1

  • rs/moq-net/src/model/origin.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@kixelated
kixelated added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit fdd1522 Nov 19, 2026
7 checks passed
@kixelated
kixelated deleted the consumer-local-public branch November 19, 2026 12:58
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