Skip to content

fix(runtime, spec): the /actions forward-unavailable 503 and the print door's 501 follow the request's language - #37336

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-37273-print-path-locale
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-37273-print-path-locale

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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 in en, zh-CN, ja-JP and es-ES; English is byte-identical to the text the two sites answered before.
    • action_forward_unavailable / action_forward_unavailable_host: the /actions door's 503 for a same-origin type: 'api' action it cannot forward in-process (REST and MCP doors / the host door dispatchAction), with {{action}} and {{target}}; action_forward_target_unnamed fills {{target}} for an action with no string target.
    • own_door_service_unregistered / own_door_member_missing: the own-door bridge's two 501 NOT_IMPLEMENTED sentences, with {{door}}, {{slot}}, {{producer}}, {{member}}; own_door_print is the print door's noun.
    • Carried nits (comment 7160569088): the N1–N3 rewording of print_timed_out (zh-CN, ja-JP, es-ES) and print_engine_unavailable (ja-JP, es-ES), taken as written there. The header's print_* paragraph now says that a translation item's errors.print_* entry is not consulted (the door holds no i18n service), that Accept-Language is 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 optional params to 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 top Accept-Language tag, then workspaceLocale, then en). That is the ladder every other refusal of this door already reads (recordNotFoundError, the declarative-update permission_denied). The relay passes the call's ec.
  • packages/runtime/src/domains/own-door-bridge.ts + print.ts: the bridge reads the request's top Accept-Language tag (it holds no execution context and no i18n service) and renders both 501 sentences from the catalog. This happens when the bridge names its noun's key (OwnDoorBridge.nounKey, new and optional); print.ts sets nounKey: 'own_door_print'. A bridge that names none (personal views, attachments) keeps its English sentence, so a sentence is never half translated.
  • Seat direction 7159533198 holds: the wire message is localized, no userMessage is 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 REAL dispatch() with a signed-in session and an accept-language header. Under zh-CN,zh;q=0.9,en;q=0.8 the answer is 503 SERVICE_UNAVAILABLE with the zh-CN sentence and no userMessage. The control (en-US, and no header) keeps today's English byte for byte.
  • packages/runtime/src/action-dispatch.test.ts: the host door (dispatchAction handed an environment's own kernel), with the zh-CN sentence for an executionContext.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 both 501 sites (no print service; a print service without handlePrintDoor). Under zh-CN they answer in Chinese, and the en-US and 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: params fills 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 assert expect(JSON.stringify(body)).not.toContain('/srv/secret').

Acceptance notes

  • Clause-② measured yes (widening), not the claim's expected no. operationUserMessage is 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 new nounKey is not reachable from @objectstack/runtime's entry: own-door-bridge.ts is not exported. Metadata-protocol: none: no authorable key, value or metadata type moves. The changeset is patch.
  • File surface. packages/services/service-print/src/print-routes.test.ts is 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).
  • The rest of the family. The personal-view and attachment doors use the same bridge and still answer their 501 in English: they name no nounKey, and their files are outside this card's surface. Making them follow the request language takes one catalog noun key per door plus nounKey on personal-views.ts and attachments.ts. carrier: none — noted for the seat; not a defect class this run files.
  • Accept-Language is read by its top tag at both new sites, the platform's existing reading. The /actions door reads it through the execution context, so a top tag the catalog lacks falls to the workspace default before en. The bridge has no execution context, so it falls straight to en.

Read first

  1. 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.
  2. packages/runtime/src/action-execution.ts — apiActionForwardUnavailableError: the two catalog keys and the target fallback.
  3. 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 under accept-language: zh-CN and today's English for the controls.

Verification

All readings on head 40ea9d122 unless noted (the typecheck fix commit 40ea9d122 touched two test lines; the full suites ran on it). Head e9bdc0698 changes only the changeset prose: on it, check-empty-changeset, check-changeset-no-major and check-adr-0087-registration exit 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's check:test-typecheck flagged two Record<string, string> arguments in the new controls. Those are fixed in 40ea9d122, and pnpm --filter @objectstack/runtime typecheck is green there.
  • @objectstack/spec test: Test Files 894 passed (894) · Tests 28413 passed, 1 todo.
  • @objectstack/core test: Test Files 157 passed (157) · Tests 3763 passed.
  • @objectstack/runtime test: Test Files 649 passed (649) · Tests 12000 passed, 25 skipped · lock VERDICT command-exit 0.
  • @objectstack/service-print test: Test Files 9 passed (9) · Tests 145 passed. The first run reported 2 unhandled Playwright targetInfo rejections from chromium-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, and git diff HEAD was empty. Runtime tests import src directly, so no build leg was needed.

  • action-execution.ts (blob 5a34a39a17df → 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 (blob 0b5835a501bb → 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.
  • NOT MEASURED (exit 3, PREREQUISITE NOT MET): node scripts/check-plugin-teardown-shape.mjs --self-test (a fixture pinned to a commit beyond this shallow clone; checker health only) and pnpm check:dual-build-cjs-loads (needs every package built). CI runs both.
  • Rerun on 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

@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 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

24 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
  • 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 — 186 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 a182fbe37765ab486f3aa5e372ffa9d6af1f6758 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from a4fa7e0a1847997eccfb363c86e53f94606324f0 — the merge of head e9bdc06989526a16dde9a6d8433b7d615ca7608e into base a182fbe37765ab486f3aa5e372ffa9d6af1f6758, 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 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

⚠️ 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#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Flake judgement (2026-11-25T18:34Z) on Test UI (9/16) at head 40ea9d1225 (run 45672207492): one failure, ui/packages/auth/src/__tests__/AuthProvider.test.tsx › "updateUser keeps the signed-in identity" › "a name save keeps the id and the email, takes the new name, and remounts nothing" (line 693); 445 other files passed in the shard.

This PR changes no file under ui/**. Its diff is packages/spec, packages/core, packages/runtime, a service-print test and a changeset, and none of it is imported by @object-ui/auth. I judge it a flake and will re-run the failed job once through rerun-failed.mjs when the run completes; a second failure is treated as real.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Final green head for L1 and same-head contract review (2026-11-25T19:13Z): 40ea9d1225.

  • Checks at this head: 58 success, 11 skipped (all 11 expected per check-expected-skips, exit 0), 0 failed. Test UI (9/16) failed once on an unrelated AuthProvider.test.tsx case (flake judgement 7171103696) and passed on its one re-run (attempt 2). mergeable_state: clean.
  • Size: 12 files, +341 / −33; not governed (0 of 12 paths hit the register); Fixes #37273.
  • Declaration: Clause-②: yes (widening): @objectstack/core's exported operationUserMessage gains an optional third argument, params; existing calls are unchanged. Metadata-protocol: none. The claim amendment is 7170597182.
  • What it does: the /actions door's forward-unavailable 503 and the own-door bridge's two 501s now come from the operation-message catalog (BUILTIN_OPERATION_MESSAGES, packages/spec/src/system/operation-message.ts) in en / zh-CN / ja-JP / es-ES, with the English byte-identical. The 503 follows the caller's execution-context language; the bridge reads the request's top Accept-Language tag for a bridge that names a noun key (print sets own_door_print). Per seat direction 7159533198, the wire message is localized, no userMessage is added, and code and status are unchanged. The carried nits (N1–N4 and the header notes) are taken.
  • Evidence: pins on the REST and host doors and both 501 sites (zh-CN plus English and absent-locale controls). Ablations restoring the hard-coded English turn the zh pins red (2 of 3, and 2 of 5), and the files were restored to the HEAD blob. spec, core, runtime and service-print suites are green. 94 of 96 derived gates ran; 2 were NOT MEASURED (shallow-clone history; full build).
  • For the contract review: the PR edits the published catalog in packages/spec/src/system/operation-message.ts (new keys and header text) and declares a widening on @objectstack/core.
  • Out of scope: the personal-view and attachment own-door doors still answer their 501 in English (they name no noun key). Filed as a follow-up after this lands.
  • Overlap: overlap-check VERDICT clean.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head 40ea9d1225b80f03cf0aa6120e8851484573c453 · 2026-11-25T19:44Z

PR #37336 for card #37273. Read against GitHub and the head tree, not against the report. One open item, on the changeset prose only; the code, the pins and the declaration all hold.

Open items

  • S1 (should-fix) — .changeset/37273-print-path-locale.md, third paragraph: "a request in English, with no Accept-Language, or in a language the catalog carries no text for, reads the same sentence as before." This is false for the /actions door's 503 in a workspace whose default locale is one the catalog carries. The door reads the execution context, and assemble-execution-context.ts:425 folds locale to the workspace default when the request names none; operationUserMessage then tries locale, then workspaceLocale. Measured on the head's operationUserMessage with action_forward_unavailable: no header with a zh-CN workspace default answers Chinese; a fr header with a zh-CN workspace default answers Chinese; an en-US header with a zh-CN workspace default answers English; no header and no default answers English. The changeset's own second paragraph states the ladder, so the two paragraphs disagree, and the changeset is what ships as CHANGELOG.md. Fix: scope that sentence to the bridge's 501, and say that at the /actions door a request with no Accept-Language, or with a language the catalog lacks, takes the workspace default before en. The behaviour is the card's and stays. The delta is one changeset sentence, so the head's contract record keeps governing under the prose-only exception.

Shape

  • Open, draft, base main; the body's first content line is Fixes #37273 and no closing keyword binds another card (l1-face.mjs --pr 37336). Fixes is right: both sites, one pin per site, the ablation and every carried nit are delivered.
  • 12 files, +341 / −33. Not governed. Clause-②: yes (widening) and Metadata-protocol: none read declared in the PR body and in the changeset body.
  • l1-face flags one item, changeset: @objectstack/service-print is touched with no entry. Cleared by reading: the one file is src/print-routes.test.ts, and the package's files[] is dist, README.md, CHANGELOG.md, so nothing from that package publishes.

Premise and fix, measured

  • The fix matches the card and direction 7159533198: only the wire message is localized, no userMessage is added, and code and status are unchanged. Every new pin asserts status and code and that userMessage is undefined.
  • English is byte-identical. The merge-base's hard-coded apiActionForwardUnavailableError and the head's catalog rendering agree over 12 cases (3 action shapes × 4 door values). Both bridge sentences agree with the old template literals.
  • Catalog completeness: 4 locales (en, zh-CN, ja-JP, es-ES), 42 keys each, identical key sets; 0 placeholder mismatches over all 42 keys × 4 locales. The six new keys carry {{action}}, {{target}} (two keys), {{door}}, {{slot}}, {{producer}} (one), {{door}}, {{slot}}, {{member}} (one) and none (two) in every locale.
  • Carried nits: the five rewordings equal comment 7160569088 character for character; the three header notes are present and true against print-routes.ts:340, preferredLocaleFromHeader and server-fault-log.ts:284; the N4 /srv/secret assertions sit on fixtures that do throw that path.
  • Widening is pure: operationUserMessage gains an optional third parameter, nothing is removed, no required member is added, and a two-argument call builds the same render input as before. The only strings that change for existing callers are the five non-English print_* rewordings the card ordered.

Pins and ablation, re-run by this review (throwaway worktree at the head, removed afterwards; under the shared verify lock)

  • Head: own-door-bridge.test.ts, api-action-forward.test.ts, action-dispatch.test.ts with -t 37273: 3 files passed, 8 tests passed. Core operation-user-message.test.ts: 9 passed. Spec operation-message.test.ts: 60 passed.
  • Ablation A, action-execution.ts restored to the merge-base blob (5a34a39a17df to e064365170c3): 2 failed, 6 passed. The REST zh-CN pin and the host-door pin went red; the English controls stayed green.
  • Ablation B, own-door-bridge.ts restored to the merge-base blob (0b5835a501bb to 074034f16dea): 2 failed, 6 passed. Both zh-CN 501 pins went red; the controls and the no-noun-key pin stayed green.
  • Ablation C, core operation-user-message.ts restored to the merge-base blob: 1 failed, 8 passed (the params pin).
  • After each run the file's hash equalled the head blob and git status was empty.

Gates

  • Check-runs at the head (69): 58 success, 11 skipped, 0 failed, 0 pending. All 11 skips are on the expected roster (l1-face: 0 unexpected skip). Lint & Repo Gates and TypeScript Type Check are success. Test UI (9/16) is success on its re-run; the flake judgement is PR comment 7171103696 and the PR touches nothing under ui/**.
  • git merge-tree --write-tree origin/main at a182fbe377: clean, exit 0. landing-k: K = 9, below the hold at 15; no new locale pack, no shared book moved.

Changeset

  • Levels are right: @objectstack/spec, @objectstack/core and @objectstack/runtime at patch. The kind is none, and a non-protocol widening ships patch (AGENTS.md, Post-Task Checklist step 3).
  • Sentence read: paragraphs one and two hold against the diff, including the six key names, the ladder and the params sentence. Paragraph three: its first sentence is S1; its second (the rewordings and the header notes) holds.

Maintainer summary ("维护者速读")

  • Accurate on what changes, why, and the failure mode ("错误码与状态码都不变"). "要你做什么:无" is right for an ungoverned PR.
  • See N4 for one narrow wording.

Nits

  • N1 — the six new keys have no spec-level placeholder pin, unlike the catalog's other families ("every locale defines all N, each with exactly its own placeholders"). zh-CN is pinned through the runtime literals; a dropped placeholder in ja-JP or es-ES would pass. Parity is measured clean at this head.
  • N2 — in ja-JP and es-ES the door and the unnamed-target noun are the same word (エンドポイント, punto de acceso), so an action with no string target reads "target (endpoint) this endpoint forwards". Wording only.
  • N3 — OwnDoorBridge.nounKey is a free string. A key the catalog lacks would print the key as the noun, and nothing pins that a bridge's key renders its noun in English. The one bridge that sets it is correct.
  • N4 — the maintainer summary says "打印类操作", but the 503 changes for every same-origin type: 'api' action whose forward is unavailable.
  • N5 — the report's "no build leg: the runtime tests import src" does not hold on a fresh tree: the three runtime files fail to load until the dependency closure is built (@objectstack/metadata entry), and core's test reads spec's built system entry. The readings above were taken after turbo run build over runtime's dependencies.

Accepted deviations

  • Clause-② measured yes (widening) against the claim's expected no: confirmed, see the contract record.
  • packages/services/service-print/src/print-routes.test.ts and packages/core/src/utils/operation-user-message.test.ts are outside the claim's first file list; both are test-only and named in amendment 7170597182.
  • The dev's first edits landed in the shared checkout before it moved to a worktree. The shared tree reads clean now.

Seat-side items

  • The card's newest Claim: comment is 7169220062 (2026-11-25T17:14Z). readClause2Line reads it declared / no / no arm. Amendment 7170597182 (2026-11-25T18:12Z) is not a Claim: comment, and its bulleted, bold line reads malformed. The queue gate reads the claim comment's line-initial key only, so the seat owes a new Claim: comment with the line Clause-②: yes (widening) before enqueueing.
  • Out of scope: the personal-view and attachment doors still answer their 501 in English. The PR body says carrier: none; PR comment 7172022330 (2026-11-25T19:13Z) says the seat files it after landing. No card exists yet.
  • The card and PR comments are signed by session_01QSeKYnagJvGbCtNg2PhvgW; this review is signed by the seat session in the first line.

Landing

  • After the S1 patch: the seat reads the delta (changeset only), re-reads the checks at the new head, and the zone lands. K = 9 now; merge main first if K reaches 15.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 40ea9d1225b80f03cf0aa6120e8851484573c453
Local-runs: probe — the seat's review order asked for the card's pins at the head and under ablation, run once in a throwaway worktree that is now removed
Scope: packages/spec/src/system/operation-message.ts + packages/core/src/utils/operation-user-message.ts, packages/runtime/src/action-execution.ts, packages/runtime/src/action-dispatch.ts, packages/runtime/src/domains/own-door-bridge.ts, packages/runtime/src/domains/print.ts

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

  • Clause-②: yes (widening) holds, and it reads declared / yes / widening in the PR body and in the changeset body. packages/core/src/index.ts:236 re-exports operation-user-message.js, and packages/runtime/src/index.ts:432 re-exports all of @objectstack/core, so operationUserMessage is on both entries. It gains an optional third parameter, params.
  • The widening is pure. Nothing is removed or renamed, no required member is added, and a two-argument call builds the same render input as before (the params key is spread in only when given). Core's pre-existing cases and the new "without params" case pass at the head.
  • The catalog is declared as a string-keyed record of string-keyed records, so six new keys move no type. No key is removed. No English string of an existing key changes. Five non-English print_* strings are reworded, as the card orders, and they equal comment 7160569088 character for character.
  • Not on a published entry: OwnDoorBridge.nounKey and the third parameter of apiActionForwardUnavailableError. packages/runtime/src/index.ts names neither own-door-bridge nor action-execution, and the package's exports address only . and ./compiled-plugin-manifest-file.
  • Metadata-protocol: none holds: no authorable key, value or metadata type moves. The new keys add no working errors.* override, because neither producer holds an i18n service, and the header says so.
  • Completeness: en, zh-CN, ja-JP and es-ES each define the same 42 keys; placeholder sets match English for every key in every locale (0 mismatches). English is byte-identical to the merge-base sentences over 12 action and door combinations for the 503 and for both 501 templates.

② Semver level

  • @objectstack/spec, @objectstack/core, @objectstack/runtime: patch. Correct: the kind is none, and a non-protocol widening ships patch (AGENTS.md, Post-Task Checklist step 3). No BREAKING banner is owed.
  • @objectstack/service-print carries no entry and owes none: its one changed file is a test, outside the package's files[].

③ Boundary flags

  • The dev report (card comment 7170542144) has no open question and no security finding. Its two flags are answered: the declaration measured yes (widening) against the claim's expected no, confirmed in ①; the two test files outside the first file list are test-only and named in amendment 7170597182.
  • Direction 7159533198 is kept: only the wire message moves, no userMessage is added to a fault, and code and status are unchanged. Each new pin asserts all three.
  • Interpolation is single-pass (interpolateValidationMessage), and the bridge renders its noun before handing it in as a value, so a placeholder inside an action name, a target or a noun is printed as written. The header-derived locale only selects a catalog; an unknown tag falls to English.
  • SQL push-down: no query, no id materialisation and no in-app join is added.
  • The PR's author is objectstack-fleet[bot]; no off-relay note is owed.
  • Checks at the head: 58 success, 11 skipped (all on the expected roster), 0 failed, 0 pending.

④ Design judgment

packages/spec/src/system/operation-message.ts, against the card, the direction, and its first consumers in this diff:

  • The six keys are the right unit. Two 503 sentences split by remedy (the deployment's HTTP server, or the kernel handed to dispatchAction), one noun for an unnamed target, two 501 sentences split by what is missing, and one door noun. Placing them in this catalog is what the card orders, and the header states that the action_forward_* sentences are an operator's, localized because the console shows a refused action's wire message.
  • The header's new text is true against the code it cites. The print door has no i18n service and passes only a locale (print-routes.ts:340), so errors.print_* is not consulted and a top tag the catalog lacks answers English. preferredLocaleFromHeader takes the top tag with no q-value reading. serverFaultLogMessage (server-fault-log.ts:284) logs the thrown error's own message and falls back to the wire text only when that message is empty. The /actions door's ladder is locale, then workspaceLocale, then en, which is what operationUserMessage reads.
  • Implementing files agree with the contract. action-execution.ts renders the _host key at the host door and the plain key elsewhere, quoting a string target and using the catalog noun otherwise. action-dispatch.ts passes the call's execution context. own-door-bridge.ts localizes only when the bridge names a noun key and otherwise keeps the whole sentence English; print.ts names own_door_print, whose English equals its noun.
  • Pins, run by this review: at the head, 8 of 8 card pins pass in the three runtime files, 9 of 9 in core's file and 60 of 60 in the catalog's file. With action-execution.ts at the merge-base blob, 2 fail and 6 pass; with own-door-bridge.ts at the merge-base blob, 2 fail and 6 pass; with core's helper at the merge-base blob, 1 fails and 8 pass. Each file was restored to the head blob.

Findings: three nits, none affecting correctness or the contract.

  • nit — the new keys have no spec-level placeholder pin of the kind the catalog's other families carry; ja-JP and es-ES placeholders are unpinned. Parity is clean at this head.
  • nit — ja-JP and es-ES use one word for the door and for the unnamed-target noun, so that rare sentence reads circular.
  • nit — nounKey is a free string; a key the catalog lacks would print the key as the noun.

The changeset prose is outside the contract faces and is read at L1.

Implemented-by: claude/issue-37273-print-path-locale
Reviewed-by: session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head e9bdc06989526a16dde9a6d8433b7d615ca7608e · 2026-11-25T20:18Z

  • Delta over the L1 REWORK 7172728507 at 40ea9d12. One commit changes one line, in .changeset/37273-print-path-locale.md. No code, test or catalog path moved.
  • S1: closed. Paragraph 3 now states the same ladder as paragraph 2. The /actions door's 503 takes the request's top Accept-Language tag, then the workspace default locale, then English. A request with no header in a zh-CN-default workspace is answered in Chinese. The bridge's 501 reads the top Accept-Language tag alone. Only a request that resolves to English, or to no catalogued language, reads the old English sentence. This matches assemble-execution-context.ts and operationUserMessage.
  • N4: taken in the 维护者速读. The 503 change is described as covering every same-origin api action.
  • The contract review PASS 7172739237 carries over this prose-only hop. The hop moves no code, schema, export or catalog key.
  • The claim line was corrected by the seat. Claim 7169220062 now reads declared / yes / widening.
  • Check-runs at head are all green: see the counts the zone reported and the head's check suite.
  • No must-fix, no should-fix.
  • Landing: the zone lands it. K is below 15, so there is no main merge first.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Landing (2026-11-25T20:19Z): head e9bdc06989, on the seat's L1 (REWORK 7172728507, S1 closed by the changeset-only delta; delta ACCEPT 7173487051) and the CONTRACT_REVIEW_TIER PASS 7172739237, carried over the prose-only hop (Clause-②: yes (widening)).

Probe Reading
check-governed-merges.mjs --pr 37336 NOT governed
Check-runs at this head 60 success · 13 expected skip (check-expected-skips exit 0) · 0 failed
Landing K 10 first-parent commits on main since the merge base; under 15, so no main merge. This PR touches no locale pack.

There is no narrowing arm, so no maintainer gate applies.

State change: ready for review, and auto-merge armed. On MERGED, #37273 closes by Fixes #37273; the personal-view and attachment own-door 501s are filed as a follow-up after the merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 20:20
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit ebac615 Nov 25, 2026
74 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37273-print-path-locale branch November 25, 2026 20:51
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
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.

Print-path English sentences outside #37260: the /actions door's forward-unavailable 503 and the own-door bridge's 501 ignore the request locale

2 participants