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 — id: design: Turso/libSQL journal fit (design + spike) (from #5681) · Issue #5865 · developing-today/code

id: design: Turso/libSQL journal fit (design + spike) (from #5681) #5865

New issue
Copy link
New issue
Copy link
Closed
#8347
Closed
id: design: Turso/libSQL journal fit (design + spike) (from #5681)#5865
#8347
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/designA design proposal (design-architect): multi-step, phased, decision-bearingpriority/normalOrdinary priority (the default)status/triagedTriaged and routed (see agent note)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 5, 2026
Issue body actions

Summary

Follow-on design ticket from #5681 — its decomposition sketch names this as a separate design, and the parent's acceptance requires these tickets to be filed and linked. Filed in the 2026-11-04 gap pass (WS-F) so the design work exists and can be prioritised on its own merits; implementation timing is a separate decision, possibly months out.

What this design must settle

libSQL embedded replicas and primary replication composed with #806, with a small proof of concept.

Context from the parent

The parent design decides D1 vs Turso vs both for the serverless (Workers) edition and fixes the storage contract each backend must satisfy. The parent issue carries the surrounding decisions this ticket must not re-decide; where this ticket's answer would change a parent decision, record that explicitly rather than silently forking it.

Decision record expected

Close this design with a recorded decision (on this issue or in a doc/ record linked from it): the chosen shape, the alternatives rejected and why, and the invariants implementation must hold. If the design splits further, file the splits and link them here rather than growing this issue.

Relations

Parent: #5681. Programme: epic #2056. Filed by WS-F (2026-11-04 ID design gap & expansion pass).

Activity

Next
  1. dezren39
    added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Contributor
    More actions

    CODE-1548

  3. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    and removed
    queue/queuedHas a queued queue task
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    agent-note:v1

    • task: 10267
    • state: done (triaged; pickup and triage in one pass, lane code-h direct)

    Triage 2026-11-05 (task 10267): well-scoped follow-on design+spike ticket from #5681, verified open with no hard-stop labels and no decision record yet (only comment is the Kaneo link).

    Verified ordering context, fresh reads:

    • Parent design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681 (D1 vs Turso vs both for the serverless edition; storage contract per backend) is OPEN. This ticket composes libSQL embedded replicas / primary replication with id: F12.13 journal replication (read replicas over a signed stream) #806 under that contract, and must not re-decide it — so the spike can be built and measured now, but the closing decision record is ordered after design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681's backend decision, or must explicitly record which parent draft it was taken against.
    • Composition partner id: F12.13 journal replication (read replicas over a signed stream) #806 checked fresh (state recorded in the triage worklog for task 10267).
    • Added kind/design to match sibling tickets. Programme: epic epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056.

    Routing: no blocker on Drew. The spike (small proof of concept) is the evidence-producing step and is independently actionable; implementation timing beyond the spike is a separate later decision per the filing note.

  5. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  6. github-actions
    assigned
    dezren39
    on Nov 5, 2026
  7. dezren39
    added
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  8. 65 remaining items

  9. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    Agent note — task 14743 picked up direct, lane code-h

    • Worker: repo-worker-code, lane code-h (shift 2026-11-10 17:58 CST)
    • Task: task 14743 (design + spike) for issue id: design: Turso/libSQL journal fit (design + spike) (from #5681) #5865 — Turso/libSQL journal fit, from parent design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681
    • Lane assignment: direct (row 6257); this lane works the task itself per fix(queue): single-session by default — launch-on-handoff, lane works, inline triage (reverses #8097 Rule 3) #8187.
    • Revalidation (fresh): issue id: design: Turso/libSQL journal fit (design + spike) (from #5681) #5865 OPEN, no hard-stop labels. Parent design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681 still OPEN, but its decision record landed today (doc/2026-11-10_decision_id5681_serverless_storage.md): Drew's direction is BOTH with roles — Turso preferred, embedded replicas on endpoints — and the signed journal (id: F12.13 journal replication (read replicas over a signed stream) #806) is the system of record while every store is a materialisation of it. This design therefore does not re-decide D1 vs Turso; it settles how libSQL replication composes with id: F12.13 journal replication (read replicas over a signed stream) #806 given that direction, and flags no conflict with it.
    • Grounding already in hand: id: F12.13 journal replication (read replicas over a signed stream) #806's design (doc/2026-11-01_design_id806.md — single writer, signed stream of exact JournalEntry bytes, (ordinal, rolling digest) cursor, verify-then-persist replicas); the journal today is append-only fsynced JSONL (pkgs/id/src/world_store.rs); pkgs/id already carries a read-only libSQL HTTP adapter for foreign data (src/foreign_libsql.rs, id: implement Turso/libsql HTTP adapter v1 (read-only, live) per #5806 decision record #7577/id: design: Turso/libsql HTTP adapter (from #5672) #5806), which is a different seam from the journal store and must not be conflated with it.
    • Plan: spike the journal-entry mapping against a local libSQL primary (turso dev) on the laptop, write the decision record as doc/2026-11-10_design_id5865.md in the sibling shape, open and merge the doc PR, record spike results here, and file the embedded-replica sync spike as a follow-on packet if it cannot be executed honestly in this shift.
  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 10, 2026
  11. developing-today
    added
    status:in-review
    on Nov 10, 2026
  12. dezren39
    added 2 commits that reference this issue on Nov 10, 2026

    docs(id): address Codex P2s on the #5865 record — watermark regressio…

    e52ffb7

    Merge pull request #8347 from developing-today/queue/14743-5865-libsq…

    4251e53
  13. dezren39
    closed this as completedin #8347on Nov 10, 2026
  14. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 10, 2026
  15. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    Agent note — task 14743 DONE (decision record merged), lane code-h

    • Worker: repo-worker-code, lane code-h (shift 2026-11-10 18:05 CST)
    • Task: task 14743 (design + spike) for issue id: design: Turso/libSQL journal fit (design + spike) (from #5681) #5865 — Turso/libSQL journal fit
    • Outcome: decision record doc/2026-11-10_design_id5865.md merged via PR docs(id): Turso/libSQL journal fit decision record (#5865) #8347 (merge 4251e53); issue id: design: Turso/libSQL journal fit (design + spike) (from #5681) #5865 closed by the merge. The composition is decided: the id: F12.13 journal replication (read replicas over a signed stream) #806 signed stream is the only journal replication; libSQL replication is a materialisation accelerator inside one deployment; embedded replicas serve only up to a verified cursor; writes go to the primary from the single writer; access via the HTTP pipeline. No conflict with the design(id): serverless edition storage — D1 vs Turso vs both for id on Cloudflare Workers #5681 direction (BOTH with roles, landed in doc/2026-11-10_decision_id5681_serverless_storage.md) — consumed, not re-decided.
    • Spike results (record section 6.1, executed on the laptop): the journal table mapping (journal_entry with exact entry bytes and a (world_id, ordinal) primary key, plus journal_head) verified against the SQLite engine libSQL forks — ordinal-ordered storage and retrieval, byte-exact entry round-trip, duplicate-ordinal refusal by the primary key, and the head-consistency check as a single query.
    • Spike owed (record section 6.2): embedded-replica frame-sync behaviour could not be executed here — no sqld on the fleet laptop (turso dev refuses to start) and the turso shell is a CGO-disabled stub. Filed as follow-on spike id: spike: libSQL embedded-replica sync behaviour for the journal tables (#5865 follow-on) #8346 with the acceptance verbatim (sync latency, offline reads, backwards-head convergence firing the watermark regression check).
    • Codex review: two P2 findings on the first pass, both accepted and fixed in e52ffb7 — (1) fork refusal split into fork vs regression, with an independently retained verified watermark catching same-chain rollbacks whose digests still match; (2) compaction resets now archive the previous chain generation's exact entries (journal_entry_archive) under the id: design: backup, recovery & exit for serverless storage (from #5681) #5869 retention policy instead of discarding them. Re-review completed clean (no findings); both threads resolved.
  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 10, 2026
  17. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    Agent note — #8346 spike executed; results linked (lane any-d, task 20126, 2026-11-17)

    The §6.2 embedded-replica spike owed by this record (#5865) has been executed against a live sqld primary (libsql-server v0.24.32, @libsql/client 0.18.0). Full measured results are on #8346: #8346 (comment) — sync latency distributions (at-rest median ~18 ms), disconnect behaviour (no replica-mode cold-open offline in this client; local file serves last synced state), reconnect convergence (digest-identical), and the head-backwards restore case: the §5.4 regression check fires at the journal layer, while libSQL's own sync() succeeds silently and keeps the replica at its newer head — the retained-watermark comparison is load-bearing. Nothing measured contradicts §2.3's freshness model. The record's §6.2 is amended with an executed-results note in the accompanying doc PR.

  18. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    Agent note — §6.2 follow-on spike #8346 EXECUTED (task 20126, lane any-j, 2026-11-17)

    The embedded-replica sync spike this issue's record owed (§6.2 of doc/2026-11-10_design_id5865.md, filed as #8346) has been executed and the full measurements are recorded on #8346: #8346 (comment)

    Headlines for this issue's record:

    • Sync latency (cloud primary, pull sync): median ~0.36 s at rest, ~0.26 s under append load, full catch-up per sync; disconnect serves last synced state; reconnect converges.
    • One design-relevant finding: writes on an embedded-replica connection are forwarded to the primary, not refused — §5.1's one-writer invariant must be gated at the journal layer, not assumed from client behaviour.
    • The §5.4 regression case behaves as designed: the journal-layer check against the retained verified watermark fires on a head-backwards restore; the libSQL layer itself gives no signal (and does not converge backwards).
    • §2.3's freshness model is not contradicted; no amendment. A companion doc PR marks §6.2 executed in the record and links the results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/designA design proposal (design-architect): multi-step, phased, decision-bearingpriority/normalOrdinary priority (the default)status/triagedTriaged and routed (see agent note)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.