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: profile updates cannot change hosted jurisdiction (#3399 slice) by dezren39 · Pull Request #13301 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

Adds a guarded profile-update entry point for hosted account records
(#3399): updateHostedAccountRecord(record, patch) in
pkgs/id/hosted-worker/src/account-directory.ts.

  • A patch attempting to change jurisdiction to a different value
    fails closed with FailClosed (403, jurisdiction_immutable).
  • A patch with the same jurisdiction, no jurisdiction, or a null
    jurisdiction returns the record with jurisdiction,
    jurisdictionPending, migrationId, phase, and routingEpoch
    unchanged. The input record is never mutated.
  • Only the migration state machine may change those fields; no
    migration transitions are built in this slice.
  • createHostedAccountRecord behaviour is unchanged; provisioning.ts
    is untouched; no persistence or production signup is enabled.

This advances the #3399 acceptance criterion "profile updates cannot
change jurisdiction" (design
doc/2026-11-01_jurisdiction_aware_user_store_design.md §1–4:
"Normal profile updates cannot change it, even before first DO
creation").

Evidence

Verified by remote dispatch (fleet-command.yml workflow fallback;
fleet queue dispatch itself is blocked by the TLS defect #13185,
and the fleet-command runner image has no node on PATH, so the
dispatched command bootstraps Node 24.0.0 from nodejs.org first — the
test invocation itself is the same command CI runs in
.github/workflows/id-hosted-worker-tests.yml).

Failing first (tests-only commit e78a329ed,
https://github.com/developing-today/fleet/actions/runs/45180084636 —
failure):

SyntaxError: The requested module '../src/account-directory.ts'
does not provide an export named 'updateHostedAccountRecord'

After (commit 07e741dd8,
https://github.com/developing-today/fleet/actions/runs/45180524878 —
success), from pkgs/id/hosted-worker:

node --experimental-transform-types --test test/routing.test.ts
✔ binding id must be a minted 32-hex id
✔ jurisdiction must be present and supported
✔ hosted account metadata requires an explicit supported jurisdiction
✔ hosted account creation fails closed before metadata exists for absent or invalid jurisdiction
✔ hosted account metadata rejects invalid identity inputs
✔ profile update changing jurisdiction fails closed and leaves the record unchanged
✔ profile update with the same or no jurisdiction succeeds with routing metadata unchanged
✔ userStub takes id and stub from the restricted namespace only
✔ userStub fails closed when restriction is unavailable
ℹ pass 9
ℹ fail 0

Tests live in the existing test/routing.test.ts; no new test file,
so no test-suite-registry row is needed.

Merge Danger

Low. Pure validation/state construction in one new exported function
plus tests; no callers yet, no persistence, provisioning, or routing
changes. Revert-safe: removing the export breaks only the two new
tests.

Refs #3399.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T13:10:34Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/workspace/github-work/code-3399-profile-guard",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/workspace/github-work/code-3399-profile-guard",
      "repo": "developing-today/code",
      "branch": "xaltha/3399-profile-jurisdiction-guard",
      "sha": "07e741dd80ee445fa723f9de66b1d02951f1679b"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dezren39 added 2 commits November 23, 2026 12:57
@dezren39
test(id): failing-first profile-update jurisdiction guard (#3399 slice)
e78a329
Profile updates must not change hosted jurisdiction (design
doc/2026-11-01_jurisdiction_aware_user_store_design.md §1–4); the
guarded entry point does not exist yet, so these tests fail first.
@dezren39
id: profile updates cannot change hosted jurisdiction (#3399 slice)
07e741d
Add updateHostedAccountRecord: a guarded profile-update entry point
that fails closed (FailClosed 403 jurisdiction_immutable) when a patch
attempts to change jurisdiction, and otherwise returns the record with
jurisdiction, jurisdictionPending, migrationId, phase and routingEpoch
unchanged. Only the migration state machine may change those (design
doc/2026-11-01_jurisdiction_aware_user_store_design.md §1–4); no
migration transitions are built here. The input record is never
mutated. createHostedAccountRecord behaviour is unchanged.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ff3da227-4e0e-466c-abca-1c05182d94b6
Commits

Reviewing files that changed from the base of the PR and between fc43886 and 20a6e5e.

Files selected for processing: 2

  • pkgs/id/hosted-worker/src/account-directory.ts
  • pkgs/id/hosted-worker/test/routing.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 23, 2026
id: add immutable jurisdiction and migration metadata to hosted directory #3399
Closed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T13:13:12.269975Z 07e741d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 23, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07e741dd80

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/hosted-worker/test/routing.test.ts
);
});

test("profile update changing jurisdiction fails closed and leaves the record unchanged", () => {

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 23, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Cover profile-update immutability with property tests

The new helper enforces a routing-metadata invariant, but these tests exercise only one us record and one us→eu rejection. The testing doctrine in root AGENTS.md requires property tests for meaningful invariants; fixed examples alone do not satisfy that requirement. Add generated checks that differing non-null jurisdictions fail closed without mutating the input, while accepted patches preserve the complete record across supported jurisdictions.

AGENTS.md reference: AGENTS.md:L37-L39

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Nov 23, 2026
id: static raw-binding boundary test for restricted routing (#3400 slice) #13311
Merged
id: enforce restricted jurisdiction routing and object entry guards #3400
Closed
id: duplicate signup preserves hosted directory record (#3399 slice) #13325
Merged
id: partition-scoped world routing, names, and admission (from #3397 Phase 2) #3898
Open
id: isolate hosted blobs by jurisdiction and minimize shared directory #3401
Closed
id: implement verified resumable user-store migration and safe cleanup #3402
Closed
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch B disposition (oc-code-08, task 21623): not merged this run. Verification needs the laptop shell route, which is down from this lane (bridge hello shell leg: broker connection refused). Rebase of this conflicting branch would need a force push, which this batch excludes, so the next step is a merge-main-in commit once verification is reachable. Conflicting (DIRTY) with main; named blocker: verification route unavailable and rebase needs force push (excluded). Resume when a shell route to the laptop answers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
Merge origin/main into xaltha/3399-profile-jurisdiction-guard (Batch …
20a6e5e
…B merge-main-in, lane code-h)
@developing-today-fleet

developing-today-fleet Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Batch B verification (lane code-h, task 21623): merge-main-in pushed (20a6e5e onto fc43886, no force). Verified: npm run typecheck clean; test/routing.test.ts 11/11 pass (profile-guard fail-closed + no-mutation asserted via deepEqual, accepted patches preserve record, duplicate-signup preserved); full hosted-worker suite 138/138 pass. Codex P1 (generated jurisdiction checks) is test-strengthening: fail-closed without mutation and preserve-complete-record are already asserted on fixed vectors with named oracles. Recording P1 as follow-up, not a merge blocker.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 95e6167 into main Nov 24, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the xaltha/3399-profile-jurisdiction-guard branch November 24, 2026 02:59
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
Open-PR clearance programme 2026-11-24: every open PR merged, fixed+merged, or tasked #14166
Open
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
id: legacy inventory for hosted accounts of unknown jurisdiction (#3399 slice) #14340
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.