Repository navigation
fix(lint): resolve the MCP door's file tools read_file and create_upload_link in ai-skill-tool-unresolved - #35034
Conversation
The MCP door registers read_file and create_upload_link and offers a skill bound to them, but no cloud AI package registers either, so the lint rule reported both as unresolved. Add MCP_FILE_TOOL_NAMES to the spec's platform tool module, kept out of PLATFORM_TOOLS_BY_PACKAGE so each group there stays the exact set one cloud package registers, resolve it in the rule, and pin it equal to what registerFileTools registers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi6WQ71HhZSLSvHhdF
…OOL_NAMES Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi6WQ71HhZSLSvHhdF
📓 Docs Drift CheckThis PR changes 2 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 173 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 ec05934df73e316d5df9f252c4dad7208c48dd12 && git checkout ec05934df73e316d5df9f252c4dad7208c48dd12
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1282a464e9d27c2f8b86e69026087d1a1ff9b2df 6c6b36bafd8bb1678cec427ffcd9a5159dffc99b && git checkout -B drift-repro 1282a464e9d27c2f8b86e69026087d1a1ff9b2df && git merge --no-ff 6c6b36bafd8bb1678cec427ffcd9a5159dffc99b
node scripts/docs-audit/affected-docs.mjs --json 1282a464e9d27c2f8b86e69026087d1a1ff9b2df
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR 席位核对L1 review · REWORK (paper only; the code is accepted as it stands) · Head-sha: This is a full review: there is no earlier L1 record. I read the diff from merge-base Route. The card allows either route: list the tools in the registry, or have the rule resolve against the door's set, plus a test that holds the two equal. The PR takes the second route with that test. Keeping the pair out of Code.
Should-fix (blocks; paper only)
Nit
Owed, for the seat: the contract review (Clause-② yes). Its face is the lint rule's resolution contract against the two runtimes, plus the new |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR 席位核对L1 same-head review · ACCEPT · Head-sha: This follows L1 6964406129 (REWORK, paper only) at the same head. The code is unchanged.
No new findings. Owed, for the seat: the contract review (Clause-② yes). This comment readies, queues and arms nothing. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: PR #35034, card #34948. Read: the card body and its 4 comments (triage 6956215495, claim 6963114365, dev report 6964304624, claim amendment 6964425901), the PR body and its 4 comments, the net diff from merge-base Check-runs on this head, read 2026-11-17T23:5xZ: 0 failed. Green and relevant: Check Changeset, Governed Surface Queue Guard, PR-body guards, Spec property liveness, Build Core, Type Check source gates / consumer gates / debt ledger, every Lint job, Test Core 7/10. Still running: Test Core 1-6 and 8-10, Type Check workspace, Type Check UI, Test UI 1-16. The spec, lint and mcp suites that hold this PR's three pins run in Test Core, so their CI verdict is not in yet; this record does not stand in for it. ① Derived judgments
② Semver levelClause-②: yes (widening) — agreed. The diff adds one export and makes an advisory rule resolve two more names; it refuses nothing. Changeset ③ Boundary flags
④ Design judgment
S1 (should-fix) — the rule now resolves the file pair for a skill that no MCP connection can ever be offered, so it is silent on a reference the skill's only runtime drops.
S2 (should-fix) — the resolution ladder is restated as an exhaustive three-source list in places the PR did not update, one of them the published spec jsdoc for the field itself. The dev applied the rule "a published text this change makes false is fixed in the same PR" to
N1 (nit, carried from L1 6964438978) — the explanation says where the pair is served ("the file tools the MCP door registers") but not that an in-product chat turn runs without them, while the rule's finding text still describes an unresolved name as one "the runtime drops". For a skill offered on both surfaces the rule cannot know which one the author means, so silence is the right verdict there; the half-sentence belongs in the explanation. S1's fix rewrites this sentence, so it is closed there at no extra cost. N2 (nit) — the pin reads the door's set from N3 (nit) — #35036 will bring up to seven more door tools. A published export named for the file pair then either gains siblings or is subsumed by a wider door list; the second costs a deprecation. Nothing to change here; #35036 should decide the shape before it adds a second constant. No must-fix. S1 and S2 are open on this head and owe a delta review of their fix. Implemented-by: VERDICT: PASS |
A skill with mcpPrompt: false is never projected on an MCP connection and runs only in the in-product agents, where no cloud package registers read_file or create_upload_link, so the rule keeps reporting the pair there. State the limit in os explain, and update the three restatements of the resolution ladder (skill.zod.ts jsdoc, authoring-rules.ts and reference-integrity-suite.ts comments) that listed it as exhaustive. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi6WQ71HhZSLSvHhdF
|
repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR 席位核对L1 delta review · REWORK (PR body only; the code is accepted) · Head-sha: This reviews the delta from L1 6964438978 (ACCEPT at
Should-fix (blocks; paper only)
Nit
Owed, for the seat: the contract-review delta for |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR 席位核对L1 same-head review · ACCEPT · Head-sha: This follows L1 6965528282 (REWORK, PR body only) at the same head. The code is unchanged.
No new findings. Owed, for the seat: the contract-review delta for |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Delta review of Scope note: the delta adds Check-runs on this head, read 2026-11-18: 73 total, 0 failed, none running; the rest are success or skipped. Green and relevant: Test Core 1/10 to 10/10 and its roll-up (the lint, mcp and spec suites that hold the pins), Build Core, every Type Check job, every Lint job, Check Changeset, Governed Surface Queue Guard, Spec property liveness, PR-body guards. The first record's open point (pins not yet judged by CI) is answered: they are green. ① Derived judgments
② Semver levelClause-②: yes (widening) — agreed, unchanged by the delta. Against Changeset: still ③ Boundary flags
④ Design judgmentS1: closed S1, as read in the tree. S2, as read in the tree. The three in-PR restatements now name the fourth source and its condition, each agreeing with the code: the New on this head. S3 (should-fix) — the
N4 (nit, carried from L1 6965577916 N1) — the #34167 pin title at N5 (nit) — a N2 and N3 of the first record ride unchanged (accepted deviation, or #35036). Tried and held: a wildcard or a near-miss on a No must-fix. S3 is open on this head and owes a delta review of its fix. Implemented-by: VERDICT: PASS |
…tle the #34167 pin The mcpPrompt jsdoc said a skill's tools are validated as before under `false`, which #34948 made false for the MCP file tools. It now says the key changes nothing else at run time, and names the one authoring verdict that reads it. The #34167 pin title and comment say the same. Comment, jsdoc and test-title text only; no .describe() string, no generated file and no behaviour moves. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi6WQ71HhZSLSvHhdF
|
repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR 席位核对L1 delta review · ACCEPT · Head-sha: This reviews the delta from L1 6965577916 (ACCEPT at
No new findings. Owed, for the seat: the contract-review delta for |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract-review-claim: session_01WGufzgh1zkZzDXL36ckWAG · head |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Second delta review, of Scope note: Check-runs on this head, read 2026-11-18T01:32Z: 69 total, 58 success, 11 skipped, 0 failed, none running. Green and relevant: Test Core 1/10 to 10/10 and its roll-up (the lint, mcp and spec suites that hold the pins, the retitled one included), Build Core, every Type Check job, every Lint job, Check Changeset, Governed Surface Queue Guard, Spec property liveness, PR-body guards. The 11 skipped are opt-in or not-applicable jobs (Build Docs, Dogfood Verify CLI, Temporal Conformance, the queue verdicts and the like). ① Derived judgments
② Semver levelClause-②: yes (widening) — agreed, unchanged by the delta. Against Changeset ③ Boundary flags
④ Design judgmentS3: closed S3, as read in the tree. The
The sentence 6965662661 quoted as false (its N4, addressed. The #34167 pin ( Tried and held. A jsdoc edit that moved a generated description: it does not, the N2, N3 and N5 of the earlier records ride unchanged (accepted deviation, or #35036). No new nit on this delta. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzi6WQ71HhZSLSvHhdF Landing · area o3-I · 2026-11-18T01:36Z
|
Requested by Yibo Wang · project thread
Closes #34948
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
read_file或create_upload_link时,只要该技能会在 MCP 上提供(mcpPrompt !== false),os lint --strict不再报ai-skill-tool-unresolved。这两个文件工具由本仓的 MCP 入口提供,现在单独列在 spec 新常量MCP_FILE_TOOL_NAMES里。声明mcpPrompt: false的技能只在产品内对话里运行,那里没有这两个工具,所以仍然照报。PLATFORM_PROVIDED_TOOL_NAMES(MCP 桥接的工具注解读它,云端一致性测试也以它为准)。回滚就是 revert 本 PR。packages/spec/src/system/constants/platform-tool-names.ts(新常量,以及它为什么不放进云端分组);packages/mcp/src/mcp-file-tools.test.ts(把 MCP 实际注册的文件工具和这份清单钉死为相等);packages/lint/src/validate-ai-tool-references.ts(工具全集多读一份)。pnpm --filter @objectstack/lint exec vitest run src/validate-ai-tool-references.test.ts,预期 26 个用例全绿:resolves the MCP door's file tools通过、对照名upload_file仍被报;新对照still reports the MCP file tools on a skill kept out of MCP (mcpPrompt: false)确认mcpPrompt: false的技能绑定read_file仍报一条。What changes
@objectstack/spec/systemgainsMCP_FILE_TOOL_NAMES(create_upload_link,read_file): exactly whatregisterFileToolsin@objectstack/mcpregisters on a bridge carrying every file member. It is a separate constant, not a group inPLATFORM_TOOLS_BY_PACKAGE, so the registry's maintenance statement stays true (each group is the exact set one cloud package registers, with conformance tests in the cloud repo). It is also kept out ofPLATFORM_PROVIDED_TOOL_NAMES, whichmcp-server-runtime.tsreads to assertopenWorldHint: falseon bridged cloud tools; adding the names there would change MCP tool annotations. The ui label-parity test readsPLATFORM_TOOLS_BY_PACKAGEonly, so nochatbot.tool.NAMElabels are owed.ai-skill-tool-unresolved(packages/lint/src/validate-ai-tool-references.ts) resolvesMCP_FILE_TOOL_NAMESper skill, only whereskill.mcpPrompt !== false(helperofferedOverMcp; seat ruling in contract review 6964565007, S1). A skill its owner keeps out of MCP runs only in-product, where the pair is not registered, so it still resolves against stack tools,PLATFORM_PROVIDED_TOOL_NAMESandaction_*only, and its near-miss suggestions come from that same set.collectToolUniverseno longer carries the pair. Nothing that resolved before is reported now.os explain ai-skill-tool-unresolved(packages/lint/src/rule-explanations.ts) names the new source and its limit: the pair resolves only for a skill offered over MCP, an in-product turn runs without it, and amcpPrompt: falseskill is still reported. The rule's test checks the explanation names every source and the limit.packages/spec/src/ai/skill.zod.ts(thetoolsjsdoc),packages/lint/src/authoring-rules.ts,packages/lint/src/reference-integrity-suite.ts.content/docs/ai/tools.mdxandskills/objectstack-ai/SKILL.mdgo to skills objectstack-ai SKILL.md: the 'resolution ladder' section names three lint sources for tool names; MCP_FILE_TOOL_NAMES (#35034) makes four #35041.packages/spec/api-surface/system.jsonandpackages/spec/export-origins/system.json(one added export each).@objectstack/specand@objectstack/lint, patch).Tests
packages/lint/src/validate-ai-tool-references.test.ts: a skill bound toread_fileandcreate_upload_linkgets no finding. Control: a third name with the same shape that nobody registers (upload_file) is still reported atskills[0].tools[2]. New control pinstill reports the MCP file tools on a skill kept out of MCP (mcpPrompt: false) (#34948):{ mcpPrompt: false, tools: ['read_file'] }gives exactly one finding atskills[0].tools[0]namingread_file, and the same skill withmcpPromptabsent ortrueresolves cleanly. Theos explaincase requires the explanation to nameMCP_FILE_TOOL_NAMES,only for a skill offered over MCPand`mcpPrompt: false`.packages/mcp/src/mcp-file-tools.test.ts(new top-leveldescribe, in the file tools' existing harness):registerFileToolson a full bridge returns exactlyMCP_FILE_TOOL_NAMES, andvalidateAiToolReferences(aliased to lint source) resolves every name it registered. Control: a bridge with no file member registers nothing.packages/spec/src/system/constants/platform-tool-names.test.ts: the new list is snake_case, sorted, duplicate-free, shares no name with the cloud registry and sits in no materialised family.Acceptance notes
aggregate_records,delete_record,list_actions,run_action,resume_run,list_remote_tablesandimport_object, none of which is in the cloud registry. Measured at head 2397798 by callingvalidateAiToolReferencesfrom the built@objectstack/lintwith a skill binding all 16 door tools: those 7 names are still reported. This is the same family as this card. Whether a skill should bind each one is a separate decision (an action is reached asaction_NAMEthroughrun_action, for example), so it is reported to the seat rather than widened here.skills/objectstack-ai/SKILL.md("Naming the tools: the resolution ladder") andcontent/docs/ai/tools.mdx:193list three sources. Filed as skills objectstack-ai SKILL.md: the 'resolution ladder' section names three lint sources for tool names; MCP_FILE_TOOL_NAMES (#35034) makes four #35041 (blocked on this PR); the 7 other door tools are lint: ai-skill-tool-unresolved still flags seven tools the MCP door registers (aggregate_records, delete_record, list_actions, run_action, resume_run, list_remote_tables, import_object) — decide per tool and close the family (after #34948) #35036.rule-explanations.ts) and 6964615710 (the three S2 files).Verification
First round read against head
2397798975; the fix round (S1, S2) against head71597ee0a5.Fix round ablation (mcpPrompt guard removed, the new control goes red, restored)
At
71597ee0a5: lint 9213 passed, mcp 1253 passed, spec 27236 passed (1 todo); spec, lint and mcp typecheck exit 0;check:generatedexit 0 (nothing derives from the jsdoc);dispatch-gates --commands93 derived, 92 run, 1 NOT MEASURED (check:dual-build-cjs-loads, partial build); overlap-check clean. Delta report: #34948 comment 6965484702.Ablation (lint universe change reverted, both new pins go red, restored)
No rebuild was needed for this ablation: both suites read the lint rule from source (lint's own test imports it relatively, and
packages/mcp/vitest.config.tsaliases@objectstack/lintto../lint/src/index.ts).Package tests and typecheck
Generated artefacts and derived gates
pnpm --filter @objectstack/spec check:generated: api-surface and export-origins were stale; regenerated with--fix, then re-checked green.node scripts/pm/dispatch-gates.mjs --commandsderived 92 commands. All 92 were run, with exit codes recorded.--ranreconciliation: 92 derived, 91 run, 1 NOT MEASURED, 0 unrun.pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: it needs every workspace package'sdist/, and only the@objectstack/mcpdependency closure was built). CI runs it after a full build.check:dev-prereqs: NOT MEASURED for the same reason (workspace not fully built; thepackages/specdist was rebuilt bycheck:generated --fix).overlap-check.mjs --branch=claude/issue-34948-mcp-file-tool-names: VERDICT clean before each push.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzi6WQ71HhZSLSvHhdF