Skip to content

id(hosted): scaffold binding-backed per-user Durable Object #5199

Closed

Description

@dezren39

Child implementation step for #3811 / slice 3 of #2852, grounded in #2258 §5 and the #2046 ruling.

Scope

Add the first local-only hosted data-plane vertical slice: a Cloudflare Worker HTTPS/WebSocket front door that resolves an already-authenticated account/binding to a lazily created per-user Durable Object; use the stable binding_id from merged #3808 (never email or a rebindable key), and fail closed on missing/unsupported jurisdiction or mismatched/undefined DO jurisdiction. The same restricted jurisdiction namespace must produce the ID and stub; no unrestricted fallback. Bootstrap a versioned SQLite schema idempotently before serving. Reconcile the stale google:<sub> / userObjectId(sub) example in doc/2026-11-01_jurisdiction_aware_user_store_design.md against the binding_id contract in #2258, #3811, and pkgs/id/src/hosted_binding.rs.

Acceptance

  • A first request lazily creates one UserDO for the stable binding_id and initializes the schema; concurrent/retried bootstrap is safe.
  • Distinct binding IDs cannot access each other; missing/unknown jurisdiction and both ctx.id.jurisdiction undefined/mismatch cases fail closed before side effects.
  • Local Workerd/Wrangler tests cover routing, isolation, cold start, and schema bootstrap/retry.
  • Keep this as an isolated Worker package; do not run Iroh QUIC inside Workers.

Excludes / gates

R2 blobs/references, metering and caps are later bounded steps under #3811; production signed-object sync belongs to #3818. No account-level Cloudflare deployment, production binding/config, residency claim, or billable resource creation: #2285 remains open/escalated and #3403 blocked pending Drew authorization and verified account evidence. Use the merged jurisdiction design #3843 and the #2046 ruling; no new product decisions.

Related: #3811 #2852 #2258 #2046 #2283 #2285 #3403 #3808}

Activity

  1. added
    kind/featureNew feature or capability request
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/highImportant and time-sensitive
    queue/queuedHas a queued task in the Supabase agent queue
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: queued

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 4, 2026
  4. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up (small_fix, task 8897)

  5. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked (CI pending, task 8897)

    • Agent: queue worker (repo-worker-code), lane code-p
    • Session / ID: task 8897
    • Artifact: PR feat(id): hosted data-plane scaffold — binding-backed per-user Durable Object (#5199) #5286 (branch queue/8897-5199-hosted-worker, commit 933de63) — hosted-worker scaffold + jurisdiction design-doc reconciliation.
    • Verified before parking: node --test 4/4, smoke 15/15 across two local wrangler dev passes, tsc --noEmit clean — all on the laptop worktree. PR is MERGEABLE; the only check, basic: production line limit (2500), is still pending in the CI backlog (run 41775353789) after a 5-minute poll; every new production file is under 200 lines, so the check's substance is satisfied — resume should merge once it reports green (after reading any Codex findings per the merge gate).
    • Resume condition: PR feat(id): hosted data-plane scaffold — binding-backed per-user Durable Object (#5199) #5286 checks green → disposition any Codex/CodeRabbit findings → squash-merge → close task 8897 as fixed_merged.
  6. 2 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 4, 2026
  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Intake review

    🤖 Fleet monitor intake pass, 2026-11-03 run.

  9. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up (resume, task 8897)

  11. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (task 8897)

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/queue-workerFiled or worked by the queue/worker pilottask/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