Skip to content

docs(skills,spec): name the dispatcher as the owner of the i18n routes - #37675

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-gvxx96-37625
Nov 27, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-gvxx96-37625

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37625

Clause-②: no (published prose and comments only; no behaviour changes)
Metadata-protocol: none

维护者速读

What changes

  • skills/objectstack-i18n/SKILL.md, Registration. Before: "It self-registers GET /api/v1/i18n/locales, /translations/:locale and /labels/:object/:locale; …". After: "The runtime's HTTP dispatcher, which os serve composes, mounts GET /api/v1/i18n/locales, /translations/:locale and /labels/:object/:locale, served from the i18n service; …". The rest of the sentence (the isDefault / sourceLocale clause) is unchanged. Checked on main: packages/services/service-i18n/src/i18n-service-plugin.ts:27-39 ("It mounts NO HTTP route", naming createDispatcherPlugin the one owner); packages/runtime/src/dispatcher-plugin.ts:1752, :1761, :1770 mount the three paths; packages/cli/src/commands/serve.ts composes createDispatcherPlugin.
  • Same file, methods list (the card's optional item). The getLocales() bullet gains getSourceLocale() / setSourceLocale(): both shipped implementations provide them (file-i18n-adapter.ts:302, :307; core/src/fallbacks/memory-i18n.ts:275, :280). getFallbackLocale() is left out: the file adapter has it (:285) but the in-memory fallback deliberately does not (its docblock at :254), and the list is "methods both shipped adapters implement".
  • Paid in the same file, no fact removed (6306 → 6333 tokens, ceiling 6333): "is not in node_modules to read" → "is not in node_modules"; "Methods implemented by both shipped adapters" → "Methods both shipped adapters implement"; "full snapshot for a locale" → "a locale's full snapshot"; "You do not wire this plugin" → "Don't wire this plugin".
  • Spec comments. The GetLocalesResponseSchema docblock (packages/spec/src/api/protocol.zod.ts) said the descriptor helper is shared by the dispatcher's /i18n domain "and service-i18n's autonomous route"; it now names the dispatcher as the route's one owner (service-i18n mounts none since runtime/service-i18n: the i18n paths have two owners, and the likely live one (the dispatcher) relays an undeclared 5xx's caught text unless it reads like SQL, so #23174's plugin-mount withholding may be shadowed (read from source, not yet measured) #23347). The toLocaleDescriptors comment (packages/spec/src/system/i18n-resolver.ts) now says both once served the route and the dispatcher owns it. Comments only: no schema, describe or export changes.
  • Changeset: @objectstack/skills and @objectstack/spec patch.

Small calls made here (no card): the skill names "the runtime's HTTP dispatcher, which os serve composes" rather than the internal createDispatcherPlugin name, which a client author cannot act on.

Why

Review N1 of PR #37614 (contract record 7197064778): a shipped skill stated a wrong fact about where the i18n routes come from.

Verification

Run at a359107dd, each exit 0:

The skill edit was drafted by a contract-tier subagent, as dispatch-gates --tier requires for skills/**, and checked here against the cited lines; the spec comments were edited here.

Contract review (L2) is owed before landing: skills/** is a governed surface (Tier H).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed (comments only; none change).
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj


Generated by Claude Code

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation protocol:system tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 2 changed file(s) yielded no anchor (packages/spec/src/api/protocol.zod.ts, packages/spec/src/system/i18n-resolver.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/spec/src/api/protocol.zod.ts, packages/spec/src/system/i18n-resolver.ts) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json dedc16c103a72b982daabc6f60df55cd6d890871 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a359107dd45cdb81463f11db53acd09ae5cb94a0
Local-runs: none
Scope: packages/spec/src/api/protocol.zod.ts, packages/spec/src/system/i18n-resolver.ts, skills/objectstack-i18n/SKILL.md + none
Security-touching: no

First round, full review (①–④). Inputs: card #37625 (body, triage comment 7197449571, claim 7202033347), the PR body and file list, the net diff against main (4 files, +26 −12) and the 69 check-runs on this head. Cited code was read on main at c2bfa3ef7c24; nothing was built or run.

① Derived judgments

  • Accept set: unchanged. Right. Both spec hunks sit wholly inside JSDoc blocks: the block above GetLocalesResponseSchema (packages/spec/src/api/protocol.zod.ts:4875-4878) and the block above toLocaleDescriptors (packages/spec/src/system/i18n-resolver.ts:4404-4406). Every changed line opens with *. No schema, no .describe() string, no export, no type and no signature moves.
  • Published surface: prose only. Right. The two docblocks ship as .d.ts comments, and protocol.zod.ts also as source (src/**/*.zod.ts in the spec package's files). No generated artefact on main carries the old docblock wording (the phrase autonomous route is found only in source and packages/spec/CHANGELOG.md), so the body's "generated artifacts: none change" holds.
  • Skill, route owner: right. createDispatcherPlugin mounts GET {prefix}/i18n/locales, /i18n/translations/:locale and /i18n/labels/:object/:locale (packages/runtime/src/dispatcher-plugin.ts:1752, :1761, :1770), prefix defaulting to /api/v1 (:987); os serve composes it with no prefix override (packages/cli/src/commands/serve.ts:5260-5278). I18nServicePlugin mounts no route (class docblock, packages/services/service-i18n/src/i18n-service-plugin.ts:27-52). "Served from the i18n service" holds: the /i18n domain reads whichever provider fills the i18n slot (packages/runtime/src/domains/i18n.ts:218).
  • Skill, method list: right. getSourceLocale() and setSourceLocale() exist on both shipped providers: FileI18nAdapter (packages/services/service-i18n/src/file-i18n-adapter.ts:302, :307) and the in-memory fallback (packages/core/src/fallbacks/memory-i18n.ts:275, :280).
  • Skill, getFallbackLocale() left out: right. FileI18nAdapter has the getter (:285) and no setter; the in-memory fallback has setFallbackLocale (:263) and deliberately no getter (its docblock at :254-262). Neither half of the fallback pair is implemented by both, so the heading "Methods both shipped adapters implement" is true only without them. A reader is told nothing false. The class "one provider each" goes unnamed, as it did before this PR, and a client still reads the declared chain off the locales answer (fallbackChain).

② Semver level

Clause-②: no

  • @objectstack/skills patch and @objectstack/spec patch match what the diff publishes: skill wording, and comments in two spec files. Metadata-protocol: none is right, since nothing an author can write changes, and none takes patch.
  • The body and the changeset carry the same two declaration lines. Check Changeset and the PR-body guards are green on this head.

③ Boundary flags

  • Dev flag, "names the runtime's HTTP dispatcher, which os serve composes, not createDispatcherPlugin": holds. The same skill sentence points at objectstack-platform → Runtime Boot Sequence, whose step 4 lists DispatcherPlugin in the os serve order, and no published skill names the factory. The body's stated reason (a client author cannot act on the name) is not the card's reader, who composes a kernel by hand; the outcome is the same, because that reader is sent to the boot sequence.
  • Dev flag, "four compressions, no fact removed": three hold as written ("is not in node_modules", "Methods both shipped adapters implement", "a locale's full snapshot"). The fourth changes mood, not a fact: N2 below.
  • open_questions: none on the card or the PR.
  • SQL push-down: not applicable. The diff holds no code, no query and no id materialisation.
  • Author: the PR's user.login is objectstack-fleet[bot], so no named-author note is owed.
  • Check-runs: 69 on this head, every one success or skipped, none red, none pending. The skill sits exactly at its token ceiling (the body reports 6333/6333; ratchet row scripts/check-skills-token-ratchet.mjs:751), so any later wording change in this file must be paid for in the same file.
  • Base: main has moved i18n-resolver.ts once since the merge base (feat(spec): Studio metadata-form select choices are translatable (metadataForms options slot) #37569), outside the edited docblock; the PR reads mergeable and the net diff is these four files.
  • Low-risk skills arm: the security line above reads no because no changed hunk teaches permission, sharing, credential, token or authentication behaviour. The hunks name a route's mount owner, add two accessor names and compress wording. The arm does not apply to this PR whatever that line reads: lowRiskArmVerdict (scripts/pm/check-governed-merges.mjs:2821) wants every changed path under a low-risk row or a rider pattern, and the two packages/spec/src/** files are neither; the changeset releases @objectstack/spec beside @objectstack/skills; and the body's Clause-② line carries a parenthesis where the arm reads a bare one. The PR stays Tier H and lands on an authorized approval.

④ Design judgment

skills/objectstack-i18n/SKILL.md — against the card's scenario (a developer who wires a kernel without the dispatcher expects the i18n routes from the service and gets none) and the tree on main. The card carries no eval prompt, and no eval under skills/objectstack-i18n/evals/ mentions the routes or these accessors.

  • The new Registration sentence removes the wrong fact and states the right one. It is also more accurate than the card asked for: the three routes exist whether or not I18nServicePlugin is installed, because the dispatcher bridges to the slot and the in-memory fallback fills it otherwise.
  • Tried to break it: path spellings, the default prefix, --no-server (no dispatcher, and no HTTP at all, so nothing is promised), and the @objectstack/hono catch-all, which reaches the same /i18n domain through HttpDispatcher. None contradicts the sentence.
  • The unchanged tail ("marks the default locale (isDefault) and names sourceLocale (the declared one, else the default)") still matches domains/i18n.ts:240-250.

packages/spec/src/api/protocol.zod.ts — the docblock now says toLocaleDescriptors is "called by the runtime dispatcher's /i18n domain, the one owner of the route (service-i18n mounts none since #23347)". Its only non-test caller on main is packages/runtime/src/domains/i18n.ts:241, and #23347 is the number the plugin's own docblock gives for the retirement. Holds. Comment-only.

packages/spec/src/system/i18n-resolver.ts — the toLocaleDescriptors comment now puts the two-provider serving in the past and keeps the history of why the helper is shared. It agrees with domains/i18n.ts:233-239. Holds. Comment-only.

No must-fix, no should-fix.

Nits, none of them fixable on this head without moving it (neither skills/** nor packages/spec/src/** is a prose face), so each is an accepted deviation or a follow-up card:

  • N1 (nit) — i18n-resolver.ts still states the retired fact twice outside the diff. The ResolvedFieldLabel docblock (the field-labels derivation; head :4485-4486) says "Both serving surfaces derive this map — the dispatcher domain body and service-i18n's autonomous route" in the present tense, and it is the docblock the edited comment now leans on ("Shared for the same reason resolveObjectFieldLabels is"). The normalizeSupportedLocales docblock (head :4439-4442) says either provider "can be the thing mounting GET /i18n/locales". The card listed two comments and the PR corrected those two. Comments only, no effect on the contract. Follow-up card, which can also take the same wording at packages/client/src/index.ts:8020 and i18n-resolver.test.ts:4000-4001.
  • N2 (nit) — "You do not wire this plugin" became "Don't wire this plugin". The old wording read as a statement that wiring is unnecessary under os serve; the new one reads as a prohibition. Explicit wiring is supported: serve.ts:4001-4004 detects an I18nServicePlugin already in plugins and :4024 skips auto-registration, and content/docs/kernel/services-checklist.mdx:448 and content/docs/protocol/kernel/i18n-standard.mdx:442 show new I18nServicePlugin({ localesDir }) for a hand-wired kernel, the card's own reader. The colon clause that follows gives the reason, so the meaning is recoverable. Accept, or restore the statement form when words are next available in this file.
  • N3 (nit) — getSourceLocale() is listed bare. It returns only what was declared and undefined otherwise: the contract leaves the collapse to defaultLocale to the caller (packages/spec/src/contracts/i18n-service.ts:159-170), and packages/runtime/src/app-plugin.ts:2901-2902 calls the setter only when i18n.sourceLocale is declared. The config table at the top of the same skill says sourceLocale "defaults to defaultLocale", and the Registration sentence says the HTTP answer collapses, so a reader calling the accessor may expect the collapsed value. The listed fact (both providers implement it) is true and the type says string | undefined. Follow-up card if the words can be paid for.

Out-of-diff notes for the same follow-up, ungraded: the Registration sentence does not say that the three routes answer signed-in callers only (domains/i18n.ts:209-216, the first statement of the handler), nor that the locales answer also carries fallbackChain (domains/i18n.ts:258-265). Neither omission is new in this PR.

Implemented-by: claude/project-thread-gvxx96-37625
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head a359107 · card #37625 · area s2-ux-T · 2026-11-26T21:00Z

L1 checklist

  • Shape and relation. l1-face.mjs --pr 37675 read 13 items and flagged none; the head's check-runs are all success or expected skip, none failed or pending. Four files: the objectstack-i18n skill, two comment-only hunks in packages/spec, and a changeset releasing @objectstack/skills and @objectstack/spec at patch, which matches a docs-and-comments diff.
  • Contract review. Record 7203257460 on this head: PASS, no must-fix, no should-fix. The route paths, their mounter (the runtime dispatcher), the provider-agnostic data source, the method list and the deliberate omission of getFallbackLocale() all hold against main; the spec hunks are JSDoc-only. Adopted. Security-touching: no; no security label.
  • Follow-up. Nits N1–N3 and the record's out-of-diff note go to follow-up card review follow-ups of PR #37675: retired i18n route-owner wording in spec/client docblocks; skill nits on plugin wiring and source locale #37695; none can be fixed on this head without moving it.
  • Governance. check-governed-merges.mjs: governed (skills/**), Tier H. The low-risk skills arm does not apply: two changed paths sit under packages/spec/src/**.

Tier: H. Landing: hand-off to the approver by the next stroke; ⛔ the seat does not merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-26T21:01Z · head a359107 · approver os-zhuang

维护者速读

  • 改了什么: 修正多语言技能(objectstack-i18n)里一句过时的说法:三个语言相关接口其实是运行时的 HTTP 分发器挂出来的,数据来自当前装着的多语言服务,不是多语言插件自己挂的。方法清单补上 getSourceLocale()/setSourceLocale(),getFallbackLocale() 因为两种实现各只有一半,故意不列。另外两处 spec 注释同步改正,只动注释。
  • 影响: 产品行为不变。按技能写应用的人和代理不会再去错的插件里找这几个接口。
  • 审核: 席位 L1 已 ACCEPT(本评论前一条)。契约审核 7203257460 PASS,逐句对照 main 都成立,没有必须改或建议改的项。三条小问题和一条范围外的提醒记在跟进卡 review follow-ups of PR #37675: retired i18n route-owner wording in spec/client docblocks; skill nits on plugin wiring and source locale #37695(另几处注释还留着旧说法、一句措辞读起来像禁止手动接入、取源语言的方法没写清未声明时返回空)。
  • 要你做什么: 技能文件是受管面,需要你批准后才能合并。撤回这一次合并即可恢复原文。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 26, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 26, 2026 23:40
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit b1490f2 Nov 27, 2026
75 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-gvxx96-37625 branch November 27, 2026 00:12
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:system size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review follow-ups of PR #37614

3 participants