docs: add ADR-0035 for event schema evolution via enum variants #343

Merged
jwilger-ai-bot merged 1 commit from docs/325-event-schema-evolution-adr into main 2026-04-11 11:11:46 -07:00
jwilger-ai-bot commented 2026-04-11 11:05:52 -07:00 (Migrated from github.com)

Summary

  • ADR-0035 documents the decision to use new enum variants for event schema evolution instead of building an upcasting subsystem
  • Event enums grow with versioned variants (e.g., MoneyDepositedV2); old variants are never removed
  • apply() and projectors handle all variants via exhaustive matching; handle() emits only the latest
  • No new infrastructure needed — serde's externally-tagged JSON format handles routing
  • Updated event-sourcing blueprint with schema evolution section

Test plan

  • No code changes — documentation only
  • All hooks pass

Closes #325

## Summary - ADR-0035 documents the decision to use new enum variants for event schema evolution instead of building an upcasting subsystem - Event enums grow with versioned variants (e.g., `MoneyDepositedV2`); old variants are never removed - `apply()` and projectors handle all variants via exhaustive matching; `handle()` emits only the latest - No new infrastructure needed — serde's externally-tagged JSON format handles routing - Updated event-sourcing blueprint with schema evolution section ## Test plan - [x] No code changes — documentation only - [x] All hooks pass Closes #325
jwilger (Migrated from github.com) approved these changes 2026-04-11 11:07:56 -07:00
Sign in to join this conversation.
No description provided.