feat: add required event_type_name() to Event trait for stable storage #344

Merged
jwilger-ai-bot merged 1 commit from feat/325-stable-event-type-names into main 2026-04-11 11:28:38 -07:00
jwilger-ai-bot commented 2026-04-11 11:22:55 -07:00 (Migrated from github.com)

Summary

  • Add required event_type_name() -> &'static str method to the Event trait
  • Replace std::any::type_name::<E>() in StreamWrites::append() with E::event_type_name()
  • All 24 impl Event for blocks across the workspace updated with stable names
  • No default fallback — every event type explicitly declares its name

Why

The event_type column in postgres/sqlite stores metadata for auditing/debugging (not used for deserialization). Previously it used std::any::type_name which changes when types move modules, splitting audit queries. Stable names prevent this.

Test plan

  • All 203 workspace tests pass
  • Clippy clean
  • Breaking change: all Event impls must add the new method (no default)

Relates to #325 (stable event type naming was the actionable piece; upcasting closed by ADR-0035)

## Summary - Add required `event_type_name() -> &'static str` method to the `Event` trait - Replace `std::any::type_name::<E>()` in `StreamWrites::append()` with `E::event_type_name()` - All 24 `impl Event for` blocks across the workspace updated with stable names - No default fallback — every event type explicitly declares its name ## Why The `event_type` column in postgres/sqlite stores metadata for auditing/debugging (not used for deserialization). Previously it used `std::any::type_name` which changes when types move modules, splitting audit queries. Stable names prevent this. ## Test plan - [x] All 203 workspace tests pass - [x] Clippy clean - [x] Breaking change: all Event impls must add the new method (no default) Relates to #325 (stable event type naming was the actionable piece; upcasting closed by ADR-0035)
jwilger (Migrated from github.com) approved these changes 2026-04-11 11:27:07 -07:00
Sign in to join this conversation.
No description provided.