Skip to content

buzz-db: use parsed enums instead of raw strings in record types #23

Description

@TheSentinel454

Several record types store enum-like values as raw String fields despite having proper enum types already defined in buzz-core:

  • ChannelRecord.channel_type: String → should be ChannelType (defined in buzz_core::channel)
  • ChannelRecord.visibility: String → should be ChannelVisibility (defined in buzz_core::channel)
  • MemberRecord.role: String → should be MemberRole (defined in buzz_core::channel)
  • WorkflowRecord status fields as strings vs WorkflowStatus enum

This forces consumers to parse strings at every use site and creates the possibility of invalid values at runtime that the type system could prevent. Priority: Medium — improves type safety, catches bugs at compile time.

🤖 AI review update (2026-08-23)

Narrow the issue: workflow, run, and approval statuses are already parsed enums. The remaining targets are ChannelRecord.channel_type, ChannelRecord.visibility, and MemberRecord.role (plus any newly verified string enums). Parse at the row boundary and test invalid database values explicitly.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions