Repository navigation
docs(adr-0149): D3 rule 1 note — a member label matches as resolved along the caller's locale chain - #34928
Conversation
…'s locale only ADR-0149 D3 rule 1 said a member's label matches "in every locale". The maintainer's ruling 「A+C 本语言标签+同义词」 (ruling record 6946563869) and both transports hold it narrower: every locale of an inline label map, plus the translation bundle's label in the caller's locale; a word in another language hits only as an authored synonym. An add-only amendment note under rule 1 records it, and the term matcher's doc comment says the same. No behaviour change. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 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 193e37893e16b76a7be85a38fd5f69e814707130 && git checkout 193e37893e16b76a7be85a38fd5f69e814707130
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c81f498b5f0614157864d9586da718dbe02121b1 3d92094558cb3739ac60893c332786494aa88767 && git checkout -B drift-repro c81f498b5f0614157864d9586da718dbe02121b1 && git merge --no-ff 3d92094558cb3739ac60893c332786494aa88767
node scripts/docs-audit/affected-docs.mjs --json c81f498b5f0614157864d9586da718dbe02121b1 |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT · 2026-11-17T16:36ZHead-sha: 233683d 席位核对PR shape. Draft, base Governed / size. Declaration. Check-runs at 233683d, read at about 16:36Z. 56 runs, none failed. Already Against the ruling. I read 6946563869 on #34720. The option text quoted, 「A+C 本语言标签+同义词」, is byte-identical. The note carries each part of the ruling's execution:
Add-only. The ADR diff is 10 Each code claim, checked on this head. Every symbol anchor resolves:
Must-fixNone. Should-fixNone. Notes
Next: the seat's fable L2 (rules face), then the seat's Tier H record and os-zhuang. A later push owes an L1-c delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: Inputs read: card #34870 (body and its three comments: triage 6951462561, claim 6953575714, os-dev report 6954260196); PR #34928 body, file list (2 paths, +23/-3) and the net diff against Check-runs on ① Derived judgments
② Semver levelClause-②: no. Agreed. No changeset, label ③ Boundary flags
④ Design judgmentNo must-fix. One should-fix, owing a delta review. Three nits. S1 (should-fix) — "the caller's locale only … the bundle's values in other locales are not" is contradicted by the resolver the note cites.
Judged and found to hold:
Verdict on this head: PASS, with S1 open. S1 is a prose-face fix that moves the head; the delta review of that fix is owed before this record can clear. Implemented-by: VERDICT: PASS |
The D3 rule 1 amendment note said a bundle label is matched in "the caller's locale only" and that "the bundle's values in other locales are not" targets. The resolver says otherwise: lookupDatasetMemberAttr walks the requested locale through the platform locale ladder (variant expansion included), then the deployment's declared fallback locale (metaTranslateOptions), skipped when the caller's locale is the authored one. The note now states that chain, keeps "one value is served and only that value is a target", and names two worked cases. It also names the HTTP pair-translation corner when no i18n service resolves, says any other door to the executor owes the same translation step, and names the PR in its header. The matcher's module comment mirrors the chain in one clause. Prose only; no code changes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT (delta) · 2026-11-17T17:53ZHead-sha: 4b963c9 席位核对Delta. Prose only, on the same two paths:
The note is still add-only against L2 S1 and my N1: closed. The bundle point now names the chain, and I checked each symbol on this head:
L2 nits folded.
Anchors. Must-fixNone. Should-fixNone. Notes
Next: the seat's L2 delta, then the Tier H record and os-zhuang. #34943 folds the same wording, and its delta read follows. A later push owes an L1-c delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: DELTA review from Check-runs on ① Derived judgments
② Semver levelClause-②: no. Agreed, as before: no changeset, label ③ Boundary flags
④ Design judgment
No must-fix. No should-fix. Two new nits. The three earlier nits, folded in this delta, were re-read for new error and none was found:
New nits, neither affecting correctness or the contract:
Verdict on this head: the contract holds, S1 is closed and nothing graded is open. The red Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Regen-provenance: 6956500816 · Merge-only hop (pr_update_branch, main c81f498): |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT (merge-only) · 2026-11-17T18:24ZHead-sha: 3d92094 席位核对A clean main merge. The new head is a merge commit:
The PR's own diff is unchanged. The patch-id of the diff from the merge-base to The hop reruns CI after a runner red. That red was not the PR's doing, as o3-F's relay records. The ACCEPT's condition stands: Must-fixNone. Should-fixNone. Next: unchanged from my ACCEPT 6956307098. A later push owes an L1-c delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG 席位记录 · 2026-11-17T19:24ZHead-sha: 维护者速读(终稿)
席位意见:建议批准。L2 共两轮:
现在只剩 nit N1–N5,都不影响正确性。 席位核对
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44184901367 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzg1NmbJpZhtiWQkTir
Closes #34870
Clause-②: no
Metadata-protocol: none
Landing: Tier H (
docs/adr/**). This PR stays draft; no seat readies, queues or arms auto-merge on it.维护者速读
dataset-term-matcher.ts的文档注释改成同样的话。没有任何代码行为变化。dataset-term-matcher.ts顶部注释。pnpm check:adr-symbol-anchors,预期最后一行✅ check-adr-symbol-anchors: ... anchors across 158 records resolve(修订说明里新增的符号锚都能解析)。docs/adr/**)。What changes
docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md(10 lines added, 0 removed): an add-only amendment note, nested under D3 rule 1 so the numbered list stays intact. It follows the record's existing amendment-note form (the spec: list_datasets answers a term with no match with acandidateslist, never selected; ADR-0149 D3 gains the amendment note #34761 note after rule 5) and its measurement discipline (symbol anchors only; the line positions are below, not in the record). It states:candidatesoffer, never hit;Accept-Language, falling back to the i18n default; stdio has no request and translates for the i18n service's default locale; with no resolvable i18n service the catalogue is untranslated on either;packages/services/service-analytics/src/dataset-term-matcher.ts(doc comments only, +13 / -3): the module comment and theMatchableMember.labelcomment say the same words. No statement, type or export changes.Why
The decision text said a member's label matches "in every locale". The ruling on #34720, verbatim 「A+C 本语言标签+同义词」 (ruling record 6946563869), and the HTTP door hold it narrower. The note did not ride #34761's ADR note (PR #34828).
Code readings behind each claim (base
ab441988)File and line positions, measured at the base commit
packages/runtime/src/domains/mcp.ts:1542(loadDatasetsinsidedatasetToolMembers) runstranslateMetaListwithrequestLocaleat:1555=metaRequestLocale({ headers: context.request?.headers }, i18n). Headers only, so the locale isAccept-Language, else the i18n service's default.packages/rest/src/meta-item-read-gate.ts:3208metaRequestLocale:Accept-Language, then?locale=, theni18n.getDefaultLocale().:3538translateMetaListreturns the items untranslated when no locale resolves;:3286metaTranslateOptionsadds the i18n fallback locale as the lookup chain.packages/spec/src/system/i18n-resolver.ts:1907mapsdatasettotranslateDataset(:2626);translateDatasetMembers(:2545, label lookup:2562) writes the bundle string overmember.labelwhen the bundle answers, an inline map included (the doc block's "An inline locale map is never changed" sentence: the catalog applies to it).localeChain(:649) is the caller's locale plus the fallback chain.packages/services/service-analytics/src/dataset-tools.ts:365loads through the transport'sloadDatasets;:439hands the loaded (translated) members tomatchDatasetTerms. The matcher (dataset-term-matcher.ts,labelTargets) reads a string or each value of an inline map and never reads a bundle.packages/mcp/src/stdio-data-bridge.ts:1431-1458runs the sametranslateMetaList, withrequestLocaleat:1453=metaRequestLocale(undefined, i18n), the i18n service's default locale. This landed with fix(mcp): stdio list_datasets localizes the dataset catalogue for the workspace default locale #34833 (commit6320abba), the change made for card mcp: the stdio door's list_datasets never localizes, so its catalogue and label matches ignore the workspace default locale (ADR-0149 D2) #34787.Tests
No behaviour change, so no new test and no ablation. At head
233683d6:Typecheck and tests, service-analytics
pnpm --filter '@objectstack/service-analytics^...' build && pnpm --filter @objectstack/service-analytics run typecheck(under the verify lock):VERDICT command-exit 0,tsc --noEmitclean.pnpm --filter @objectstack/service-analytics test(under the verify lock):Test Files 218 passed (218),Tests 5548 passed | 335 skipped (5883),VERDICT command-exit 0.Acceptance notes
loadDatasetsapplies no translation step. Atab441988it does: fix(mcp): stdio list_datasets localizes the dataset catalogue for the workspace default locale #34833 (6320abba) made it run the HTTP door'stranslateMetaListfor the i18n service's default locale. The note states what the code does: on stdio the bundle label in the workspace default locale is a target, and an inline map's every locale is a target.candidateswith near members (name, label, synonym) on a zero-match, only from what the caller may read #34763) touchesdataset-term-matcher.tstoo.overlap-checkmerges it cleanly with this branch.skip-changesetlabel. The diff is an ADR (not published) plus doc comments in a published package. That is the fast lane's comment-only case, so nothing ships. An empty changeset was ruled out on purpose:check-empty-changesetrefuses a new one.Verification
At head
233683d6, change set derived bynode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(2 paths vs merge baseab4419881): 54 local commands run, 52 exit 0, 2 NOT MEASURED (prerequisites, not red).--ranreconciliation:54 derived famil(ies) accounted for — 54 run, 0 UNRUN.Selected verdict lines
pnpm check:adr-symbol-anchorsexit 0:✅ check-adr-symbol-anchors: 3740 anchors across 158 records resolvenode scripts/check-adr-links.mjsexit 0:✅ check-adr-links: 1150 relative link destination(s) under docs/adr/ resolvepnpm check:adr-indexexit 0:adr-index --report: OK — docs/adr/README.md is currentpnpm check:adr-anchorsexit 0pnpm check:nul-bytesexit 0:check-nul-bytes: OK (scanned 25983 text file(s) ... no raw ASCII control bytes)node scripts/check-issue-citations.mjsexit 0:✅ check-issue-citations: no issue citations added against ab4419881 (1 file(s) read);pnpm check:issue-citations(self-test) exit 0pnpm check:doc-authoringexit 0node scripts/pm/overlap-check.mjs --branch=HEADexit 0:VERDICT clean exit 0(origin/main13e0305c33and feat(analytics): list_datasets offers candidates for a term that matched nothing #34904)node scripts/check-plugin-teardown-shape.mjs --self-testexit 3, reason: its fixture is pinned to commit621a4876, which this shallow checkout cannot reach (checker health only, cannot judge this diff).pnpm check:dual-build-cjs-loadsexit 3, reason:PREREQUISITE NOT MET, no fullpnpm buildin this worktree. CI runs both.The repo-wide runs (
pnpm lint, the fullcheck:*farm,Test Core) are CI's.Fix round 1
Head
4b963c98answers the seat's L2 record (comment 6954921504, S1, with N1 to N3 folded in) and the L1-c ACCEPT's note N1 (comment 6954336709), which made the same point as S1. Prose only: no statement, type or export changes. The body's What changes bullet and the 维护者速读 line above were edited to match.lookupDatasetMemberAttrwalkslocaleChain: first the requested locale, read throughpickData/resolveBundleLocale(exact, case, platform table language, base language, variant expansion), then the deployment's declared fallback locale.metaTranslateOptionssupplies that fallback fromgetFallbackLocale(), andlocaleChainskips it when the caller's locale is the authored one (getSourceLocale(), elsegetDefaultLocale()). The note's bundle point now states that chain, says one value is served per member and only that value is a target, and replaces the clause with "no other bundle value is". It gives two worked cases. Azh-TWcaller against a bundle whose only Chinese locale iszh-CNis served thezh-CNlabel:resolveLocaleAmongstep 5, variant expansion. Afrcaller in a deployment authored in another language, with declared fallbacken, is served theenlabel when the bundle has no French one. The bold lead now reads "the one translation-bundle label resolved for the caller's locale". New anchors:i18n-resolver.ts#lookupDatasetMemberAttr,i18n-resolver.ts#resolveBundleLocale,meta-item-read-gate.ts#metaTranslateOptions. The matcher's module comment mirrors the chain in one clause, and itsMatchableMember.labelcomment says "resolved for", not "resolved to".metaRequestLocale(undefined, undefined)isundefined), sotranslateMetaListreturns the items untranslated. HTTP is different:Accept-Languagestill yields a locale, andpairTranslationBundleOfreads a declared override's pair bundle from the protocol.translateDatasetthen applies it throughlabelCatalogs. The note now names that one exception (anchormeta-item-read-gate.ts#pairTranslationBundleOf).ToolRegistry(D2) among them, supplies the executor'sloadDatasetsitself and owes the same translation step. The contract it points to isdataset-tools.ts#DatasetToolsDeps, whoseloadDatasetsdoc already says "localized at the metadata boundary for the caller's locale". No repository beyond those the ADR already names is cited.Fix round 1 verification, head 4b963c9
pnpm check:adr-symbol-anchorsexit 0,✅ check-adr-symbol-anchors: 3745 anchors across 158 records resolve(3740 at round 0, plus the five new anchors).pnpm check:adr-linksexit 0,1150 relative link destination(s) under docs/adr/ resolve.pnpm check:adr-indexexit 0,docs/adr/README.md is current.pnpm check:adr-anchorsexit 0.pnpm check:doc-authoringexit 0.pnpm check:nul-bytesexit 0,no raw ASCII control bytes.pnpm check:issue-citations(self-test) exit 0.node scripts/check-issue-citations.mjsexit 0,no issue citations added against ab4419881 (1 file(s) read).pnpm --filter '@objectstack/service-analytics^...' build, thenpnpm --filter @objectstack/service-analytics typecheck, both under the verify lock:VERDICT command-exit 0each,tsc --noEmitclean.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackgave 54 commands, all run. 52 exited 0. 2 are NOT MEASURED for the same reasons as round 0, both prerequisites and not reds.check-plugin-teardown-shape --self-testexited 3: the fixture commit621a4876cannot be reached from this shallow checkout.check:dual-build-cjs-loadsexited 3 withPREREQUISITE NOT MET: there is no full build here.--rangives54 derived famil(ies) accounted for — 54 run, 0 UNRUN. The derivation warned STALE TREE: this branch is 11 commits behindorigin/main, anddispatch-gates.mjsand its data file changed in that range. CI derives on its own tree.node scripts/pm/overlap-check.mjsexit 0:VERDICT clean exit 0, against origin/main46991d0eand feat(analytics): list_datasets offers candidates for a term that matched nothing #34904.Human Minimum
packages/specholds no runtime logic. (Not touched.)pnpm lintpasses. (Left to CI.)main, one pull request.skip-changeset.)packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code