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: jurisdiction-aware per-user store routing (signup jurisdiction field, DO/blob/directory pinning) · Issue #2283 · developing-today/code

id: design: jurisdiction-aware per-user store routing (signup jurisdiction field, DO/blob/directory pinning) #2283

New issue
Copy link
New issue
Copy link
Closed
Closed
id: design: jurisdiction-aware per-user store routing (signup jurisdiction field, DO/blob/directory pinning)#2283
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Follow-up A from the Durable Object jurisdiction investigation on #2061
(doc: doc/2026-10-29T11-43-02Z_investigation_do_jurisdiction_pinning/).

Parent epic: #2056. Context: #2044 (Cloudflare Workers fit), §3 and §7.

What to design

Make the per-user hosted store jurisdiction-aware from the first request, without exposing a user-facing region choice yet.

  1. A jurisdiction field on the user record, written at account creation (default us, policy constant), immutable in the app layer from the first Durable Object creation.
  2. One ID-derivation function userObjectId(sub, jurisdiction) with no default argument — because idFromName("google:"+sub) and jurisdiction("eu").idFromName("google:"+sub) are different objects, a routing bug that drops the jurisdiction silently creates a second, empty user store (investigation §4.1).
  3. Restricted-namespace binding: select env.USERS.jurisdiction(<stored>) at runtime rather than using the unrestricted binding, so a mismatched ID throws instead of working (the unrestricted namespace "will not run into an error").
  4. A ctx.id.jurisdiction assertion on every identity-touching entry point, failing closed — including the two undefined cases (unrestricted namespace; alarm scheduled before 2026-03-15).
  5. R2 bucket per jurisdiction, bound with the jurisdiction field repeated in wrangler config; content-addressed dedupe becomes jurisdiction-local.
  6. The shared D1 directory's residency story: it has one jurisdiction for all users, so it must be data-minimal (hashed subject, public keys, public server records — never graph content) and documented as the single residency exception.
  7. The migration path as a first-class state, not an ops script: jurisdiction_pending + export → create in target → import → verify → switch directory record → delete. Signatures survive unchanged.

Out of scope

The user-facing region choice UI (design the field and routing now; ship the control when a customer needs it). Cross-jurisdiction shared worlds — that is follow-up B. Vendor-guarantee confirmation — follow-up C.

Acceptance

  • Design doc under doc/ covering the seven points above, with the failure modes named.
  • A concrete migration runbook sketch for a single account.
  • Follow-on implementation issues for whatever is buildable.

Acceptance criteria

  • Design doc under doc/ covers all seven numbered points in the body, with the silent-second-store failure mode (dropping jurisdiction in ID derivation) named and designed out
  • The ctx.id.jurisdiction assertion covers both undefined cases and fails closed
  • Migration path specified as a first-class state (jurisdiction_pending → export → create → import → verify → switch → delete)
  • A single-account migration runbook sketch is included
  • Follow-on implementation issues filed for the buildable parts

Activity

Next
  1. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1141

  3. dezren39
    added
    queue/queuedHas a queued queue task
    on Oct 29, 2026
  4. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  5. dezren39
    added
    priority/normalOrdinary priority (the default)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  6. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    Intake review

    Related: #2061 (investigation), #2044 (§3/§7), #2284/#2285 (siblings B/C), epic #2056

    Notes: Design-only issue; the field/routing design is deliberately ahead of any user-facing region UI (out of scope per body).

    Risks: The unrestricted-namespace silent-accept behaviour is the trap: any path that bypasses the restricted binding creates split-brain user stores.

    Suggested approach: Design the ID-derivation function and assertion first; R2/D1 residency stories follow from them.

    🤖 Agent note · filed

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-10-29T12:12Z (07:12 CDT)
    • Found via: monitor reconciliation
    • Task: Duty 2 intake enrichment — acceptance criteria appended (original body preserved verbatim above it), labels normalized, meta/enriched applied. Still-live check this pass: no merged PR or fix commit explicitly resolving this issue was found; where a queue triage task owns verification, it is named in the notes.
    • Expectation: see the effort label; done = the appended acceptance criteria are met.
    • Links: this issue
  7. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  8. 32 remaining items

  9. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-h
    • Session / ID: task 7877 (attempt 3)
    • Found via: queue claim
    • Task: Triage of issue id: design: jurisdiction-aware per-user store routing (signup jurisdiction field, DO/blob/directory pinning) #2283 (id: design: jurisdiction-aware per-user store routing) — execution lane assigned opencode; re-handing off to the laptop claimant (earlier attempts parked/expired without a terminal state; labels moved parked → claimed in this pass).
    • Expectation: the claimant's bound session triages issue id: design: jurisdiction-aware per-user store routing (signup jurisdiction field, DO/blob/directory pinning) #2283 at current main and drives task 7877 to its terminal state.
    • Links: n/a yet
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done — closing with evidence

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 7877 (triage)
    • Found via: queue claim; prior triage verdict (recorded in task 7877's park reason) re-verified fresh this shift per resume-don't-restart.
    • Verdict: the design this issue asked for is delivered on main: doc/2026-11-01_jurisdiction_aware_user_store_design.md (17,218 bytes). Its sections map to the issue body: "1–4. Authoritative record, routing and object guard" (jurisdiction field, userObjectId derivation, restricted-namespace binding, ctx.id.jurisdiction assertion), "5–6. Blob and directory boundaries" (per-jurisdiction R2, data-minimal D1 directory), "7. Migration protocol and single-account runbook", plus "Failure modes and verification".
    • Follow-ons: the buildable implementation issues are filed and open — id: add immutable jurisdiction and migration metadata to hosted directory #3399, id: implement verified resumable user-store migration and safe cleanup #3402, id: gate hosted jurisdiction provisioning on verified DO and R2 support #3403, id: implement fenced jurisdiction migration control plane #3404 (verified open 2026-11-03T19:10Z).
    • Action: closing issue id: design: jurisdiction-aware per-user store routing (signup jurisdiction field, DO/blob/directory pinning) #2283 as completed; the remaining work lives in the follow-on issues above.
  12. dezren39
    closed this as completedon Nov 3, 2026
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
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/mMedium: expected under 1 day of workkind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

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.