Dashboard › opencode › Distillation
9f2929fd-c217-4cc4-b123-e3c3af3b8a28["lore_tm_v1_i2jO7xUjmjB_VGBYawI7SZth4O5gbjAWnuCNa-_rvsE","lore_tm_v1_fM6AX2Frd8N2dAT3HKsp2Gl6btg6cyYFCJdz9mKVPZc"]
Date: Sep 17, 2026
packages/core/src/event.ts, commitDurableEvent(...) wraps durable publication in Effect.uninterruptible and a database transaction with { behavior: "immediate" }; inside the transaction it runs registered projectors, invokes the optional commit(seq) hook, upserts EventSequenceTable, and inserts into EventTable, in that exact order.packages/core/src/event.ts, durable subscriber wake-up occurs only after the transaction completes successfully: pubsub.durable.get(committed.aggregateID) entries receive PubSub.publish(wake, undefined).commitDurableEvent(...) validates that the configured durable aggregate field is a string and rejects an input.aggregateID mismatch with InvalidDurableEventError.commitDurableEvent(...) replay handling compares the stored event’s ID, versioned type, and deeply equal encoded data. An exact replay returns without rerunning projectors or the local commit hook; a mismatch fails with "Replay diverged at aggregate ${aggregateID} sequence ${input.seq}".commitDurableEvent(...) owner handling rejects a conflicting owner when input.strictOwner is true, silently returns for a non-strict conflicting owner, and can populate a previously null EventSequenceTable.owner_id during an exact replay.commitDurableEvent(...) enforces contiguous sequence numbers and globally unique event IDs; errors include "Sequence mismatch for aggregate ${aggregateID}: expected ${latest + 1}, got ${seq}" and "Event ${event.id} already exists at aggregate ${stored.aggregateID} sequence ${stored.seq}".packages/core/test/session-runner.test.ts:4200 contains LLMEvent.toolCall({ id: "call-terminal", name: "echo", input: { text: "done" } }); this was the sole search match for call-terminal.