Skip to content

buzz-db: extract community CRUD into community.rs #5

Closed

Description

@TheSentinel454

Problem

~400 lines of community operations live inline in lib.rs with no domain module:

  • lookup_community_by_host, lookup_community_by_host_for_management
  • is_community_active
  • list_communities_owned_by, lookup_community_host
  • get_community_icon, set_community_icon
  • ensure_configured_community, create_community_with_owner
  • archive_community_owned_by, unarchive_community_owned_by
  • community_of_channel, communities_of_channels

Plus 7 related structs: CommunityRecord, EnsuredCommunityRecord, CreatedCommunityRecord, OwnedCommunityRecord, ArchivedCommunityRecord, UnarchivedCommunityRecord, CreateCommunityWithOwnerResult.

Every other domain (channels, events, reactions, workflows, etc.) has its own module file. Community is the gap.

Proposed change

Create community.rs containing:

Priority

Medium — naturally done alongside #2 (lib.rs breakup). Creates a new module rather than just moving existing code.

🤖 AI review update (2026-08-23)

Proceed as one incremental #2 slice. Move community records, methods, SQL, tests, and datastore spans together into community.rs, with no API or behavior changes. This is a good early structural slice because the domain boundary is clear and it does not require the broader PgExecutor conversion.

Activity

  1. TheSentinel454 commented on Aug 25, 2026

    @TheSentinel454
    OwnerAuthor

    🤖 Closing as completed by block#6668. Community records, Db methods, SQL, focused tests, and datastore spans now live together in community.rs with the public API preserved.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions