Skip to content

id: implement Jurisdiction-aware per-user hosted stores (design #2283) #5523

Open

Description

@dezren39

Implementation of an ID design that has not landed yet (zero implementation as of the 2026-11-04 inventory).

Design issue: #2283
Design doc: doc/2026-11-01_design_id2283.md (in developing-today/code)

Acceptance, in brief: per-user hosted stores selected and scoped by jurisdiction per the design.
Current state: no jurisdiction logic anywhere in pkgs/id.

The design documents govern. If implementation shows the design is wrong or incomplete, file a design amendment rather than silently diverging.

Scope: pkgs/id and its tests. Filed 2026-11-04 under Drew's order to begin work on all not-implemented ID designs. Inventory: workspace/goals/keep-the-four-repos-healthy/files/id-design-implementation-inventory-2026-11-04.md (in the fleet workspace).

Activity

  1. developing-today commented on Nov 4, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Picked up by repo queue worker lane code-u for task 9590: implementing issue #5523 (jurisdiction-aware per-user hosted stores, design #2283) in pkgs/id. Revalidating against the design doc, then branch + PR per queue protocol.

  3. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Scoping findings for task 9590 (lane code-u) — blocking as packet_defect:

    The packet's premise is stale: it states "no jurisdiction logic anywhere in pkgs/id", but the hosted data-plane scaffold for #5199 merged in PR #5286 already implements a large part of design #2283 in pkgs/id/hosted-worker:

    • src/routing.ts: single routing module owning the raw USERS namespace; ID + stub derived only from ns.jurisdiction(jurisdiction) restricted namespace; fail-closed parseJurisdiction/parseBindingId (missing/invalid = error, no default-to-us, no unrestricted fallback); tests in test/routing.test.ts.
    • src/user-do.ts: per-user DO binds (binding_id, jurisdiction) immutably on first routed request; guard checks routed context, runtime state.id.jurisdiction mismatch, and persisted identity before any read/write.
    • src/worker.ts: front door strips client-supplied internal headers and routes only via the restricted namespace.

    What remains of the design is its own phased program, already tracked by open follow-ons — not one 45-minute small_fix:

    Two further packet defects: (1) its test scope names only cargo test for pkgs/id, but the jurisdiction surface is TypeScript in hosted-worker (the design itself says local Rust tests cannot establish these facts); (2) it prescribes the design doc's userObjectId(sub, jurisdiction) contract, while the merged #5199 implementation deliberately uses binding_id per the #2258/#3811 reconciliation and explicitly rejects google:<sub> derivation — that conflict must be resolved on #3400/#3399, not silently by a worker.

    Action: task 9590 blocked, reason class packet_defect. Issue #5523 stays open as the umbrella; the phase follow-ons above are the actionable units.

  4. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 4, 2026
  5. added
    epic/id-programReprioritization program epic (2026-11-12)
    and removed
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    on Nov 12, 2026
  6. 8 remaining items

  7. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · stale packet — umbrella already triaged today (task 15192)

    • Agent: repo queue worker, lane any-c (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-any-c run 2026-11-14; task 16716

    Task 16716 re-enqueues this issue as a single small_fix — the exact packet shape task 15192's triage (today, 2026-11-14T11:26Z, verdict note on this issue) evaluated and rejected: #5523 is an umbrella, its jurisdiction-aware hosted data plane already landed via #5199 (pkgs/id/hosted-worker routing with fail-closed jurisdiction parsing, per-user DO binding), and the remaining work is the phased program #3399–#3404 — the same slices the #5528 umbrella decomposition tracks (see also today's task 15194 triage, which filed the one unfiled slice, Phase 3 world blobs #9935 / task 16708). The packet's premise ("no jurisdiction logic anywhere in pkgs/id") is stale, as 15192 recorded.

    No work is duplicated here: task 16716 completes as triaged against the 15192 verdict, with follow_up_task_ids [] — the actionable units are the phase follow-ons (#3399–#3404, #9935), each carrying its own queue state. This issue stays open as the umbrella.

  8. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 14, 2026
  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triage (already triaged — duplicate of the verdicts of record)

    • Agent: repo-worker-code (Muse queue worker, lane any-a)
    • Session / ID: queue task 18313 · lane any-a
    • Found via: repo-health-code-pilot atomic claim (unfiltered one-queue claim; bulk-intake packet)

    This issue was triaged twice on 2026-11-14 — task 15192 (full re-evaluation under unblock-all) and task 16716 (same-day duplicate, completed against the 15192 verdict). Both verdicts stand and are re-confirmed this shift: the issue is unchanged since (OPEN, no comments after 2026-11-14T13:02Z).

    The verdict, briefly: #5523 is an umbrella whose premise ("no jurisdiction logic anywhere in pkgs/id") is stale — the jurisdiction-aware hosted data plane already landed via #5199 in pkgs/id/hosted-worker (fail-closed parseJurisdiction/parseBindingId, per-user DO binding, front-door header stripping, routing tests). The remaining work is the phased program, each phase carrying its own issue and queue state: #3399 (Phase 1 authoritative record), #3400 (Phase 2 reconciliation), #3401 (Phase 3 R2/D1), #3404 (Phase 4 migration control plane), #3402 (Phase 5 transfer/verify/cleanup), #9935 (Phase 3 world blobs), with #3403 (Phase 0 Cloudflare canary) not queue-actionable.

    The issue stays open as the umbrella; no duplicate follow-on is filed, and it should not be re-enqueued as a single small_fix. Task 18313 completes as already_done.

  10. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  11. removed their assignment
    on Nov 20, 2026
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

    epic/id-programReprioritization program epic (2026-11-12)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions