Skip to content

id: implement Residency step 4 — federation, relays and metadata (#5529) #9393

Closed

Description

@dezren39

Implementation step 4 of the residency design (#3398, doc/2026-11-01_design_id3398.md §7) for epic issue #5529.

Scope: pkgs/id — route policy for replicated projections and world participation (federation), approved relay selection, and discovery/observability metadata destinations.

Depends on: step 3 (native sync and hosted bridge checks for #5529) — start only after the step-3 implementation is merged.

Acceptance (design §3 rows + §7 step 4):

  • Jurisdiction partitioning is the default for federation; a cross-boundary shared world requires an explicit world-level policy and participant consent/disclosure.
  • A valid capability plus a destination outside the allowed set is denied and creates no replica.
  • Scoped routes use only approved, attested relays (relays are transport, never residency evidence); an unknown/unapproved relay or forbidden metadata destination never receives protected bytes or identifiers; changing to direct mode alone does not satisfy a strict transport requirement.
  • Discovery, logs, traces and metrics have explicit metadata destinations; tests cover forbidden relay metadata, direct-route limits and telemetry egress.

Filed by queue task 9596 (lane code-a) as the ordered follow-on split the design's §7 requires.

Activity

  1. developing-today commented on Nov 13, 2026

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

    @dezren39
    MemberAuthor

    Agent note — dependency-blocked on step 3 (task 15856, lane any-d, 2026-11-13)

    This step-4 packet states its own gate: "Depends on step 3 (native sync and bridge checks) — start only after the step-3 packet for issue #5529 is merged."

    Verified fresh 2026-11-13:

    So there is nothing to implement yet: starting step 4 now would build federation/relay residency on top of sync/bridge checks that do not exist. Task 15856 is registered blocked-by-issue #9392 (dependency block, 900s recheck cadence). Resume when #9392's step-3 work has merged; the packet's scope and acceptance criteria stand as written.

  3. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    work/assignedQueue worker lifecycle state
    and removed on Nov 13, 2026
  4. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/blockedQueue or user escalation state
    queue/blockedQueue or user escalation state
    on Nov 14, 2026
  5. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Agent note — state: picked up · task 15856, lane code-a

    Gate revalidated fresh (2026-11-14T04:35Z): step 3 (issue #9392) is CLOSED — PR #9412 squash-merged as bd307da (2026-11-13T10:51:46Z) with residency checks for native sync and the outbox. The step-4 gate in this packet is met, so implementation starts now in this session (direct assignment, row 7592): pkgs/id route policy for replicated projections and world participation, approved relay selection, and discovery/observability metadata destinations, per doc/2026-11-01_design_id3398.md §3/§6/§7 step 4 for #5529. Issue #9393 is OPEN with no hard-stop labels; labels synced to queue/claimed + status/in-progress.

  6. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    state: done
    task: 15856 · lane: code-a

    Step 4 is implemented and merged: PR #9717 squash-merged as 2ebd1ca (2026-11-14T04:39:49Z) — new id_events::residency_routes gate module per design doc/2026-11-01_design_id3398.md S3/S6/S7 step 4 for #5529: FederationGate (jurisdiction partitioning by default; cross-boundary shared world only with explicit world-level consent + disclosure naming the destination; no capability input; empty projection denied, denial creates no replica), RelayGate (only approved, attested relays selected; unknown/unapproved/revoked never selected; direct denied when a proven managed route is required), MetadataGate (discovery/telemetry/log egress only to destinations declared in the Metadata plane with current in-policy evidence).

    Gate revalidated before starting: step 3 issue #9392 CLOSED via PR #9412 (merged bd307da). Verification: cargo test -p id-events residency_routes 22/22 pass; full id-events suite 311 passed, 0 failed, 2 ignored; cargo fmt applied. Codex review hit usage limits (zero findings, same as step 3's PR #9412); CodeRabbit NEUTRAL. No PR-triggered CI covers pkgs/id paths (id-check runs on main). Step 5 of #5529 (hot-world spill + launch gate) remains its own packet.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions