Repository navigation
fix(runtime): the personal-view and attachment own-door 501s follow the request's language, like the print door's - #37594
Conversation
…he request's language Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
📓 Docs Drift Check8 anchor(s) derived from 2 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 — 182 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 aff2fd6fa41533b4f08f01743882d53a4780a1ad && git checkout aff2fd6fa41533b4f08f01743882d53a4780a1ad
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6c290d3af7c52d019d1de1c09b6b0306f09700bb 9a610dc7157a35e3b9f241e3b28caa288b3f1818 && git checkout -B drift-repro 6c290d3af7c52d019d1de1c09b6b0306f09700bb && git merge --no-ff 9a610dc7157a35e3b9f241e3b28caa288b3f1818
node scripts/docs-audit/affected-docs.mjs --json 6c290d3af7c52d019d1de1c09b6b0306f09700bb |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Inputs read: card #37352 (body and its four comments, the claim 7194367121 and its amendment 7194982901 among them), PR #37594 (body, five-file list, net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Nit:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 9a610dc · card #37352 · area s2-ux-T · 2026-11-26T15:18ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
…he request's language (objectstack-ai#37639) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuPE7uyDAJyqjwwMzomWv5ff)_ Fixes objectstack-ai#37610 Clause-②: yes (widening) Metadata-protocol: none Skills-docs: none (no page under `skills/**` names these doors' `501` sentences) ## 维护者速读 - 用户能看到什么变化:内核缺少评论服务或 webhook 服务时,评论接口和 webhook 重新投递接口返回的 501 提示,现在会按请求的语言(中文、日文、西班牙文)显示,和同一内核上的打印、个人视图、附件接口一致。英文请求看到的英文和以前一字不差。另外,附件接口那句英文原来写成 "doors is not available",现在改成语法正确的 "are"。 - 为什么做:objectstack-ai#37594 的审核发现这两扇门还只说英文,附件那句英文语法也不对。 - 出错会怎样:只影响服务没装好时的 501 提示文字,状态码和错误码都不变。英文只有附件那一句变了(is 改 are),西班牙文附件那句改成复数。 - 要你做什么:无。`packages/spec` 的消息目录有改动,席位会安排契约审核。 ## What changes - **Catalog** (`packages/spec/src/system/operation-message.ts`, `BUILTIN_OPERATION_MESSAGES`), each in `en`, `zh-CN`, `ja-JP` and `es-ES`: - `comment_doors_service_unregistered`, `comment_doors_member_missing`, `webhook_redeliver_service_unregistered`, `webhook_redeliver_member_missing`. The English is the sentence each door answered before, byte for byte; slot, member and package names are written in, untranslated. - `own_door_service_unregistered_plural`, `own_door_member_missing_plural`: the bridge's two sentences with a plural verb (`are` / `no están disponibles`; `zh-CN` and `ja-JP` read as the singular pair). - `es-ES` `own_door_attachment_mutate` becomes plural ("los puntos de acceso para eliminar y renombrar adjuntos"), to agree with the plural pair. - **`packages/runtime/src/domains/comments.ts`, `webhooks.ts`**: the two `501`s each answer `operationUserMessage(key, { locale })`, the locale read by the bridge's own reader, now exported (`requestLocaleOf`, `own-door-bridge.ts`). Code, status and the absence of `userMessage` are unchanged. - **`own-door-bridge.ts`**: `OwnDoorBridge.nounKey` is required (the type is internal: `packages/runtime/src/index.ts` exports none of it); the English-only arm is gone. A new optional `nounPlural: true` makes the bridge read the `_plural` pair. `attachments.ts` sets it, so the English reads "The attachment removal and rename doors are not available: …". - **Changeset**: `@objectstack/spec` and `@objectstack/runtime` patch, with a paragraph saying the English moved for the attachment doors. Small calls made here (no card): - The card's third item suggested changing the attachment noun; the noun is already plural ("the … doors"), and the verb sits in the shared sentence, so the fix is a plural pair of sentences chosen by a bridge flag rather than a noun change. The English noun and its catalog value stay as they were. - The comment and webhook doors are not own-door bridges (each has its own sentence), so they get whole sentences in the catalog rather than the bridge's `{{door}}` template. - The old "a bridge with no noun key stays English" control test is removed with the arm it pinned. ## Why Review of PR objectstack-ai#37594 (record 7196010986, adopted at ACCEPT 7196077328) found the comment and webhook redelivery doors still answering English only, the optional `nounKey` that would let a fourth bridge ship English-only, and the attachment sentence's verb agreement. ## Verification Head `e2708e28c`, under `os-verify-lock`: - `packages/runtime`: `own-door-bridge.test.ts`, `comments.test.ts`, `webhooks-redeliver.test.ts`: 3 files, 79 tests passed. New describes pin both `501`s of the comment doors (on every door) and of the redelivery door in en (and with no header), zh-CN, ja-JP and es-ES, with no `userMessage`; the attachment pins now read "are" and the plural `es-ES` sentence. - `tsc --noEmit -p packages/runtime`: exit 0. - `packages/spec` `src/system/operation-message.test.ts`: 60/60. - `eslint` on the 8 touched source and test files: exit 0. - `node scripts/pm/overlap-check.mjs`: clean. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed (none depend on this catalog). - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj)_ <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgUpnvPnJ1hR74pUrVj --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
Fixes #37352
Clause-②: yes (widening)
Metadata-protocol: none
Skills-docs: none (no page under
skills/**names the own-door bridge or its501sentences)维护者速读
What changes
packages/spec/src/system/operation-message.ts: the operation-message catalog (BUILTIN_OPERATION_MESSAGES) gains the two doors' nouns,own_door_personal_view_deleteandown_door_attachment_mutate, inen,zh-CN,ja-JPandes-ES. The English of each is the bridge's currentnoun, byte for byte. The catalog header names all three noun keys.packages/runtime/src/domains/personal-views.ts,attachments.ts: each bridge setsnounKey, asprint.tsdoes since fix(runtime, spec): the /actions forward-unavailable 503 and the print door's 501 follow the request's language #37336, sonotImplementedSentencerenders both501sentences (own_door_service_unregistered,own_door_member_missing) in the request's topAccept-Languagetag.NOT_IMPLEMENTED, status501, the slot, member and package names are unchanged, and nouserMessageis added.Small calls made here (no card): the Spanish attachment noun is singular (
el punto de acceso para eliminar y renombrar adjuntos) so the catalog's singularno está disponibleagrees with it; the English keeps its existing plural noun withis, since it must stay byte-identical.Why
After #37336 the print door answered its own-door
501in the reader's language while the two sibling doors on the same bridge answered in English, so one failure mode read in two languages depending on the door.Verification
packages/runtime/src/domains/own-door-bridge.test.ts, new describe[#37352]: for both doors (personal-viewDELETE; attachmentDELETEandPATCH), on a kernel with no service and with a service lacking its member, the501 NOT_IMPLEMENTEDmessage is pinned inen(and with no header),zh-CN,ja-JPandes-ES, with nouserMessage; the catalog English of all three noun keys equals each bridge'snoun. Red first: withnounKeyremoved from the personal-view bridge, 3 of the 50 tests fail.#37273control "a bridge that names no noun key keeps its English sentence" now takes a shipped bridge with its key removed and hands it tohandleOwnDoorBridgeRequestdirectly, since no shipped bridge lacks one any more.9a610dc71:@objectstack/runtimevitestsrc/domains240 files / 7,024 tests pass;@objectstack/specvitestsrc/system78 files / 2,787 pass;@objectstack/coreoperation-user-message.test.ts9/9;pnpm --filter @objectstack/spec check:generatedexit 0; eslint on the touched files exit 0;tsc --noEmitfor runtime exit 0;node scripts/pm/overlap-check.mjsexit 0.Contract review (L2) is owed before landing: the diff changes
packages/spec/src/**and declaresClause-②: yes (widening).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed (check:generatedreports nothing to regenerate).content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
Generated by Claude Code