Skip to content

fix(runtime): the approval action-page door and the inbound automation hooks answer their 501 in the request's language - #37721

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-axt9gn
Nov 27, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-axt9gn

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37662

Clause-②: yes (widening)
Metadata-protocol: none
Skills-docs: none (no page under skills/** names these doors' 501 sentences)

维护者速读

  • 用户能看到什么变化:内核缺少审批服务或入站钩子服务(trigger-api)时,审批操作页 /approvals/act 和入站自动化钩子返回的 501 提示,现在按请求的语言显示中文、日文或西班牙文。评论、webhook 重新投递、打印等接口已经这样做了。英文请求看到的英文和以前一字不差。
  • 为什么做:fix(runtime): the comment and webhook redelivery doors' 501 follows the request's language #37639 的审核发现这两个接口还只说英文,另外留了三处措辞和测试上的小问题,这次一起补上。
  • 出错会怎样:只影响服务没装时的 501 提示文字,状态码和错误码都不变。
  • 要你做什么:无。packages/spec 的消息目录有改动,席位会安排契约审核。

What changes

  • Catalog (packages/spec/src/system/operation-message.ts, BUILTIN_OPERATION_MESSAGES).

    • Four new keys, each in en, zh-CN, ja-JP and es-ES: approvals_act_service_unregistered, approvals_act_member_missing, automation_hooks_service_unregistered and automation_hooks_member_missing.
    • The English of each key is the sentence its door answered before, byte for byte. Slot, member and package names are written in and never translated.
    • N2. The jsdoc paragraph on these whole-sentence keys, which covers comment_doors_*, webhook_redeliver_* and the two new families, now states what the print_* and own_door_* paragraphs state. The locale is the request's top Accept-Language tag, and a top tag the catalog lacks answers English. No errors. override is consulted.
  • packages/runtime/src/domains/approvals.ts and automation-hooks.ts. Each of the two 501s answers operationUserMessage(key, { locale: requestLocaleOf(context) }), which is fix(runtime): the comment and webhook redelivery doors' 501 follows the request's language #37639's shape for the comment and redelivery doors. Code, status and the absence of userMessage are unchanged.

  • N1, own-door-bridge.ts. The section title "The 501 is in the request's language when the bridge names its noun" loses its now-always-true clause.

  • N3, own-door-bridge.test.ts. A new pin walks every module in domains/ that builds a bridge domain (createOwnDoorBridgeDomain(), imports it, and checks each exported bridge:

    • its nounKey holds text in every catalog locale;
    • the English of nounKey is the bridge's noun;
    • nounPlural is set exactly when the English noun is plural (/\bdoors\b/);
    • the sentence pair the bridge reads (singular or _plural) exists in every locale.

    A module that builds a bridge domain but exports no bridge fails the pin.

  • Changeset. @objectstack/spec and @objectstack/runtime, both patch.

Why

PR #37639's review (record 7200392904, adopted at ACCEPT) left these four items, which the card lists.

Verification

  • New tests. approvals-act.test.ts and automation-hooks.test.ts each add a describe that pins both 501s in four locales: en (with and without a header), zh-CN, ja-JP and es-ES. Each pin checks the exact sentence, 501 NOT_IMPLEMENTED, and no userMessage.
  • Ablation. With approvals.ts and automation-hooks.ts reverted to main, the 4 new cases fail at zh-CN. They pass en first, which shows the English is unchanged.
  • N3 pin. With nounPlural: true removed from ATTACHMENTS_BRIDGE, the walk fails: 'the attachment removal and rename doors': expected false to be true.
  • vitest run on approvals-act, automation-hooks, own-door-bridge, comments and webhooks-redeliver: 5 files, 129 passed.
  • packages/spec: operation-message.test.ts 60/60.
  • tsc --noEmit -p packages/runtime passes. eslint on the 7 touched files passes, and check-test-source-alias is OK. approvals-act.test.ts gains the module-top @objectstack/metadata import.
  • overlap-check is clean against origin/main.

Small decisions

  • The new keys are whole sentences, not the bridge's {{door}} template. Neither door is an own-door bridge, and fix(runtime): the comment and webhook redelivery doors' 501 follows the request's language #37639 made the same call for the comment and redelivery doors.
  • The N3 walk finds bridges by scanning the source for createOwnDoorBridgeDomain( and then reading exports. There is no registry to read, and adding one only for the test would be new runtime surface.
  • The plural test is the English noun's doors. All three shipped nouns end in door or doors, so it holds for every bridge today. A noun that breaks the pattern fails the pin loudly rather than passing silently.

Owed

  • L1 (seat). The catalog in packages/spec widens, so the seat rules whether a contract review is owed.

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 on the changed files.
  • 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 (none depend on this catalog).
  • 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_01L6bhgU7eeqHgQrtv5CeJK6


Generated by Claude Code

…n hooks answer their 501 in the request's language

The two doors still answered the missing-service 501 as English literals.
Both now answer operationUserMessage(key, { locale: requestLocaleOf(context) })
with four new whole-sentence catalog keys in en, zh-CN, ja-JP and es-ES,
the English byte for byte the sentences they answered before.

Review follow-ups of #37639 ride along: the own-door bridge's section title
no longer says "when the bridge names its noun" (it always does), the
catalog jsdoc for these whole-sentence keys states the top Accept-Language
tag and that no errors. override is consulted, and one pin walks every
module that builds an own-door bridge, tying nounKey to the catalog in
every locale and nounPlural to the English noun's number.

Claude-Session: https://claude.ai/code/session_01L6bhgU7eeqHgQrtv5CeJK6
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:system tests 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

11 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/runtime/src/domains/own-door-bridge.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/runtime/src/domains/own-door-bridge.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • 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 — 182 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 0f8e13b0011a2ad610b9531733359db95f2a4e40 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 233c1599d7effd4e1b02216e798603b8f298eb7e — the merge of head a885f92a5b7490394303148e053685f7218d1902 into base 0f8e13b0011a2ad610b9531733359db95f2a4e40, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 233c1599d7effd4e1b02216e798603b8f298eb7e && git checkout 233c1599d7effd4e1b02216e798603b8f298eb7e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0f8e13b0011a2ad610b9531733359db95f2a4e40 a885f92a5b7490394303148e053685f7218d1902 && git checkout -B drift-repro 0f8e13b0011a2ad610b9531733359db95f2a4e40 && git merge --no-ff a885f92a5b7490394303148e053685f7218d1902

node scripts/docs-audit/affected-docs.mjs --json 0f8e13b0011a2ad610b9531733359db95f2a4e40

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgU7eeqHgQrtv5CeJK6

Final head for L1: a885f92a5b7490394303148e053685f7218d1902.

CI is green on this head: 69 check runs, each one a success or skipped by the path filter, none failed. All 10 Test Core shards and all 16 Test UI shards pass.

  • Fixes review follow-ups of PR #37639: missing-service 501 still English on approvals act and inbound hooks; own-door bridge wording nits #37662. Size S, one commit, 8 files:
    • the catalog: 4 keys × 4 locales, plus the N2 jsdoc
    • the two doors, approvals.ts and automation-hooks.ts
    • the N1 title in own-door-bridge.ts
    • three test files: the doors' locale pins, and the N3 bridge walk
    • a changeset: @objectstack/spec and @objectstack/runtime, both patch
  • Ablation: with the two doors reverted, the 4 new cases fail at zh-CN after passing en, so the English is byte for byte unchanged. With nounPlural dropped from ATTACHMENTS_BRIDGE, the N3 walk fails.
  • Clause-②: yes (widening): the packages/spec operation-message catalog gains keys. Metadata-protocol: none.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a885f92a5b7490394303148e053685f7218d1902
Local-runs: none
Scope: packages/spec/src/system/operation-message.ts + packages/runtime/src/domains/approvals.ts, packages/runtime/src/domains/automation-hooks.ts, packages/runtime/src/domains/own-door-bridge.ts

First round. Read: card #37662 (body, triage 7201313998, claim 7205582224), this PR's body and its two comments, its eight-file list, the net diff against the merge-base 0f8e13b001 (main has since touched none of the four scoped files), and the 69 check-runs on the head. Every check-run is completed, success or skipped, none red: Lint & Repo Gates, Lint · ESLint, TypeScript Type Check, Test Core (all ten shards), Build Core, Check Changeset, Spec property liveness and Governed Surface Queue Guard all read success. Nothing was built or run; the byte comparisons below are text comparisons of committed blobs.

The rest of the diff (the changeset and the three test files) is the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

  • Catalog key set: right, an enlargement. BUILTIN_OPERATION_MESSAGES goes from 50 to 54 keys in each of en, zh-CN, ja-JP and es-ES. Added in all four: approvals_act_service_unregistered, approvals_act_member_missing, automation_hooks_service_unregistered, automation_hooks_member_missing. No key is removed and no value of an existing key moves in any locale; the four deleted lines of the file are jsdoc.
  • Each new key is closed the way the sibling rows are. The four sentences take no placeholder in any locale and their callers pass no params. Slot (approvals, trigger-api), member (handleActionPage, handleInboundHook) and package (@objectstack/plugin-approvals, @objectstack/trigger-api) names are written verbatim in all four locales.
  • The two doors, wire: right. Status 501, code NOT_IMPLEMENTED (derived from the status by the dispatcher's own error(), which the diff does not touch) and the absence of userMessage are unchanged. The four en values are byte-identical to the literals approvals.ts and automation-hooks.ts hold on main: each handler holds exactly two 501 literals there, and each concatenates to its catalog value, ASCII only. A request whose top Accept-Language tag resolves to zh-CN, ja-JP or es-ES now reads that locale; no header, or a tag that resolves to none of the four, reads English.
  • The jsdoc's byte-identity sentence now also covers the two older families, and it is true of them. comment_doors_* and webhook_redeliver_* equal the literals comments.ts and webhooks.ts held in the tree before fix(runtime): the comment and webhook redelivery doors' 501 follows the request's language #37639.
  • Runtime: no published change. The two handlers gain two imports each (operationUserMessage from @objectstack/core, requestLocaleOf from the bridge module, already exported). No export, type or signature moves. own-door-bridge.ts changes one jsdoc heading.
  • No spec export is added, removed or renamed, the catalog's type is unchanged, and no schema key is touched.

② Semver level

@objectstack/spec patch and @objectstack/runtime patch match what the diff publishes: a catalog enlargement with no protocol kind, and a fix in a released package. That is the repo's rule as written (AGENTS.md, Post-Task Checklist 3: none takes patch; a non-protocol widening ships patch) and as practised: the changesets of #37594 (own_door_* nouns) and #37639 (comment_doors_*, webhook_redeliver_*) made the same catalog key additions at patch on the same two packages. Check Changeset is success.

Both declarations hold, and the PR body, the changeset and the card's claim carry the same pair. The Clause-②: yes (widening) line is true: four keys join a published catalog in each locale, nothing is removed or refused. Metadata-protocol: none is true: the catalog is platform text, no schema key, accepted value or metadata type changes, and these doors consult no errors. override, so no authorable key gains an effect.

③ Boundary flags

  • Small decision 1, whole sentences instead of the bridge's door template: accepted. Neither handler is an own-door bridge (each resolves its slot through resolveService and forwards on its own), and their English differs in wording from the bridge template, so only whole sentences keep it byte-identical, which the card requires.
  • Small decision 2, the N3 walk finds bridges by scanning for the builder call: accepted. There is no registry to read. For the lane seat, on a file outside this record's scope: the walk keys on createOwnDoorBridgeDomain(, so a later module that calls the exported handleOwnDoorBridgeRequest directly would not be walked.
  • Small decision 3, plural read off the English noun's doors: accepted, with its claim narrowed. The pin is loud when the flag and the word disagree. A plural noun spelled without doors and without the flag would pass it. The three shipped nouns and the interface's own jsdoc (the … doors) make that spelling a convention; the pin does not hold a fourth bridge to it.
  • Red without the fix: yes, by reading. Each new door case compares the wire message with a sentence typed into the test, not read from the catalog. On main's handlers a zh-CN header gets the English literal, so each of the four cases stops at its zh-CN step after passing en, which is what the PR reports. The N3 pin is a guard over the three shipped bridges and is green on main by design; dropping nounPlural from the attachment bridge makes nounPlural === true differ from the doors match, as reported. Not re-run here.
  • No open_questions entry: the claim is mode:thread, with no dev report on the card.
  • SQL push-down: the diff holds no query, no id materialisation and no join.
  • Author: objectstack-fleet[bot]; no off-relay author to name.
  • Fixes #37662 is whole, not partial. Item 1 (both doors from the catalog, four locales, measured under zh-CN with the service absent), N1 (the heading), N2 (the jsdoc now states the top-tag reading and that no errors. override is consulted, for all four families) and N3 (one pin that walks the bridges) are each delivered.
  • Out-of-diff notes for the seat, not findings on this head:
    • Other missing-service or unsupported-member 501s in packages/runtime/src/domains/ still answer fixed English (auth.ts, i18n.ts, mcp.ts, and several in automation.ts, meta.ts and packages.ts). The card names two doors and both are done.
    • GET /approvals/act now answers a body that differs by Accept-Language, and I found no Vary: Accept-Language or cache directive on the dispatcher's error envelope (REST's metadata routes set that Vary). A 501 is heuristically cacheable. The same holds for every refusal the dispatcher already renders by this header, so it is a platform question, not this PR's.

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/system/operation-message.ts holds against the card and against its consumers. The rewritten paragraph is true of all four doors it lists, sentence by sentence: comments.ts, webhooks.ts, approvals.ts and automation-hooks.ts each render both keys through operationUserMessage(key, { locale: requestLocaleOf(context) }); requestLocaleOf reads the header's first tag with its weight stripped; the caller object carries locale alone, so no workspace-default rung sits between a miss and en; and operationUserMessage passes no translator, so no errors. override can be consulted. I tried to break it six ways and none held: a locale missing a key (the every-locale test refuses it, and all four carry all four); a placeholder left unfilled (the sentences take none); a header-derived tag reaching a prototype member of the catalog or throwing in the resolver (own keys only, string folding only, a miss falls to en); a translated 501 sentence swallowed by the dispatcher's 5xx leak guard (the new pins read the exact translated sentence off the wire, and they are green); a consumer matching the old English text (none in the tree outside the new pins); an English request reading a changed byte (identical, above).

Each of the twelve translations says what its English says, and keeps the sibling keys' wording: "compose" is rendered as comment_doors_service_unregistered renders it in each locale, and hook, inbound and flow follow the platform bundles (钩子, 入站, 流程; フック, 受信, フロー; gancho, entrante, flujo). One term departs, N1.

approvals.ts, automation-hooks.ts, own-door-bridge.ts agree with the catalog: each handler's two 501s read the key of its own family, by the bridge's locale reader, with no params, and nothing else in either handler moves. The bridge's heading no longer states a condition that is always true.

  • N1 (nit) — operation-message.ts, ja-JP: both automation_hooks_* sentences say オートメーション, where the platform's Japanese text says 自動化 for automation (packages/platform-objects/src/apps/translations/ja-JP.ts group_automation, the build-probe user text). The meaning is the same; a Japanese reader meets two words for one thing.
  • N2 (nit) — operation-message.ts: "a top tag the catalog lacks answering English" is looser than the resolver. resolveBundleLocale runs the platform ladder, so es-MX answers es-ES, zh and zh-TW answer zh-CN, and ja answers ja-JP; English is the answer only for a tag the ladder resolves to none of the four. The print_* paragraph on main uses the same words, and the card asked for parity with it, which this gives.
  • N3 (nit) — own-door-bridge.ts: requestLocaleOf's jsdoc still names the comment and webhook redelivery doors as its outside readers. Four door families read it now, and the catalog paragraph cites it for all four.

All three sit in non-prose files, and N1 is also typed into two test pins, so a fix would move this head. They are accepted deviations here, or one follow-up card; if N2 is tightened, the print_* paragraph is tightened in the same edit.

Implemented-by: claude/project-thread-axt9gn
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head a885f92 · card #37662 · area s2-ux-P · 2026-11-27T00:38Z

L1 checklist

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 00:38
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Queue kick · re-enqueue once · head a885f92 · 2026-11-27T01:05Z

Signature: merge_group run 45918016841 (queue ref gh-readonly-queue/main/pr-37721-ce4d8c7d74…), Test UI (11/16) job 140243746914. ui/packages/app-shell/src/sameServerFetch.bearer.ratchet.test.ts:393 ("every bare cookie-only call is a counted row of the shrink-only allow-list") hit its 15000 ms timeout. Shard 12/16 was cancelled with it. The shard's other 450 files and 5,990 tests passed.

Signature ledger: no known-flaky row matches, so this is a new signature. Re-enqueued ONCE on the three facts:

  1. Disjoint import closure: the failing test imports only vitest, node:fs, node:path, node:url and typescript, and scans ui/ sources. This diff touches only packages/spec/src/system/operation-message.ts, packages/runtime/src/domains/* and a changeset; no ui/ path.
  2. Base green on the same shard: the queue base ce4d8c7d74 passed its push run 45918398684 (success), Test UI shards included. This PR's own run passed all 16 Test UI shards at this head.
  3. First error is a timeout, not an assertion.

If the same signature kicks this PR a second time, re-enqueueing stops and the signature is diagnosed afresh.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45918016841 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (11/16) — 失败步骤: Run the ui tests (shard 11/16)

    × every bare cookie-only call is a counted row of the shrink-only allow-list 15767ms
    FAIL   unit  packages/app-shell/src/sameServerFetch.bearer.ratchet.test.ts > cookie-only same-server fetch ratchet (every ui package + console) > every bare cookie-only call is a counted row of the sh
      ↳ 失败原因: Error: Test timed out in 15000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • packages/app-shell/src/sameServerFetch.bearer.ratchet.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 16 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 14badad Nov 27, 2026
70 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-axt9gn branch November 27, 2026 01:36
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… by Accept-Language, and the inbound automation hooks' Japanese 501 says 自動化 (objectstack-ai#37813)

<!-- 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#37737

Clause-②: no
Metadata-protocol: none
Skills-docs: none (no page under `skills/**` quotes these 501 sentences
or their headers)

## 维护者速读

- 用户能看到什么变化:日文环境下,入站自动化钩子未配置时返回的 501 提示改用平台日文包统一的说法「自動化」。另外,所有按请求语言翻译的
501 响应(打印、个人视图、附件、评论、webhook 重新投递、审批操作页、入站自动化钩子)现在都带 `Vary:
Accept-Language` 响应头。
- 为什么做:objectstack-ai#37721 的审核发现日文术语不一致;而且 501 在 HTTP
标准里默认可以被缓存,如果前面有共享缓存,可能把一种语言的提示发给说另一种语言的人。
- 出错会怎样:只影响服务没装好时的 501 提示和一个响应头,状态码、错误码和英文句子都不变。
- 要你做什么:无。卡里的第 5 项(其余约 26 句固定英文 501)已经移到 objectstack-ai#37811,不在这个 PR 里。

## What changes

- **Japanese term (item 1, N1)**:
`packages/spec/src/system/operation-message.ts`, both `ja-JP`
`automation_hooks_*` sentences say `受信自動化フック` instead of
`受信オートメーションフック`, with the two pins in `automation-hooks.test.ts`. No
other sentence in the repository used `オートメーション`; `ui/packages/i18n`
`ja.ts` and the `platform-objects` ja-JP bundles say `自動化`.
- **Locale-fallback jsdoc (item 2, N2)**: the `print_*` paragraph and
the `comment_doors_*` … `automation_hooks_*` paragraph of the catalog
jsdoc now say the request's top tag is matched by language
(`resolveBundleLocale`): `es-MX` reads `es-ES`, `zh` and `zh-TW` read
`zh-CN`, `ja` reads `ja-JP`, and only a language with no catalog locale
answers English (measured against the built catalog).
- **`requestLocaleOf` reader list (item 3, N3)**: its jsdoc names the
four non-bridge families that read it (comments, webhook redelivery,
approval action pages, inbound automation hooks).
- **Walk and pin coverage (item 4)**, `own-door-bridge.test.ts`: the
walk also imports a module that calls `handleOwnDoorBridgeRequest(`
directly; every bridge noun must end in `door` or `doors`
(`/\bdoors?$/`), and `nounPlural` must equal `/\bdoors$/`, so a plural
noun spelled another way fails instead of passing. The `noun` member's
jsdoc states the rule.
- **`Vary: Accept-Language` (item 6)**, `own-door-bridge.ts`:
`localizedNotImplemented(deps, message)` builds the `501` and adds the
header; `catalogNotImplemented(deps, context, key, params?)` renders a
catalog key in the request's language first. The bridge's two `501`s and
the eight sentences of `approvals.ts`, `comments.ts`, `webhooks.ts` and
`automation-hooks.ts` answer through them (their now-unused
`operationUserMessage` / `requestLocaleOf` imports are dropped). Each
family's language test pins the header beside the sentence.
- **Item 5 moved**: the remaining fixed-English `501`s (auth, i18n, mcp,
automation, meta, packages, about 26 sentences) are card objectstack-ai#37811,
`Blocked-by: objectstack-ai#37737`, per the seat's split.
- **Changeset**: `@objectstack/runtime` and `@objectstack/spec` patch.

Small calls made here (no card):
- This PR adds `Vary: Accept-Language` to the ten `501`s 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. A `501` is heuristically cacheable (RFC
9111 §4.2.2). The other localized answer that is cacheable by default,
the `404 RECORD_NOT_FOUND` of `GET /data/:object/:id` (its `userMessage`
follows the caller's language), is not covered here and is tracked by
objectstack-ai#37828. Agreed with the seat.
- Item 4 is closed by widening (walk and pin), not by narrowing the
claim.

## Why

Contract review record 7206602201 on PR objectstack-ai#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 head `620499a87` only declares the
bridge's hand-built `501` in `scripts/check-route-envelope.mjs`,
`handBuilt: 1`; `Response-envelope guard` green):
- `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 asserting `Vary:
Accept-Language`.
- `packages/spec`: `src/system/operation-message.test.ts` 60/60.
- `tsc --noEmit -p packages/runtime`: exit 0. `eslint` on 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

- [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

---
_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>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
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/m tests 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 #37639: missing-service 501 still English on approvals act and inbound hooks; own-door bridge wording nits

2 participants