Repository navigation
Closed
0 / 70 of 7 issues completedClosed
0 / 70 of 7 issues completed
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codeeffort/lLarge: multi-day or open-ended; expect staged check-insLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)Reprioritization program epic (2026-11-12)priority/normalOrdinary priority (the default)Ordinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
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
- Tenancy DB schema: what lives centrally (accounts, DB registry, roles, publish index?) vs per-user — and what must NEVER live centrally (content? keys?)?
- 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).
- Provisioning lifecycle: signup → tenancy row → Turso DB creation → credential issuance/rotation → suspension/deletion; who can do each step.
- Sync protocol: native instance ↔ hosted DB — change capture, ordering, conflict resolution, offline behavior; does sync ride component G's transports or direct Turso replication?
- 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).
- 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.
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codeeffort/lLarge: multi-day or open-ended; expect staged check-insLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)Reprioritization program epic (2026-11-12)priority/normalOrdinary priority (the default)Ordinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today commentedon Nov 12, 2026
CODE-2787
dezren39 commentedon Nov 12, 2026
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.
dezren39 commentedon Nov 13, 2026
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.
22 remaining items
Merge pull request #11325 from developing-today/queue/20279-9083-tena…
dezren39 commentedon Nov 22, 2026
Merged work, still open. Every pull request that references this issue has merged (#11325) and none is open, but the issue kept
status:in-review. Tasks that name it as a blocker have been waiting on it.status:in-reviewis removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").By: Claude, 2026-11-22 flow review.
Generated by Claude Code
dezren39 commentedon Nov 22, 2026
Component I adapter-design input from #9087: Self-hosted tier design. E/control-plane requirements are in “Component E/F boundaries”: authoritative tenant-scoped references and authorization, policy/holds and desired-vs-observed replica metadata, transactional/replayable outbox, and race-safe serialization of reference removal against GC. Physical replicas never grant access. This defines the boundary without deciding E’s tenancy schema or sync design.
dezren39 commentedon Nov 23, 2026
🤖 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:
185f166edba); record on main atdoc/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).TenantOpsDOprovisioning state machine (blocked by E1)SyncCoord+ hosted sync ingress (blocked by E1, E6)PublishIndex+ publish/retract (blocked by E1, E3)id-storePremise/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/PublishIndexreturned only PR #11325, confirming E1–E7 were unfiled.All acceptance criteria pass — closing as completed. The implementation work continues in E1–E7 above.