Skip to content

id: implement fenced jurisdiction migration control plane #3404

Open

Description

@dezren39

Follow-up to #2283. Implement a resumable per-account jurisdiction migration state machine with pending target, durable migration ID, lease/fencing token, CAS routing epochs, maintenance, source freeze/drain and target activation. Never rely on directory state alone to fence stale writers.

Acceptance: all mutation paths including WebSockets, alarms, RPC and bridges honor the durable source fence; export waits for freeze acknowledgement; target is non-serving until switch; fault/concurrency tests cover ambiguous CAS, retries and stale epochs. Post-switch recovery is forward or a fresh reverse migration. Depends on directory, restricted routing and actual hosted write interfaces.

Activity

  1. developing-today commented on Nov 1, 2026

    @developing-today
    Contributor
  2. added
    kind/infrastructureInfrastructure / host-portability work
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    source/humanFiled directly by a human
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 1, 2026
  3. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: #2283 (parent), #3399 (directory), #3400 (restricted routing) — dependencies; #3402 consumes this control plane.

    Notes: Inline Acceptance present (all mutation paths incl. WebSockets, alarms, RPC, bridges honor the durable source fence; export waits for freeze acknowledgement; target non-serving until switch; fault/concurrency tests for ambiguous CAS, retries, stale epochs). The fencing-token discipline — never directory state alone — is the design invariant.

    Risks: Ambiguous-CAS and stale-epoch cases are where migration control planes corrupt data; the fault tests are not optional polish.

    Suggested approach: State machine + fence persistence first, freeze/drain second, activation last; post-switch recovery is forward-only or a fresh reverse migration, per the filing.

    — fleet monitor intake (2026-11-01)

  4. added and removed on Nov 1, 2026
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Picked up by repo queue worker lane C (task 5804) for revalidation against fresh GitHub state.

  6. added
    work/assignedQueue worker lifecycle state
    and removed on Nov 1, 2026
  7. 454 remaining items

  8. dezren39 commented on Nov 21, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked_up
    worker: repo-worker-code
    lane: oc-code-08
    task_id: 5804
    at: 2026-11-21T03:39:30Z
    note: Claimed task 5804; fresh validation in progress before source changes. Existing recorded owner-session binding will not be overridden.

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

    @dezren39
    MemberAuthor

    agent-note:v1
    event: parked
    worker: repo-worker-code
    lane: oc-code-08
    task_id: 5804
    at: 2026-11-21T03:40:45Z
    reason: Dependency gate remains unmet: #3399 and #3400 are OPEN with status/blocked, queue/blocked, user/escalated; phase 4 cannot proceed until both phases merge and hosted write interfaces are available. No source or worktree touched; no implementation PR exists.
    resume: After both dependencies merge and hosted write interfaces exist, revalidate #3404, labels, owner/session binding, and implementation PRs before implementation.

  11. removed
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 22, 2026
  12. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked-up
    task: 18262
    worker: repo-worker-code
    lane: code-f
    origin: openchamber-scheduled-lane

    Picked up triage for #3404. Fresh checks: #3404 OPEN; its required directory, restricted-routing and hosted-write prerequisites are not in main; issues #3399 and #3400 are both OPEN with blocked/escalated labels. No implementation PR for the migration control plane was found. I am recording the existing dependency gate rather than creating a duplicate implementation packet.

  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: blocked
    worker: repo-worker-code
    lane: code-f
    task_id: 18262
    at: 2026-11-22T01:15:30Z
    reason: #3404 explicitly depends on #3399 and #3400; both prerequisites remain OPEN and blocked, and the required migration interfaces are not yet available. Queue task 18262 is blocked on both issues.
    resume: When #3399 and #3400 are resolved and the directory, restricted-routing, and hosted-write interfaces are available, revalidate #3404 and continue triage.

  14. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Decided: Migration-control-plane engineering must not wait for a Cloudflare vendor-residency response; use the published #2285 mechanics evidence without claiming vendor guarantees, and keep production migration disabled until the actual directory, routing, storage, and hosted mutation-fencing prerequisites land.
    Why: #3399 records the owner gate discharged and says no residency answer is coming; #3400 records the same evidence boundary. The design document lists slices 2–4 and actual bridge/WebSocket contracts as technical prerequisites. Those are sequencing dependencies, not owner decisions.
    Undo: Revise the evidence boundary if new verified provider evidence changes the supported-runtime or residency contract; revise sequencing only with new implementation evidence.
    By: lane code-f (OpenChamber scheduled Fleet lane)}

  15. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: premise_checked_not_landable
    lane: KH (archer sandbox fix lane)
    at: 2026-11-23 ~07:20Z

    Picked up via fleet agent next shortlist (rank 3). Fresh premise + ownership check:

  16. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Checkpoint: PR #13037 adds a pure, local migration transition model and seeded/table-driven invariant tests. It covers source-active pending state, freeze/verify ordering, target non-serving until activation, epoch advancement, pre-switch abort, and no rollback after switch. It deliberately does not persist state or implement CAS, leases, durable fencing, mutation-path integration, export/import, or production enablement; this is a model-only checkpoint, not completion of #3404's acceptance criteria.

    Evidence: hosted-worker npm test (100 passed), npm run typecheck, JSON/test-path parity, and git diff --check all pass. Production migration stays disabled. Next implementation point remains after provisioning (#3403), directory (#3399), restricted routing (#3400), blob/directory policy (#3401), and the actual hosted write interfaces are in place; then integrate the model with durable state and fault/concurrency tests.

  17. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Progress — lane code-j: slice landed as PR #13167

    Implemented a pure migration phase state machine with phase-DAG transitions, routing-epoch CAS, fencing-token validation, freeze-ack gate before switch, pre-switch abort/token rotation, and irreversible post-switch recovery. Focused tests: cargo test -p id --lib hosted_migration — 12 passed, 0 failed on laptop at 3db2817897a. No directory persistence or hosted mutation entrypoint enforcement is included.

    Next slice: after this PR, cargo test -p id --lib hosted_migration should show durable directory CAS adapters can serialize/restore records and reject concurrent stale writes (requires #3399 / hosted directory interfaces).

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/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepic/id-programReprioritization program epic (2026-11-12)kind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions