Skip to content

design(id): #2036 messaging/relay protocol v1 - #3833

Merged
dezren39 merged 2 commits into
mainfrom
design/id-2036
Nov 2, 2026
Merged

dezren39 merged 2 commits into
mainfrom
design/id-2036

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Add doc/2026-11-01_design_id2036.md, a decision-ready synthesis of the #2034/#2035 inputs and latest #2036 triage.

durable facts -> origin-signed event graph -> member relay / range-sync catch-up
live input   -> signed session header + MAC frames -> signed segment checkpoints

The note defines options, trade-offs, trust/retention invariants, acceptance criteria, and four independently mergeable implementation phases. It also makes validation-before-forwarding a hard gate: stock iroh-gossip's eager propagation cannot be made safe by post-receive validation alone.

Evidence

  • Before: the issue had the two investigations and a triage proposal, but no decision note reconciling gossip's forwarding behavior with the required membership gate.
  • After: the note records the two-class protocol, relay fallback, attestation hand-off, media/chunking rules, phased plan, and the one non-blocking Drew question.
  • git diff --cached --check passed; this is docs-only, so implementation tests were not run.

Merge Danger

Door: two-way — documentation only; implementation behavior is unchanged.

Blast Radius: narrow


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 16:58
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f871ee8e-90f7-4e1b-9eb9-e8eb46d4f2e6
Commits

Reviewing files that changed from the base of the PR and between 927f383 and 4c3b9db.

Files selected for processing: 1
  • doc/2026-11-01_design_id2036.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T17:01:36.037446Z 4c3b9db PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c3b9dbf9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| **Chained / durable** | Identity, membership, documents, money, durable chat, match results, session checkpoints | Origin signs each fact; event sequence/backlink and causal frontier provide graph order. Receivers verify the signed envelope and group membership at send time. | Retained as ordinary event-graph entries; durable facts are never moved to checkpoint-only signing. | Any peer can catch up from another member by range sync. Arrival may be out of order; graph dependencies determine application. |
| **Ephemeral / live** | Keystrokes, cursors, presence, live input, live-session chat | One signed session header binds session ID, purpose, participants and key commitment; frames carry per-session sequence numbers and MACs; signed segment checkpoints bind ordered deltas to state roots. | Live frames stay out of the durable graph and are not queued for offline members. A checkpoint is a normal signed graph event. Initial default: checkpoint every 256 events or 2 seconds, whichever comes first, and at explicit commit/blur/end; make limits configurable in the `WorldLimits` style. | Rebuild from the latest checkpoint plus the live frames since it. A disconnected live stream may lose its uncheckpointed tail; this is acceptable only for non-dispute-grade state. |

The checkpoint commits to the session, monotonic segment number, immediate previous checkpoint, ordered segment root, event count and time bounds. Frames must bind their session ID, sequence and payload under the session MAC. The 256-event/2-second values are defaults from the latest issue triage, not magic protocol constants. The existing `WorldLimits` pattern supports bounded runtime-configurable limits (`pkgs/id/src/world/mod.rs:57-100`). The investigation's threat analysis makes the guarantee explicit: a checkpoint attests to a signer-committed segment; it does not prove the exact time of each frame or that every recipient saw the same intermediate stream (`doc/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention/2026-10-29T10-45-00Z_investigation_ephemeral_live_data_retention.md:84-99, 110-118`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind recovery checkpoints to retained state snapshots

For a late or reconnecting participant that missed already-checkpointed frames, these checkpoint fields provide only commitments and metadata, not the state needed to satisfy §3's promise to rebuild from the latest checkpoint plus subsequent frames. A segment hash cannot reconstruct discarded deltas, and §4.6 permits expired audit blobs to disappear. Require recovery checkpoints to bind to retrievable state snapshots and retain those snapshots for the recovery lifetime (as contemplated in investigation #2034, §6); otherwise an implementation following this contract can lose checkpointed document/game state, not just the explicitly expendable live tail.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant