Skip to content

Redesign event log with proper separation of concerns#63

Merged
koenvo merged 2 commits intomainfrom
feat/real-domain-events
Mar 18, 2026
Merged

Redesign event log with proper separation of concerns#63
koenvo merged 2 commits intomainfrom
feat/real-domain-events

Conversation

@koenvo
Copy link
Contributor

@koenvo koenvo commented Mar 18, 2026

  • Add EventLog class owning all event_log table access (write + fetch)
  • EventLog.write() accepts domain events directly
  • EventLog.fetch_batch() reconstructs and returns domain events
  • EventLogSubscriber delegates to EventLog
  • EventLogConsumer owns reader_state, uses EventLog for events
  • Simplify tests to 4 focused cases

koenvo added 2 commits March 18, 2026 10:11
- Add EventLog class owning all event_log table access (write + fetch)
- EventLog.write() accepts domain events directly
- EventLog.fetch_batch() reconstructs and returns domain events
- EventLogSubscriber delegates to EventLog
- EventLogConsumer owns reader_state, uses EventLog for events
- Simplify tests to 4 focused cases
- write() stores event.model_dump() so future event fields survive round-trip
- fetch_batch() uses event_cls.model_validate() directly
- Add test_consumer_only_processes_new_events
@koenvo koenvo merged commit ff6c18a into main Mar 18, 2026
12 checks passed
@koenvo koenvo deleted the feat/real-domain-events branch March 18, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant