Repository navigation
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Each Nexus task has a home channel. Buzz needs live delivery when a viewer joins 10,000 task channels. Discovery and live admission must both retain that scope.
What
Keep 10,000 joined channels on stable batches of 10. Fill empty batch slots when membership changes. Keep removed channel lifetimes fenced during replacement.
How
Use 1,000 channel subscriptions. Reserve room for global routes, previews, and replacement wires within the relay limit of 1,024. Raise the broker limits for the larger interest and status records. Keep the startup cache bound at 8 MiB.
This PR targets main. It has no dependency on artifact sync. Tracks NEXUS-3721.
Risk
This affects shared channel delivery and discovery in both hosts. Large rosters retain more metadata. Finite reads still own history recovery. A cache above 8 MiB requires fresh discovery.
Testing
Local checks cover task 10,000, artifact events, missed input after reconnect, membership changes across every batch, wire counts, and restart with signed rosters. Six review regressions cover slow setup, event order, and failures during replacement. Each fails before its fix and passes after it. The real HTTP broker accepts 10,000 IDs at the maximum length. The existing production broker journey passes in Chromium and WebKit. No browser tests are added or removed. Scale and failure cases stay in Vitest.
Human and native app testing remain open. To repeat the scale checks, run
bin/pnpm exec vitest run src/features/relay/live.test.ts browser-host/relay-broker-live.test.mjs src/features/relay/startup.test.ts. The large roster tests must pass. Keep this PR in draft until a human tests it. Thebuzz-review-completedmarker is absent.Generated with Codex