fix: Append resolves event_type per event, not once for batch — Closes #175 #176

Merged
ash merged 1 commit from fix/append-event-type-per-event into main 2026-03-03 00:18:48 +00:00
Owner

Closes #175

All 16 packages pass with -race.

Closes #175 All 16 packages pass with -race.
fix: Append resolves event_type per event, not once for batch
Some checks failed
CI / test-sqlitestore (push) Failing after 3s
CI / test-pgstore (push) Failing after 3s
CI / test-nats (push) Failing after 5s
CI / test-integration (push) Failing after 4s
CI / benchmarks (push) Failing after 4s
CI / test-codec-otelkit (push) Successful in 11s
CI / test-sqlitestore (pull_request) Failing after 3s
CI / test-pgstore (pull_request) Failing after 4s
CI / test-nats (pull_request) Failing after 6s
CI / test-integration (pull_request) Failing after 4s
CI / benchmarks (pull_request) Failing after 4s
CI / test-codec-otelkit (pull_request) Successful in 12s
CI / test-core (push) Failing after 1m34s
CI / test-core (pull_request) Successful in 1m33s
441efa99f9
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
ash merged commit 860e172c89 into main 2026-03-03 00:18:48 +00:00
einar deleted branch fix/append-event-type-per-event 2026-03-06 12:01:16 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit!176
No description provided.