Skip to content

feat: say a translation fault on the answer as translationWarning, and guard three unguarded bundle builders - #38282

Queued
objectstack-fleet[bot] wants to merge 3 commits into
mainfrom
claude/project-thread-w29ab7
Queued

objectstack-fleet[bot] wants to merge 3 commits into
mainfrom
claude/project-thread-w29ab7

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #35707

Clause-②: yes (widening)
Metadata-protocol: added

维护者速读

  • 是什么:翻译服务出错时,对象和数据集的回答(元数据接口、AI 助手读对象和查数据集)现在都会多带一句「翻译读不到,下面显示的是原文」,中文用户不会再把故障当成没翻译;正常时回答一个字不变。这句话是固定写法,原始报错只记在服务器日志里。
  • 为什么:上一轮修复只让「列数据集」会提示,其余地方故障时和「本来就没翻译」看起来一模一样;另外还有三处读翻译的地方没加保护,翻译服务一出错就直接报错。
  • 出错会怎样:最大的行为变化是对象保存和元数据迁移:翻译读不到时两者都会被拒绝(503,提示稍后重试),而不是把界面上的译文当成原文存进去。可直接撤回。
  • 要你做的:无。

What changes

① A whole-answer warning, translationWarning. When the i18n service resolves but its getLocales / getTranslations throws, the shared translator (translationBundleOf, packages/rest/src/meta-item-read-gate.ts) already served the authored text and logged the fault. The answers now also carry one optional top-level string, translationWarning, holding one fixed sentence (META_TRANSLATION_FAULT_WARNING): "The translations could not be read, so labels and descriptions are served untranslated." The i18n error's own text goes to the server log only. It is present only on such a fault; an answer whose translations were read (including one that found no translation for the caller's locale) is byte for byte what it was. One key, no companion boolean (seat ruling on the claim, 7237696168).

Surface Where it is attached
GET /meta/:type (REST server and runtime dispatcher) createMetaListAnswer step 9: the translateList port takes an optional reportTranslationFault, and the chain puts the sentence beside items on the { type, items } envelope. A bare-array list has no member to carry it and is answered as it came.
GET /meta/:type/:name (both hosts) translateMetaEnvelope, the one place both hosts build the by-name body: beside item.
MCP list_objects (HTTP and stdio bridges) DiagnosedObjectListing.translationWarning, rendered by the tool beside objects (healthy and degraded branches).
MCP describe_object (both bridges) a top-level member of the answer the bridge builds.
query_dataset (both bridges) the bridges' loadDatasets now name the fault as DatasetToolSource.translationWarning; the executor serves it on the answer. warning stays the delegation narrowing's alone.

list_datasets keeps its shape: it still says the same fault as partial + warning (the executor reads the renamed source member into the same warnings list), now in the same fixed sentence. Its warning when the dataset catalogue itself cannot be read is a fixed sentence too ("The dataset catalogue could not be read, so no dataset is listed."), with the error logged through the analytics service's logger (DatasetToolsDeps.logger, optional, bound by AnalyticsService.datasetTools). query_dataset's 503 SERVICE_UNAVAILABLE when the dataset read fails is the REST door's own fixed sentence (The dataset "<name>" could not be resolved: the dataset read failed. This is a server-side fault, not a missing dataset.), the error on cause and in the same log. All warning and refusal sentences use the platform's client-facing failure text; the original error is in the server log only.

Spec: GetMetaItemsResponseSchema, GetMetaItemResponseSchema (one shared description) and QueryDatasetOutputSchema gain translationWarning: z.string().min(1).optional(). No export added or removed; regenerated content/docs/references/** and authorable-surface/{ai,api}.json.

② The three unguarded bundle builders. Reach measured first:

  • ProtocolDiscoveryAndBasesFacet.registeredTranslationBundle (packages/metadata-protocol): it has two readers, the object save (the translated-echo restore) and the stored-metadata migration (migrateStoredMetadata's translated-echo notices, read for every stored object row on the preview and the apply pass, reached from the REST route, the runtime dispatcher and os migrate meta). Answering undefined there, as the read doors do, would store a Studio session's translated labels as the authored text, or count an echoed stored row canonical. It now refuses either 503 SERVICE_UNAVAILABLE (translationsUnreadableError) and stores nothing; before, the raw i18n error escaped. The refusal is declared (refusal: true) with one fixed sentence, so the HTTP caller reads it rather than the generic 5xx one: "The translations could not be read, so a label a translated read served back cannot be told from one written by hand; nothing was saved or migrated. Retry once the translations can be read." The i18n error rides as cause and is logged at warn where it is caught (a declared refusal is not logged by the route doors). A dev-thread decision, listed here: fail closed, the rule the same facet's stored-row read already follows.
  • buildTranslationBundle in service-analytics plugin.ts (select-option labels of a dataset dimension) and translationBundleOf in service-storage record-file-access.ts (the upload page's labels): answer no bundle, so the labels are served as declared, and one warn line names the reason (a functional degradation).

③ The two test gaps from the card: a fault pin on the HTTP object-tools path, and the mcpRequestHttp branch that reads a host's already-parsed request.query.

Tests

  • packages/rest/src/meta-translation-fault-34993.test.ts: list and by-name on a fault carry translationWarning, exactly the fixed sentence; the log line names the i18n error; the control carries none. The protocol double now answers the list in the { type, items } envelope the real protocol answers.
  • packages/runtime/src/domains/meta-list-projection-parity.test.ts: new top-level describe, both transports, list and by-name: 200, authored label, the same fixed translationWarning with no i18n error text in the body; control translated with none.
  • packages/runtime/src/domains/mcp-object-locale-34872.test.ts: ③ the fault pin (describe_object, listObjectsDiagnosed, both throwing reads: the fixed sentence, no i18n error text) plus control; ③ the parsed-query pin, whose URL names fr-FR while request.query names zh-CN, so an answer read from the URL cannot pass (control: the same request without query reads the URL).
  • packages/mcp/src/stdio-data-bridge.object-locale-34872.test.ts: through the real tool layer, describe_object and list_objects carry the fixed translationWarning on a fault, with no i18n error text, the control's list_objects keys are exactly objects, totalCount; a resolver that throws (no service) says nothing.
  • packages/runtime/src/mcp-dataset-tools-bridge.test.ts and packages/mcp/src/stdio-data-bridge.dataset-locale.test.ts: query_dataset on a fault carries the fixed translationWarning, and the controls carry none; list_datasets' fault warning is now the same fixed sentence and neither answer contains the i18n error text.
  • packages/objectql/src/protocol-meta-effective-schema.test.ts: an object save over throwing reads is refused as a declared 503 SERVICE_UNAVAILABLE refusal with the fixed sentence, the i18n error on cause, and stores no row; the migration's preview and apply passes are refused the same way and leave the stored row untouched; controls save and list.
  • packages/rest/src/meta-save-translation-fault-35707.test.ts (new), at the HTTP door over the real protocol: PUT /meta/object/:name over throwing reads answers 503 SERVICE_UNAVAILABLE whose error is the fixed sentence (not the generic 5xx one), the body holds no i18n error text, the store is unchanged, and the server log has the error; control 200 and stored.
  • packages/services/service-analytics/src/__tests__/dataset-tools.test.ts: list_datasets over a catalogue read that throws answers the fixed sentence, no error text, and the logger gets the error; query_dataset over a dataset read that throws refuses 503 with the fixed sentence, no error text, the error as cause and in the logger.
  • packages/services/service-analytics/src/__tests__/picklist-dimension-label-i18n.test.ts and packages/services/service-storage/src/record-file-access.integration.test.ts: a fault serves the authored labels and logs the reason.

Verification

Read first: translateMetaEnvelope and step 9 of createMetaListAnswer in packages/rest/src/meta-item-read-gate.ts; registeredTranslationBundle in packages/metadata-protocol/src/protocol-discovery-and-bases.ts (the one place a fault now refuses instead of degrading, for its two readers); describeForPrincipal / listObjectsDiagnosed in packages/mcp/src/stdio-data-bridge.ts.

Two-minute check: pnpm --filter @objectstack/rest exec vitest run src/meta-translation-fault-34993.test.ts src/meta-save-translation-fault-35707.test.ts prints 6 passed: the fault reads carry the fixed translationWarning, and the save door answers 503 with the fixed sentence.

runs

Head 2468a0c (three commits on origin/main 98bd8de). Round 2 answers contract review 7238485386 (M1, S1, S2); round 3 is the seat's one addition, query_dataset's 503 sentence.

Round 3 (2468a0c): service-analytics build + typecheck exit 0; service-analytics dataset-tools 96 passed, 10 skipped; rest analytics-dataset-ai-tools-parity 7/7; mcp mcp-dataset-tools + stdio-data-bridge.dataset-locale 40/40; runtime mcp-dataset-tools-bridge 13/13; dispatch-gates 136 derived, 135 run exit 0, 1 NOT-MEASURED (teardown self-test, exit 3), 0 UNRUN.

Round 2 (141dfb3):

  • Build: pnpm turbo run build over @objectstack/metadata-protocol, rest, service-analytics, mcp, runtime and their closures: exit 0, 42/42.
  • Tests (each file, vitest run): rest meta-translation-fault-34993 + meta-save-translation-fault-35707 (new) + analytics-dataset-ai-tools-parity 13/13; objectql protocol-meta-effective-schema 31/31 after one fix (the migration control first asserted a listed row; a canonical row is not listed, so it now asserts both passes answer and leave the row untouched); service-analytics dataset-tools + picklist-dimension-label-i18n 132 passed, 10 skipped; mcp stdio-data-bridge.dataset-locale + stdio-data-bridge.object-locale-34872 + mcp-dataset-tools 51/51; runtime mcp-object-locale-34872 + mcp-dataset-tools-bridge + meta-list-projection-parity 1471/1471.
  • pnpm turbo run typecheck for rest, metadata-protocol, service-analytics, objectql, mcp, runtime: exit 0, 47/47.
  • node scripts/pm/dispatch-gates.mjs --commands then --ran: 136 derived, 135 run exit 0, 1 NOT-MEASURED (node scripts/check-plugin-teardown-shape.mjs --self-test, exit 3, shallow clone, left to CI), 0 UNRUN. Four gates were red on the new REST test first and green after: check:engine-double-contract (ledger rewritten with --write), check:objectql-double-limit (the double applies the caller's limit), check:rest-log-spy-declared (declares OS_REST_LOG), check:test-source-alias (module-top @objectstack/objectql import).
  • Check Changeset reads the PR's declaration, so it is measured on CI only.

Round 1 (head c04c652): build, typecheck and the same test files green; check:generated regenerated content/docs/references/**; dispatch-gates 127 derived, 123 run exit 0, 4 NOT-MEASURED, 0 UNRUN.

Acceptance notes

  • The cached by-name read's validator does not move on a fault. Its ETag is keyed on the stored row and the locale, not on what the translation step contributes, so a client holding a fault-time body can be answered 304 after the fault clears (and the reverse). Pre-existing on main; not changed here; the seat files it as its own card.
  • The MCP tool descriptions do not mention translationWarning (review N1, left as is); the member is self-describing and only appears on a fault.
  • The objectstack://objects MCP resources (stdio) serve the authored text on a fault, without a warning: no resource body has a slot for one, and the card names the tools only.
  • Branch is the platform's claude/project-thread-w29ab7, not the repo's claude/issue-<n>-… convention.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5

…arded bundle builders

An i18n service that resolves but cannot read its translations now leaves a
trace on every answer it touches: the /meta list and by-name reads on both
HTTP hosts, the MCP list_objects and describe_object tools on both bridges,
and query_dataset carry an optional translationWarning naming the reason,
present only on such a fault.

The object save refuses 503 SERVICE_UNAVAILABLE instead of storing a body
whose translated echoes it could not tell from typed text; the analytics
option-label pass and the upload page serve the authored labels with one
warn line.

Claude-Session: https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation protocol:ai tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 7 package(s): @objectstack/mcp, @objectstack/metadata-protocol, @objectstack/rest, @objectstack/runtime, @objectstack/service-analytics, @objectstack/service-storage, @objectstack/spec, touching 40 documentable anchor(s). ⚠️ 2 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/authorable-surface/api.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/connect-mcp.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/ai/knowledge-rag.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/api/client-sdk.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/api/error-catalog.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/api/index.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/automation/webhooks.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/deployment/self-hosting.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/kernel/runtime-services/email-service.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/permissions/authentication.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/permissions/authorization.mdx (via buildMcpBridge (symbol, a top-level function), SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/permissions/sharing-rules.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/plugins/packages.mdx (via AnalyticsServicePlugin (symbol, a top-level class))
  • content/docs/protocol/kernel/error-handling.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/protocol/knowledge.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/ui/print-pages.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))

⛔ 13 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/implementation-status.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v12.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v16.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/releases/v17/17-3.mdx (via RestServer (symbol, a top-level class), SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/releases/v17/17-4.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/releases/v17/17-5.mdx (via AnalyticsService (symbol, a top-level class), RestServer (symbol, a top-level class))
  • content/docs/releases/v17/17-6.mdx (via AnalyticsService (symbol, a top-level class), AnalyticsServicePlugin (symbol, a top-level class))
  • content/docs/releases/v17/17-7.mdx (via AnalyticsService (symbol, a top-level class), SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/releases/v18/18-2.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/releases/v18/18-3.mdx (via RestServer (symbol, a top-level class))
  • content/docs/releases/v18/18-5.mdx (via SERVICE_UNAVAILABLE (literal, a string literal in translationsUnreadableError))
  • content/docs/releases/v18/18-6.mdx (via AnalyticsService (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/authorable-surface/api.json) — pages documenting those are invisible to this run
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 190 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 3ad3b415997e28d37e74cc50ea05af9fac7faeaf → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 464d6b82cd225944f50a18f1cfa933dcae2dd3d2 — the merge of head 2468a0c13d1c7b84b95a3b1fce142b3bd470f657 into base 3ad3b415997e28d37e74cc50ea05af9fac7faeaf, 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 464d6b82cd225944f50a18f1cfa933dcae2dd3d2 && git checkout 464d6b82cd225944f50a18f1cfa933dcae2dd3d2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3ad3b415997e28d37e74cc50ea05af9fac7faeaf 2468a0c13d1c7b84b95a3b1fce142b3bd470f657 && git checkout -B drift-repro 3ad3b415997e28d37e74cc50ea05af9fac7faeaf && git merge --no-ff 2468a0c13d1c7b84b95a3b1fce142b3bd470f657

node scripts/docs-audit/affected-docs.mjs --json 3ad3b415997e28d37e74cc50ea05af9fac7faeaf

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 3ad3b415997e28d37e74cc50ea05af9fac7faeaf → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c04c6526ff112994b0415319bca2990d0b0ccf5a
Local-runs: none
Scope: packages/spec/src/ai/dataset-tools.zod.ts, packages/spec/src/api/protocol.zod.ts + packages/rest/src/meta-item-read-gate.ts, packages/rest/src/rest-server.ts, packages/runtime/src/domains/meta.ts, packages/runtime/src/domains/mcp.ts, packages/mcp/src/mcp-http-tools.ts, packages/mcp/src/metadata-completeness.ts, packages/mcp/src/stdio-data-bridge.ts, packages/services/service-analytics/src/dataset-tools.ts, packages/services/service-analytics/src/plugin.ts, packages/services/service-storage/src/record-file-access.ts, packages/metadata-protocol/src/protocol-discovery-and-bases.ts

Read: card #35707 (body, triage 7027843174, claim 7237696168, dev report 7238417187), the PR body, file list and net diff, the check-runs on this head, and the cited code on main e2a0e90. Tests, generated references, the authorable-surface shards and the changeset prose are the lane seat's ACCEPT, apart from what ② says of the changeset.

① Derived judgments

  • GetMetaItemsResponseSchema, GetMetaItemResponseSchema, QueryDatasetOutputSchema each gain translationWarning: z.string().min(1).optional(). Right: a response-side widening, no key removed, no existing key's meaning moved. QueryDatasetOutputSchema.warning keeps "present exactly when delegationNarrowed", and the executor still writes warning from the narrowing alone.
  • No export added or removed in packages/spec. Right (the diff adds one module-private constant).
  • DiagnosedObjectListing.translationWarning? and DatasetToolSource.translationWarning? (exported types of @objectstack/mcp and @objectstack/service-analytics): optional members, widening. Right.
  • MetaListAnswerSources.translateList gains an optional third parameter: both transports in the diff pass it; an out-of-tree implementer that ignores it still type-checks and simply serves no warning. Right.
  • Bridge loadDatasets now hands the fault as translationWarning where main handed it as warning. Right: the executor pushes it into the same list_datasets warnings list, in the same position, so partial + warning there are what they were; query_dataset reads it into the new key only.
  • A healthy answer is byte for byte what it was. Right: every attach site is conditional on a reported fault; the plain by-name read and the list hash the served body, so their validators move with the member.
  • Object save under a translation fault: on main the raw i18n error already escaped saveMetaItem (no guard at registeredTranslationBundle, no catch on the way out), so the save already failed and stored nothing. The diff changes what the failure is coded as (503 SERVICE_UNAVAILABLE, cause kept), not whether it fails. Right as a small call: no save that succeeded on main is refused now.
  • Analytics option labels and the upload page's labels: fail on main, authored text plus one warn line now. Right, and it is the answer translationBundleOf in packages/rest already gives.

② Semver level

Clause-②: yes (widening): right, on the PR body and the changeset.

Metadata-protocol: none with @objectstack/spec: patch: wrong on this head. Check Changeset concluded failure: the diff moves packages/spec/authorable-surface/ai.json and api.json, and the gate takes a moved shard as a key entered, which wants Metadata-protocol: added and @objectstack/spec at least minor. The gate's conclusion is the verdict; see M1.

The changeset says the refused save "names the reason". At the protocol throw it does; at the HTTP door it does not (S2). The changeset and the PR body both say the bundle's only reader is the object save; it has a second (S1).

③ Boundary flags

  • open_questions: none in the dev report.
  • Dev flag, the cached by-name read's validator does not move on a fault: confirmed against the tree, and it is wider than reported. getMetaItemCached hashes the stored document and the locale, and the REST arm translates after the validator is judged, so nothing the translation step contributes is in that validator: a changed translation is held by a 304 the same way a fault-time body is. Pre-existing, in files outside this diff, so not a finding on this head. "Noted, not filed" is not an answer for it: escalated to the seat to file as its own card, naming that the default by-name read can keep a client on a translationWarning after the fault has cleared.
  • Dev flag, 4 of 127 derived gates not measured locally and left to CI: CI had not answered at this read. Without a conclusion on this head: Build Core, Build Docs, Build UI Deps, Live E2E UI, Test Core 1/10 to 10/10, Type Check (workspace, consumer gates, debt ledger), Lint (CI, release & engine gates; docs & code guards; repo & tooling gates; scoped query-options erasure; scoped slot lookup & corpus). This record does not stand in for them.
  • Dev flag, the objectstack://objects resources serve no warning: accepted; the card names the tools.
  • Dev flag, the branch is not claude/issue-N-…: the seat's to accept; no effect on the contract.
  • Seat note, the save refusal as a small call: answered in ① (already a failure on main); its coding and wording in S1 and S2.
  • SQL push-down: no new id materialisation and no in-app join in the diff.

④ Design judgment

packages/spec/src/api/protocol.zod.ts. Holds against its consumers. Both transports build the by-name body in translateMetaEnvelope and the list in step 9 of createMetaListAnswer, so the member is beside item / items and never inside a document, as the description says. "Absent on every answer whose translations were read" holds: only the catch in translationBundleOf reports. The real protocol and both dispatcher fallbacks answer the { type, items } envelope, so the bare-array carve-out reaches no shipped list.

packages/spec/src/ai/dataset-tools.zod.ts. Holds against the executor: query_dataset writes the key only from the source's translationWarning, independent of warning.

Read doors and bridges (rest, runtime, mcp, service-analytics dataset-tools.ts): agree with the contract. The other readers of describeObject (field visibility, the not-recorded probe, validate_expression) read fields alone, so the extra member breaks none of them.

service-analytics plugin.ts, service-storage record-file-access.ts: agree with their docblocks.

packages/metadata-protocol/src/protocol-discovery-and-bases.ts:

M1 (must-fix) — Check Changeset is red on this head. Declare Metadata-protocol: added on the PR body and in the changeset, and grade @objectstack/spec minor; the other packages stay patch.

S1 (should-fix) — The docblock says the bundle's "one reader is the object SAVE". It has a third call site: migrateStoredMetadata (packages/metadata-protocol/src/protocol-save.ts, the echoNotices read) calls host.registeredTranslationBundle() for every stored object row, on the preview pass as well as the apply pass, from the REST route, the dispatcher and os migrate meta. So the reach the card asked to be measured first was measured short, and a preview that saves nothing now fails with "this save cannot tell … nothing was saved". Failing closed is right there too (without the bundle an echoed row would be counted canonical), so the code's decision stands; the docblock, the error's sentence and the changeset line do not. Name both readers, word the sentence for either, and pin the migration pass under a throwing read.

S2 (should-fix) — The refusal's sentence does not reach an HTTP caller. The route error door withholds the prose of a declared 5xx unless the producer sets refusal: true (packages/rest/src/error-response.ts, the status >= 500 arm; declaredRefusalMessage in packages/types/src/thrown-http-error.ts), and translationsUnreadableForSaveError does not set it. A Studio save therefore gets 503 SERVICE_UNAVAILABLE with the generic sentence, not "retry once the translations can be read", and the new test pins the protocol throw only. It is coded as the platform's other 503s are (code, status, cause), but not worded as they are: metadataStoreUnavailableError authors a fixed sentence and keeps the caught text on cause alone. Either declare the refusal with a sentence authored for the caller on that pattern, or leave it undeclared and correct the changeset and PR body; pin whichever at a door. One related point is reported to the seat outside this record.

N1 (nit) — The list_objects, describe_object and query_dataset tool descriptions do not name translationWarning. No effect on the contract; a follow-up if wanted.

Implemented-by: claude/project-thread-w29ab7
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA (isolated contract-review sub-agent)

VERDICT: FAIL

…e fixed warning sentences

- The changeset declares `Metadata-protocol: added` and grades
  `@objectstack/spec` minor: the response schemas' new key moves the
  authorable-surface shards.
- `registeredTranslationBundle` has two readers, the object save and the
  stored-metadata migration (preview and apply). Both are refused the same
  way on a translation fault; the docblock and the sentence name both, and a
  migration pin covers the two passes.
- The refusal is declared (`refusal: true`) with one fixed sentence, so the
  HTTP caller reads it instead of the generic 5xx sentence; the i18n error
  rides as `cause` and is logged at warn. Pinned at the REST save route.
- `translationWarning`, `list_datasets`' translation warning and its
  catalogue-unreadable warning are fixed sentences; the original error goes
  to the server log only (`DatasetToolsDeps.logger`, bound by
  `AnalyticsService.datasetTools`).

Claude-Session: https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5
Co-authored-by: Claude <noreply@anthropic.com>
The refusal is the REST door's own sentence for the same fault; the read's
error rides as `cause` and goes to the server log through the dataset tools'
logger, never into the answer.

Claude-Session: https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2468a0c13d1c7b84b95a3b1fce142b3bd470f657
Local-runs: none
Scope: packages/spec/src/ai/dataset-tools.zod.ts, packages/spec/src/api/protocol.zod.ts + packages/rest/src/meta-item-read-gate.ts, packages/rest/src/rest-server.ts, packages/runtime/src/domains/meta.ts, packages/runtime/src/domains/mcp.ts, packages/mcp/src/mcp-http-tools.ts, packages/mcp/src/metadata-completeness.ts, packages/mcp/src/stdio-data-bridge.ts, packages/services/service-analytics/src/dataset-tools.ts, packages/services/service-analytics/src/analytics-service.ts, packages/services/service-analytics/src/plugin.ts, packages/services/service-storage/src/record-file-access.ts, packages/metadata-protocol/src/protocol-discovery-and-bases.ts

Delta review against the round-1 record 7238485386 (FAIL at c04c6526). Read: the two commits since (141dfb3e, 2468a0c1) as the net delta c04c6526...2468a0c1, the PR body and the full net diff against main as they stand, the head's files for the touched answer paths, and the check-runs on this head. The two hits files did not move in the delta.

① Derived judgments

Round 1's judgments stand. The delta adds:

  • DatasetToolsDeps.logger? (exported type of @objectstack/service-analytics): optional, widening. Right. AnalyticsService.datasetTools binds the service's logger unless the caller names one.
  • metaTranslationFaultWarning(error) is replaced by the constant META_TRANSLATION_FAULT_WARNING. Right: the function was not on @objectstack/rest's index and had no importer outside its own file on main, so no published export leaves.
  • The sentences an answer carries changed on shipped surfaces: list_datasets' two warnings and query_dataset's 503 for a failed dataset read are now fixed text where main appended the caught text. Right, by the seat's ruling: warning and refusal sentences use fixed client-facing text; the original error goes to the server log. The keys, codes, statuses and partial are what they were.
  • The save and migration refusal is now a declared refusal (refusal: true, 503 SERVICE_UNAVAILABLE, cause kept). Right: still a failure where main failed; only its coding and sentence moved.

② Semver level

Clause-②: yes (widening) and Metadata-protocol: added, on the PR body and in the changeset, with @objectstack/spec: minor and the six other packages patch: right for what the diff publishes and for the moved authorable-surface shards. Check Changeset has one run concluded success on this head and a second still in progress at this read.

The changeset now names both catalog readers, the declared refusal and its sentence, the fixed sentences and the new optional logger: it matches the tree.

③ Boundary flags

  • open_questions: none.
  • Round 1's escalation stands and is not this head's to close: the default cached by-name read's validator does not move with anything the translation step contributes. Outside the diff; the seat's card to file.
  • N1 was left undone by the thread: accepted as a nit, see ④.
  • SQL push-down: nothing new in the delta.
  • No conclusion on this head at this read: Build Core, Build Docs, Build UI Deps, Live E2E UI, Plan Test Core shards, Plan Test UI shards (the Test Core shards had not been created yet), Type Check (workspace, source gates, consumer gates, debt ledger), Lint (ESLint; CI, release & engine gates; docs & code guards; repo & tooling gates; scoped query-options erasure; scoped slot lookup & corpus; scoped tooling self-tests), and the second Check Changeset run. This record does not stand in for them; the new REST pin and the migration pins are judged here by reading, and their runs are CI's.

④ Design judgment

M1: closed. The declaration reads added, @objectstack/spec is minor, on both bodies.

S1: closed. The docblock of registeredTranslationBundle names both readers, the object save and migrateStoredMetadata on its preview and apply passes; the one sentence is worded for either door ("nothing was saved or migrated"); protocol-meta-effective-schema.test.ts pins both migration passes under a throwing read as the same declared 503 with the stored row untouched, beside a control.

S2: closed. translationsUnreadableError follows the metadataStoreUnavailableError pattern: a fixed sentence authored for the caller, code / status, the caught error on cause alone, and refusal: true, which is the member the route error door reads before it hands a declared 5xx's sentence on. packages/rest/src/meta-save-translation-fault-35707.test.ts pins it at PUT /meta/object/:name over the real protocol: 503, error equal to the fixed sentence, the store unchanged, and a control.

Fixed client-facing text, read across the whole net diff and not the delta alone: every sentence the diff puts on an answer or a refusal is a constant or is built from the request's own names only. That covers translationWarning on GET /meta/:type and GET /meta/:type/:name (both hosts), on MCP list_objects and describe_object (both bridges) and on query_dataset; list_datasets' translation and catalogue warnings; query_dataset's 503; and the save and migration 503. Each place that catches an error writes the original to the server log (logWarn, the service logger, console.warn in metadata-protocol) and, where it throws, keeps it on cause; the two analytics and upload-page builders log and serve authored text. The tests on each surface assert the fixed sentence and that the answer does not contain the original text.

The read doors, the bridges and the two spec files are as round 1 judged them; the spec descriptions still describe what is served.

No must-fix, no should-fix.

N1 (nit) — unchanged: the list_objects, describe_object and query_dataset tool descriptions do not name translationWarning. An accepted deviation, or a follow-up card if wanted.

Implemented-by: claude/project-thread-w29ab7
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA (isolated contract-review sub-agent)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgVdouXCTCCcBVLaYW5
os-dev-report

{
  "issue": 35707,
  "status": "done",
  "branch": "claude/project-thread-w29ab7",
  "pr": "https://github.com/objectstack-ai/objectstack/pull/38282",
  "session": "session_01L6bhgVdouXCTCCcBVLaYW5",
  "premise_still_valid": true,
  "summary": "Rounds 2 and 3 on top of report 7238417187, answering contract review 7238485386 (delta PASS 7239581233). M1: Metadata-protocol: added and @objectstack/spec minor on the PR body and the changeset. S1: registeredTranslationBundle's two readers (object save; migrateStoredMetadata preview and apply) named in the docblock, the sentence and the changeset, with migration pins. S2: translationsUnreadableError is a declared refusal (refusal: true, 503 SERVICE_UNAVAILABLE) with one fixed sentence, the i18n error on cause and logged at warn; pinned at PUT /meta/object/:name over the real protocol. Seat ruling: every warning and refusal sentence the diff serves is fixed client-facing text (translationWarning via META_TRANSLATION_FAULT_WARNING; list_datasets' translation and catalogue warnings; query_dataset's 503 for a failed dataset read, the REST door's own sentence), original errors on cause and in the server log (DatasetToolsDeps.logger, optional, bound by AnalyticsService.datasetTools).",
  "tests": "head 2468a0c1: rest meta-translation-fault-34993 + meta-save-translation-fault-35707 (new) + analytics-dataset-ai-tools-parity 13/13; objectql protocol-meta-effective-schema 31/31 (one fix: the migration control asserted a listed row, a canonical row is not listed); service-analytics dataset-tools 96 passed 10 skipped, picklist-dimension-label-i18n green; mcp stdio-data-bridge.dataset-locale + object-locale-34872 + mcp-dataset-tools 51/51 then 40/40 after round 3; runtime mcp-object-locale-34872 + mcp-dataset-tools-bridge + meta-list-projection-parity 1471/1471; turbo build and typecheck of rest, metadata-protocol, service-analytics, objectql, mcp, runtime exit 0.",
  "gates": "dispatch-gates --commands: 136 derived; --ran with exit codes: 135 exit 0, 1 NOT-MEASURED exit 3 (check-plugin-teardown-shape --self-test: shallow clone), 0 UNRUN. Four gates first red on the new REST test, fixed in-PR: check:engine-double-contract (--write), check:objectql-double-limit, check:rest-log-spy-declared, check:test-source-alias. CI on head 2468a0c1: 64 success, 12 skipped, 0 failed; PR mergeable_state clean.",
  "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
  "mcp_calls": "1 — subscribe_pr_activity (not a GitHub write tool)",
  "api_writes": "5 — relay pr_create, relay comment (report 7238417187), relay issue_patch x2 (PR body r2, r3), relay comment (this report)",
  "open_questions": [],
  "security_findings": "none",
  "out_of_scope_findings": ["carrier: #38288 (seat-filed) — the cached by-name /meta read's validator does not move with what the translation step contributes"]
}

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 2468a0c · card #35707 · area s2-ai · 2026-11-28T13:28Z

L1 checklist

  • Shape and checks. Every check on the head is green apart from expected skips (64 success, 12 skipped); mergeable clean. The PR is a draft. It touches packages/spec (three response schemas and the authorable-surface shards), packages/rest, packages/mcp, packages/runtime, packages/metadata-protocol, packages/services/service-analytics and service-storage, their tests, the generated reference pages, and one changeset. Dev report 7239955643.
  • Contract review at CONTRACT_REVIEW_TIER. Round 1 (7238485386) was a FAIL on M1 (the Metadata-protocol: line and spec level), S1 (the save-side bundle has a second reader, the stored-metadata migration) and S2 (the save refusal's sentence did not reach an HTTP caller). Delta 7239581233 on this head closes M1, S1 and S2 and is a PASS; N1 stays a nit. Their transcripts pass verify-review-tier; the seat adopts the record.
  • What changes for a client. During a translation fault, REST /meta (list and by-name), MCP list_objects / describe_object and query_dataset now carry one optional translationWarning, so a client can tell untranslated text from missing translations; a healthy answer is byte for byte the same, and list_datasets' shipped partial + warning keeps its shape. The three unguarded bundle builders are guarded: analytics and the file-access page serve authored text and log; an object save or a stored-metadata migration that cannot read its translations refuses with a declared 503 and stores nothing. Warning and refusal sentences use fixed client-facing text; the original error goes to the server log. The cached by-name read's validator is follow-up rest: the cached by-name metadata read answers 304 across a translation change, so a client can keep stale labels or a stale translation warning #38288.
  • Declarations. Clause-②: yes (widening), Metadata-protocol: added, @objectstack/spec minor, the other packages patch. Fixes #35707 is right.

Tier: L. Landing: ready and auto-merge in this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 28, 2026 13:28
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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:ai size/l 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 #35680: client-visible translation-fault warning slot, three unguarded i18n bundle builders, two test gaps

2 participants