Repository navigation
fix(runtime): a 501 answered in the request's language says it varies by Accept-Language, and the inbound automation hooks' Japanese 501 says 自動化 - #37813
Conversation
… by Accept-Language, and the inbound automation hooks' Japanese 501 says 自動化 The localized 501s (the own-door bridge, the comment doors, webhook redelivery, the approval action-page door, the inbound automation hooks) now answer through one helper that adds Vary: Accept-Language: a 501 is cacheable by default, so a shared cache could otherwise serve one reader's language to the next. Also: the two ja-JP automation_hooks sentences say 受信自動化フック, the platform's Japanese term; the catalog jsdoc states how a request's tag is matched (es-MX → es-ES, zh/zh-TW → zh-CN, ja → ja-JP); requestLocaleOf's jsdoc names its four reader families; the bridge walk also finds a module that calls handleOwnDoorBridgeRequest directly, and every bridge noun must end in door/doors so its plurality is read off the word. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
📓 Docs Drift Check20 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 d1e154884bcb9e32cbc473b6e3f1f297fc746b05 && git checkout d1e154884bcb9e32cbc473b6e3f1f297fc746b05
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 44ccf94a409362dbb3c16fc2f03b321d4e91b797 620499a87efcac52eb3f6c413a7c30a2c3268041 && git checkout -B drift-repro 44ccf94a409362dbb3c16fc2f03b321d4e91b797 && git merge --no-ff 620499a87efcac52eb3f6c413a7c30a2c3268041
node scripts/docs-audit/affected-docs.mjs --json 44ccf94a409362dbb3c16fc2f03b321d4e91b797 |
…ridge.ts's one hand-built answer check-route-envelope counts response object literals per domain module; localizedNotImplemented spreads deps.error's envelope and adds Vary: Accept-Language, which deps.error cannot express. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Re-run failed jobs once (seat) · head 620499a · 2026-11-27T05:03Z Run 45941124060 failed only
The race goes to a small card of its own. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Inputs read: card #37737 (body and both comments), PR #37813 (body, 13 files, net diff against The rest of the diff is the lane seat's ACCEPT at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implementing files. S1 (should-fix) — Item 6 of the card closes on a premise the tree contradicts. The card asks to decide N1 (nit) — Card #37737 has no comment that records the split of item 5. The split is readable only from #37811's body, and the card's claim comment still lists the item 5 doors in its file surface. A one-line comment on the card fixes it. N2 (nit) — The new N3 (nit) — The walk's comment says a new bridge is held to the rules "whichever way it is mounted". It finds a module by the two call spellings inside Note for #37811, not a finding on this head: the fixed-English Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta review of record 7210823764 on the same head. The head has not moved, so sections ①, ② and ④'s reading of the tree stand as that record wrote them. This round judges only the fixes made on the prose faces, each re-read from the platform: the PR body, card #37737's new comment 7210847585, the new card #37828, and comment 7210862044 on #37811. Check-runs on this head: 60 success, 13 skipped, none failed. The PR body edit re-ran ① Derived judgmentsUnchanged from record 7210823764: every derived judgment was named right, and the tree is the same. ② Semver levelUnchanged. The changeset is not touched. ③ Boundary flags
④ Design judgmentS1: closed. All three parts of the fix are on the platform, and none moved the head.
N1: closed. The same comment records that item 5 is split off to #37811 and that the item 5 doors in the claim's file surface are not part of this PR. N2: accepted deviation, now carried. Comment 7210862044 on #37811 names both stale comments (the N3: accepted deviation, unchanged. No bridge on No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 620499a · card #37737 · area s2-ux · 2026-11-27T05:46ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
…st's language (objectstack-ai#37845) <!-- 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#37811 Clause-②: yes (widening) Metadata-protocol: none Skills-docs: none (no page under `skills/**` quotes these 501 sentences or their headers) ## 维护者速读 - 用户能看到什么变化:服务没装好或功能没实现时,平台返回的 501 提示(认证、i18n、MCP、元数据、软件包、自动化、启用开关、权限集复制、安全建议重新打开、共享链接)现在按请求的语言显示中文、日文或西班牙文,并带 `Vary: Accept-Language` 响应头。英文句子、状态码和错误码都不变。 - 为什么做:objectstack-ai#37721 和 objectstack-ai#37737 只本地化了几个自有接口的 501,其余接口的 501 对所有人都是固定英文。 - 出错会怎样:只影响服务缺失时的 501 提示文字和一个响应头;最坏情况是某句翻译不准,英文和行为都不变。 - 有两处 501 保留英文,理由写在下面。 ## What changes - **Catalog**, `packages/spec/src/system/operation-message.ts`: 37 new keys, all in `en`, `zh-CN`, `ja-JP` and `es-ES`. 31 of them are sentences, one per fixed-English `501`. The other 6 are `catalog_activation_noun_*`, the activation door's nouns, rendered in the same locale. The English of each sentence is byte-identical to the sentence its door answered before. `{{member}}`, `{{table}}`, `{{name}}` and `{{packageId}}` stay untranslated code, table, item and package names. The Japanese says `自動化`, as objectstack-ai#37737 aligned. A jsdoc paragraph names the keys and how they are read. - **Doors**, `packages/runtime/src/domains/`: every one of these `501`s now answers through `catalogNotImplemented` (`own-door-bridge.ts`, objectstack-ai#37737), which reads the request's top `Accept-Language` tag and adds `Vary: Accept-Language`: - `auth.ts`: 1 - `i18n.ts`: 1 - `mcp.ts`: 2 (`/mcp` and the skill door) - `meta.ts`: 5 (layered read, conditional save, save, draft listing, stored migration) - `packages.ts`: 8 - `automation.ts`: 11 (5 connector credential and connection legs, which name the missing member, plus flow clone, resume, cancel, restore, screen lookup and run list) - `actions.ts`: 1 - `catalog-activation.ts`: 1 (on/off sentences, with the localized noun) - `permission-set-clone.ts`: 2 - `security.ts`: 1 - `share-links.ts`: 1 The four `actions.ts`, `catalog-activation.ts` and `permission-set-clone.ts` sites were found when the premise was re-measured; neither the card nor the seat note listed them. The clone landing's `501` is thrown from `resolveDefaultCloneLanding`. It now carries its catalog key, and the door's catch answers it in the request's language. Its English stays the error's message. - **Review N2 of PR objectstack-ai#37813**: the `requestLocaleOf` jsdoc now says the four non-bridge families, and now these modules, reach it through `catalogNotImplemented`. The four gate comments for `approvals.ts`, `automation-hooks.ts`, `comments.ts` and `webhooks.ts` in `scripts/check-route-envelope.mjs` now say their `501`s go through it. No gate count changes. - **Pins**: - Each door with an existing `501` test gains a `[objectstack-ai#37811]` block beside it, which asserts byte-identical English with no header, the catalog's Japanese under `ja-JP`, and the `Vary`. These are the run lifecycle, connector credential and connection (with the member named), screen read, catalog and action activation, packages and `/meta` probes, permission-set clone and `/i18n` tests. - `domain-501-language-37811.test.ts` pins the doors that had no `501` fixture: `/auth`, `/mcp`, the `/meta` layered read, conditional save and save, `/share-links`, the `/security` reopen, and the `/automation` run list, resume and flow clone. - The same file adds a source walk: no domain module except the two builders contains `deps.error(…, 501)`, so a new fixed-English `501` fails there. - `operation-message.test.ts` pins that each of the 37 keys is translated in every locale (not an English echo) and keeps exactly the English placeholders. - **Changeset**: `@objectstack/runtime` and `@objectstack/spec` patch. Small calls made here (no card): - **Kept English: `capabilityUnavailable`** (`unavailable.ts`, ten call sites in `ai.ts`, `automation.ts`, `notifications.ts` and `ui.ts`). Its sentence is `serviceUnavailableMessage(slot)`, the same remedy discovery reports as `services.<slot>.message`. By contract the two are the same bytes, so a caller who hits the wall gets the fix that discovery lists. Discovery is English, so localizing this `501` alone would split the two. Localizing both is a discovery-protocol change and out of this card's scope. The answer carries no `Vary`, because its text does not vary. - **Kept English: the MCP resume door's `501`** (`mcp.ts`, `resumeDoorError`). It is thrown into the resume tool's error mapping, not answered as an HTTP `501` envelope, and the calling agent reads it beside that door's other refusals, which are English. - **Not localized: `meta.ts`'s `errorFromThrown(e, 501)`**. It forwards the metadata service's own thrown message, so the sentence is not the door's. - **The activation noun is translated through its own key**, so the zh, ja and es sentences carry no English noun. The on/off verb is two keys (`_on`, `_off`), because the verb does not interpolate across languages. ## Why Card objectstack-ai#37811 is item 5 of objectstack-ai#37737, split out by the seat. Comment 7210862044 adds the `capabilityUnavailable`, `share-links.ts` and `security.ts` sites and review N2 of PR objectstack-ai#37813. ## Verification Head `372155638`, plus `5e4ea0904` (the clone landing's `501` is caught around `resolveDefaultCloneLanding` alone, so the save catch keeps its main-branch form and the durability-degradation log-level guard passes: red on `372155638`, exit 0 on `5e4ea0904` locally; `permission-set-clone.test.ts` 55/55, `tsc` exit 0). CI on `5e4ea0904`: 58 success, 11 skipped, none failed: - `packages/runtime`: `vitest run src/domains`, 243 files, 7130 passed, 4 skipped (head `a30533a43`; the follow-up head only adds a module-top `import '@objectstack/metadata'` to five edited tests, and those five re-ran 103/103). - `packages/spec`: `src/system/operation-message.test.ts` 98/98. - `tsc --noEmit -p packages/runtime`: exit 0. `eslint` on `packages/runtime/src/domains/*.ts` and the catalog files: exit 0. - `node scripts/check-route-envelope.mjs`: exit 0. `check:changeset-fixed`, `check:test-source-alias`: exit 0. - `node scripts/pm/overlap-check.mjs`: clean (shares `meta.ts` and `packages.ts` with objectstack-ai#37676, merges cleanly). - The card's claim comment 7211371658 was corrected in place to the fixed `Claim:` / `Branch:` spelling that `check:closing-target-claim` reads. Locally, the gate passes against this PR's context. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic (catalog strings and comments only). - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; 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: no generated artifact depends on these strings or comments. - [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 <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgUpnvPnJ1hR74pUrVj --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
Fixes #37737
Clause-②: no
Metadata-protocol: none
Skills-docs: none (no page under
skills/**quotes these 501 sentences or their headers)维护者速读
Vary: Accept-Language响应头。What changes
packages/spec/src/system/operation-message.ts, bothja-JPautomation_hooks_*sentences say受信自動化フックinstead of受信オートメーションフック, with the two pins inautomation-hooks.test.ts. No other sentence in the repository usedオートメーション;ui/packages/i18nja.tsand theplatform-objectsja-JP bundles say自動化.print_*paragraph and thecomment_doors_*…automation_hooks_*paragraph of the catalog jsdoc now say the request's top tag is matched by language (resolveBundleLocale):es-MXreadses-ES,zhandzh-TWreadzh-CN,jareadsja-JP, and only a language with no catalog locale answers English (measured against the built catalog).requestLocaleOfreader list (item 3, N3): its jsdoc names the four non-bridge families that read it (comments, webhook redelivery, approval action pages, inbound automation hooks).own-door-bridge.test.ts: the walk also imports a module that callshandleOwnDoorBridgeRequest(directly; every bridge noun must end indoorordoors(/\bdoors?$/), andnounPluralmust equal/\bdoors$/, so a plural noun spelled another way fails instead of passing. Thenounmember's jsdoc states the rule.Vary: Accept-Language(item 6),own-door-bridge.ts:localizedNotImplemented(deps, message)builds the501and adds the header;catalogNotImplemented(deps, context, key, params?)renders a catalog key in the request's language first. The bridge's two501s and the eight sentences ofapprovals.ts,comments.ts,webhooks.tsandautomation-hooks.tsanswer through them (their now-unusedoperationUserMessage/requestLocaleOfimports are dropped). Each family's language test pins the header beside the sentence.501s (auth, i18n, mcp, automation, meta, packages, about 26 sentences) are card runtime: localize the remaining fixed-English 501 refusals (about 26 sentences across auth, i18n, mcp, meta, packages and automation) #37811,Blocked-by: #37737, per the seat's split.@objectstack/runtimeand@objectstack/specpatch.Small calls made here (no card):
Vary: Accept-Languageto the ten501s localized from the request's language only (the bridge's two and the eight of the comment, webhook-redelivery, approval action-page and inbound-hook doors), not to the whole error envelope, which every refusal shares whether or not its text varies. A501is heuristically cacheable (RFC 9111 §4.2.2). The other localized answer that is cacheable by default, the404 RECORD_NOT_FOUNDofGET /data/:object/:id(itsuserMessagefollows the caller's language), is not covered here and is tracked by A localized 404 RECORD_NOT_FOUND is cacheable by default but carries no Vary: Accept-Language #37828. Agreed with the seat.Why
Contract review record 7206602201 on PR #37721 (nits N1–N3 and the record's notes, adopted at ACCEPT), carried here per the one-card-per-PR rule.
Verification
Head
bcf922153(the follow-up head620499a87only declares the bridge's hand-built501inscripts/check-route-envelope.mjs,handBuilt: 1;Response-envelope guardgreen):packages/runtime:own-door-bridge.test.ts,automation-hooks.test.ts,comments.test.ts,webhooks-redeliver.test.ts,approvals-act.test.ts: 5 files, 129 tests passed, each language case now also assertingVary: Accept-Language.packages/spec:src/system/operation-message.test.ts60/60.tsc --noEmit -p packages/runtime: exit 0.eslinton the 6 touched runtime source and bridge test files: exit 0.check:changeset-fixed,check:test-source-alias: exit 0.node scripts/pm/overlap-check.mjs: clean.Human Minimum
packages/specholds no runtime logic (catalog strings and comments only).main, one pull request.packages/spectouched: no generated artifact depends on these strings or comments.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUpnvPnJ1hR74pUrVj
Generated by Claude Code