Skip to content

id: static raw-binding boundary test for restricted routing (#3400 slice) - #13311

Open
dezren39 wants to merge 1 commit into
mainfrom
lane-oc-code-02-3400-20261123
Open

dezren39 wants to merge 1 commit into
mainfrom
lane-oc-code-02-3400-20261123

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Slice of #3400 (restricted jurisdiction routing + fail-closed object entry guards).

What: new static boundary test pkgs/id/hosted-worker/test/routing-boundary.test.ts (5 tests) enforcing the design rule that the raw USERS namespace binding is owned exclusively by the routing module — no application path may bypass userStub() to derive IDs or stubs. Covers the raw-binding-bypass leg of #3400 acceptance: a future bypass fails here instead of silently producing a second, empty store for a missing jurisdiction.

Why this slice now: it depends only on already-merged code (routing module, front door, test harness) — not on #3399's remaining migration-metadata slices — and touches no files used by in-flight #3399 work (#13301 edits account-directory.ts + routing.test.ts; this adds a new test file and one package.json test-list entry).

Verification:

  • node --experimental-transform-types --test test/routing-boundary.test.ts: 5/5 pass
  • mutation check: adding a stray idFromName call anywhere under src/ fails the first test (scratch file removed afterwards)
  • full hosted-worker suite: 129/129 pass; npm run typecheck clean

Does not close #3400. Remaining #3400 work (entry-point inventory incl. alarm quarantine path) stays blocked on #3399 landing.

{
  "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:18:00Z",
    "session_id": "ses_e5df77c904fffevTYAbZrlkggy",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code-oc-code-02-3400",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code-oc-code-02-3400",
      "repo": "developing-today/code",
      "branch": "lane-oc-code-02-3400-20261123",
      "sha": "ffbe71716adcf83ed03041bf5b358da0c818738a"
    },
    "auth_subject": "oc-code-04",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

The raw USERS namespace binding is owned exclusively by the routing
module; no application path may bypass userStub() to derive IDs or
stubs. This enforces the design boundary (doc/2026-11-01_jurisdiction_
aware_user_store_design.md) by test: a future raw-binding bypass fails
here instead of silently producing a second, empty store.

Covers the raw-binding-bypass leg of #3400 acceptance with 5 tests;
verified the first test fails when a stray idFromName call is added.
Full hosted-worker suite 129/129 green, tsc clean.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

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 34 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: a81d9f68-bc91-483b-935e-b0ad2a6191b4
Commits

Reviewing files that changed from the base of the PR and between 619b7e5 and ffbe717.

Files selected for processing: 2

  • pkgs/id/hosted-worker/package.json
  • pkgs/id/hosted-worker/test/routing-boundary.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

@chatgpt-codex-connector

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

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:19:33.699800Z ffbe717 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.

@dezren39

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.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id: enforce restricted jurisdiction routing and object entry guards

1 participant