Repository navigation
fix(runtime): comment doors answer on an objectstack serve / objectstack dev multi-tenant host instead of 404 ENDPOINT_NOT_FOUND - #36712
Conversation
…tstack dev` multi-tenant host instead of 404 ENDPOINT_NOT_FOUND Clause-②: no Metadata-protocol: none A multi-tenant host composed by the framework CLI (HonoServerPlugin + DispatcherPlugin + kernel-resolver) mounts no createHonoApp catch-all, so #36539's /comments dispatcher domain was unreachable there: AuditPlugin runs on the tenant kernel (no http.server) and DispatcherPlugin's fallback handed on only domain-decided and app-endpoint paths. Cloud's local rig runs apps/objectos this way, which is where the card's literal ENDPOINT_NOT_FOUND reading came from. DispatcherPlugin's fallback now hands exactly the three door shapes (bare or environment-scoped) to dispatch() on a multi-tenant host, with the request rebuilt as a Web Request carrying its original body, and writes the door's Response back unchanged. Other shapes and single-kernel hosts keep today's answers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZu8LTZdVjqiEi4pci
📓 Docs Drift CheckThis PR changes 1 package(s): 19 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. 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 fbe7c5205abeab7dc16e6162a5659265a0b16264 && git checkout fbe7c5205abeab7dc16e6162a5659265a0b16264
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b617675d2887f7b88e98a397011f70cf2004ae0c a91378cd59b13faf8a9aa137da394b62fb2242eb && git checkout -B drift-repro b617675d2887f7b88e98a397011f70cf2004ae0c && git merge --no-ff a91378cd59b13faf8a9aa137da394b62fb2242eb
node scripts/docs-audit/affected-docs.mjs --json b617675d2887f7b88e98a397011f70cf2004ae0c
|
The CLI package's test-layer typecheck reaches runtime source and refuses a Uint8Array over a possibly shared buffer as BodyInit (TS2322). Copy the raw body bytes into a plain view. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZu8LTZdVjqiEi4pci
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读评论的「取消表情回应」「标记已解决」「删除自己的评论」这三个操作,在用 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
Requested by Warren · project thread
Part of #36469
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack dev启动的云端运行时)里,取消表情回应、标记已解决、删除自己的评论不再报「接口不存在」。What changes
Measured finding. Cloud's local rig runs
apps/objectosunderobjectstack dev, the framework CLI's composition, which mounts nocreateHonoAppcatch-all. On that host the three comment doors answer404 {"success":false,"error":{"code":"ENDPOINT_NOT_FOUND","message":"Not found"}}whatever the framework pin, because #36539's/commentsdomain is reachable only throughdispatch(). The gap is in this repo'sDispatcherPlugin, so it reaches any multi-tenant host composed byobjectstack serve/objectstack dev, not only cloud's rig.The card's hosted reading was a literal
404 {"success":false,"error":{"code":"ENDPOINT_NOT_FOUND","message":"Not found"}}onDELETE /api/v1/comments/reactions/:id. #36539 left that spelling unexplained. This PR explains it and closes the gap it came from.Two host shapes serve a hosted environment.
apps/objectos/server/serve-node.ts. It mountscreateHonoApp({ prefix: '/api/v1' })under theHonoServerPluginraw app, so an unclaimed/api/v1/comments/**request reachesdispatch()and fix(comments): unreact, resolve and own-comment delete answer on a kernel with no http.server #36539's/commentsdomain. Cloud'smainpin moved to objectstacked0edb1b5on 2026-11-23 04:35Z (cloud#4929), which contains fix(comments): unreact, resolve and own-comment delete answer on a kernel with no http.server #36539 (d463c46f64). Whether that pin is deployed is cloud's fact and is not read here.scripts/dev-local/run-stack.sh, defaultSTART_CMD=dev) runsapps/objectosunderobjectstack dev: the framework CLI's composition, which isHonoServerPlugin+DispatcherPluginwith akernel-resolverand nocreateHonoAppcatch-all.AuditPluginruns on the per-environment kernel (cloud'shosted-slate.tsforcesaudit), which owns nohttp.server, so nothing mounts the doors on the host's route table.DispatcherPlugin's fallback seam hands on only domain-decided paths (/actions,/keys,/notifications,/mcp) and app-endpoint paths, so it declined, and the transport'sunmatchedResponseanswered. That is the card's exact body. The card was measured on this rig.The fix, in
@objectstack/runtimeonly:forwarded-door-fallback.ts(new, internal):matchForwardedDoorPathsays whether an unrouted request is exactly one of the three comment door shapes, bare or/environments/:id-scoped (it reusesmatchCommentDoorPathfromdomains/comments.ts).toWebRequestrebuilds the fallback'sIHttpRequestas a WebRequest(headers, query, original body bytes viarawBody()).sendWebResponsewrites the member'sResponseback unchanged,Set-Cookielines kept separate.DispatcherPlugin's fallback gains one arm, before the app-endpoint step: on a multi-tenant host, an exact door shape goes todispatch()with the rebuilt request, and aResponseresult is written through. Everything afterdispatch()is fix(comments): unreact, resolve and own-comment delete answer on a kernel with no http.server #36539's/commentsdomain, unchanged, including its authentication and membership gates.What does not change:
IHttpServer.setFallbackHandler的 Hono 实现 + dispatcher 端点派发步 + 路由台账登记 #5090).kernel-resolver) keeps today's answers byte for byte.Clause-② is
no: the arm routes only the three door shapes #36539 already declared (route ledger rows,/commentsdomain,ICommentDoorsService), with no new route, export or contract.Why
Card #36469 acceptance asks for the reaction removal, resolve/reopen and own-comment delete to work on a hosted environment, "本机 cloud rig 或 staging". After #36539 the staging shape works by construction, but the local rig, where the card was measured, still answered
ENDPOINT_NOT_FOUND.Verification
packages/runtime/src/dispatcher-plugin.comment-doors-multi-tenant.test.ts(new, 9): a realHonoServerPlugin+DispatcherPluginover a socket with akernel-resolverand a stub tenant member. Each door reaches the placed tenant's member, with the PUT body intact and the member's own headers on the answer. The environment-scoped spelling forwards at the wire path. Three non-door shapes (an extra segment, the wrong verb, GET) keep404 ENDPOINT_NOT_FOUNDand reach no member. An unplaced request is never served out of a tenant. A host with no resolver keeps404 ENDPOINT_NOT_FOUND.packages/qa/http-conformance/src/hono-comment-doors.conformance.test.ts(+3, 9 total): theobjectstack serveshape over the REALAuditPluginon a real store. A member removes their own reaction (200, row gone on the tenant). A member resolves, reopens, then removes their own comment (200 each, store follows). The anonymous refusal and the two refused bodies are byte-identical to the self-hosted mount.dispatcher-plugin.tshunk removed, restore proved bysha1 c3ac20dc…before and after):distrebuilt without the arm: the 3 new cases red. Each answered404 {"success":false,"error":{"code":"ENDPOINT_NOT_FOUND","message":"Not found"}}, the card's body byte for byte. Rebuilt with the arm: green.dispatcher-plugin*,*fallback*androute-ledger*: 25 files, 205 tests green.domains/comments.test.ts+dispatcher-plugin.multi-tenant-endpoint.integration.test.tsgreen. http-conformancehono-comment-doors9/9.typecheckexit 0. Runtimetsc --noEmitexit 0 and the new test file clean undertsconfig.test.json. Runtimecheck:test-typechecknames 3 untouched files (TS2307 on the unbuilt@objectstack/driver-turso, not built in this worktree). The previous round on this card recorded the same 3.--no-inline-configon the 4 changed source files: exit 0.origin/mainmerges cleanly, 0 open PR heads share a file.dispatch-gates --commandsat the base4034a6d2f8plus this diff: 68 derived, all run. 66 exited 0.check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: it needs every package'sdist/), so it is NOT MEASURED here and left to CI.check:test-source-aliascaught the new runtime test reaching@objectstack/metadatalazily inside a clocked case; fixed with a module-top import, now green.Not done here
objectstack devhost:/webhooks/redeliver,/approvals/act, and the/personal-viewsand/attachmentsdoors open in fix(hosted): personal-view delete and attachment remove/rename answer on a hosted tenant kernel instead of 404 #36690. Each would be one matcher row inFORWARDED_DOOR_MATCHERS. This PR does not add them; the seat decides whether to file them or let fix(hosted): personal-view delete and attachment remove/rename answer on a hosted tenant kernel instead of 404 #36690 add its own rows.comment doors mountedboot line) stays with the seat and the cloud lane.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.https://claude.ai/code/session_01JQwxbZu8LTZdVjqiEi4pci
Generated by Claude Code