Repository navigation
fix(rest, runtime)!: the /meta action doors and MCP list_actions serve an action entry as the object door projects it (ADR-0106) - #31104
Conversation
…er projection Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
…or and MCP list_actions Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
…d the object-less action judgment Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
…gh the action entry projection The /meta/action/:name/layers read (and its ?layers=true spelling) and the /published read answer a caller an action entry exactly as the plain item read does: an entry binding a field the caller cannot read, judged on the object each param names, is answered as a name with nothing behind it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
…s and MCP list_actions Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
📓 Docs Drift CheckThis PR changes 3 package(s): 13 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 39 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 f0f9611ef9fcae227f5873b3baca6d9805ac579a && git checkout f0f9611ef9fcae227f5873b3baca6d9805ac579a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 465c2bea3ae57c41332908bae2e4e932a235f325 c97eb416db5710fcd97a0193aa5f2f7433248331 && git checkout -B drift-repro 465c2bea3ae57c41332908bae2e4e932a235f325 && git merge --no-ff c97eb416db5710fcd97a0193aa5f2f7433248331
node scripts/docs-audit/affected-docs.mjs --json 465c2bea3ae57c41332908bae2e4e932a235f325
|
|
security#1 · os-tesla · session_01L9qibvynRbCtMndW8EHNGc Contract reviewServed-tier: Reviewed 2026-11-07T08:52Z on the face the changeset's Check-runs on this head at review time: every concluded run is success or skipped (PR-body guards, Governed Surface Queue Guard, Dogfood Regression Gate, Check Changeset, Check Documentation Links, Spec property liveness, Test UI, Flag docs affected). Nine are still in progress: Build Core, Build Docs, the four Type Check legs, the eight Test Core shards counted as their parent, the six Lint legs and Live E2E UI. The PASS below is conditional on those going green; a red among them returns the head to the dev, not to this record. ① Derived judgmentsThe one rule, as shipped. Accept-set changes, each judged:
Consumer hunt, on
No legitimate caller loses an answer it reads today. The accept set narrows for exactly one class: a non-exempt caller holding a ② Semver level
③ Boundary flagsJudged at rule level; mechanisms stay out of this record.
④ Design judgmentOne seam over
On the narrowing face the question is whether the narrowing takes a declared capability away at the consumer or makes the spec's own refusal real. It makes D1 real on the action doors for Implemented-by: VERDICT: PASS |
|
security#1 · os-tesla · session_01L9qibvynRbCtMndW8EHNGc Test Core (2/8) went red on this head (run 42356119351). The failure is not this PR's.
Generated by Claude Code |
|
security#1 · os-tesla · session_01L9qibvynRbCtMndW8EHNGc 席位核对ACCEPT · 2026-11-07T09:18Z · head
Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 42359300139 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
security#1 · os-tesla · session_01L9qibvynRbCtMndW8EHNGc
Clause-②: no (narrowing) — the
/metaactionreads (the list, the item read,/layerswith its?layers=truespelling, and/published, on both transports) and MCPlist_actionsnow answer a caller only the action entries the/metaobject door's projection serves that caller, which ADR-0106 D1 ("a field the caller cannot read does not exist for that caller, on any plane") already promises, so no stated contract is narrowed; what narrows is the answer to a caller with areadable: falsefield. Nothing is widened: no answer member, error code or status is added; the new exports are the shared projection the doors ask.Metadata-protocol: none
Skills-docs: no move —
skills/**teaches no/metaaction read;content/docs/ai/connect-mcp.mdxandcontent/docs/deployment/environment-variables.mdxstate the projection.维护者速读
/meta的action读取(列表、单项、/layers及?layers=true、/published,REST 与 runtime dispatcher 两端)与 MCPlist_actions,对每个独立动作条目按/meta对象门对该调用者的 ADR-0106 投影判定:参数绑定了调用者不可读字段的动作(按参数所指对象判定:有objectOverride取其目标,否则取动作的objectName;含无所属对象的 global 动作)不再列出,单项读取的回答与不存在的名字逐字节相同;list_actions对objectOverride参数的摘要改读目标对象的字段。/meta/object已隐去这类动作,但独立action条目的各个读取门与 MCP 的 global 动作仍未投影。readable: false字段的调用者是收窄(标题带!);动作所属对象的字段可见性无法评估时与对象门一样拒绝(FIELD_VISIBILITY_UNRESOLVED/ 503)。无限制调用者、D4 豁免者(manage_metadata、system)、无 security 服务或关闭掩码的部署逐字节不变;执行门(MCPrun_action、POST /actions)及其参数校验与拒绝文案不变。回滚即 revert 本 PR。packages/rest/src/meta-item-read-gate.ts(projectMetaActionForCaller及列表 7a、单项 4a、分层 3a 三步)、packages/runtime/src/domains/mcp-object-schema-mask.test.ts(新增的最后一个 describe)。pnpm --filter @objectstack/runtime exec vitest run src/domains/mcp-object-schema-mask.test.ts,预期Tests 45 passed (45)。What changes
packages/rest/src/meta-item-read-gate.ts—projectMetaActionForCaller(sources, action, ownerName): one action entry as this caller is served it. The action is projected as its own object's onlyactionsentry throughprojectMetaObjectSchemaover the posture related to that document (the object door'smaskDeniedFieldReferences→actionParamReadsDenied,objectOverridejudged on the object it names), not a second rule. Apassthroughposture serves the entry with no object read. An action with no own-object definition has only itsobjectOverrideparams judged, each on the caller's posture for the object it names; a posture that cannot be evaluated or is undetermined withholds it./publisheddoors answer it as a name with nothing behind it.projectMetaActionItemis the item-read entry the cached arm and the published doors ask.packages/rest/src/meta-item-read-routes.ts— the cached item arm (the default door foraction) asks the same projection, and judgesIf-None-Matchafter it, so a withheld entry is answered404, never304.packages/metadata-core/src/object-schema-fls.ts—actionObjectOverrideTargetsandactionServedWithoutOwnObject, the object door's own rule for an action with no own-object definition.packages/runtime/src/domains/mcp.ts—servedActionObjectdelegates toprojectMetaActionForCaller, so an object-less action is judged on the objects itsobjectOverrideparams name;listActionshandssummarizeActionthe served object of each override target.packages/runtime/src/action-execution.ts—summarizeAction,summarizeActionParamsandresolveDeclaredActionParamstake an optional object lookup and read anobjectOverrideparam's field on the object it names; a target the lookup does not resolve reads the own object's field, as before.enforceActionParamspasses no lookup, so the run doors' validation and refusal text are unchanged.packages/rest/src/rest-server.ts,packages/runtime/src/domains/meta.ts— each transport hands the item, layered and published chains itsobjectmasker (resolveObjectMasker).connect-mcp.mdxandenvironment-variables.mdxstate the projection. Changeset: a patch for@objectstack/metadata-core,@objectstack/restand@objectstack/runtime, the BREAKING banner and the ADR-0087not-requireddisposition.Tests
A new top-level
describeinpackages/runtime/src/domains/mcp-object-schema-mask.test.ts: the realSecurityPluginon a realObjectQLover a realSqlDriver, the protocol over that engine,RestServer's registered handlers (cached arm, and a deployment with the cache off) and the runtime dispatcher, plus the MCP bridge.field, and a global action'sobjectOverridefield) is not listed the action, and its item,/layers,?layers=trueand/publishedreads answer byte-identical to an unknown name, on every door. None of the field's label, help text or the param's label appears in the list.404, and the staff still revalidates304.list_actionswithholds the global action; anobjectOverrideparam is summarised with the target field's label and type.manage_metadataand the system context are answered byte-identical to the same caller with no security service, on every sub-door.resolveDeclaredActionParamswith and without the lookup (andenforceActionParamsunchanged);actionObjectOverrideTargetsandactionServedWithoutOwnObject.Acceptance notes
projectMetaActionForCallerreturnsservefirst) turns the 16 refused legs red (list, item,/layers,?layers=true,/publishedper door, the304leg, MCP global, and the two fix(runtime)!: MCP list_actions summarises each action against the object as the caller is served it (ADR-0106) #31075 legs) while the 29 controls stay green. Ablating the target-field lookup turns the two summary pins red./metadoors read an action's own object from its specobjectName;@objectstack/restcannot reach objectql's legacyobjectrung, so an entry carrying only that key is judged as object-less there.Verification
All on head
c97eb416db(origin/main merged in), under the verify lock:pnpm --filter @objectstack/metadata-core test— Test Files 25 passed (25), Tests 966 passed (966);typecheckexit 0.pnpm --filter @objectstack/rest test— Test Files 393 passed (393), Tests 7486 passed, 332 skipped (7818);typecheckexit 0.pnpm --filter @objectstack/runtime test— Test Files 553 passed (553), Tests 8909 passed, 19 skipped (8928);typecheckexit 0.pnpm --filter @objectstack/runtime exec vitest run src/domains/mcp-object-schema-mask.test.ts— Tests 45 passed (45).pnpm --filter '@objectstack/dogfood^...' build, thenpnpm --filter @objectstack/dogfood test) — Test Files 434 passed, 3 skipped (437), Tests 3596 passed, 41 skipped (3637).node scripts/pm/dispatch-gates.mjs --commands— 93 derived gate commands, all exit 0 (check:skill-examplesandcheck:dual-build-cjs-loadsre-run after their build prerequisite);--ranreconciles 93 derived, 93 run, 0 unrun.Generated by Claude Code