CAT-K7: every operation's event is sent once, after a restart too

An event of a change carries the record, the version it follows and the event as its message id; the last version sent per
record is a key of the state sent; at start the events of the operations after it are sent again under the same ids, so a
stop between an operation and its event loses none and a second start sends none.

Issue 1966.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 12:09:26 +01:00
parent c5dc10fa8c
commit 7bf0e991d8
6 changed files with 255 additions and 19 deletions
@@ -9,8 +9,11 @@ import (
func ledgerWorld(t *testing.T) (*world, *fakeLedger) {
t.Helper()
f := newFakeLedger(t)
w := imported(t, newLedgerStore(f, newFakeStates()))
w := newWorld(t, newLedgerStore(f, newFakeStates()), fixture())
w.k.States = newFakeStates()
if _, err := w.k.Import("import@test", ImportAsk{}, fixture()); err != nil {
t.Fatal(err)
}
return w, f
}