sam 0814f7b9b4 fix(gateway): give messages durable identity and a SQLite store
Three defects shared one root cause -- messages had no identity of their
own, so the store could not tell a redelivery from a new message:

- SaveMessages destroyed history. Writing a batch replaced records that
  a concurrent write had already stored, and earlier messages vanished.
- A redelivered channel message overwrote the stored one, contradicting
  the append-only sequence in docs/architecture/messaging-and-work-intake
  .md:112-114.
- /compress stranded whatever exceeded one page: deleting 1200 reported
  1000 deleted and left 200 behind.

Messages now carry an application-generated MessageID, derived from
(session, source id) so a redelivery lands on the same record, and
stored records are immutable -- a repeat write is a no-op rather than an
overwrite. SourceID keeps the channel-native id for correlation without
being load-bearing. _ts is written as Unix milliseconds and clamped
monotonic per session: Telegram dates are whole seconds, so replies
arriving inside the same second would otherwise order arbitrarily.
Deletes page with a cursor instead of assuming one page holds everything.

Adds a SQLite session store behind the same interface, per
docs/architecture/messaging-and-work-intake.md:107. A shared conformance
suite runs all 19 groups against both implementations, so the two cannot
drift while the NellDB path is still the one wired up.
2026-08-04 01:44:26 +10:00
2026-08-03 19:08:10 +10:00
2026-07-28 18:46:50 +10:00
2026-08-03 19:08:10 +10:00
2026-08-03 19:08:10 +10:00
S
Description
Archie connects events from your systems to agents that can investigate, reason, and act. Define what an event means, map its data into a workflow, and give that workflow an agent equipped for the job: its own execution environment, tools, and identity.
https://archie.catlow.cloud
Apache-2.0
133 MiB
0 Stars 1 Watchers 0 Forks
2026-11-10 10:01:23 +00:00
Languages
Go 76.8%
Vue 13.1%
TypeScript 7.8%
JavaScript 1.2%
Shell 0.6%
Other 0.4%