Skip to content

Follow-ups to unique listed channel names: starter channels on the relay, remove the operator rename #8927

Closed as not planned

Description

@loganj

Context

#8782 makes the relay refuse a second listed channel with the same name, ignoring case. A listed channel is open, not unlisted, a stream or forum, and not deleted; archived channels keep their name. #8787 adds the database index that enforces the rule. Two pieces of planned work remain after that stack ships.

1. Move starter channels to the relay

Released desktop and mobile apps create #general and #welcome-everyone at a fixed id when a community has no open, unarchived stream with that name. The relay counts any listed stream or forum, archived ones included. When the two disagree, the app's create gets invalid: an open channel named "general" already exists. The apps do not treat that as duplicate:, so starter setup fails on every attempt.

The rename script in #8782 fixes the cases that exist at rollout (every channel with the name archived). These cases stay open after rollout:

  • a listed forum named general or welcome-everyone;
  • a starter that someone archives after rollout;
  • an archived starter at the fixed id (the relay answers invalid: channel is archived; this already fails on main).

Plan:

  • Relay: create general and welcome-everyone when a community is created, at the clients' fixed ids, with auto_join (feat(relay): auto-join new community members to default channels #8594). Add an operator command, not a migration, that adds them to existing communities. Released apps then find the live channel and only join it; if one races the relay, its create gets duplicate:, which it treats as success.
  • Product decision: what the backfill does with an archived starter at the fixed id (for example, unarchive it).
  • Clients: mobile stops creating starters and relies on auto-join. buzz-app has no starter code.
  • Optional, product decision: starters cannot be archived or deleted, as Slack does for #general.

2. Remove the operator rename exception

#8782 lets a relay operator send a channel edit that changes only the name of a listed channel, archived ones included, so the rename script can rename channels it does not own. That is a new authority rule, and nothing needs it once the existing duplicates are renamed and #8787 is deployed everywhere.

  • After the rollout, remove the operator-rename branch from crates/buzz-relay/src/handlers/side_effects.rs, its tests, and the rename script and plan SQL in scripts/maintenance/, together with their references in docs/channel-name-uniqueness-deployment.md.

    Operators who upgrade later still pass through the fix(relay): refuse a second listed open channel with the same name #8782 release, a required stop, and use the script from that release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions