Skip to content

feat(relay)!: construct the cluster origin once - #3582

Merged
kixelated merged 4 commits into
devfrom
quest/m1/cluster-construction
Sep 12, 2026
Merged

kixelated merged 4 commits into
devfrom
quest/m1/cluster-construction

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

  • Cluster::new now takes ClusterOptions, so the origin is built once after identity and cache settings are known.
  • Removes Cluster::with_cache, which rebuilt the origin and silently detached previously cloned handles and stats publishers.
  • --cluster-linger stays a hidden config no-op and is not an origin construction option.

Public API

Breaking:

  • Removed Cluster::with_cache.
  • Cluster::new now takes ClusterOptions instead of ClusterConfig.
  • Added ClusterOptions (config, cache) with ClusterOptions::new and ClusterOptions::with_cache (sets the cache before construction; does not rebuild the origin).

Cluster::with_client, with_client_tls, and with_stats still attach independent services without replacing the origin.

Wire

None.

(written by grok-4.6)

@kixelated
kixelated marked this pull request as ready for review September 10, 2026 08:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-12T06:15:18.726394Z ac840c1 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6c46f0ebf

ℹ️ 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".

Comment thread rs/moq-relay/src/cluster.rs
@kixelated

Copy link
Copy Markdown
Collaborator Author

Disclaimer: This review was posted by Grok Bot (an automated assistant), not a human reviewer. Treat findings as advisory — verify before acting.

PR #3582 — feat(relay)!: construct the cluster origin once

Summary

Fixes the hazard where Cluster::with_cache rebuilt the origin and silently detached previously cloned origin handles / stats publishers.

  • Cluster::new now takes ClusterOptions { config, cache } (via ClusterOptions::new / with_cache).
  • Removes rebuilding Cluster::with_cache.
  • with_client / with_client_tls / with_stats still attach services without replacing the origin.
  • --cluster-linger remains a hidden config no-op, not an origin construction knob.
  • Call sites (Relay::load, tests) updated.

Findings

Blockers

  1. Merge conflict with current dev. GitHub reports CONFLICTING. merge-tree against dev shows at least quest/m1/README.md changed in both (quest tracker churn from later merges such as docs(quest): plan the LAN app id, one LAN mesh, and the relay verb #3590). Rebase onto latest dev before merge.
  2. Must not land blindly with feat(relay): merge config with recorded provenance #3587. Content conflicts on rs/moq-relay/src/{cluster,cache,web}.rs, relay tests, and doc/bin/relay/config.md. Recommended order: rebase/merge feat(relay)!: construct the cluster origin once #3582 first (smaller, construction-only), then rebase feat(relay): merge config with recorded provenance #3587 (touches the same files for setting= / bool provenance).

Risks

  1. Public API break — embedders using Cluster::new(ClusterConfig) / with_cache need ClusterOptions. In-tree updated; CHANGELOG present.
  2. Behavior change is the point (no more detached handles); worth a regression that takes an origin handle before any former with_cache equivalent and still serves through it (PR tests lean this way via construction-time cache).

Nits

  1. Naming: ClusterOptions::with_cache vs deleted Cluster::with_cache — good that the options method does not rebuild; keep that distinction loud in docs (PR does).

CI

Check Result
Check SUCCESS (on PR head vs older base)
Test SUCCESS
Mergeability DIRTY / CONFLICTING

CI green on the branch tip does not override the conflict with current dev.

Verdict

Request changes — rebase onto dev to clear conflicts; coordinate with #3587. Design LGTM once mergeable.

kixelated and others added 4 commits September 11, 2026 23:05
Put cache settings into ClusterOptions so the origin and node view are
built once. Cluster::with_cache rebuilt the origin and detached any
handle taken earlier.

Co-Authored-By: grok-4.6 <noreply@x.ai>
The cluster-construction quest file is deleted when the origin is built
once, so remaining links would fail the quest checker.

Co-Authored-By: grok-4.6 <noreply@x.ai>
#3587 made stats.enabled a bool, so the construction-time cache test
cannot wrap it in Some.

Co-Authored-By: grok-4.6 <noreply@x.ai>
@kixelated
kixelated force-pushed the quest/m1/cluster-construction branch from 736c493 to ac840c1 Compare September 12, 2026 06:12
@kixelated
kixelated merged commit ac6c361 into dev Sep 12, 2026
3 checks passed
@kixelated
kixelated deleted the quest/m1/cluster-construction branch September 12, 2026 06:21
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