GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(id): bridge sync session PoC — native store ↔ DO-shaped SQLite store over WebSocket (#2276) by dezren39 · Pull Request #2848 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

PoC for #2276 (from the #2058 bridge-semantics investigation, doc PR #2277): a bridge sync session between a native pkgs/id store and a DO-shaped SQLite store over a WebSocket — pkgs/id/tests/bridge_poc.rs, test-only, no permanent feature on top of it.

How it maps to the investigation's rules:

  • Bridge = sync peer, not translator. Both sides ingest received bytes through the store's own ingest_batch (+ the resolution inside it), unchanged. No bridge-assigned ordering, no re-signing, no authoritative snapshot.
  • Proof-carrying exchange, not heights. Reconciliation is the range exchange (event_store::range::Party) over the sync set (position key + event ID, fork proof headers included). LogSync compares heights and cannot see a fork (investigation §4) — the fork test sets up equal heights with different heads and shows the exchange still detecting the fork.
  • DO shape. The hosted side's store of record is SQLite with the investigation's table shape (events by (author, seq), chains, forks, proof_ids, proof_headers), written one batch per transaction from the same ingest outcomes; the replay test compares native vs hosted tables row-for-row.
  • Withholding has evidence. A relay variant drops one author's events; the receiver detects it from the announced chain heads plus the after-frontier reference in a signed event it did receive (§6).

Acceptance coverage (issue #2276):

  • Two-way convergence to identical applied sets and live tag claims — bridge_session_converges_both_directions
  • Fork authored on each side while disconnected, detected by the proof-carrying exchange, same fork proof on both sides — bridge_session_detects_fork_by_proof_exchange_not_heights
  • Withholding bridge detected from chain-head / after-frontier evidence, demonstrated in a test — bridge_withholding_is_detected_from_heads_and_frontier
  • Replay of the same journal into empty hosted-shaped and native stores yields identical stores (tables compared) — replay_into_hosted_and_native_yields_identical_tables
  • Fork-proof exchange cost measured (flights + reconciliation bytes vs set size) — fork_proof_exchange_cost_scales_sublinearly_in_bytes; numbers recorded on id: poc: bridge sync session — native store ↔ DO-shaped SQLite store over WebSocket, fork-proof exchange + withholding detection (from #2058) #2276

One dev-dependency added: rusqlite (bundled) for the hosted store's SQLite tables.

PoC limitations, stated plainly: the sync set is enumerated through the store's public read API, which exposes the lowest fork proof per author (the internal sync set also carries higher fork points' proof headers); the hello's chain heads are unsigned in the PoC — in production the same evidence arrives inside signed events' backlinks/after frontiers, which is what the withholding test's frontier half demonstrates.


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
test(id): bridge sync session PoC — native store ↔ DO-shaped SQLite s…
b3421ef
…tore over WebSocket (#2276)
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 22:18
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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 9 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: f5d802e4-1ef6-4548-8250-a7c3d1a71b92
Commits

Reviewing files that changed from the base of the PR and between b706a83 and 632f7fa.

Files ignored due to path filters: 1
  • pkgs/id/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 3
  • pkgs/id/Cargo.toml
  • pkgs/id/src/event_store/mod.rs
  • pkgs/id/tests/bridge_poc.rs
  • 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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-10-30T22:53:06.740302Z 632f7fa New commits
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 30, 2026
id: poc: bridge sync session — native store ↔ DO-shaped SQLite store over WebSocket, fork-proof exchange + withholding detection (from #2058) #2276
Closed
5 tasks done
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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: b3421ef187

ℹ️ 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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/tests/bridge_poc.rs
],
)
.unwrap();
mirror_author(&self.store, &tx, &event);

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Mirror authors affected by released waiting events

When batches arrive out of dependency order, ingesting one author's event can release waiting events belonging to another author, but this loop refreshes only authors present in the current batch. For example, ingest Yuri's event referencing Xena's missing event, then ingest Xena's event in a second batch: the native store applies Yuri's waiting event, while SQLite never receives Yuri's updated chain row. The single-batch replay test masks this divergence. Refresh all authors affected by ingestion, including released waiting events, and exercise replay across multiple batches.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/tests/bridge_poc.rs
Comment on lines +1021 to +1025
let announced = heads_of(&native, &authors);
let authored: Vec<(AuthorKey, Hash)> = all_events
.iter()
.map(|e| (*e.header.verifying_key.as_bytes(), e.id))
.collect();

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Derive withholding evidence from the receiver's wire observations

In the withholding scenario, the detector receives chain heads read directly from the sender after the session and an author-to-ID inventory built from all_events, including the events deliberately withheld from the receiver. It never examines the received signed event's after frontier, and the session's learned-but-undelivered IDs are not used. Consequently, the test demonstrates detection with an out-of-band oracle rather than detection from the announced heads and signed frontier available to the receiver. Retain the received announcements and derive the missing-ID evidence from reconciliation and received signed events instead of supplying the sender's private inventory.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/tests/bridge_poc.rs
Comment on lines +239 to +241
for id in store.waiting_ids().unwrap() {
if let Some(event) = store.event_by_id(&id).unwrap() {
push(event, &mut seen, &mut out);

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Include waiting events in the reconciliation snapshot

When a store starts a session with waiting events, this lookup silently omits them: EventStore::event_by_id reads only HASHES and EVENTS, while waiting events reside in WAITING and are explicitly forbidden from also being stored by check_waiting. For example, if native holds Yuri's event waiting for Xena's event and hosted holds that dependency, the session transfers Xena's event and releases Yuri locally, but hosted never receives Yuri's event because the reconciliation entries and transfer byte maps were snapshotted without it. Retrieve waiting-event bytes through a path that actually reads waiting storage and add this split-dependency convergence scenario.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Addressed: added to read waiting rows directly from the WAITING table and decode events, updated to retrieve waiting events, and added demonstrating two-way convergence with split waiting dependencies.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/tests/bridge_poc.rs
Comment on lines +1106 to +1110
deliver(&mut native, &all);
let mut hosted = HostedStore::open();

let started = std::time::Instant::now();
let report = run_session(&mut native, &mut hosted, &authors, None).await;

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Measure sparse fork reconciliation across multiple set sizes

The scaling experiment initializes hosted as empty and native with 100 non-forking events, so it measures a full bootstrap rather than fork-proof reconciliation. In this case Party::respond sends the native set's entire ID list, making reconciliation bytes linear in set size; that linear exchange still passes the 6,400-byte bound because the bound budgets every ID twice. A single-size bootstrap therefore cannot establish the claimed sublinear fork-exchange cost or supply the stated cadence measurement. Use shared histories with a fixed fork difference at multiple set sizes, and evaluate how reconciliation bytes grow.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Addressed: added sparse_fork_reconciliation_scales_sublinearly_across_set_sizes evaluating single-fork reconciliation against growing shared histories (20, 60, and 100 events). Measured flights stayed constant at 5 and bytes scaled from 1,036 to 1,356 bytes across a 5x history growth, confirming sublinear sparse fork reconciliation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dezren39 added 2 commits October 30, 2026 17:50
@dezren39
test(id): address Codex review on bridge PoC — waiting-event snapshot…
d14d26b
… + sparse fork scaling (#2276)
@dezren39
Merge remote-tracking branch 'origin/main' into queue/3431-2276-bridg…
632f7fa
…e-sync-poc
@dezren39
dezren39 merged commit d2eb34e into main Oct 30, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/3431-2276-bridge-sync-poc branch October 30, 2026 22:52
This was referenced Nov 1, 2026
id: implement hosted HTTPS/WS signed-object bridge v1 (from #2046) #3818
Closed
id: design: ID serverless edition v1 (Cloudflare Workers) #2046
Closed
id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811
Closed
@dezren39 dezren39 mentioned this pull request Nov 14, 2026
id: implement ID serverless edition v1 on Cloudflare Workers (design #2046) #5524
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.