Skip to content

fix(objectql): the packaged object base carries the fields a code extender adds, so /meta translates a dependent package's added fields - #34156

Merged
objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/area-A2-33800
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/area-A2-33800

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

维护者速读

  • 改了什么:依赖包通过 objectExtensions 给基础包对象新增的字段(如 carbon 包给 crm_account 加的 cb_market),在中文等非默认语言下读 /api/v1/meta/object 时,字段名和选项名现在按该依赖包自己的翻译包显示,不再是英文。
  • 为什么改:此前对象的"出厂基准"只算基础包自己声明的字段,依赖包加的字段被当成"后来手工改过",于是翻译一律不套用;新建记录表单读的就是这个接口,所以中文界面里出现英文选项。
  • 风险与回滚:只扩了基准里"基础包没声明、由代码依赖包新增"的字段;基础包自己的字段、对象名称、fieldPatches 改的文字、租户和 .custom 加的字段都按原样不动。回滚即 revert 本 PR。
  • 先看:packages/objectql/src/registry.ts(packagedAddedFields 与 getPackagedObjectBase,重写后的 ⛔ 段)、packages/objectql/src/protocol-packaged-object-base.test.ts(边界钉子)、packages/objectql/src/protocol-meta-effective-schema.test.ts(中文读回再保存仍存英文原文)。
  • 两分钟验证:pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-object-field-patch-i18n.test.ts,预期 12 passed,其中新增组断言 zh-CN 下 cb_market 为「市场」、选项为「内销 / 出口」,基础包自己被改名的字段仍保持原文。
  • 需要你做的:无,席位落地。

Fixes #33800

Half 2 of the card (a dependent package's fieldPatches label/description getting its own translation) is out of this PR by maintainer ruling 6896340775: D stands and it has its own card. Until that card lands, patched text shows as written in every language.

Clause-②: no
Metadata-protocol: none

What changes

The defect, measured on origin/main 45dee17. A select field cb_market added by a dependent code package through objectExtensions, with the zh-CN rows in that package's pack, was served under zh-CN as Market / Domestic / Export. That held on the item read and on the list read (translateMetaDocument / translateMetaList, over a real SchemaRegistry). translateObject worked as designed. Its input was the problem: SchemaRegistry.getPackagedObjectBase returned the owner's declaration alone, so the field had no packaged counterpart and every slot of it counted as authored after the fact.

Origin. The label and option-label divergence checks came in with #29624 (59775a0, shipped in 18.3.0). It was not #29948, and not 18.4.0: the path is identical from 18.3.0 to 18.4.0 (measured: translateObject, packagedObjectField, valueOverridesPackagedBase, getPackagedObjectBase and translateMetaDocument agree at the 18.3.0 and 18.4.0 tags).

The fix (seat ruling 6895879286, option A). getPackagedObjectBase now also carries every field that a CODE extend contributor adds under a name the owner does not declare (packagedAddedFields). It uses the same filter as packagedRules (ownership === 'extend' && isCodeArtifactBody). This extends #27559's rule-name principle to field names: the catalog rows for such a field can only translate what its extender ships. Boundaries, each one pinned:

The save door agrees with the read. restoreTranslatedObjectEchoes (#29673) reads the same accessor. A zh-CN read of the added field, echoed back by a PUT, is stored as the extender's source text (Market, Domestic, Export), both over a stored row and with none.

Extender-added listViews: not applicable, no card. ObjectExtensionSchema refuses listViews on an extension (packages/spec/src/data/object.zod.ts, its guidance: "listViews cannot be contributed through an object extension"). So translateObjectListViews never sees a view an extender added.

Stale comments rewritten: the TranslateDocumentOptions.packagedBase doc, the packagedObjectField doc, the translateObject docblock sentence on undeclared fields, and the i18n-resolver.test.ts comment on the undeclared-field pin. These are comment-only changes in @objectstack/spec.

Contract declaration. Clause-②: no. No accept set, export, schema or response shape changes, and nothing previously served is refused. What changes is the label text that non-default-locale /api/v1/meta/object reads serve for fields a code extender adds; the changeset says so. Default-locale reads are unchanged. Not breaking, so no !, banner or ADR-0087 marker, and the dogfood battery is not owed.

Tests

  • packages/objectql/src/protocol-packaged-object-base.test.ts (the existing harness for getPackagedObjectBase, per ruling 6583487846): a new top-level describe with 7 cases. The BY REFERENCE pin is flipped: with the shared fixture's loyalty_tier extension the base is now a copy that carries the field, and a label-only extension still returns the owner by reference.
  • packages/rest/src/meta-object-field-patch-i18n.test.ts (the existing harness for the meta-object extension i18n exit): a new top-level describe with 5 cases (item read, list read, base fields, owner field redeclared, tenant-added field).
  • packages/objectql/src/protocol-meta-effective-schema.test.ts (the existing Studio in zh-CN: a new object publishes "successfully" and never reaches the data plane, because its echoed queue column carries a translated label #29673 door harness): a new top-level describe with 2 cases (with and without a stored row).

Red before the fix (45dee17 + pins): objectql 4 failed / 9 passed; rest 4 failed / 8 passed (expected 'Market' to be '市场').

Acceptance notes

  • The reporter's package shape (seat item 2) was not measured directly: steedos-labs/os-project-blackcat-crm is not readable from this session. The card's own facts point to a code package rather than a stored object_extension row. The fields come in "through objectExtensions" (the manifest key of a code package), they carry no __c suffix, and the package "passes validate".
  • Extender-added listViews: none can exist (the extension schema refuses the key), so there is nothing to translate and no card to file.
  • The seat ruling asks the reporter to confirm which page and version their 18.3.0 Chinese reading came from. On this path 18.3.0 and 18.4.0 behave the same (fix(spec): a published fieldPatches label is served by every object read, not only /layers #29624 shipped in 18.3.0).

Verification

All on head ecffbe8d0 (origin/main 86350e125 merged), unless a line names another head.

Pins, typecheck, generated artifacts (locked, final head)
os-verify-lock: VERDICT command-exit 0 · held the lock 904s
closure   :: exit 0 :: pnpm --workspace-concurrency=2 --filter @objectstack/rest... build
pins-oql  :: exit 0 :: Test Files 2 passed (2) :: Tests 38 passed (38)
pins-rest :: exit 0 :: Test Files 1 passed (1) :: Tests 12 passed (12)
oql-tc    :: exit 0 :: pnpm --filter @objectstack/objectql typecheck
rest-tc   :: exit 0 :: pnpm --filter @objectstack/rest typecheck
spec-gen  :: exit 0 :: pnpm --filter @objectstack/spec check:generated
dts-closure / published-files / sourcemap-no-sources-content / lean-entry-closure / test-source-alias / nul-bytes / type-check-debt :: exit 0
Package suites (head c856cd3: the fix merged with origin/main fb79d47; the final head adds only a test import and a main merge that touches no package of this diff's behaviour)
oql-test  :: exit 0 :: Test Files 598 passed (598) :: Tests 13250 passed (13250)
mp-test   :: exit 0 :: Test Files 342 passed | 9 skipped (351) :: Tests 22923 passed | 43 skipped
rest-test :: exit 0 :: Test Files 413 passed (413) :: Tests 8459 passed | 332 skipped
spec-test :: exit 0 :: Test Files 843 passed (843) :: Tests 26966 passed | 1 todo
Ablations (each leg: ablation-replace, objectql build, ablation-dist-preflight, pins, restore with blob == HEAD)
A1 drop the owner-declared guard     -> 3 red: BY REFERENCE (label-only/redeclare), owner's redeclared field (objectql), owner field redeclared (rest)
A2 drop the code-artifact filter     -> 1 red: carries nothing from a stored (tenant-provenance) extension
A3 fold code fieldPatches into base  -> 7 red: does not fold fieldPatches (objectql) + 6 of the published fieldPatches cases (rest)
final build exit 0 · absent-preflight exit 0 · every leg "restored == HEAD blob"

A3's first run was a no-op: the anchor sat inside its own replacement, and ablation-replace refused it with a drop of 0. It was rerun with a different anchor, and the line above is that rerun. A1's first run failed the dts build (an unused binding) and was rerun clean.

Gate sweep and PR-body gates

dispatch-gates --commands derived 93 families. 92 were run locally with exit codes recorded and exit 0, after one fix: check:test-source-alias asked for a module-top @objectstack/spec/ui import in the rest pin file, which is added. check:dual-build-cjs-loads is left to CI. pnpm lint exit 0. Run with this body: check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword, all exit 0. git merge-tree --write-tree is clean against origin/main, #33821 (already merged) and #34025 (the one open PR touching i18n-resolver.ts).


🤖 Generated with Claude Code

…s field on the packaged base and the served /meta read

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
…ender adds, so /meta translates a dependent package's added fields

getPackagedObjectBase now also carries every field a CODE extend
contributor adds under a name the owner does not declare (fold order,
same filter as packagedRules). Owner-declared fields, the scalars and
fieldPatches stay the owner's; tenant overlays and stored extensions add
nothing. The stale spec comments that described the base as the owner
alone are rewritten.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
…ension i18n pins

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/objectql, @objectstack/spec, touching 4 documentable anchor(s).

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

  • content/docs/concepts/metadata-lifecycle.mdx (via SchemaRegistry (symbol, a top-level class))
  • content/docs/deployment/environment-variables.mdx (via SchemaRegistry (symbol, a top-level class))
  • content/docs/kernel/services-checklist.mdx (via SchemaRegistry (symbol, a top-level class))
  • content/docs/plugins/adding-a-metadata-type.mdx (via SchemaRegistry (symbol, a top-level class))
  • content/docs/protocol/kernel/plugin-spec.mdx (via SchemaRegistry (symbol, a top-level class))

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

  • content/docs/releases/v17/17-4.mdx (via SchemaRegistry (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
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 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; 123 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 — 175 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 121017b91d12602f8db428d3403cb1a638a7b92f → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 561147d71af21d39e74451e62956e0c28437c0e1 — the merge of head 265a82f18135486bea5619b27f3958eb222530c4 into base 121017b91d12602f8db428d3403cb1a638a7b92f, 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 561147d71af21d39e74451e62956e0c28437c0e1 && git checkout 561147d71af21d39e74451e62956e0c28437c0e1
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 121017b91d12602f8db428d3403cb1a638a7b92f 265a82f18135486bea5619b27f3958eb222530c4 && git checkout -B drift-repro 121017b91d12602f8db428d3403cb1a638a7b92f && git merge --no-ff 265a82f18135486bea5619b27f3958eb222530c4

node scripts/docs-audit/affected-docs.mjs --json 121017b91d12602f8db428d3403cb1a638a7b92f

⚠️ 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 121017b91d12602f8db428d3403cb1a638a7b92f → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added 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 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

Request: review · PR #34156 · S1/A2 · Fixes #33800 (half 1, option A; half 2 stays D) · head ecffbe8 · 2026-11-15T23:12Z

Reviewer: review-a of seat domain:server#5. Two reads at this head, which the area declares final:

  • The ordinary ACCEPT read, per review-checklist.md.
  • Request: contract-review at CONTRACT_REVIEW_TIER. The diff touches packages/spec/src/system/i18n-resolver.ts, a non-test published-schema path. The change there is doc comments only, but the face is read by path.

Dev report: 6902334065. Declaration lines: Clause-②: no, Metadata-protocol: none.

Changeset sentences for the ACCEPT to check against the diff:

  • The packaged base now carries each field a code extend contributor adds under a name the owner does not declare.
  • A later extender of the same name replaces an earlier one.
  • Non-default-locale /meta reads serve the pack's translation for those fields.
  • A Studio save of such a read stores the source text again.
  • Default-locale reads are unchanged.
  • The Unchanged paragraph: object scalars, owner-declared fields and fieldPatches stay the owner's, and tenant-overlay and stored-extension fields still count as authored after the fact.
  • @objectstack/spec changes only in doc comments.

Checks at this head: 56 success, 11 skipped, 0 red.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review claim (review-a, S1) · head ecffbe8 · 2026-11-15T23:14Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ecffbe8d012b31fa202e2bc5c25858f0ab9b0875
Local-runs: none
Scope: packages/spec/src/system/i18n-resolver.ts + packages/objectql/src/registry.ts

Read: card #33800 (body and all 7 comments, rulings 6895879286 and 6896340775 included), PR #34156 (body, file list, net diff against 86350e125), and the check-runs on this head. Code outside the diff was read, not reviewed: mergeObjectDefinitions, foldExtendersOntoDefinition, withholdDisabledExtensions, packagedRules, getPackagedObjectOwner, applySystemFields (registry.ts), isCodeArtifactBody (metadata-core), translateObject, packagedObjectField, valueOverridesPackagedBase (i18n-resolver.ts), restoreTranslatedObjectEchoes (metadata-protocol).

① Derived judgments

  • packages/spec/src/system/i18n-resolver.ts is doc comments only: right. Every added or removed line of the hunk sits inside a block comment (3 hunks: TranslateDocumentOptions.packagedBase, packagedObjectField, the translateObject docblock). No type, export, schema or runtime line moves. i18n-resolver.test.ts changes one comment.
  • No accept set widens or narrows: right. ObjectExtensionSchema is untouched; nothing new is authorable and nothing is refused.
  • Public surface: the VALUE of SchemaRegistry.getPackagedObjectBase(name) changes, its signature does not: right. fields now also holds each field a code extend contributor adds under a name the owner does not declare. The by-reference return narrows to "no code extender ships a rule or adds a field"; the docblock says so.
  • Served answers change on non-default-locale reads only: right. translateObject compares each served field slot with packagedObjectField(base, name); a field the base carries now reads the deployment catalog where its text still equals the extender's. With no locale catalog hit the served text is unchanged.
  • The save door moves with the read: right. restoreTranslatedObjectEchoes hands the same accessor's answer to restoreTranslatedEchoes as packagedBase and, with no stored row, as the source. One accessor, so the two cannot split.
  • Gates: 56 check-runs success, 11 skipped, 0 failed on this head, Check Changeset, Governed Surface Queue Guard, Spec property liveness, PR-body guards, Test Core 1-8 and the type-check lanes included.

② Semver level

@objectstack/objectql: patch and @objectstack/spec: patch match what the diff publishes: a bug fix in the value one public read returns, and jsdoc text that ships in the spec's declaration files. No export, type, schema key or response shape is added or removed, so no minor is owed and no !.

Clause-②: no holds, on the PR body and on the changeset. Nothing previously served is refused, no accept set moves, and the one changed answer (label text of code-extender fields on non-default-locale /meta reads) is named in the changeset. Metadata-protocol: none holds.

③ Boundary flags

  • Seat item 2 (the reporter's package shape) was not measured: the consumer repo is not readable from the dev's session, and the shape is inferred from the card. Accepted as an inference, not as a measurement. The filter itself answers both shapes that can be fixed here: any extend contributor whose body passes isCodeArtifactBody (a package id, not sys_metadata, not _provenance: 'org') is carried, stored or not. An org-provenance row stays diverged by ruling. The seat's question to the reporter (which page and version the 18.3.0 Chinese reading came from) is still open on the card; it does not block this PR.
  • Fixes #33800 closes a card whose title also names half 2. Half 2 is ruled out of this PR (maintainer ruling 6896340775) and has its own open card, i18n: let a dependent package's fieldPatches label/description be translated from that package's own catalog (split from #33800 half 2) #33952. Closing is consistent with the ruling.
  • Seat item 4 (extender-added listViews): answered. ObjectExtensionSchema is strict and its key list has no listViews; mergeObjectDefinitions copies no key outside its closed set. No card owed.
  • Deviation: suites ran on c856cd3b7, not the final head. Covered: Test Core 1-8 are green on this head.
  • Deviation: a third comment (translateObject docblock) rewritten beyond the two the amendment names. Same file, same reason, comment only. Accepted.
  • open_questions is empty. No escalation.

④ Design judgment

packages/spec/src/system/i18n-resolver.ts (hits). Each changed sentence was read against the code it describes.

  • packagedBase: "its fields also carry each field a code extender ADDS under a name the owner does not declare, as that extender ships it". Holds against packagedAddedFields and the spread in getPackagedObjectBase. "Its scalars, every field the owner declares ... stay the owner's": holds, the hasOwnProperty guard on the owner's fields and the untouched spread of owner.definition. Every supplier of an object's packagedBase (the REST read through metadata-protocol's getPackagedObjectBase, the echo restore) goes through the one registry accessor, so the sentence is true for every caller.
  • packagedObjectField: the three answers are unchanged in code, and the reworded {} case holds. The owner's body carries the platform's injected columns (applySystemFields runs at registration), so those are not a third undeclared case.
  • translateObject docblock: holds.

packages/objectql/src/registry.ts (implementing). Tried to break the docs' claims against the fold.

  • Filter equals packagedRules' (ownership === 'extend' and isCodeArtifactBody): holds, same expression.
  • Fold order: objectContributors lists are kept sorted by ascending priority, and the fold spreads { ...base.fields, ...extension.fields }, so "a later extender's declaration replaces an earlier one's" holds whenever every extender is enabled.
  • fieldPatches not read; an extender's queue or audit-column redeclaration is skipped as owner-declared (the owner's body is planned at registration); a tenant overlay and an org-provenance extension contribute nothing; the tenant's rename of an extender field still reads as diverged because the base holds the extender's text. All hold.
  • No caller depends on reference equality or reads base fields for a lock or write decision: the callers are the REST read, the echo restore and the validation-message lookup.

Findings:

  1. should-fix: the base does not follow the fold when a code extender's package is DISABLED. The served fold withholds a disabled package's extend contribution (withholdDisabledExtensions, used by resolveObject); packagedAddedFields reads every code extend contributor, disabled or not. With two code extenders adding one field name and the higher-priority one disabled, the fold serves the enabled extender's declaration and the base carries the disabled one's. Where their labels or option labels differ, the served field reads as diverged and is served untranslated, which is the card's own defect for that pair. So "in fold order ... as mergeObjectDefinitions does" (the packagedAddedFields doc), "Same-name extenders resolve to the fold's winner" (PR body) and "as in the fold" (changeset) do not hold there. It fails toward source text, never toward wrong text, and needs a name collision the fold already reports (objectql: two extensions of one object declaring the same field name merge last-writer-wins with no refusal or report #28835), so it is not a must-fix. Fix either way: skip contributors whose package is disabled, with a pin, or state the boundary in the docblock and file a card. packagedRules has the same gap for rule names (outside the diff, read only): a follow-up card, not this PR.
  2. nit: one sentence of the packagedBase doc is hard to parse. "the owner's fields as an extension's fieldPatches leave them stay the owner's" can be read as "the base carries the patched fields", the opposite of the code. Suggested: "an extension's fieldPatches are not applied to it". Left as a follow-up; a fix here moves the head.
  3. nit: "a stored extension's" in the packagedObjectField and translateObject docs is broader than the filter. A stored extension body with package provenance passes isCodeArtifactBody and IS carried; only an org-provenance one is not. The registry docblock says "stored (non-code)", which is exact. Follow-up wording only.

Implemented-by: claude/area-A2-33800
Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review — PASS (should-fix owed before landing)

Head-sha: ecffbe8d012b31fa202e2bc5c25858f0ab9b0875
Reviewer: review-a (areas S1 + S3) · read 2026-11-15T23:19Z · diff read against the merge's main parent 86350e12 (7 files, +434/−15, matches the PR files list)
Implemented-by: session_01QsR2jVPGBoi3MCGoKbW1Hv (area S1 dispatch) · Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM; the contract face by an isolated sub-agent at CONTRACT_REVIEW_TIER

Contract face: packages/spec/src/system/i18n-resolver.ts changes in doc comments only. The record confirms that every changed line sits inside a block comment. The review is owed at CONTRACT_REVIEW_TIER. Its record is comment 6903060139 (PASS, Local-runs: none), and it carries one should-fix. This verdict covers the rest of the diff at TIER_DEFAULT.

Should-fix (from the record, and I found it independently in the code; delta review after the fix)

  1. packagedAddedFields reads disabled packages' extensions, while the served fold withholds them. getObjectContributors keeps a disabled package's extend contribution, which is why fix(objectql): a following amount whose parent code field is no longer served is refused with a message that says so #34024's refusal can name it. Suppose two code extenders add the same field name and the later one is disabled. The base then carries the disabled extender's declaration, and the served field is the enabled one's. So the field reads as diverged and stays untranslated. The "as in the fold" sentences in the docblock and the changeset do not hold in that case.

    This fails toward source text, never toward wrong text. Either fix it in this PR:

    • skip disabled contributors, as the fold does, and add a pin; or
    • state the boundary in the docblock and the changeset, and file a card that also covers packagedRules, which has the same gap for rule names outside this diff.

What holds (rest of the diff)

  • The packaged base widens only by field names the owner does not declare. The owner's scalars, every owner-declared field (including one an extender redeclares) and every fieldPatches entry stay the owner's. Object-extension fold leaks the extension's label onto ?layers=true only — the two reads #7556 reconciled on FIELDS now disagree on LABEL #8037's divergence rule therefore keeps holding for everything it covered. A tenant overlay or an _provenance: 'org' extension adds nothing.
  • Readers. getPackagedObjectBase is read only by the translation path (PACKAGED_BASE_ACCESSORS in meta-item-read-gate.ts), the save door's translated-echo restore and the validation-message reader. The validation-message reader reads validations alone, so the wider fields reaches only translation and the echo restore. The changeset names the echo-restore consequence: a Studio save of a translated read stores the source text.
  • By-reference identity is kept when nothing is added, and that is pinned.
  • Tests. Real-registry pins cover the added field, the owner redeclare, the tenant overlay, the stored extension, fieldPatches and the later-extender order. There are REST pins for the item read and the list read in zh-CN and en, and an echo-restore pin with and without a stored row. Each of the three ablations goes red on the pins it targets.
  • Changeset. objectql and spec patch. Clause-②: no / Metadata-protocol: none hold: translation output changes, but no authorable key or accept set moves.

Nits (no re-review needed)

The record's two comment nits:

  • "the owner's fields as an extension's fieldPatches leave them stay the owner's" can be read backwards.
  • "a stored extension's" is broader than the filter. A stored extension with package provenance passes isCodeArtifactBody and is carried.

Fold both into the should-fix round if you touch those comments.

Gates: at review time 56 success, 11 skipped, none red, so every check is green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 265a82f · 2026-11-16T01:03Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

Request: delta review · PR #34156 · S1/A2 · Fixes #33800 · head 265a82f · 2026-11-16T01:07Z

The area declares this head final. It answers review-a's should-fix in 6903069973 by the first route:

  • packagedAddedFields now skips contributors from disabled packages, as the served fold does.
  • A pin is added in meta-object-field-patch-i18n.test.ts. Its ablation reads 1 red.
  • Both comment nits are fixed.
  • origin/main is merged.

packagedRules is unchanged here. Its same gap was measured and filed as #34217.

Delta report: 6904478515. Checks at this head: 56 success, 11 skipped, 0 red.

Owed: review-a's delta ACCEPT, and a delta contract record at CONTRACT_REVIEW_TIER against 6903060139. The face is still the doc comments in packages/spec/src/system/i18n-resolver.ts.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 265a82f18135486bea5619b27f3958eb222530c4
Local-runs: none
Scope: packages/spec/src/system/i18n-resolver.ts + packages/objectql/src/registry.ts, packages/rest/src/meta-object-field-patch-i18n.test.ts

Read at 2026-11-16T01:08Z. Delta review of this head against PASS 6903060139 at ecffbe8 (by the lane's own reviewer); claim: comment 6904455068; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for domain:server#5; reviewed by os-tesla, who neither dispatched nor implemented it.

Read: card #33800 (body, all comments, seat ruling 6895879286 and maintainer ruling 6896340775), the PR body and comments, record 6903060139, the changeset, the net diff at this head, the two dev commits e2c5196a and 8c317692, what the main merge brought under packages/objectql, packages/spec, packages/rest and packages/services/service-i18n, and the check-runs on this head. Code outside the diff was read, not reviewed: resolveObject, servedFoldWithLayer, resolveObjectLeavingExtensionsOut, foldObjectExtendersOnto, resolveStorageObject, withholdDisabledExtensions, withoutWithheldMembers, packagedRules, isPackageDisabled (registry.ts), restoreTranslatedObjectEchoes (metadata-protocol), PACKAGED_BASE_ACCESSORS and the resolve-options builder (rest).

① Derived judgments

  • The net change at this head is the prior net change plus the two dev commits, and nothing else: right. Prior base 86350e12, this base 2539ad98 (the merge's main parent, also the merge base). Per path, the patch of base to head equals the patch of the prior base to the dev tip 8c317692 on all seven paths. Six of the seven are byte-identical at head and at the dev tip. The seventh, i18n-resolver.ts, differs only by what main brought. The merge commit reproduces exactly from its two parents with no conflict, so it carries no hand edit.
  • The two dev commits touch five paths: right. registry.ts (the disabled filter in getPackagedObjectBase, packagedAddedFields moved above the docblock it had been splitting from mergeObjectDefinitions, docblock wording), one new REST pin, the changeset text, and comment wording in i18n-resolver.ts and its test. No type, export, schema or accept set moves. The @objectstack/spec change stays doc comments only at this head.
  • The main merge conflicts with nothing here and leaves no baseline stale: right. Of the PR's paths, main touched i18n-resolver.ts alone (feat(i18n): serve labels by i18n.sourceLocale as the authored language #34025), in the module header, ResolveOptions.defaultLocale and the lookup-order docblock: comment text, in hunks the PR does not touch. feat(i18n): serve labels by i18n.sourceLocale as the authored language #34025's runtime change in packages/rest picks the authored language for the resolve options and does not read the packaged base. The performedBy change (feat(spec, objectql, runtime): the in-product AI path can name itself on ExecutionContext.performedBy, and hooks see it on HookContext.provenance #34018) and the AI-door confirmation change (feat(spec)!: the AI-door confirmation rule binds every AI door, the in-app assistant included #34001) touch no path or symbol of this diff. The PR adds or edits no generated artifact. The head also merges clean with current main 121017b9.
  • getPackagedObjectBase now leaves out a disabled package's added fields by the fold's own predicate: right. The filter is ownership === 'extend' and isPackageDisabled(packageId), the expression withholdDisabledExtensions uses. The accessor is uncached, so an enable or disable needs no invalidation. The return shape and the by-reference rule are unchanged.
  • CI: 67 check-runs on this head, 56 success, 11 skipped, none failing, none running.

② Semver level

@objectstack/objectql: patch and @objectstack/spec: patch still match what the diff publishes: the value one public read returns, and jsdoc text. No minor and no ! is owed. Clause-②: no and Metadata-protocol: none hold on the PR body and the changeset: nothing served before is refused, no accept set moves, and the changed answer (label text of code-extender fields on translated /meta reads) is named in the changeset, with the disabled-extender boundary added by 8c317692.

CI is complete and green on this head, so this PASS waits on no check.

③ Boundary flags

  • Prior ③ flags (reporter's package shape inferred, not measured; Fixes #33800 with half 2 on its own card; extender-added listViews; suites run on an earlier head; the third rewritten comment): unchanged by the delta, and I agree with each answer. Test Core is green on this head.
  • The rule half of the base still reads a disabled package's extension. packagedRules is not filtered, and the new docblock says so. It is outside what this PR changes, and the prior record sent it to a follow-up card. No card number for it appears in the PR body, the commits or the card thread: see S1.
  • Folds that are not the ordinary served one (the per-package export layer, the enable door's as-enabled pre-check, the storage fold) can carry an added field from a different extender than the base does. The base is keyed by name alone. Where they differ the slot reads as diverged and keeps its source text. This is as at the prior head and not a finding.
  • SQL push-down check: the diff adds no query, id materialisation or in-app join.
  • open_questions is empty. No escalation.

④ Design judgment

Prior findings, by id (record 6903060139).

  • Finding 1 (should-fix, the base did not follow the fold for a disabled code extender): resolved for fields. With the higher-priority adder disabled, the base now carries the enabled extender's declaration, the one the fold serves. I checked each served reader of the fold. resolveObject, servedFoldWithLayer, resolveObjectLeavingExtensionsOut and foldObjectExtendersOnto all withhold through withholdDisabledExtensions, and each takes a withheld-only field off a base body that already carries it. So no served read carries a disabled extender's added field while the base lacks it, and none carries the base's field from a different enabled extender in the ordinary fold. The storage fold keeps the columns by design and is not a translated read. The save door reads the same accessor, so read and write cannot split. The base only decides whether a slot is translated; it never removes a field from a served body, so no reader drops a field it should serve. The pin is the new REST case: it asserts its premise (the fold serves the enabled extender's label), the base's label, and the translated label and option labels. Its control is the enabled twin of the same fixture in protocol-packaged-object-base.test.ts (a later enabled extender wins in the base and in the fold). Without the filter the base would hold the disabled extender's label, so the pin's base assertion and its translation assertions cannot hold. That is read from the code; nothing was run.
  • Finding 2 (nit, the packagedBase sentence that read backwards): resolved. It now reads "an extension's fieldPatches are never folded in, so a patched owner field still reads as diverged", which matches the code.
  • Finding 3 (nit, "a stored extension" broader than the filter): resolved. packagedObjectField, the translateObject docblock, the test comment, the registry docblocks and the changeset now say tenant provenance, and packagedAddedFields states that a stored row of package provenance is a code layer and is carried. That matches isCodeArtifactBody.

Independent judgment of the contract at this head. The seat ruling's option A is implemented as ruled: only field names the owner does not declare, the packagedRules filter, the fold's order, fieldPatches not read, scalars and owner-declared fields left the owner's, tenant-provenance layers adding nothing, the #8037 reason kept in the rewritten docblock. The changeset describes the change a consumer sees, and each of its sentences holds against the code, with the one wording nit below. The i18n-resolver.ts comments each hold against the serving layer they describe.

New findings.

  • S1 (should-fix) — continues prior finding 1's follow-up; no head move. Cite the follow-up card for the rule half. The registry docblock now records that packagedRules reads disabled extenders, and the prior record asked for a card. File it, or name it if it exists, on the card thread or the PR body.
  • S2 (should-fix) — new; a PR body edit, no head move. The PR body still describes ecffbe8d. "Verification: all on head ecffbe8d0", the REST describe "with 5 cases" and the two-minute check's "12 passed" predate the new pin (one more case by count), and the body says nothing of the disabled-extender boundary or of a red-first run for it. The maintainer's quick check would read a different number than the body promises.
  • N1 (nit) — new, from the main merge. The changeset's "non-default-locale" and "Default-locale reads are unchanged" are exact only where no i18n.sourceLocale is declared apart from the default. Since feat(i18n): serve labels by i18n.sourceLocale as the authored language #34025 the reads that stay unchanged are those in the authored language. Wording only.
  • N2 (nit) — new. The disabled case is pinned in the REST harness only. The accessor's own harness has no disabled case, so "a lone disabled adder leaves the owner by reference" is unpinned. It has no served effect, since the fold withholds that field.

No must-fix. Two should-fix, neither needing a new head.

Implemented-by: claude/area-A2-33800
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Contract review — delta

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 265a82f18135486bea5619b27f3958eb222530c4
Local-runs: none
Scope: packages/spec/src/system/i18n-resolver.ts + packages/objectql/src/registry.ts
Prior record: 6903060139

Read: the prior record, the PR's two delta commits (e2c5196a, 8c317692), merge 265a82f1 (parents 8c317692 and main 2539ad98), card #34217, and the check-runs on this head. Code outside the delta was read, not reviewed: withholdDisabledExtensions, isPackageDisabled, resolveObject, servedFoldWithLayer, resolveObjectLeavingExtensionsOut, packagedRules (registry.ts), isCodeArtifactBody (metadata-core).

Merge

Clean. The PR's net diff has the same stable patch-id against its merge base as against main parent 2539ad98 (9b8ea010... both ways), over the same 7 files, with no conflict markers. Main's own changes to i18n-resolver.ts (#34025) sit outside the PR's hunks and were not reviewed.

Status of prior findings

  • Should-fix 1 (the base read a disabled package's added fields): fixed. getPackagedObjectBase now hands packagedAddedFields the contributors without those matching ownership === 'extend' && isPackageDisabled(packageId). That is the predicate withholdDisabledExtensions uses for the served fold (resolveObject calls it with no asEnabled), and both filters keep list order, so the last enabled code extender wins in the base as in the fold. The only fold that keeps a disabled extension, asEnabled, is the enable preview in runtime/domains/packages.ts; it is not translated against this base.
  • Nit 2 (the hard-to-parse packagedBase sentence): fixed. Reworded as suggested.
  • Nit 3 ("a stored extension's" broader than the filter): fixed in packagedObjectField, the translateObject docblock, the spec test comment, both registry docblocks and the changeset.
  • packagedRules follow-up: filed as i18n: the packaged base reads a disabled package's same-name validation rule, so the enabled rule's message stays untranslated #34217 (open). The getPackagedObjectBase docblock states the gap: "(The rule half, packagedRules, still reads every code extender, disabled ones included.)" That matches the code: extended and packagedRules(contributors) still take the unfiltered list.

Sentences checked

  • packagedBase: "Its scalars and every field the owner declares stay the owner's: an extension's fieldPatches are never folded in, so a patched owner field still reads as diverged." Holds: the base is the owner's spread plus only names the owner does not declare (hasOwnProperty guard), and fieldPatches is not read.
  • packagedObjectField: "a tenant overlay's, or one of tenant provenance". Holds against isCodeArtifactBody: a body with no package id, with sys_metadata, or tenant-authored is not carried; a stored row of package provenance is.
  • translateObject docblock: "a field a tenant overlay or a tenant-provenance extension authored". Holds, same filter.
  • packagedAddedFields docblock: "a stored extension row of package provenance is a code layer and does"; "contributors is the caller's ... hands in the list without a disabled package's extensions". Both hold.
  • getPackagedObjectBase docblock: "Nor does a disabled package's extension, which the served fold withholds." Holds for fields, and the parenthesis limits it for rules.
  • Changeset: "a disabled package's extension adds nothing, as the fold withholds it." Holds for the added fields that sentence is about. "an extension of tenant provenance (_provenance: 'org')": holds.
  • Pin (packages/rest/src/meta-object-field-patch-i18n.test.ts): holds the case. The enabled extender sits at priority 200; the disabled one adds the same name at 300 with label Sales Market. The test asserts the premise (the fold serves Market), the base's label (Market) and the zh-CN label and option labels. Without the filter the base would carry Sales Market and the second and third assertions would fail.

Findings

No must-fix. No should-fix.

  1. nit: packagedAddedFields doc, "so the base and the served field are the same extender's". True among code extenders. A later tenant-provenance extension adding the same name still wins the served fold and is not in the base; by ruling that reads as diverged, so only the sentence is loose, not the behaviour.
  2. nit: the docblock states the packagedRules gap without naming i18n: the packaged base reads a disabled package's same-name validation rule, so the enabled rule's message stays untranslated #34217. A reader of the code cannot find the card from it.
  3. nit: "Returns the owner's definition BY REFERENCE when no code extender ships a rule or adds a field" is now narrower than the code: it also returns by reference when the only field-adding code extender is disabled. True as written, not complete.

Gates

Check-runs on 265a82f1: 67 completed, 56 success, 11 skipped, 0 failed, none pending. Nothing was run locally.

Implemented-by: claude/area-A2-33800
Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review — PASS (delta)

Head-sha: 265a82f18135486bea5619b27f3958eb222530c4
Reviewer: review-a (areas S1 + S3) · read 2026-11-16T01:11Z · delta ecffbe8d..265a82f1: e2c5196a (fix, spec comments, pin) and 8c317692 (changeset), 5 files, +79/−47. The rest is a clean main merge (main parent 2539ad98), and the PR's hunks keep the same patch-id against both bases.
Implemented-by: session_01QsR2jVPGBoi3MCGoKbW1Hv (area S1 dispatch) · Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM; the contract face by an isolated sub-agent at CONTRACT_REVIEW_TIER
Prior verdict: PASS 6903069973 (should-fix 1 owed before landing) · prior record 6903060139

Should-fix 1: fixed. getPackagedObjectBase now hands packagedAddedFields the contributors without a disabled package's extend rows (isPackageDisabled). That is the same predicate withholdDisabledExtensions uses for the served fold, so the base and the served field come from the same extender. The new REST pin covers it: a later, disabled extender adds the same name, the fold serves the enabled extender's label, the base carries that same label, and zh-CN translates it. The fix is ablated as reported. The changeset says a disabled package's extension adds nothing. The docblock states that packagedRules still reads disabled extenders, and #34217 carries that gap.

Comment nits: fixed. packagedBase now says plainly that fieldPatches are never folded in. "A stored extension" is now "tenant provenance (_provenance: 'org')", which matches the filter: a stored row of package provenance is a code layer and is carried.

The delta contract record is comment 6904556587 (PASS, Local-runs: none).

Nits (no re-review needed)

The record's three:

Gates: at review time 56 success, 11 skipped, none red, so every check is green. The PR can land.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

席位核对 · ACCEPT · Head-sha: 265a82f · 2026-11-16T01:12Z

  • Review: review-a's ACCEPT read is PASS 6903069973. Its delta at this head, PASS 6904564497, discharges the should-fix (contributors from disabled packages are skipped, pinned and ablated) and both comment nits. The three remaining nits are not owed. The packagedRules sibling gap is filed as i18n: the packaged base reads a disabled package's same-name validation rule, so the enabled rule's message stays untranslated #34217.
  • Contract face: the diff touches packages/spec/src/system/i18n-resolver.ts, in doc comments only, so it goes to CONTRACT_REVIEW_TIER. Records: PASS 6903060139, and delta PASS 6904556587 at this head. Clause-②: no, Metadata-protocol: none. No served answer is refused, so no ! and no dogfood battery is owed.
  • Card relation: Fixes #33800 delivers half 1, option A of seat ruling 6895879286. Half 2 is D, as the maintainer ruled; nothing is owed in code.
  • Changeset sentences checked against the diff, in .changeset/33800-extender-added-fields-translate.md:
    • the packaged base carries each field a code extend contributor adds under a name the owner does not declare;
    • a later same-name extender replaces an earlier one;
    • a disabled package's extension adds nothing;
    • non-default-locale /meta reads (object, by name, list, form routes) serve the pack's translation;
    • a Studio save stores the source text again;
    • default-locale reads are unchanged;
    • the Unchanged paragraph: scalars, owner-declared fields and fieldPatches stay the owner's, and tenant-overlay and _provenance: 'org' extensions still count as authored after the fact;
    • spec changes only in the two doc comments.
      Each sentence matches registry.ts (getPackagedObjectBase and packagedAddedFields) and the pins in protocol-packaged-object-base.test.ts, protocol-meta-effective-schema.test.ts and meta-object-field-patch-i18n.test.ts. No content/docs file is in the diff.
  • Governed: check-governed-merges --pr 34156 reads NOT governed: 0 of 7 paths, +466/−15.
  • Base: the Test Core affected-set diff base is 121017b9. K = 11 first-parent commits to origin/main dfb8ed35, which is below 15, so no branch update is owed.
  • Checks on this head: 56 success, 11 skipped (path-filtered), 0 red, 0 pending. Lint & Repo Gates and TypeScript Type Check both succeeded. Mergeable state is clean.
  • Landing: area S1, on the maintainer's line in the area thread (2026-11-15T11:06Z). pr_ready and automerge_enable follow in this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 01:12
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 98a4449 Nov 16, 2026
68 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-A2-33800 branch November 16, 2026 01:46
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

1 participant