Skip to content

feat: support 10,000 task channels (NEXUS-3721) - #1574

Draft
dr0uleau wants to merge 4 commits into
mainfrom
drouleau/scale-task-channels
Draft

dr0uleau wants to merge 4 commits into
mainfrom
drouleau/scale-task-channels

Conversation

@dr0uleau

Copy link
Copy Markdown
Contributor

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. The buzz-review-completed marker is absent.

Generated with Codex

dr0uleau and others added 4 commits October 22, 2026 15:57
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>
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