Skip to content

id: investigate: bridge semantics — hosted (HTTPS/WS) edition syncing with native Iroh nodes #2058

Closed

Description

@dezren39

Source: the Cloudflare Workers fit investigation (on #2044) open question 2. The Workers edition speaks signed objects/graph/journals over HTTPS/WebSocket; native nodes speak Iroh/QUIC. Design the bridge: who bridges, ordering and conflict semantics across the seam, replay/journal interop, and how the trust model (signatures are transport-independent) is preserved end to end.

Program: Drew's 2026-10-28 directive (full text: hatch-personal memory/topics/id-program-2026-10-28.md). Parent epic: #2056.
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

  • A written bridge-semantics investigation exists: who bridges hosted (HTTPS/WS) and native (Iroh/QUIC) editions, with ordering and conflict semantics across the seam
  • Replay/journal interop and the transport-independent trust model (signatures end to end) are addressed explicitly
  • Open questions that block the serverless-edition design (id: design: ID serverless edition v1 (Cloudflare Workers) #2046) or chat/boards syntheses are named with owners

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Parent epic: #2056 — ID platform expansion (2026-10-28 directive). Filed as batch 2 from PREPARED-ACTIONS.md.

  3. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  4. added
    effort/mMedium: expected under 1 day of work
    kind/questionQuestion or design decision to resolve
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    priority/highImportant and time-sensitive
    source/humanFiled directly by a human
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    Part of the ID platform expansion program (parent epic #2056; source: the Cloudflare Workers fit investigation on #2044, open question 2). Filed by Drew 2026-10-28; no merged PR or commit resolves an investigation of this kind. Suggested approach: follow the program's working pattern — a bounded investigation write-up on this issue, feeding the named synthesis issues. Risk: bridge semantics decided implicitly by an implementation later; this investigation is the cheap place to pin ordering/conflict rules.

    — repo-fleet-monitor intake enrichment (protocol §5): acceptance criteria appended to the body where missing, labels normalized, meta/enriched applied.

  6. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Top priority — ID program wave-1. Drew directed this be picked up in the next runs (2026-10-29): enqueued directly as triage task 3360 in repo-health-code-pilot at queue priority 20 (only breakage-class work at priority 10 outranks it). Wave-1 is the ungated investigations and designs; syntheses and PoCs stay gated on their named inputs. Investigation route: Workhorse.

  7. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  8. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane C
    • Session / ID: queue task 3360 · repo-queue-worker-shift-c · 2026-10-29 06:24 CDT
    • Found via: queue claim
    • Task: Bridge-semantics investigation for id: investigate: bridge semantics — hosted (HTTPS/WS) edition syncing with native Iroh nodes #2058 — who bridges hosted (HTTPS/WS) and native (Iroh/QUIC) editions, ordering/conflict semantics across the seam, replay/journal interop, and the transport-independent signed-object trust model; deliverable is a design doc in doc/ linked from this issue plus routed follow-on work.
    • Expectation: effort/m — done = investigation doc PR opened, findings summarized here, blocking open questions for id: design: ID serverless edition v1 (Cloudflare Workers) #2046 / chat / boards syntheses named with owners, follow-on work routed.
    • Links: queue task 3360 (branch/PR to follow)
  9. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (investigation delivered; PR awaiting CI)

    Investigation result — bridge semantics (#2058)

    Verdict: the bridge is a sync peer, not a translator or a proxy. Ordering and trust already live entirely in the signed event layer (pkgs/id/src/chain.rs: per-author sequence + backlink + signed after causal frontier, domain tag id.events.v1; envelope_net.rs: "The payload's signature is what makes it trusted, not the iroh node that delivered it"). The seam needs a new transport for the existing sync sessions — not new semantics — under three rules: no bridge-assigned ordering, no bridge-held trust, no authoritative snapshot.

    • Who bridges: the Durable Object is the passive, always-reachable endpoint (it cannot initiate Iroh — no UDP in Workers); any dual-homed native node that adds the HTTPS/WS transport is the general bridge, in both data directions. A third-party relay bridge is an optional availability-only courier (LIST 9 role), never a required hop in v1, and holds no content trust.
    • Session shape: same Request/Answer negotiation and the same measured LogSync/range crossover (~3.5% of chain count, sync_method.rs) — the rule is about set difference, not transport. Bridge-only additions are transport-level: resumption from the store's own (author, seq) positions (needed because DO invocations are CPU-capped and sockets hibernate), and blob bytes on a separate HTTPS/R2 leg by hash, never inside the event session.
    • Ordering: per-author order is total (the chain) and transport-independent — scrambled/duplicate/late delivery produces waiting rows and catch-up, never a different history. Cross-author order is causal only (after); arrival order is not semantics and wall-clock receipt time must never become a tiebreak, or hosted and native replays of the same set diverge.
    • Conflicts: forks are a property of the signed bytes; both sides run the same applied-prefix + fork-proof machinery (event_store/). The one real seam hazard: LogSync compares heights, not heads, so it cannot see a fork (log_sync.rs) — a bridge relationship that only ran LogSync could carry a forked prefix indefinitely while both sides report "in sync". Rule: bridge relationships must run the proof-carrying exchange on a cadence (bootstrap, after any refusal, periodically). The DO's single-writer serialization does not prevent author forks (an author signs from any device), so "last writer wins by arrival" on the hosted side would be a silent divergence — explicitly ruled out.
    • Replay/journal interop: one journal format — the signed event set; the DO SQLite schema mirrors the native store's tables, so interop is a table scan, not a translation. Hosted replay is incremental (ingest_batch chunks, positions as cursor) to fit CPU caps, with identical results (tested by the PoC, id: poc: bridge sync session — native store ↔ DO-shaped SQLite store over WebSocket, fork-proof exchange + withholding detection (from #2058) #2276). DO point-in-time bookmarks are operator disaster recovery for the hosted copy only — never a substitute for the signed journal.
    • Trust end to end: a bridge/relay can withhold, delay, reorder, or observe metadata — it cannot forge or alter. Withholding leaves evidence (chain heads stall; after frontiers reference missing hashes), so it is an availability attack with proof, not an integrity attack. Allowed-writer filtering stays a view rule on both editions; custodial signing keys stay rejected.
    • Ephemeral traffic: if it isn't signed, it isn't synced and isn't replayed — presence/typing stays WebSocket fan-out inside the DO; only settled signed objects cross as events.

    Open questions blocking downstream designs (owners named)

    # Question Blocks / owner
    Q1 Fork-proof exchange cadence for bridge relationships + its DO row/CPU cost #2046 sync spec — owner: #2046
    Q2 WorldDO: serialized writer (creates a total order native worlds don't have) vs CRDT replica #2046 / world design — owner: #2046
    Q3 Journal/ephemeral boundary for chat (which traffic settles into signed events) #2051 — owner: #2051 (input #2049)
    Q4 Hosted-leg retrieval of graph-linked objects (HTTPS-only, no swarm chunking) — acceptable for boards v1? #2054 — owner: #2054 (input #2052)
    Q5 Withholding-detection evidence threshold (alert vs idleness) #2036 — owner: #2036
    Q6 DO read-scope policy (which graphs an unauthenticated dual-homed node may pull) #2046 — owner: #2046

    Not blocking: SSO→ID binding / key recovery (#2258, from #2045); native multi-hop relay (#2035, PoC #2249) — distinct from this hosted seam.

    Follow-on routed

    PoC filed as #2276: bridge sync session native store ↔ DO-shaped SQLite store over WebSocket, reusing ingest_batch + resolve unchanged; acceptance covers two-way convergence, cross-seam fork detection via proof exchange, withholding detection, and replay-identity between editions. Docs PR: #2277.

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/questionQuestion or design decision to resolvemeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/humanFiled directly by a humanstatus:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions