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 — design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects · Issue #9083 · developing-today/code

design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects #9083

New issue
Copy link
New issue
Copy link
Closed
6 / 76 of 7 issues completed
Closed
design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects#9083
6 / 76 of 7 issues completed
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/lLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)priority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

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

Component E of epic #9078 (hosted editions program). Design first (design mill, under #9078).

What (Drew's sketch, 2026-11-12)

  • Per-user ID databases in Turso: each user gets their own hosted database(s), served and handled by Workers and Durable Objects (routing, auth, sync coordination, provisioning).
  • A central tenancy database: the registry of users, their databases, account state, and roles — the control plane the Workers consult.
  • Hosted per-user instances connect and sync their data (a user's local/native instance ↔ their hosted DB, both directions, with a conflict story).
  • A large public database we offer: everyone can connect to it too — public content published there is readable by all; how publishing works (component F's reference model) is designed with F.

Builds on / relations

  • id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811 — hosted Worker API + per-user DO provisioning and metering (the closest existing machinery; E must state whether it builds on, wraps, or supersedes it).
  • Turso + Cloudflare epic: epic: Turso + Cloudflare integration — databases, edge, gateway, and DNS #8987 (databases, edge, scoped credentials). Identity/accounts: SSO for fleet services: GitHub/Google/Microsoft login gated to Drew + devtoday OIDC provider with roles + account linking #9077 + component H under epic: hosted editions — PM service, ID service, and fleet tool as workable Cloudflare Workers equivalents (multi-tenant Turso/R2 architecture) #9078; roles from design(pm-stack): one identity across the stack — SSO propagation from the public entry into every layer, roles replace asserted authorship #1253. Store backends: component D. Blob jurisdiction isolation: id: isolate hosted blobs by jurisdiction and minimize shared directory #3401.

Open design questions

  1. Tenancy DB schema: what lives centrally (accounts, DB registry, roles, publish index?) vs per-user — and what must NEVER live centrally (content? keys?)?
  2. DO responsibilities: one DO per user? per DB? — routing, presence, sync sessions, rate limiting, metering (vs id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811's metering).
  3. Provisioning lifecycle: signup → tenancy row → Turso DB creation → credential issuance/rotation → suspension/deletion; who can do each step.
  4. Sync protocol: native instance ↔ hosted DB — change capture, ordering, conflict resolution, offline behavior; does sync ride component G's transports or direct Turso replication?
  5. Public DB: single shared Turso DB or a federation — write path (who may publish), moderation/abuse controls, and how per-user DBs reference its content (component F).
  6. Credential model for direct Turso access (component G): scoped, expiring tokens per user per DB — issuance and revocation from the tenancy plane.

Acceptance

  • Design merged under doc/ as part of epic: hosted editions — PM service, ID service, and fleet tool as workable Cloudflare Workers equivalents (multi-tenant Turso/R2 architecture) #9078's build-out: tenancy schema sketch, DO inventory, provisioning lifecycle, sync protocol, public-DB rules.
  • Relationship to id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811 decided and recorded.
  • Granular implementation issues filed under this issue.

Sub-issues

Collapse Sub-issuesSub-issues

6 of 76 of 7 Issues completed
Loading 7 sub-issues

Activity

Next
  1. dezren39
    added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    epic/pm-stackReprioritization program epic (2026-11-12)
    on Nov 12, 2026
  2. developing-today commented on Nov 12, 2026

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

    CODE-2787

  3. dezren39
    added a parent issue on Nov 12, 2026
    • epic: hosted editions — PM service, ID service, and fleet tool as workable Cloudflare Workers equivalents (multi-tenant Turso/R2 architecture) #9078
  4. dezren39 commented on Nov 12, 2026

    @dezren39
    dezren39
    on Nov 12, 2026
    MemberAuthor
    More actions

    Amendment applied (Drew 2026-11-12 17:03, epic #9078): PEER PRINCIPLE. The tenancy/sync design treats hosted-CF nodes, Rust-binary nodes, and clustered self-hosted nodes (component I, #9087) as the SAME participant kinds with different backends. Our own server is a peer, not a special case — no protocol special-casing; the only differences are backend complexity and possible ID-service clustering.

  5. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    MemberAuthor
    More actions

    INPUT from program #9106 (Drew, 2026-11-12 18:29 CST): tenancy gains a federation dimension — peer classes (fully trusted / send-only / accept-signed-from), signed-data-only acceptance, federated query fan-out, and reputation are designed in Part B of #9106 (#9141-#9148, under #9108). The tenancy DB's peer/account model should expect those classes as configuration; don't invent a parallel trust model here.

  6. github-actions
    assigned
    dezren39
    on Nov 13, 2026
  7. dezren39
    marked this as blocking 8 issues on Nov 14, 2026
    • Cache epoch and hot-result contract #10154
    • Separate canonical content ID from encrypted object locator #10155
    • Recommendation snapshot paging state machine #10158
    • Implement ordered lifecycle hooks and fixed acceptance gate #10192
    • Implement mode bundles and safe override precedence #10193
    • Define typed R2, laptop and Drive location values #10200
    • Signed user-attribute definitions and policy #10222
    • Append submission, mandatory pending gate and atomic approval #10237
  8. 29 remaining items

  9. dezren39
    added sub-issues on Nov 23, 2026
    • impl(pm-stack): E3 — SyncCoord + hosted sync ingress (#9083) #12798
    • impl(pm-stack): E4 — credential issuance/revocation service (#9083) #12799
    • impl(pm-stack): E5 — public plane: PublishIndex + publish/retract (#9083) #12800
    • impl(pm-stack): E6 — tenant DB store adapter in id-store (#9083) #12801
    • impl(pm-stack): E7 — documentation pass: user→tenant in #3811-era docs (#9083) #12802
  10. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done check passed — closing (Lane BZ, archer, 2026-11-22)

    Done check against main, per the 2026-11-22 flow-review instruction on this issue:

    • Design merged under doc/ as part of epic: hosted editions — PM service, ID service, and fleet tool as workable Cloudflare Workers equivalents (multi-tenant Turso/R2 architecture) #9078's build-out — PR design(hosted): tenancy architecture — per-user Turso DBs + a central tenancy DB (#9083) #11325 merged 2026-11-18 (merge 185f166edba); record on main at doc/2026-11-17T16-55-00Z_design_hosted-tenancy-architecture/ covering tenancy schema (§2), DO inventory (§3), provisioning lifecycle (§4), sync protocol (§5), public-DB rules (§6), credential model (§7).
    • Relationship to id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811 decided and recorded — design §9: build on id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811, do not wrap, do not supersede; metering stays where id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811 put it; "user" becomes "tenant".
    • Granular implementation issues filed under this issue — the §11 follow-up pass that never ran after the design PR landed. Filed today and attached as sub-issues of design(pm-stack): tenancy architecture — per-user Turso databases + central tenancy DB, served by Workers and Durable Objects #9083 (7/7), with §11 sequencing recorded as GitHub blocked-by dependencies:
      • E1 impl(pm-stack): E1 — tenancy schema + migration baseline (#9083) #12796 — tenancy schema + migration baseline
      • E2 impl(pm-stack): E2 — TenantOpsDO provisioning state machine (#9083) #12797 — TenantOpsDO provisioning state machine (blocked by E1)
      • E3 impl(pm-stack): E3 — SyncCoord + hosted sync ingress (#9083) #12798 — SyncCoord + hosted sync ingress (blocked by E1, E6)
      • E4 impl(pm-stack): E4 — credential issuance/revocation service (#9083) #12799 — credential issuance/revocation service (blocked by E1, E2)
      • E5 impl(pm-stack): E5 — public plane: PublishIndex + publish/retract (#9083) #12800 — public plane: PublishIndex + publish/retract (blocked by E1, E3)
      • E6 impl(pm-stack): E6 — tenant DB store adapter in id-store (#9083) #12801 — tenant DB store adapter in id-store
      • E7 impl(pm-stack): E7 — documentation pass: user→tenant in #3811-era docs (#9083) #12802 — documentation pass: "user"→"tenant" in id: implement hosted Worker API + per-user DO provisioning and metering (from #2046/#2852 slice 3) #3811-era docs

    Premise/singular-ownership check before this pass: issue open, no live claim by another worker in today's comments, no open PR referencing #9083; searches for TenantOpsDO / SyncCoord / PublishIndex returned only PR #11325, confirming E1–E7 were unfiled.

    All acceptance criteria pass — closing as completed. The implementation work continues in E1–E7 above.

  11. dezren39
    closed this as completedon Nov 23, 2026
  12. developing-today
    added
    status:done
    on Nov 23, 2026
  13. dezren39
    added 5 commits that reference this issue on Nov 23, 2026

    feat(id): tenancy schema + migration baseline (E1 of #9083)

    511c3a2

    docs(pm-stack): E7 — user→tenant in #3811-era docs (#12802)

    f47ed4a

    feat(id-store): tenant DB store adapter — SQLite-over-HTTP (Turso) ro…

    6b9deca

    Merge pull request #13042 from developing-today/xaltha/12796-tenancy-…

    32d964d

    feat(id): TenantOpsDO provisioning state machine (E2 of #9083, #12797)

    972ae2e
  14. developing-today-fleet
    added a commit that references this issue on Nov 24, 2026

    Merge pull request #14392 from developing-today/felix/12797-tenantops…

    9e955bb
  15. dezren39
    added a commit that references this issue on Nov 24, 2026

    feat(id-store): tenant DB store adapter — SQLite-over-HTTP (Turso) ro…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/lLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)priority/normalOrdinary priority (the default)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.