Files
buzz/crates
Brad Seiler 4c60be6a1e Enforce single-community relay mode (#9149)
## Summary

Add `BUZZ_MULTI_COMMUNITY_RELAY` (default `true`, strict boolean). With
`false`, ordinary HTTP/WebSocket traffic serves only the community at
the normalized `RELAY_URL` authority, including a nondefault port. Other
hosts receive a generic 404 before tenant lookup or handler execution.

Authenticated admin/operator inventory and cleanup remain available
through their configured authorities. Existing extra rows do not prevent
startup and are not deleted automatically. Canonical bootstrap and
legacy convergence on the existing canonical community remain available;
operator creation is disabled. Invite minting and git callbacks also
check their target community. Availability retains its free-name meaning
and adds `can_create` to report policy permission.

Changes require restarting every serving revision. An older image can
ignore this setting. Removing it, setting it true, or rolling back to an
older image can reopen serving and creation. Keep operator/admin
authentication configured throughout rollout and rollback.

### Current draft gates

Published candidate `8319e9a4b299deb2bb2cb72400a2c6aff396b362` includes
the independently reviewed deletion-fixture correction. Normal push
hooks and all local validation passed at this head: 2,028 package tests,
full `just ci`, all 1,393 isolated UTF-8/UTC PostgreSQL tests and the
binary build. A running local relay passed 16 HTTP/WebSocket and signed
admin/operator assertions, including extra-host denial and cleanup
access. Hosted PostgreSQL and full CI must still pass on this head.
Human acceptance and the background-work decision remain open; keep this
PR draft.

Background workers currently retain their prior behavior:
cleanup/retention/recovery/revocation continue, as do scheduled
workflows, reminders, configured push/listener delivery, storage-usage
reporting and artifact sync under existing lifecycle rules. Whether to
pause ordinary background work for extras is an open product decision
and an acceptance gate. No worker changes are included yet.

### Rollout and acceptance

1. Resolve the background-work decision, finish validation/review, and
complete the repository-required human test.
2. Obtain separate staging rollout authority, use an immutable
supporting image and explicit false on every serving revision, and
review generated configuration.
3. Verify an extra host returns 404 for HTTP and WS; canonical HTTP/WS
and NIP-FI still work. Verify authenticated admin reads/actions and
operator inventory/archive/delete still reach an extra community.
4. Only after staging acceptance, obtain separate production rollout
authority. This draft grants no merge, deployment or cleanup authority.
5. Rollback by returning the setting to true or the previous image
explicitly reopens serving/creation. Preserve operator/admin access.

### Related issue

No duplicate creation-only policy PR found in the open-PR search.
Related creation surface work: #2398.

Creation-only validation is superseded; see its [historical CI
run](https://github.com/block/buzz/actions/runs/42123475841). It does
not qualify the current candidate.

Generated with Codex

---------

Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Sarnow <1894dcbafaa4df1ac607a9bf879ac0b7d77fbccb0e0f4619ecc252c8adbad8a2@seiler-test.communities.public.builderlabstaging.xyz>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
2026-11-12 00:10:38 +00:00
..