im: give the IM delivery layer its own database (shape B) #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "im-own-database"
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?
Operator chose shape B: im is a downstream consumer with its OWN database. santi-im now exposes an ImStore that opens/owns its own SQLite file (im_inbox + im_participants); those tables leave santi's schema; santi keeps only reply_outbox (producer side). SantiStore holds an ImStore (at .im) and delegates, so ops/service/api call sites are unchanged. Cross-store paths split at the boundary: receipt im_deliveries = santi turn_ids + im deliveries_for_turns; manual reply = santi resolves participant + im enqueues. Auto reply flows reply_outbox -> dispatch -> im.deliver_reply into im's db (at-least-once + idempotent). Per '全部清零', no cross-db migration: im db starts empty, santi's im tables dropped. Obsolete v26 test removed; delivery-failure trigger targets im's db. 0 faults, core 0, 48 test groups green. Remaining purity: ImStore still inside SantiStore (core still crate-deps im); moving to api is the final step. window separate.