Repository navigation
fix(runtime, spec): the /actions forward-unavailable 503 and the print door's 501 follow the request's language - #37336
Conversation
…e print door's leak assertions
📓 Docs Drift Check24 anchor(s) derived from 3 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 — 186 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 a4fa7e0a1847997eccfb363c86e53f94606324f0 && git checkout a4fa7e0a1847997eccfb363c86e53f94606324f0
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a182fbe37765ab486f3aa5e372ffa9d6af1f6758 e9bdc06989526a16dde9a6d8433b7d615ca7608e && git checkout -B drift-repro a182fbe37765ab486f3aa5e372ffa9d6af1f6758 && git merge --no-ff e9bdc06989526a16dde9a6d8433b7d615ca7608e
node scripts/docs-audit/affected-docs.mjs --json a182fbe37765ab486f3aa5e372ffa9d6af1f6758 |
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Flake judgement (2026-11-25T18:34Z) on This PR changes no file under |
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Final green head for L1 and same-head contract review (2026-11-25T19:13Z):
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Contract reviewServed-tier: PR #37336, card #37273. Read: the card and all six comments, seat direction 7159533198, the PR body, the full net diff against the merge-base, and the head's check-runs. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings: three nits, none affecting correctness or the contract.
The changeset prose is outside the contract faces and is read at L1. Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Landing (2026-11-25T20:19Z): head
There is no narrowing arm, so no maintainer gate applies. State change: ready for review, and auto-merge armed. On MERGED, #37273 closes by |
…he request's language, like the print door's (objectstack-ai#37594) <!-- 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#37352 Clause-②: yes (widening) Metadata-protocol: none Skills-docs: none (no page under `skills/**` names the own-door bridge or its `501` sentences) ## 维护者速读 - 用户能看到什么变化:在缺少个人视图服务或附件服务的环境里,删除个人视图、删除或重命名附件时弹出的「接口不可用」提示,现在和打印一样按界面语言(中文、日文、西班牙文)显示;英文界面一字不差。 - 为什么做:同一个故障,打印接口已经显示中文,旁边这两个接口还显示整句英文,用户看到的语言取决于点了哪个按钮。 - 出错会怎样:最坏是某种语言措辞不够好;错误码、状态码和服务名都不变,可直接撤回。 - 要你做什么:无。 ## 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_delete` and `own_door_attachment_mutate`, in `en`, `zh-CN`, `ja-JP` and `es-ES`. The English of each is the bridge's current `noun`, byte for byte. The catalog header names all three noun keys. - `packages/runtime/src/domains/personal-views.ts`, `attachments.ts`: each bridge sets `nounKey`, as `print.ts` does since objectstack-ai#37336, so `notImplementedSentence` renders both `501` sentences (`own_door_service_unregistered`, `own_door_member_missing`) in the request's top `Accept-Language` tag. - No wire change: code `NOT_IMPLEMENTED`, status `501`, the slot, member and package names are unchanged, and no `userMessage` is 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 singular `no está disponible` agrees with it; the English keeps its existing plural noun with `is`, since it must stay byte-identical. ## Why After objectstack-ai#37336 the print door answered its own-door `501` in 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 `[objectstack-ai#37352]`: for both doors (personal-view `DELETE`; attachment `DELETE` and `PATCH`), on a kernel with no service and with a service lacking its member, the `501 NOT_IMPLEMENTED` message is pinned in `en` (and with no header), `zh-CN`, `ja-JP` and `es-ES`, with no `userMessage`; the catalog English of all three noun keys equals each bridge's `noun`. Red first: with `nounKey` removed from the personal-view bridge, 3 of the 50 tests fail. - The `objectstack-ai#37273` control "a bridge that names no noun key keeps its English sentence" now takes a shipped bridge with its key removed and hands it to `handleOwnDoorBridgeRequest` directly, since no shipped bridge lacks one any more. - Local runs at `9a610dc71`: `@objectstack/runtime` vitest `src/domains` 240 files / 7,024 tests pass; `@objectstack/spec` vitest `src/system` 78 files / 2,787 pass; `@objectstack/core` `operation-user-message.test.ts` 9/9; `pnpm --filter @objectstack/spec check:generated` exit 0; eslint on the touched files exit 0; `tsc --noEmit` for runtime exit 0; `node scripts/pm/overlap-check.mjs` exit 0. Contract review (L2) is owed before landing: the diff changes `packages/spec/src/**` and declares `Clause-②: yes (widening)`. ## 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 (`check:generated` reports nothing to regenerate). - [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>
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Fixes #37273
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
packages/spec/src/system/operation-message.ts: six keys in the operation-message catalog (BUILTIN_OPERATION_MESSAGES), each inen,zh-CN,ja-JPandes-ES; English is byte-identical to the text the two sites answered before.action_forward_unavailable/action_forward_unavailable_host: the/actionsdoor's503for a same-origintype: 'api'action it cannot forward in-process (REST and MCP doors / the host doordispatchAction), with{{action}}and{{target}};action_forward_target_unnamedfills{{target}}for an action with no string target.own_door_service_unregistered/own_door_member_missing: the own-door bridge's two501 NOT_IMPLEMENTEDsentences, with{{door}},{{slot}},{{producer}},{{member}};own_door_printis the print door's noun.print_timed_out(zh-CN, ja-JP, es-ES) andprint_engine_unavailable(ja-JP, es-ES), taken as written there. The header'sprint_*paragraph now says that atranslationitem'serrors.print_*entry is not consulted (the door holds no i18n service), thatAccept-Languageis read by its top tag only (preferredLocaleFromHeader, no q-value negotiation), and that only a throw with an empty message puts the localized sentence into the fault-log line (serverFaultLogMessage's fallback); every other throw logs its own text. The log line itself is unchanged.packages/core/src/utils/operation-user-message.ts:operationUserMessage(messageKey, caller?, params?)takes an optionalparamsto fill a key's placeholders. Existing calls are unchanged.packages/runtime/src/action-execution.ts+action-dispatch.ts:apiActionForwardUnavailableError(action, door, caller)renders the catalog key in the caller's execution-context language (locale, which the dispatcher resolves from the topAccept-Languagetag, thenworkspaceLocale, thenen). That is the ladder every other refusal of this door already reads (recordNotFoundError, the declarative-updatepermission_denied). The relay passes the call'sec.packages/runtime/src/domains/own-door-bridge.ts+print.ts: the bridge reads the request's topAccept-Languagetag (it holds no execution context and no i18n service) and renders both501sentences from the catalog. This happens when the bridge names its noun's key (OwnDoorBridge.nounKey, new and optional);print.tssetsnounKey: 'own_door_print'. A bridge that names none (personal views, attachments) keeps its English sentence, so a sentence is never half translated.messageis localized, nouserMessageis added to a fault, and code and status are unchanged.Tests
packages/runtime/src/domains/api-action-forward.test.ts: a new top-level describe drives the REST door through the REALdispatch()with a signed-in session and anaccept-languageheader. Underzh-CN,zh;q=0.9,en;q=0.8the answer is503 SERVICE_UNAVAILABLEwith the zh-CN sentence and nouserMessage. The control (en-US, and no header) keeps today's English byte for byte.packages/runtime/src/action-dispatch.test.ts: the host door (dispatchActionhanded an environment's own kernel), with the zh-CN sentence for anexecutionContext.locale: 'zh-CN'and today's English without a locale.packages/runtime/src/domains/own-door-bridge.test.ts: a new top-level describe covers both501sites (no print service; a print service withouthandlePrintDoor). Underzh-CNthey answer in Chinese, and theen-USand absent-header controls keep today's English. A bridge with no noun key (personal views) stays English under zh-CN.packages/core/src/utils/operation-user-message.test.ts:paramsfills placeholders in the caller's language; the placeholder-free call is unchanged.packages/services/service-print/src/print-routes.test.ts(N4): the zh-CN pins and the caller-unresolved pin also assertexpect(JSON.stringify(body)).not.toContain('/srv/secret').Acceptance notes
yes (widening), not the claim's expectedno.operationUserMessageis exported from@objectstack/core's entry, and it gains an optional third parameter. Under the execution-duties reading ("public surface = what the built entry declarations reach") that widens the public surface. No existing call changes. The bridge's newnounKeyis not reachable from@objectstack/runtime's entry:own-door-bridge.tsis not exported.Metadata-protocol: none: no authorable key, value or metadata type moves. The changeset ispatch.packages/services/service-print/src/print-routes.test.tsis outside the claim's listed files. It is the N4 test point the dispatch order names (comment 7160569088), and the change is test-only (two assertions per pin).501in English: they name nonounKey, and their files are outside this card's surface. Making them follow the request language takes one catalog noun key per door plusnounKeyonpersonal-views.tsandattachments.ts.carrier: none— noted for the seat; not a defect class this run files.Accept-Languageis read by its top tag at both new sites, the platform's existing reading. The/actionsdoor reads it through the execution context, so a top tag the catalog lacks falls to the workspace default beforeen. The bridge has no execution context, so it falls straight toen.Read first
packages/runtime/src/domains/own-door-bridge.ts—notImplementedSentence/requestLocaleOf: the header read and the English-only fallback for a bridge with no noun key.packages/runtime/src/action-execution.ts—apiActionForwardUnavailableError: the two catalog keys and the target fallback.packages/spec/src/system/operation-message.ts— the six new keys per locale, and the header notes.Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run src/domains/own-door-bridge.test.ts src/domains/api-action-forward.test.ts src/action-dispatch.test.ts -t 37273→ 8 passed. Expected: the zh-CN sentences underaccept-language: zh-CNand today's English for the controls.Verification
All readings on head
40ea9d122unless noted (the typecheck fix commit40ea9d122touched two test lines; the full suites ran on it). Heade9bdc0698changes only the changeset prose: on it,check-empty-changeset,check-changeset-no-majorandcheck-adr-0087-registrationexit 0.Package suites and typecheck
pnpm --filter @objectstack/spec --filter @objectstack/core --filter @objectstack/runtime --filter @objectstack/service-print typecheck: spec, core and service-print were green; runtime'scheck:test-typecheckflagged twoRecord<string, string>arguments in the new controls. Those are fixed in40ea9d122, andpnpm --filter @objectstack/runtime typecheckis green there.@objectstack/spectest: Test Files 894 passed (894) · Tests 28413 passed, 1 todo.@objectstack/coretest: Test Files 157 passed (157) · Tests 3763 passed.@objectstack/runtimetest: Test Files 649 passed (649) · Tests 12000 passed, 25 skipped · lock VERDICT command-exit 0.@objectstack/service-printtest: Test Files 9 passed (9) · Tests 145 passed. The first run reported 2 unhandled PlaywrighttargetInforejections fromchromium-driver.test.ts, a file this diff does not touch. A rerun was clean: VERDICT command-exit 0, 145/145, no errors.Ablation — restoring the hard-coded English turns each site's zh pin red
Each run went through
scripts/ablation-replace.mjs. The anchor hit 1 → 0 and the on-disk marker count was 1. The file was restored to its HEAD blob, andgit diff HEADwas empty. Runtime tests importsrcdirectly, so no build leg was needed.action-execution.ts(blob5a34a39a17df→e8d139f4f90a→5a34a39a17df): the REST zh-CN pin and the host-door pin went ×. The REST English control stayed ✓ (Tests 2 failed, 1 passed).own-door-bridge.ts(blob0b5835a501bb→8178c33f7755→0b5835a501bb): both zh-CN 501 pins went ×. Both English controls and the no-noun-key pin stayed ✓ (Tests 2 failed, 3 passed).Derived gates
node scripts/pm/dispatch-gates.mjs --commands: 96 commands, all run. Reconciled with--ran, exit codes recorded: 96 derived, 94 run, 2 NOT MEASURED, 0 UNRUN.node scripts/check-plugin-teardown-shape.mjs --self-test(a fixture pinned to a commit beyond this shallow clone; checker health only) andpnpm check:dual-build-cjs-loads(needs every package built). CI runs both.40ea9d122:check:type-check-coverage,check:type-check-debt,check:test-source-alias,check:cross-package-test-inputs,check:nul-bytes,check-changeset-no-major,check-adr-0087-registration(no declared-breaking changeset),check-empty-changeset,check:issue-citations,check:doc-authoring: all exit 0.overlap-check: VERDICT clean, exit 0 before each push.Generated by Claude Code