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.
Several record types store enum-like values as raw
Stringfields despite having proper enum types already defined inbuzz-core:ChannelRecord.channel_type: String→ should beChannelType(defined inbuzz_core::channel)ChannelRecord.visibility: String→ should beChannelVisibility(defined inbuzz_core::channel)MemberRecord.role: String→ should beMemberRole(defined inbuzz_core::channel)WorkflowRecordstatus fields as strings vsWorkflowStatusenumThis 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.