GeezerVison is showing github.com — id(chat): presence heartbeat protocol over gossip (ephemeral, TTL-based) · Issue #2809 · developing-today/code
id(chat): presence heartbeat protocol over gossip (ephemeral, TTL-based) #2809Labels app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests DescriptionFollow-up from the IRC-first chat investigation (#2049, doc in PR #2807 §2.4; synthesis consumer #2051).
Build: presence as specified: per-node {node-id, channels[], status, ts} heartbeats over direct connections fanned out via the already-wired gossip ALPN, short TTL (60–90 s suggested), stale = gone, no leave messages. Roster = backing-group fold annotated with last-seen liveness. Presence is NEVER journaled, synced, or replayed.
Done when: two nodes show each other live/stale correctly across a simulated netsplit (kill -STOP / resume), and typing-indicator TTLs ride the same path. Hand the result to #2051.
Acceptance criteria
- Two nodes exchange presence heartbeats ({node-id, channels[], status, ts}) over direct connections fanned out via the already-wired gossip ALPN, with a short TTL (60–90 s suggested); stale entries read as gone; no leave messages.
- Roster = backing-group fold annotated with last-seen liveness, demonstrated across a simulated netsplit (kill -STOP / resume): both nodes show each other live, then stale, then live again correctly.
- Presence is never journaled, synced, or replayed (verified in the implementation); typing-indicator TTLs ride the same path.
- Result handed to the synthesis consumer id: design: ID chat v1 #2051.
Activitydezren39 commented on Oct 31, 2026 dezren39 commented on Nov 1, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 1, 2026 dezren39 commented on Nov 1, 2026 agent-note:v1
- task: 5799
- state: done (fixed_merged)
- pr: feat(id): chat presence heartbeat protocol over gossip (#2809) #3956 — merged 628436e
- note: Presence protocol implemented as specified.
pkgs/id/src/chat_presence.rs: signed per-node {node, channels[], status, ts} heartbeats, 75 s TTL (60–90 s band), no leave messages, stamp-based expiry (replays cannot extend a claim), roster = backing-group fold annotated with last-seen liveness, receipt-side membership filtering + viewer-scoped rosters for private channels, typing on a 12 s TTL over the same path. The table is in-memory only — never journaled, synced, or replayed. serve broadcasts/verifies presence frames on the existing gossip ALPN. Codex round (3 P2 findings: authentication, duplicate-extended expiry, pruning) fixed and replied on the PR threads.
- tests: laptop
cargo test -p id chat_presence — 10 passed, 0 failed (TTL, two-node stop/resume frame exchange, roster annotation, private-channel scoping, typing TTL, replay/out-of-order refusal, duplicate-expiry, signature authentication, frame magic, memory-only).
- handoff: result handed to id: design: ID chat v1 #2051 (comment there). Pre-existing unrelated failure found on main: id-core test target does not compile (
vt100 used in world_presentation tests, not an id-core dev-dependency after the crate split).
MetadataMetadataapp/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests DevelopmentNo branches or pull requestsIssue actions
|