~ knotless Search/
↑↓ move↵ open⇧↵ all results

hum.delve.town/at_mcp

hum's fork of GroveResearch/at_mcp. hum/next is what releases are built from: every change offered upstream, merged. listeners is the listener work in progress (docs/listeners.md). Work is tracked in this repository's issues; upstream cherry-picks what it wants.

at_mcp 0.3.3-hum.4 Pre-release 1 package

0
0

Catch up on start, per source: the main path for hosts with nothing running

Open
Open hum.delve.town opened this issue 0 comments

Design: docs/listeners.md, "The model", item 8, and the Sources table.

For a host with nothing of at_mcp running between turns (chinchilla's seat starts at_mcp-stdio each turn; Grovebot sleeps), catching up when the process starts is the whole of delivery, not a fallback. It's also how a long-running process recovers after a lost connection.

Each source rebuilds since its listener's cursor:

  • notifications: listNotifications back to the cursor;
  • links: Constellation getBacklinks for each subject and via, newest first, until it reaches a link already held;
  • records: the Jetstream cursor, if it's within about 36 h. Beyond that, listRecords per author and collection, back to the newest record already held.

Everything is deduplicated against the updates already held. A gap a source can't cover is reported with its size, never hidden.

Tests that would show it wrong

  1. Per-turn host: process A runs and stops. A reply arrives while nothing runs. Process B starts and reads it once. Process C starts and reads nothing new.
  2. Notifications: items between the cursor and now are recovered, none twice.
  3. Links: with a fake Constellation, the links in a gap are recovered and paging stops at the first one already held. Both facet path variants are read (seen live: two paths for mentions).
  4. Records within 36 h: replay from the saved time_us recovers them. Beyond 36 h, listRecords does, and the update says it came from catch-up.
  5. A stream reconnect within its window doesn't run the slow reads.
  6. A gap no source covers shows as missed: <from>..<to> on the listener.

Live check (a comment here): stop at_mcp, have someone reply to me, start it, and the reply is there once.