fix: Append resolves event_type per event, not once for batch — Closes #175 #176
No reviewers
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit!176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/append-event-type-per-event"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #175
All 16 packages pass with -race.
When E=any, a decider can return multiple concrete types in one batch (e.g., []any{&TypeA{}, &TypeB{}}). The old code resolved the event type from events[0] and reused it for ALL events, storing wrong types in PG. Fix: resolve event type and schema version per event in the marshal loop. This matches AppendWithOptions in deletion.go which already does per-event. Includes test: TestAppend_MultiType_AnyStore verifies correct types for multi-type batches both in returned events and read-back from DB. Closes #175