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 — feat(id): share EventStoreBackend with TenantStore by dezren39 · Pull Request #14642 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Closes #12801

Summary

  • TenantBackend<T> owns the TenantStore transaction behind EventStoreStorage (RowRead / RowWrite). The shared EventStore<B> implements EventStoreBackend for both native and tenant storage.
  • Ingest, sync, invariant checks, fork/waiting state, bodies and event lookups use the same event-store semantics. id-sync continues to use SharedEventStore<S: EventStoreBackend>; there is no hosted-only branch in callers.
  • The merge includes current main through 410291eebdaf. The remaining main commits after the tested head 8dc3bcda324 changed no files under pkgs/id.

Evidence

  • Current PR head 43602e837aaa; current base 410291eebdaf.
  • Remote Fleet run 45879046271 passed cd pkgs/id && cargo check -p id-store && cargo test -p id-store on tested head 8dc3bcda324. The paired native/TenantStore store_traits suite passed 12/12.
  • Laptop verification through fleet-build-lock passed cargo check -p id-store && cargo test -p id-store on the same tested head; the command exited 0.
  • The final main merge adds no pkgs/id changes after that tested head.

Merge Danger

Two-way storage change. TenantBackend owns the row transaction and commits or rolls it back with the same change semantics as the native backend. Uncertain tenant-session outcomes remain explicit errors; the paired conformance suite covers observable equivalence.

Sorry, something went wrong.

Uh oh!

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

All reactions
dezren39 and others added 10 commits November 24, 2026 09:12
@dezren39
feat(id-store): tenant DB store adapter — SQLite-over-HTTP (Turso) ro…
735201f
…w layer (E6 of #9083, refs #12801)

The pipeline-protocol codec (POST /v2/pipeline: baton sessions,
hrana value encoding, statement errors), an HTTPS transport carrying
the tenant's scoped token (never stored, redacted from Debug), and
TenantStore: the native event store's 17 tables mirrored as SQL rows
with redb's table semantics — byte-ordered keys, last write wins,
multimap sets in value order, ordered range and prefix scans, and
explicit transactions over the baton session.

Conformance is proven at the row layer this slice owns: one op script
runs against both the adapter (over an in-process SQLite endpoint
speaking the same protocol bytes) and real redb tables, requiring
identical observable results.

Not yet an EventStoreBackend: the ingest semantics live in id-events'
EventStore, written directly against redb transactions; porting them
onto this row layer without forking the semantics is the remaining
E6 work. No caller above store_traits changes.
@dezren39
fix(id-store): turso row layer compiles and conformance passes
2fe6b57
- scan/range_clauses bound to RangeBounds<Vec<u8>> so prefix and
  bounded scans typecheck; call sites pass owned bounds
- add .as_slice() to redb byte-literal call sites in tests
- close() sends the close request before marking the session
  closed (round_trip refuses closed sessions, so close always failed)
- conformance test reopens its read txn after the remove instead
  of comparing against a stale pre-remove snapshot
@dezren39
Merge remote-tracking branch 'origin/xaltha/12801-tenant-store-adapte…
f680130
…r' into oc-code-04/12801-takeover
@dezren39
test(id-store): import ReadableMultimapTable in turso conformance test (
658df27
#12801)

The row-store conformance test calls get() on a redb 5 read-only
multimap table; the trait providing it was not in scope, so the lib
test target did not compile. Fixes the test build only.
@dezren39
Merge remote-tracking branch 'origin/main' into xaltha/12801-tenant-s…
5a77abb
…tore-adapter
@dezren39
Merge remote-tracking branch 'origin/main' into HEAD
0621b77
@dezren39
Merge remote-tracking branch 'origin/xaltha/12801-tenant-store-adapte…
f8f5f87
…r' into code-f/23653-tenant-backend-seam
@dezren39
test(id-store): expose missing compacted tenant table against native …
4ca508d
…oracle
@dezren39
refactor(id-store): share event persistence writes over RowWrite
9a7141a
Introduce storage-only RowWrite (get/put/multi_put) with native redb and
tenant Torudo/SQLite adapters. Port existing store_event, store_body,
store_chain and store_fork onto it so native ingest and TenantStore share
one persistence implementation. Tenant writes are explicit transactions;
dropping without commit rolls back, failing commit closes the session.

Add an opt-in SQLite pipeline fixture under id-events tests comparing
persisted rows against the native redb oracle, plus a partial-rollback
case. Mirror the missing native compacted table in the tenant schema.
@dezren39
test(id-store): harden transaction guard and fault coverage
3375dd6
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Explain Change →

Walkthrough

The change adds a Turso-backed tenant store and shared row transaction interfaces. EventStore now supports native and tenant backends through a common storage abstraction. Persistence and integration tests compare behavior across both backends.

Changes: Tenant persistence and shared event store

Layer / File(s) Summary
Row transactions and Turso tenant store
pkgs/id/crates/id-store/src/event_rows.rs, pkgs/id/crates/id-store/src/turso.rs, pkgs/id/crates/id-store/src/event_types.rs, pkgs/id/crates/id-store/src/lib.rs, pkgs/id/crates/id-store/Cargo.toml, pkgs/id/src/lib.rs
Adds row read/write interfaces, transaction lifecycle handling, redb adapters, and a tenant transaction guard. Adds a Turso pipeline transport and SQL-backed TenantStore with schema and format checks, table validation, and single-value and multimap operations.
Backend-generic EventStore operations
pkgs/id/crates/id-events/src/event_store/backend.rs, pkgs/id/crates/id-events/src/event_store/mod.rs, pkgs/id/crates/id-events/src/event_store/{resolve,claims,compaction,anchors,chat,documents,sync,threads,writer_set}.rs
Adds EventStoreStorage implementations for redb and tenant storage. Generalizes EventStore over its backend and routes shared reads, writes, resolution, synchronization, and persistence helpers through row operations.
Row-based ingestion and recovery
pkgs/id/crates/id-events/src/event_store/{ingest,waiting_rows}.rs
Moves ingest decisions, waiting-row operations, expiry, and device-operation recovery to row-based transaction APIs. Recovery scans stored events in pages of 256 before scanning waiting rows.
Backend parity tests and verification records
pkgs/id/crates/id-events/src/event_store/persistence_tests.rs, pkgs/id/crates/id-store/tests/store_traits.rs, .github/test-suite-registry.json, doc/2026-11-24T22-25-00Z_refactor_e6_persistence_helpers/*, doc/2026-11-25T00-45-16Z_architecture_shared_event_transactions/*, pkgs/id/crates/id-events/Cargo.toml
Adds native-redb versus tenant-SQLite comparisons, transaction and failure tests, and paired EventStoreBackend integration tests. Adds the targeted test registry entry and records design and verification status in documents.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant EventStore
  participant TenantBackend
  participant TenantStore
  participant HttpTransport
  EventStore->>TenantBackend: with_write operation
  TenantBackend->>TenantStore: begin transaction
  TenantBackend->>TenantStore: run row operations
  TenantStore->>HttpTransport: send pipeline request
  TenantBackend->>TenantStore: commit or rollback
Loading

Possibly related issues

  • Issue 13145: The issue describes running EventStoreBackend and store_traits conformance over tenant storage. This change adds TenantBackend and native-versus-tenant parity tests.

Suggested reviewers: claude

Pre-merge checks: Passed 2

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(id): share EventStoreBackend with TenantStore" matches the main change. The PR makes the event store generic over a new EventStoreStorage trait, adds TenantBackend, and routes the Turs…
Full details: Title check

Explanation

The title "feat(id): share EventStoreBackend with TenantStore" matches the main change. The PR makes the event store generic over a new EventStoreStorage trait, adds TenantBackend, and routes the Turso TenantStore through the shared EventStoreBackend implementation. The title is short, specific, and states the primary change. It omits the row-transaction and Turso adapter parts, which the title does not need to cover.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution timed out
Clippy (1.99.1) exceeded its 180-second time budget. Findings from completed work are retained; remaining checks are incomplete.

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
All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39 dezren39 mentioned this pull request Nov 24, 2026
feat(id-store): tenant DB store adapter, SQLite-over-HTTP row layer (E6 slice 1, #12801) #14439
Closed
@dezren39
docs(id-store): record expanded remote verification result
76b0b60
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
impl(pm-stack): E6 — tenant DB store adapter in id-store (#9083) #12801
Closed
3 tasks done
dezren39 added 13 commits November 24, 2026 18:13
@dezren39
id: route waiting rows through RowWrite
8d4e7a6
@dezren39
refactor(id-events): load resolution rows via backend seam
a4d7b7a
@dezren39
refactor(id-events): share resolution reads across row backends
1b9644b
@dezren39
fix(id-events): reborrow row transaction in settle
4efb0bf
@dezren39
docs(id-events): record shared transaction driver direction
5baf90a
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
eb469ec
…ackend-seam

# Conflicts:
#	doc/README.md
@dezren39
refactor(id-events): share write transaction lifecycle
19335d2
@dezren39
feat(id-store): add paged event row scans
727de7a
@dezren39
refactor(id-events): share bounded device recovery
c840560
@dezren39
test(id-events): use supported rows for transaction oracle
b157e38
@dezren39
fix(id-events): reborrow native transaction in shared driver
a90987e
@dezren39
Fix tenant transaction driver compile errors
418677e
@dezren39
Document transaction driver verification checkpoint
85158ed
@dezren39

dezren39 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Verification checkpoint for head 418677ea7b86901ac746e3a370a8a370fe61767c: Fleet run 45532509993 checked out the exact SHA and reports the targeted test command step successful (Turso row parity, persistence tests, recovery tests). GitHub Actions is still in post-command cleanup, so there is no terminal workflow conclusion or complete transcript yet. The preceding run #45531905747 failed before checkout because its dispatch ref was mistyped. Architecture note updated; full backend parity and laptop verification remain outstanding. Draft PR remains open.

All reactions

Sorry, something went wrong.

Uh oh!

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

dezren39 added 2 commits November 25, 2026 03:31
@dezren39
Merge current main into E6 backend slice
6525bc5
# Conflicts:
#	doc/README.md
#	pkgs/id/crates/id-store/src/lib.rs
@dezren39
test(id-events): specify tenant backend parity
3486c86
dezren39 added 17 commits November 25, 2026 03:49
@dezren39
test(id-events): require tenant event-store transactions
144bd9c
@dezren39
feat(id-events): add tenant transaction backend seam
0c99600
@dezren39
refactor(id-events): parameterize event store backend
f3bbd39
@dezren39
refactor(id-events): route shared reads through event rows
cfa5ea0
@dezren39
feat(id-events): share ingest and sync over tenant rows
c4e7d6d
@dezren39
feat(id-events): implement backend trait over tenant rows
7a65702
@dezren39
test(id-store): compare store traits across native and tenant backends
8ae6c6a
@dezren39
fix(id-events): query owned row keys as byte slices
cad63a2
@dezren39
fix(id-store): generalize store traits test helpers
399eab9
@dezren39
test(id-store): allow SQLite dev dependency for tenant fixture
b9eaca1
@dezren39
fix(id-events): adapt native unit tests to row backend seam
0eeb413
@dezren39
fix(id-events): import table reads in sync tests
24ffcc2
@dezren39
Merge current main into tenant event-store backend
9f08c62
@dezren39
Merge latest main into tenant event-store backend
9657e5b
@dezren39
Merge latest main into tenant event-store backend
e19bace
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
e5ffef3
…ackend-seam

# Conflicts:
#	pkgs/id/crates/id-events/src/event_store/ingest.rs
@dezren39
Use row reader for thread resolution
1a74c6a
@dezren39 dezren39 changed the title refactor(id-store): share persistence helpers across native and tenant rows feat(id): share EventStoreBackend with TenantStore Nov 26, 2026
@dezren39
dezren39 marked this pull request as ready for review November 26, 2026 18:11
dezren39 added 5 commits November 26, 2026 12:18
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
4686b8f
…ackend-seam

# Conflicts:
#	pkgs/id/crates/id-events/src/event_store/mod.rs
#	pkgs/id/crates/id-events/src/event_store/threads.rs
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
5dcd76c
…ackend-seam
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
948a8fc
…ackend-seam
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
8dc3bcd
…ackend-seam
@dezren39
Merge remote-tracking branch 'origin/main' into code-f/23653-tenant-b…
43602e8
…ackend-seam
@dezren39
dezren39 merged commit 2c9f115 into main Nov 26, 2026
1 of 2 checks passed

Uh oh!

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

@dezren39
dezren39 deleted the code-f/23653-tenant-backend-seam branch November 26, 2026 19:15
This was referenced Nov 26, 2026
impl(id): E6 remainder — run EventStoreBackend over the tenant row layer (#12801 follow-up) #13145
Closed
impl(pm-stack): E3 — SyncCoord + hosted sync ingress (#9083) #12798
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

impl(pm-stack): E6 — tenant DB store adapter in id-store (#9083)

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.