GeezerVison is showing github.com — id: design: ID chat v1 · Issue #2051 · developing-today/code
id: design: ID chat v1 #2051DescriptionLIST 14 synthesis. Merge the chat and chunk-retrieval investigations into chat v1: IRC-shaped core, graph-object links that resolve and fetch from the swarm, and the growth path toward Discord/Slack/Teams features (threads, reactions, servers) without breaking the IRC core.
Program: Drew's 2026-10-28 directive (full text: hatch-personal memory/topics/id-program-2026-10-28.md).
Working pattern: parallel investigations, then the named synthesis issue merges them into a full design. Route guidance: Workhorse by default; Specialist/Summit for synthesis and ramification-heavy work. A result that says "done" is not the endpoint — the orchestrator reviews it and may commission another round. Deliverables: a markdown design/investigation doc (mermaid/SVG diagrams welcome) linked from this issue, plus follow-up issues for anything buildable. Build a proof of concept where the design calls for one, but do NOT build the permanent feature on top of an unreviewed PoC.
Acceptance criteria
Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Oct 29, 2026 Parent epic: #2056 — ID platform expansion (2026-10-28 directive). dezren39 commented on Oct 29, 2026 Intake review
LIST 14 synthesis under epic #2056; depends on investigations #2049 and #2050. Filed by Drew 2026-10-28; no merged PR resolves it. Suggested approach: synthesis after its investigations, per the program pattern. Risk: growing Discord/Slack-shaped features before the IRC core semantics (presence, channels, graph links) are pinned.
— repo-fleet-monitor intake enrichment (protocol §5): acceptance criteria appended to the body where missing, labels normalized, meta/enriched applied. dezren39 commented on Nov 1, 2026 dezren39 commented on Nov 1, 2026 ID chat v1 — synthesis decision record
Inputs and state. This closes the synthesis gap named by the issue body: IRC-shaped core, graph-object links, and a growth path toward threads/reactions/servers. The two required investigations are complete: #2049 was published in PR #2807 (merged) and #2050 in PR #2811 (merged). Their repo documents are linked below. The bridge-semantics investigation #2058 is also complete in merged PR #2277. This record is based on origin/main at a9e976ac245d94682ff7ada8dd5562cc58c9b00f.
Recommendation
Build chat as a group-addressed signed-event application, not as a game-world feature and not as a new transport stack. Use the channel's existing group ID as its canonical identity; put each durable message in the existing signed event graph, bound to that group; use ephemeral presence separately. A message carries references to graph objects, never the bytes or an access capability. Keep link resolution behind an API that takes a set of candidate holders, even while the first implementation can fetch from the author/hint.
This fits the product ask (“I mostly just want IRC”; #2049 doc lines 3–8), reuses the existing trust/causal model (#2049 doc lines 20–29; pkgs/id/src/chain.rs:28-33, 93-107, 271-309), and leaves explicit seams for the Discord/Slack/Teams growth path (#2049 doc lines 212–229).
Decisions and alternatives
| Decision |
Viable options |
Recommendation and reason |
| Channel substrate |
Keep chat only inside worlds; make a separate chat-specific membership database; or map channels to groups |
Group-backed channels. World chat is explicitly a first-class WorldEventKind::Chat (pkgs/id/src/world/mod.rs:326-335) but is scoped to a game session; its session frame is just ClientFrame::Chat { text } (pkgs/id/src/world_session/types.rs:223-225). Existing groups already carry members, roles and history policy (pkgs/id/src/groups/policy.rs:91-110, 113-129), and Worlds::holds_here evaluates local membership/grants (pkgs/id/src/groups/worlds.rs:103-123). A group hash is the stable channel ID. Existing world chat remains unchanged and can be presented as world:<id>. Do not add a global channel-name registry: # names and nicknames are local aliases. A DM is a two-member friendship group (the template caps it at two; groups/policy.rs:132-147), not an unrelated envelope-only data model. |
| Identity and authorship |
Transport endpoint as authority; server-assigned world participant number; or signed event author |
No registration; local nickname over an ID public key. The event signature is the author assertion; the Iroh EndpointId is a route/connection candidate, not proof that the delivered message was authored by it. If an installation's event signing key and endpoint key differ, require the platform's verifiable key-to-endpoint binding. Do not reuse the world participant integer as global chat identity (world/mod.rs:320-331). This preserves the investigation's Iroh-ID/no-registration requirement (#2049 doc lines 72–75) while retaining signed-event identity. |
| Message format and durability |
Ephemeral chat stream; settle only on explicit save; or settle each channel message |
Every channel text message is a signed event; presence/typing are ephemeral. Use a versioned chat.message.v1 event kind, channel group hash in ChainExt.group, causal frontier in after, and body {text, links:[...]}. The existing event header already provides the signature, domain, per-author sequence/backlink and causal frontier; the signed header commits to the body hash (chain.rs:28-33, 93-107, 259-309). Do not invent an IRC-wide sequence number or order concurrent authors by receipt time: cross-author order is causal only, otherwise undefined (#2058 doc lines 128–154). Reuse the channel's group history policy rather than overriding it; current ordinary group policy defaults to History::Full (groups/policy.rs:113-129). This costs event storage/sync for chat volume, but gives offline delivery, replay and history consistently with native/hosted replicas. Existing world chat remains a separate adapter and is not migrated by this design. |
| Transport |
Overload /id-envelope/1; add a chat ALPN; or sync signed events |
Use the existing event store/sync semantics for durable messages; no chat ALPN. id serve already registers gossip, docs, event sync (when enabled), world, and envelope protocols (pkgs/id/src/commands/serve.rs:973-1000). The envelope wire path is expressly friend envelopes and says the payload signature—not the Iroh node—provides trust (pkgs/id/src/envelope_net.rs:1-7; directory.rs:290-329 limits the current envelope kind to friend request/accept). Keep it for its existing purpose and use it only as an optional notification/wakeup if needed; event bytes remain authoritative. The hosted side is a passive sync peer and must not translate, re-sign, sequence or choose a winning snapshot (#2058 doc lines 17–46, 71–87). |
| Graph-object references |
Inline/duplicate attachment bytes; embed access tickets; or signed references |
Reference only: {kind, hash, author, hint?}; v1 kinds are blob and event. A document already names an iroh blob hash (pkgs/id/src/documents.rs:141-145), and signed events bind their body hash (chain.rs:271-309). A link carries no capability; fetch still passes the existing world-membership gate (pkgs/id/src/blob_gate.rs:39-47, 90-107). Resolve local store → author/hint → known provider set/public-server rendezvous; verify bytes against the content hash and event signatures. #2050 establishes that Iroh blobs already provide verified chunk/range transfer, while ID lacks content-holder discovery and a multi-provider scheduler (#2050 doc lines 23–58, 62–88, 258–275). The message-link API therefore accepts a holder set, but v1 may use one known holder; chat does not reimplement hashing or swarm transfer (#2050 doc lines 330–342). No global Mainline lookup in v1. |
| Presence and roster |
Journal presence; infer it from peer discovery; or short-lived live state |
Ephemeral channel-scoped liveness. Roster is the channel group fold plus last-seen status; presence/typing never enter the event journal, sync or replay. World-session presence today is refcounted only while a world session is live (world_session/mod.rs:1924-1933; world/actor.rs:804-855); peer discovery announces peer identity/name/blob count/time, not channel liveness or content holders (discovery.rs:324-335). Native presence is a bounded-TTL live message to authorized members, not a public channel list; hosted presence is WebSocket fan-out inside the DO. This follows the explicit bridge rule “if it isn't signed, it isn't synced, and it isn't replayed” (#2058 doc lines 240–249). #2809 specifies a 60–90s TTL and a stop/resume netsplit test. |
| Growth without breaking IRC |
Bake advanced features into v1; or leave stable extension seams |
Defer feature payloads, preserve seams. Threads may later reference a parent event hash; reactions can start as ephemeral annotations (a durable reaction would be a signed event); servers/guilds can later be group templates plus a directory event. Unknown rich features must degrade to ordinary text for clients that do not implement them (#2049 doc lines 212–229). No global namespace, bouncer, typing, reactions, threads, or guild UX is required for v1. |
Invariants and acceptance for implementation
- A channel's canonical key is its group hash; names are client-local. Membership, roles, admission and history are the group policy, never an endpoint's self-asserted channel list.
- A message is accepted only after its signature, event domain, channel binding, encoding, and body bounds validate. Use text sanitization and start from existing world-chat bounds (2,048 UTF-8 bytes; 50 messages per participant per 10 seconds:
world/mod.rs:53-67, 87-94; world/core.rs:976-1007). Revisit tuning only with measurements and a documented config seam.
- Every settled message is replayable signed data; ephemeral liveness/typing are not. No bridge assigns event ordering, trust, or an authoritative snapshot (id: investigate: bridge semantics — hosted (HTTPS/WS) edition syncing with native Iroh nodes #2058 doc lines 31–46, 128–154).
- Membership/history checks happen before projection/delivery. A link is not authorization; unknown and forbidden blob references retain the gate's indistinguishable refusal behavior (
blob_gate.rs:39-47, 90-107). Never expose private-channel holder/presence metadata in public gossip.
- Object links are content references, not copied data or capabilities. Bytes are hash-verified; the author/hint is only a candidate source. APIs must accept multiple candidate holders so the
#2050 provider/scheduler work can attach without changing the message schema.
- The PoC in id(chat): PoC — two CLI nodes exchanging channel frames with a blob link #2808 is a review gate, not production code to extend. Durable core id(chat): implement durable IRC-shaped group channels and signed messages #3799 starts only after that PoC is reviewed/sign-off is recorded. Presence id(chat): presence heartbeat protocol over gossip (ephemeral, TTL-based) #2809 and graph-holder/retrieval work are separate mergeable phases.
Phased packets enqueued
The existing follow-up issues were revalidated OPEN and not held; each has a queue packet and the issue now carries queue/queued, status/needs-triage, task/small-fix as applicable, plus an agent-note:v1 handoff comment.
| Phase |
Packet |
Queue task / dedupe key |
Gate |
| 0 — wire-format/link proof |
#2808, two-node /id-envelope/1 PoC |
task 5792 · repo-health:v1:fix:developing-today/code:issue:2808 |
Must be reviewed; no permanent feature on the PoC |
| 1 — durable channel core |
#3799, signed group-channel messages and links |
task 5794 · repo-health:v1:fix:developing-today/code:issue:3799 |
After phase 0 sign-off |
| 2 — live roster |
#2809, ephemeral TTL presence |
task 5799 · repo-health:v1:fix:developing-today/code:issue:2809 |
Separate from journaled messages; may merge independently |
| 3 — cold-link holder set |
#2260, provider table + membership-gated blob serving |
task 5806 · repo-health:v1:fix:developing-today/code:issue:2260 |
Required before in-network discovery can satisfy offline-author links |
| 4 — multi-holder retrieval evidence |
#2261, review-gated range-retrieval PoC |
task 5810 · repo-health:v1:fix:developing-today/code:issue:2261 |
Accepts hand-fed holders before phase 3; remains a PoC pending review |
Deferred, not silently dropped: #2262 partial-holder re-serving remains gated on #2260 and LIST 8 per-world/per-peer budgets; #2263 Mainline global content discovery remains a separate privacy/trust investigation, public-world opt-in only, and is not needed for chat v1. Existing issues #2262 and #2263 remain open and are linked above through #2050. No packets for them were enqueued in this pass because they are not v1 requirements and #2263 is explicitly gated on #2260.
Drew-only questions
No unresolved Drew-only choice blocks the implementation packets. One product trade-off is surfaced for review: Should new chat groups default to full history for a newly admitted member, or to history-from-join? Options: (A) default to the current ordinary-group History::Full; (B) create chat groups with a restricted history policy and permit Admins to widen it. Recommendation: B for private/invite-only channels, A only for explicitly public channels, while keeping the choice in the existing group policy. This is privacy-sensitive but does not block the protocol PoC; #3799 should expose the policy rather than hard-code one global answer. #2051's owner can confirm the product default during design review.
Sources
dezren39 commented on Nov 1, 2026 🤖 Agent note · done (design record + implementation packets)
- Agent: queue worker (repo-worker-code), openchamber-scheduled-lane
- Session / ID: task 5734 · outcome triaged
- Found via: queue claim
- Task: Synthesized id: investigate: IRC-first chat on ID — channels, graph-linked objects, presence #2049/id: investigate: BitTorrent-style chunk retrieval for graph objects #2050 into an IRC-shaped, group-backed signed-event design; recorded decisions, alternatives, invariants, file:line evidence, and the hosted-bridge boundary.
- Expectation: met — design record posted; five independently tracked packets enqueued and handed off: task 5792/id(chat): PoC — two CLI nodes exchanging channel frames with a blob link #2808 PoC, task 5794/id(chat): implement durable IRC-shaped group channels and signed messages #3799 durable core, task 5799/id(chat): presence heartbeat protocol over gossip (ephemeral, TTL-based) #2809 ephemeral presence, task 5806/id: holder discovery for blob hashes — provider table, gossip announcements, wire the blob gate #2260 holder discovery/gate, task 5810/id: PoC — multi-provider chunk-range retrieval in the get path (swarm scheduler over iroh-blobs) #2261 retrieval PoC. Dedupe keys are in the design record above. id: partial-holder re-serving while downloading, under LIST 8 serving budgets #2262/id: investigate global (Mainline DHT) content discovery for public worlds #2263 are explicitly deferred as non-v1 follow-ups.
- Links: design record id: design: ID chat v1 #2051 (comment) · implementation issue id(chat): implement durable IRC-shaped group channels and signed messages #3799 · source investigations id: investigate: IRC-first chat on ID — channels, graph-linked objects, presence #2049/id: investigate: BitTorrent-style chunk retrieval for graph objects #2050/id: investigate: bridge semantics — hosted (HTTPS/WS) edition syncing with native Iroh nodes #2058
dezren39 commented on Nov 1, 2026 Design PR
PR #3866 — design(id): #2051 IRC-first chat v1
Summary
- The design note is
doc/2026-11-01_design_id2051.md; it is design-only and leaves id: design: ID chat v1 #2051 open.
- Channels are group-backed with local names; DMs use encrypted two-account friendship groups.
- Every channel text message is a signed causal event; identity is the ID public key and EndpointId is a route/liveness handle.
- Private payloads are encrypted and stored separately; current open whole-store sync must become group-scoped before private chat ships.
- Event-store/range-sync is authoritative; an envelope is only an optional wakeup, not a message transport or new ALPN.
- Presence is ephemeral per-channel gossip; links are signed blob/event references with a holder-set-shaped resolver.
- The note defines acceptance criteria and separately mergeable phases; threads, reactions, typing and guild UX stay out of v1.
Phased plan
- Review/sign off existing id(chat): PoC — two CLI nodes exchanging channel frames with a blob link #2808 and id(chat): presence heartbeat protocol over gossip (ephemeral, TTL-based) #2809 PoCs; do not build permanent code on an unreviewed PoC.
- Implement channel/identity policy and signed
chat.message.v1 / chat.topic.v1 types.
- Persist encrypted payloads and implement group-scoped history sync/access; this is the private-chat critical path.
- Keep event sync authoritative; add only a measured optional envelope wakeup.
- Add graph-link resolution through a holder-set interface (one holder is sufficient initially), then ephemeral presence/roster and the minimal client surface.
Drew question
For a newly admitted member, should history be (A) full, (B) recent/bounded, or (C) from-join? Recommendation: B for private/invite-only channels and A for explicitly public channels; C currently needs encryption-history support. No other Drew-only decision is required to start the PoC/review path. dezren39 commented on Nov 1, 2026 Handoff from #2809 (ID chat presence), completed via PR #3956 (merged 628436e):
Presence is available for the synthesis: pkgs/id/src/chat_presence.rs provides signed TTL heartbeats (75 s), a group-fold roster annotated with last-seen liveness, membership-scoped private-channel presence, and typing indicators on the same path — ephemeral only, never journaled/synced/replayed. id serve broadcasts and verifies presence frames on the existing gossip ALPN; the chat layer reads liveness through PresenceTable.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|