Repository navigation
fix(runtime): a dispatcher door reads its service only from the request's own kernel - #39786
objectstack-fleet[bot] wants to merge 9 commits into
Conversation
…st's own kernel Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
… the request's own kernel Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
…t reading another kernel Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
…s in the door-own-kernel pins Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Label · 2026-12-05T02:53Z. |
📓 Docs Drift CheckThis PR changes 1 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 30 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 22444f285a8906559d67f624dd01d8a93b18ed73 && git checkout 22444f285a8906559d67f624dd01d8a93b18ed73
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 881809cf53e394c59704cb9ba100386fba74804a 1c383715cfbed5085900ede3ef0326fb5b05e74a && git checkout -B drift-repro 881809cf53e394c59704cb9ba100386fba74804a && git merge --no-ff 1c383715cfbed5085900ede3ef0326fb5b05e74a
node scripts/docs-audit/affected-docs.mjs --json 881809cf53e394c59704cb9ba100386fba74804a
|
|
repo:cloud@hotlong · hotlong · session_01Q4EjjQzFqHGjUAXt8kBQhV Answer (by code read of cloud main Hosted (
Self-host EE multi-env (
Single-env EE (
Side note: sharing is also unconditional ( A measured boot check is available if you need one. |
|
security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4 Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing makes the rule real against main: a slot the request kernel does not register is absent for that request, and the migration is stated.
The two should-fix block landing until a delta read closes them. Implemented-by: VERDICT: PASS |
… other identity read is the request kernel's Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
…uest kernel's auth Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4 Co-authored-by: Claude <noreply@anthropic.com>
Security-fix: seat-dispatched
Clause-②: no (narrowing)
Metadata-protocol: none
维护者速读
What changes
The rule: a dispatcher door reads its service only from the request's own kernel.
kernel-resolverplaces a request on a kernel of its own, every kernel-reading member ofDomainHandlerDeps(resolveService,resolveServiceOrLoud,classifyServiceOrLoud,getObjectQL, with or without an environment id) reads that kernel alone. A slot it lacks is absent, and the door gives its existing absent-service answer (501,503or an empty capability).ServiceReachtype: the identity step and the auth gate that judges the principal it resolved, and the HTTP transport slot (http.server, no environment's service; a same-origin forward is injected into the host's app, which places it in the request's environment).Tests
packages/runtime/src/domains/door-own-kernel.test.ts(71 cases): per door family (actions, automation, keys, activation gate, MCP authoring, MCP, meta, notifications, security, share links, knowledge), each slot the family reads, through every kernel-reading member, on a two-kernel fixture (host has it, request kernel lacks it: not served; request kernel has it: the request kernel's). Three doors driven through their real handlers (the host's member is never called). Posture read off the request kernel. What stays: one kernel, scoped factory, transport slot, identity step.http-dispatcher.tsrestored to the base commit, 68 of the 71 cases red; restored, 71 green.http-dispatcher.request-kernel-first.test.ts(an absent slot on the environment kernel is absent) andflow-start-confirmation-gated-target.test.ts(a failing request-kernel slot refuses the start503, nothing runs, and the host's instance is never read).Acceptance notes
mcp.tsneeded no edit: the rule lives in the deps the MCP door already reads.Verification
Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/door-own-kernel.test.tsprintsTests 71 passed (71).Read first, by risk:
packages/runtime/src/http-dispatcher.ts:classifyService(leg order) and thedomainDepsliteral (which reach each member reads with).packages/runtime/src/http-dispatcher.ts:resolveService(host leg condition) andServiceReach.packages/runtime/src/domains/door-own-kernel.test.ts: the net at the bottom.Local readings (head ef19e16)
@objectstack/runtimelocal test project, all files, in three runs: 252 + 208 + 209 files passed; 6277 + 3702 + 2872 tests passed (skips 6 + 19 + 2).pnpm --filter @objectstack/runtime typecheck: exit 0, test layer OK.plugin-hono-servermulti-tenant current-user endpoints 12 passed;http-conformancecomment doors 14 passed.dispatch-gates --ran: 75 derived, 73 run (all exit 0 after fixes), 2 NOT MEASURED:check:dual-build-cjs-loads(needs every package built, exit 3 PREREQUISITE NOT MET),check:type-check-debt(closure build over the foreground window). Both run in CI.Generated by Claude Code