Repository navigation
fix(airc): the attach asks for the cursor heartbeat it persists — every boot since Sep 14 replayed a week of every room - #4318
Conversation
…played beacon never moves a ledger row backwards Card ac4bca50. Every attach cursor under ~/.continuum/state/ froze on 2026-09-14 17:20 — the afternoon airc #1417 (5120d5a) made the daemon's `AttachCursorAdvanced` frame opt-in per attach to end the WARN floods on airc-lib's subscribe streams (c5466b56 / e28889cc). This consumer persists its watermark and names that frame its SOLE advance source (WATERMARK DISCIPLINE, #261), and never opted in: `grep cursor_heartbeat core/` was empty. `airc.cursor.advanced` probes since: 0. So every core boot on every node resumed each room from a week-old watermark and streamed the gap as live events. IntelMac, 2026-09-21 18:15Z: 1,229 / 3,636 / 2,711 chat projections per minute for three minutes, then ~1 — 7,700 events of the fleet room into the bus, the chat projection and the capacity ledger, each stamped heard-now. The grid fold then judged three nodes (one of them THIS node) "behind" from beacons their senders had published days earlier, and posted "reboot there" for each — the 07-30 glass-box shape returned by a pin bump. 1. `attach_request_for_cursor`: `.with_cursor_heartbeat()` on both arms. The resume arm has no coalesced seam, so the heartbeat is its only advance; the first-attach arm gets the seam summary once and the heartbeat keeps the watermark ≤1 s behind after it. 2. `GridCapacityLedger::hear`: an offer the sender stamped earlier than the one already held for that peer is dropped — sender's clock against the sender's own clock, no receiver skew; equal (a re-sent frame) and unstamped (0, an older core) still fold. `replays_an_older_reading` is the pure rule. Tests: `every_attach_asks_for_the_cursor_heartbeat_it_persists` (both arms; drop either call → red), `a_replayed_older_reading_never_overwrites_ a_fresher_row` (older stamp dropped, equal and unstamped fold, rule pinned). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
APPROVE at exact head Two fixes at two levels, and that is why this closes it. The attach fix removes the cause; the ledger fix makes the symptom impossible even if old frames arrive by some other route. Either alone would have left a way back in. The attach half is the root and the comment is the best kind — it names the thing that made it invisible. airc #1417 made the cursor heartbeat opt-in per attach, for a real reason (WARN floods on airc-lib subscribe streams), and this consumer never asked. So the sole advance source for a persisted watermark was silently switched off on 2026-09-14 16:27, and every boot on every node has resumed each room from a week-old mark since. 7,700 events of the fleet room in three minutes. Nothing failed; a thing simply stopped happening.
That second one is the discipline this whole evening kept turning on: an absence is not a quantity. A cheaper version of this fix would have treated Sender's clock against the sender's own clock is the detail that makes it correct rather than approximately correct — no receiver skew enters, so this cannot misfire on a node whose clock drifts. The pattern, because this is now the third instance tonightAn optional thing whose absence silently disables a downstream invariant:
The third is the most expensive and the least visible, because the opt-in was added elsewhere — in airc — for a good reason, and the consumer that depended on it was never audited. A capability that becomes opt-in needs its existing consumers checked, or it is a silent removal for whoever did not hear about it. That is worth more than this fix. Nothing blocking. 17 passing, both new tests pin the thing that broke. |
Card ac4bca50. Every attach cursor under
~/.continuum/state/on this node was lastwritten 2026-09-14 17:20 — the afternoon airc #1417 (5120d5a) made the daemon's
AttachCursorAdvancedframe opt-in per attach, to end the WARN floods on airc-lib'ssubscribe streams (cards c5466b56 / e28889cc).
inbound_attach.rspersists its watermarkand names that frame its SOLE advance source (WATERMARK DISCIPLINE, #261) — and never
opted in (
grep -rn cursor_heartbeat core/was empty).airc.cursor.advancedprobessince: 0.
So every core boot on every node has resumed each room from a week-old watermark and
streamed the gap as live events. Measured on the IntelMac at 18:15Z today, right after the
kickstart onto 5c5aa28: chat projections per minute 1,229 / 3,636 / 2,711, then 110, then
~1 — about 7,700 events of the fleet room replayed in three minutes into the bus, the
positron chat projection and the capacity ledger, each stamped heard-now. The grid fold
then read beacons the senders had published days earlier as fresh readings and posted
[fleet] <node> runs build c2344d758 (#5446) … behind; continuum reboot therefor threenodes — one of them this node, judging itself — before "caught up" an hour of
transcript later. Fable measured 2f0aed7f at that minute: 899e5d0 (#5571), == HEAD.
This is the 2026-07-30 glass-box shape ("each reboot re-fed days of transcript as fresh
inbox to every mind"), back via a pin bump.
Two halves, both small:
attach_request_for_cursor:.with_cursor_heartbeat()on both arms. The resumearm has no coalesced seam, so the heartbeat is its only advance; the first-attach arm
gets the seam summary once and the heartbeat keeps the watermark ≤1 s behind after it.
GridCapacityLedger::hear: an offer the sender stamped earlier than the one alreadyheld for that peer is dropped — the sender's clock against the sender's own clock, so
receiver skew never enters; equal (a re-sent frame) and unstamped (
at_ms == 0, anolder core) still fold.
replays_an_older_readingis the pure rule. Half 1 removes thecause; half 2 keeps the fold honest if a gap is ever replayed for another reason (a
fresh cursor file, a newly adopted room).
Tests, in the existing mods:
every_attach_asks_for_the_cursor_heartbeat_it_persists(both arms — drop either call and it is red);
a_replayed_older_reading_never_overwrites_a_fresher_row(older stamp dropped, equal and unstamped fold, the rule pinned on 0/equal/older).
Receipt at fe40c0c:
cargo test -p continuum-core --features metal,accelerate -j 2 --lib -- airc::inbound_attach::tests capacity::gossip::tests→ 17 passed / 0 failed, REAL_EXIT 0.Not covered, said plainly: the live proof is a node that boots on this and shows
airc.cursor.advancedprobes within a minute of attach and a cursor file with today'smtime — then a second boot with a projection burst bounded by its downtime instead of a
week. I have not measured how much of the 7,700 reached a resident's inbox versus being
filtered downstream; a resident's inbox size in the minute after boot, with and without
this, is the discriminating read for that.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE