Repository navigation
Closed
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Description
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG
立卡门类别:④ 协调节点的子单,承父单 #34659(MCP 二期与问数专题);#34720 实测读出的契约缺陷,⛔ 不是认领。
Evidence: #34720 comment 6945257866 (live boot, both transports, origin/main f02f4f6); seat read confirms at 6dd5716.
维护者速读
- 做什么:让 stdio 通道的
list_datasets像 HTTP 通道一样,先按工作区默认语言把数据集成员标签翻译好再匹配和展示。 - 为什么:ADR-0149 D2 规定数据集目录"在元数据边界按调用者语言本地化",没有通道例外;现在同一个工作区、同一把密钥,HTTP 看到中文标签并能按「总金额」命中,stdio 只看到英文、按中文标签一个都不命中。
- 需要你做的:无。D2 已裁定 stdio 该怎么做;reading first: does list_datasets match a member's translated label from a translation bundle, or only an inline label map #34720 的跨语言匹配问题另走决策卡,与本卡无关。
现状 (objectstack origin/main 6dd5716)
- HTTP door:
packages/runtime/src/domains/mcp.ts:1520-1538loadDatasetsrunstranslateMetaList(…, 'dataset', items)withmetaRequestLocale(Accept-Language, then?locale=, then the i18n default). - stdio door:
packages/mcp/src/stdio-data-bridge.ts:1414-1420loadDatasetsreturnsgetMetaItems({ type: 'dataset' })(ormetadataService.list('dataset')) with no translation step; the file has no i18n read at all. packages/mcp/src/plugin.ts:312-319already says the stdio face speaks the workspace default inlocalization(requestLocale: undefined), but the dataset loader never applies it.- Live (reading first: does list_datasets match a member's translated label from a translation bundle, or only an inline label map #34720 comment): stdio on a copy of app-crm with
i18n.defaultLocale: 'zh-CN'shows English labels and matches 0 of 总金额 / 平均成交额 / 阶段; the same copy over HTTP with no header matches all three vialabel.
要做的
- stdio
loadDatasetstranslates the dataset list for the workspace default locale through the same translator the HTTP door uses (translateMetaListor the shared helper it wraps), resolving the i18n service the stdio host already has; no new locale source, no per-call locale. - A missing or throwing i18n service leaves the untranslated list (the HTTP door's fallback), not an error.
- Test: a stdio bridge over a dataset with a zh-CN bundle label and a zh-CN default answers
list_datasetswith the translated label andmatchedOn: "label"for the bundle term; anendefault keeps today's result.
不做的
- Matching other locales' bundle values or changing
dataset-term-matcher.ts(that is reading first: does list_datasets match a member's translated label from a translation bundle, or only an inline label map #34720's open fork, ruled on that card). candidates(spec: list_datasets answers a term with no match with acandidateslist, never selected; ADR-0149 D3 gains the amendment note #34761/service-analytics: list_datasets fillscandidateswith near members (name, label, synonym) on a zero-match, only from what the caller may read #34763); the HTTP door; a per-call locale on stdio.
验收
- The reading first: does list_datasets match a member's translated label from a translation bundle, or only an inline label map #34720 stdio row re-read on the zh-CN copy: zh-CN labels in the catalogue, 总金额 / 平均成交额 / 阶段 →
labelhits, the same as the HTTP control row. - The new test reds with the translation step removed.
Reader: domain:server · seat 3 area o3-F.
Blocked-by: none.
Dedupe: gh api -X GET search/issues -f q='repo:objectstack-ai/objectstack is:issue "stdio" list_datasets locale' → #34720 only (the reading card). … is:issue stdio-data-bridge loadDatasets → #34720, #31590 (closed, registered the tools), QA runs, #6015; none this.
Metadata
Metadata
Assignees
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first-touch audit → p2 confirmed ·
domain:server·pm:queuekept · 2026-11-17T11:02Z⛔ Not a claim.
list_datasetsnever localizes, so the same workspace and key match 「总金额」 over HTTP but not over stdio. This breaches ADR-0149 D2's "localized at the metadata boundary".packages/mcp→domain:server.objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
Claim: PM loop round 4 · 2026-11-17T11:14Z
Session:
session_01WGufzgwLiKcfujYUug7sPsAccount:
os-support-aiBranch:
claude/issue-34787-stdio-list-datasets-localeWorktree:
objectstack-issue-34787Domain:
domain:serverSeat:
repo:objectstack#3File surface:
packages/mcp/src/stdio-data-bridge.ts(theloadDatasetstranslation step),packages/mcp/src/plugin.ts(handing the stdio host's i18n service to the bridge, if it is not already reachable),packages/mcp/package.jsononly if the shared translator is imported from@objectstack/rest(no cycle:@objectstack/restdoes not depend on@objectstack/mcp), card-named tests underpackages/mcp/src/, root.changeset/Container & model:
S,mode:subagent(area o3-B),model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate),effort: highClause-②: no
Metadata-protocol: none
Responsibility:
n/a — contract gap read live on #34720, not a regression cardThread-read: 6946194074
Premise: holds on origin/main 3bbda33:
packages/mcp/src/stdio-data-bridge.ts:1413-1419loadDatasetsreturnsgetMetaItems({ type: 'dataset' })ormetadataService.list('dataset')with no translation step, and the file has no i18n / locale read; the HTTP doorpackages/runtime/src/domains/mcp.ts:1520-1538runstranslateMetaList(…, 'dataset', items)withmetaRequestLocale(falls back to the i18n default when no header);packages/mcp/src/plugin.ts~:318 documentsrequestLocale: undefinedwith the workspace default as the only locale stdio speaks.translateMetaListlives in@objectstack/rest(meta-item-read-gate.ts:3538, re-exported from the package root);@objectstack/mcpdoes not depend on@objectstack/resttoday, so reuse means either that new workspace dependency or a thin wrapper over the same helper; the dev measures and states the route chosen. Reach is the stdio door only.Serial constraints cleared:
overlap-check probe of the 3 named files vs origin/main 3bbda33b: clean exit 0; shares packages/mcp/package.json with open #33849, merging cleanly; no in-flight card holds stdio-data-bridge.tsPre-claim lane:
domain:server—packages/mcp/src/**; moved from area o3-F to o3-B by seat 3 (11:12Z, o3-F full)Pre-claim deps: no
Blocked-by:; milestone 1 of epic #34659 released (triage 6944629941); #34720's open cross-locale fork is NOT a dependency and stays untouchedPrior rulings read: stdio, list_datasets, locale, translateMetaList → 17 hits (ADR-0024 §3-5, ADR-0030 §2, ADR-0032 §3, ADR-0092 D1-D2, ADR-0098 §1, ADR-0101 D1-D2, …: generic locale / transport records, none answers this); the governing one is ADR-0149 D2 ("localized at the metadata boundary for the caller's locale", no transport exception). Out of scope per card and seat:
dataset-term-matcher.ts, other-locale bundle matching (#34720 holds for the maintainer),candidates(#34761/#34763), the HTTP door, a per-call stdio locale.Lease
o3-Bunder seat 3 (seat post #34584); child of epic #34659. Clause-② note:noholds while no export of@objectstack/mcpgrows; a fallback to the untranslated list on a missing or throwing i18n service mirrors the HTTP door.objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
os-dev-report
{ "issue": 34787, "status": "done", "branch": "claude/issue-34787-stdio-list-datasets-locale", "pr": "https://github.com/objectstack-ai/objectstack/pull/34833", "session": "session_01WGufzgwLiKcfujYUug7sPs", "premise_still_valid": true, "head": "f12cb94021", "files_changed": [ ".changeset/34787-stdio-list-datasets-locale.md", "packages/mcp/package.json", "packages/mcp/src/plugin.ts", "packages/mcp/src/stdio-data-bridge.ts", "packages/mcp/src/stdio-data-bridge.dataset-locale.test.ts", "packages/mcp/vitest.config.ts", "pnpm-lock.yaml" ], "summary": "The stdio bridge's loadDatasets, which both list_datasets and query_dataset read, now runs translateMetaList from @objectstack/rest. The sources mirror packages/runtime/src/domains/mcp.ts: i18n via ctx.getService('i18n') resolved at each use, a throwing resolver read as none; the merged protocol as the packaged base; metaRequestLocale(undefined, i18n), which falls back to the i18n default. No new locale source and no per-call locale. Route: the rest import, not a wrapper. translateMetaList also applies the packaged base, the pair bundle and the translate options, so a wrapper would diverge from the HTTP door. plugin-auth already imports it the same way. Measured cost: the mcp ESM entry goes from 17 to 25 packages at module init (379 to 400 modules). The 8 added (rest, metadata, observability, platform-objects, chokidar, glob, js-yaml, readdirp) are all already in the built cli entry's closure. Premise re-measured on 3bbda33b and it holds. Changes beyond the claim's file surface, each needed by this route: packages/mcp/vitest.config.ts (anchored src aliases for @objectstack/rest and @objectstack/service-analytics; without them check:test-source-alias would need new rows in its shrink-only ledger), a devDependency on @objectstack/service-analytics (the test's stand-in executor runs the real matchDatasetTerms), and two importer links in pnpm-lock.yaml.", "tests": "Head f12cb94021. Whole package: pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 under the lock: Test Files 67 passed (67), Tests 1230 passed (1230), VERDICT command-exit 0. pnpm --filter @objectstack/mcp typecheck: exit 0 (check:test-typecheck OK). New file src/stdio-data-bridge.dataset-locale.test.ts, 4 cases: zh-CN default gives the translated labels and 总金额/阶段 matchedOn label; en default keeps today's result; a throwing i18n resolver gives the untranslated list; no i18n gives the untranslated list. Ablation, fix committed first, scripts/ablation-replace.mjs: the anchor 'return Array.isArray(translated) ? translated : items;' was replaced by 'return items; /* ABLATED-34787 */'. Landing confirmed (anchor 1 to 0, blob 5dad1618 to 721eb27b). The zh-CN case went red: expected 'Opportunity Metrics' to be '商机指标', 1 failed and 3 passed. Restored: blob equals HEAD (5dad1618) and git diff HEAD is empty. The test reaches the subject through a relative import, so no dist sits on its path. eslint --no-inline-config on the 4 changed TS files: exit 0.", "live_readings": "The worktree's build, os dev in throwaway app-crm copies (deleted afterwards). Boot 1 minted a key; boot 2 used OS_MCP_STDIO_ENABLED and the key, drove stdio initialize plus tools/call, and HTTP POST /api/v1/mcp. zh-CN default: stdio and HTTP with no header are identical. Labels 商机指标 · 阶段/客户/成交日期 · 商机数/总金额/平均成交额. Matches: 总金额, 平均成交额, 阶段 and 客户 all as label; Total Amount and total_amount as name. 'Avg Deal Size' (the authored label of measures.avg_amount, not a member name) misses on both. HTTP en on the same boot: English labels; 客户 as synonym; Avg Deal Size as label. en default: stdio, HTTP with no header and HTTP en are identical: English labels; Avg Deal Size → measures.avg_amount · label; 客户 as synonym; Total Amount and total_amount as name. HTTP zh-CN on the same boot: the six zh-CN hits.", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack derived 84 commands, all run locally with exit codes captured before any pipe. 83 exited 0, among them check:test-source-alias, undeclared-dep-imports, workspace-manifest-cycles, lean-entry-closure, dts-closure, published-files, engine-double-contract, type-check-coverage and type-check-debt. pnpm check:dual-build-cjs-loads exited 3 (PREREQUISITE NOT MET: 14 packages unrelated to this change have no dist in this worktree) and is NOT MEASURED. Direct require of packages/mcp/dist/index.cjs: exit 0. dispatch-gates --ran with exit-annotated records: 84 accounted, 83 run, 1 NOT-MEASURED (derived from exit 3), exit 0. check-nul-bytes exit 0. overlap-check before each of the 2 pushes: clean exit 0 against origin/main, #34814 (shares stdio-data-bridge.ts), #34223 (pnpm-lock.yaml) and #33849 (packages/mcp/package.json). K rule: 1 first-parent commit from the merge-base to origin/main, below 15, no merge. CI check-runs: in_progress at report time.", "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2: (1) the relay pr_create through POST /repos/objectstack-ai/objectstack/dispatches (run 44084158564: draft PR #34833 plus the assignees leg os-support-ai; read-back identical, 12197 bytes); (2) this os-dev-report comment through post-stamped.mjs. Plus 2 git pushes, which are not REST.", "open_questions": [ { "question": "The dispatch asked for a final HTML-comment line in the PR body (signed: …). os-dev.md forbids dev-authored HTML comments, and on a conflict os-dev.md prevails. I followed the dispatch's exact text and read the body back: the line survived, identical (12197 bytes sent, 12197 stored). Should the seat keep this convention?", "options": [ "A: keep the signed line (it survived the read-back)", "B: drop it per os-dev.md" ], "recommendation": "A for this PR, because the read-back shows the line stored intact. Record the exception in os-dev.md if the convention stays." } ], "security_findings": "none", "out_of_scope_findings": [ "none filed. Acceptance notes only: (1) the stdio locale is the i18n default, as on HTTP with no header; plugin.ts EntryLocalization is not read; on these readings the two agreed. (2) As on HTTP, only a failed i18n resolution falls back to the untranslated list; a resolved service whose getLocales/getTranslations throws reaches the executor as a degraded read on both transports. carrier: none" ] }objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG
Claim amendment · 2026-11-17T12:36Z
Claim 6946458372, on PR #34833 @
f12cb940(o3-B's report 6948178219):@objectstack/mcpgains a runtime dependency on@objectstack/rest(no cycle) andloadDatasetscallstranslateMetaListwith the same inputs as the HTTP door. That meansctx.getService('i18n')per call; a missing or throwing service leaves the list untranslated; the locale ismetaRequestLocale(undefined, i18n), which falls back to the i18n default. No export of@objectstack/mcpgrows, soClause-②: noholds and no seat L2 is owed.packages/mcp/vitest.config.ts(anchored source aliases for@objectstack/restand@objectstack/service-analytics, whichcheck:test-source-aliasotherwise wants as ledger rows), a devDependency on@objectstack/service-analytics(the test runs the real matcher), and thepnpm-lock.yamlimporter links.Accept-Language. It hits under an en default, and on HTTP withAccept-Language: en. That is the ruling on reading first: does list_datasets match a member's translated label from a translation bundle, or only an inline label map #34720 (6946563869, the caller's-language label plus synonyms), not a gap of this card.Review: L1-a. Not governed (+221/−7).
objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
Delivered · 2026-11-17T13:47Z
6320abbae80c64ccb65a7b90c123e0bb4674b8e1); card closed byCloses. L1 ACCEPT 6948646042, landing 6948672954; Clause-② no, no L2 (seat amendment 6948225307).list_datasetsandquery_datasetread a dataset list translated for the workspace default locale throughtranslateMetaListfrom@objectstack/rest, the function the HTTP door runs, with the same inputs (i18n service per call, a throwing resolver read as none, the merged protocol as packaged base,metaRequestLocalefalling back to the i18n default). Live on an app-crm copy with a zh-CN default, stdio now equals HTTP with no header (总金额 / 平均成交额 / 阶段 / 客户 →labelhits). New runtime dependency@objectstack/mcp→@objectstack/rest(no cycle).pm:dispatchedremoved (card closed).