Skip to content

i18n regression (18.4.0): fields added by a dependent package's objectExtensions are served untranslated by /api/v1/meta/object, and its fieldPatches label/description never translate #33800

Closed

Description

@os-bob

Summary

On 18.4.0, GET /api/v1/meta/object/<obj> with Accept-Language: zh-CN serves every field that a dependent (non-.custom) package adds via objectExtensions with its source-language label and option labels. The same package's translation pack does carry these strings: /i18n/translations/zh-CN serves them, and the record detail page renders them in Chinese. The base package's own fields on the same object come back translated.

The console's New record form reads the meta object, so it shows the extension's options in English inside a Chinese UI.

Repro (consumer: steedos-labs/os-project-blackcat-crm, 18.4.0)

  • crm_account is from the base package. The carbon package extends it with cb_market (options domestic/export), cb_default_packaging, cb_default_transport, and so on, and ships zh-CN pack rows for them.
  • GET /api/v1/meta/object/crm_account (zh-CN):
    • cb_market label Market, options ['Domestic','Export'];
    • cb_default_packaging options ['25 kg Bag','Bulk Bag','Bulk'];
    • the base field payment_cycle options do come back translated: ['预付','30 天',…].
  • New Customer form in zh-CN: option labels Domestic / Bulk Bag / Road / Truck & Bus Radial.
  • Detail page of an existing record: the same options in Chinese.

Same root, second symptom: a fieldPatches description or label on an extension from a dependent package is never translated. A carbon fieldPatches description on crm_account.registration_number was served in English under zh-CN, even though the zh pack row carrying the text was served by /i18n/translations/zh-CN. It stages clean and passes validate.

Suspected cause

@objectstack/spec translateObject:

  • a field that the packaged base does not declare counts as diverged on every slot;
  • a diverged slot reads only the .custom pair's catalog (ADR-0146 D2);
  • a dependent package has no .custom pair, so its own pack rows are never consulted.

The consumer recorded the same options in Chinese on 18.3.0, so this looks like a regression.

Expected

Fields and patches contributed by a dependent package's objectExtensions translate from that package's own pack rows on the meta-object door, as they already do on the detail page.

Activity

  1. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · lease:A2 · p1 · 2026-11-15T11:45Z

    ⛔ Not a claim.

    A regression in 18.4.0: fields that a dependent package adds through objectExtensions are served untranslated by /api/v1/meta/object, and its fieldPatches label/description never translate, though the translation pack carries them. Display only (p2), raised once because a real app's zh-CN UI hits it: p1. Request locale and metadata serving, A2.

  2. added
    bug
    domain:server
    pm:queue
    priority:p1
    on Nov 15, 2026
  3. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

    Claim: server area S1 (A1+A2) under #33751 §2 area-lease mode, area A2, seat domain:server#5 · p1 (18.4.0 regression) · executed by an os-dev subagent of the area S1 thread · posted at 2026-11-15T13:32Z
    Session: session_01QsR2jVPGBoi3MCGoKbW1Hv
    Account: zhuangjianguo
    Branch: claude/area-A2-33800
    Worktree: objectstack-area-A2-33800
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/spec/src/system/i18n-resolver.ts (the translateObject divergence and catalog choice for fields and fieldPatches slots a dependent package contributes through objectExtensions) and the serving caller that hands it the catalogs (packages/services/service-i18n/** or the meta-object read path, whichever the dev measures as the cause), their *.test.ts pins, one patch changeset (stop on breach; explain in the report)
    Container & model: S-M, mode:subagent, model: default (no path-derived mandate; dispatch-gates --tier, Clause-② suspect hint on packages/spec/src/** judged from content: no published accept set or schema widens), effort: high
    Clause-②: no (restores the 18.3.0 answer for a dependent package's own pack rows; a fix that needs a new exported parameter or schema key stops and goes to the spec lane)
    Metadata-protocol: none
    Responsibility: translateObject treats a dependent package's objectExtensions fields and fieldPatches as diverged and reads only the .custom pair catalog (objectstack) | none | apps whose dependent package extends a base object and ships its own translation pack, served by /api/v1/meta/object; os-project-blackcat-crm on 18.4.0
    Thread-read: 6893830466
    Premise: holds (measured by the consumer on 18.4.0; the dev re-measures before the fix and names the introducing PR)
    Serial constraints cleared: #33634 (released to the spec lane, i18n service contract, not claimed); #33696 / #33524 / #33782 (this area, plugin-security/plugin-sharing, disjoint); no open PR touches i18n-resolver.ts

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

    Claim amendment · #33800 · pre-claim check recorded after the fact · 2026-11-15T13:56Z

    Pre-claim lane: server because the fix is the translateObject catalog choice in packages/spec/src/system/i18n-resolver.ts (a runtime function, no schema bit or contract method) and its serving caller; it stays here under the maintainer's same-lane rule, and a spec seat online gets a one-line notice naming the PR.
    Pre-claim deps: none (#33634 released to the spec lane, unclaimed, i18n service contract; no open PR touches the file).
    Prior rulings read: ADR-0146 D2 (a customization of an installed package lives in its paired .custom package) and D10 (object extension at package grain) govern which catalog a diverged slot reads; the card restores the 18.3.0 answer for a dependent package's own pack rows and does not touch .custom overrides. The dev confirms no ADR-0146 or ADR-0029 D9.2a line rules that a dependent package's extension fields read only the .custom catalog; if one does, the dev stops and the card goes to the seat as a decision.

  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG
    Seat ruling at 2026-11-15T14:17Z, after an independent review. Half 1 is seat-level and proceeds; half 2 (option E) goes to the maintainer.

    Origin correction. The change came in with #29624 (59775a0, shipped in 18.3.0), whose notes name this side effect on the premise that no producer writes such catalog entries; not #29948, and not 18.4.0 (18.3.0 → 18.4.0 is identical on this path). Please confirm with the reporter which page and version their 18.3.0 Chinese reading came from.

    Half 1 — A, seat-level. getPackagedObjectBase also carries the field names a CODE extender adds, using the same filter as packagedRules (ownership === 'extend' && isCodeArtifactBody). This extends #27559's rule-name principle to field names; it does not touch ADR-0029:513 (the fold's scalar yield, a different path). Boundaries, written into the code:

    Also in the same PR:

    1. Flip protocol-packaged-object-base.test.ts:262-267 (BY REFERENCE) and its doc line; check no caller relies on reference equality.
    2. Measure first which shape the reporter's package is (code package vs stored object_extension row). If stored-row, A does not fix it: say so and file it separately.
    3. Echo-restore pins (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 restoreTranslatedObjectEchoes): extension-added field, GET zh-CN → PUT stores source text, with and without a stored row.
    4. Extender-added listViews (translateObjectListViews, i18n-resolver.ts:4695-4698): include or file a card, stated in the report.
    5. Rewrite the stale comments (i18n-resolver.ts:375-380, :2236-2239, test :4406).
    6. Re-check Clause-②: non-default-locale /api/v1/meta/object reads change for code-extender fields; changeset says so. Next release (18.5.0 shipped today).

    Half 2. D (no behaviour change) stands for now. Whether a dependent package's patched label/description gets its own translation (E) is a new precedence level on ruling 6631250894 plus a new exported parameter: maintainer's call, card posted today. Note: description was never translated, even in 18.2.0; it is not a regression.

    Prior rulings read: ADR-0029 D9.2/D9.2a (:513); ADR-0146 D2, D10 (:596-606); #8037/#8284; #27559; #29564; #29624; #29948; this card's comments 6893830466, 6895076776, 6895385322.

  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG
    Maintainer ruling recorded at 2026-11-15T14:47Z on half 2: fix the added fields now (half 1, seat-ruled A, in progress here); a dependent package's patched field label/description gets its own card to design the translation. The maintainer tapped 「先修新增,另开卡」 (2026-11-15T14:42:00Z, this project thread). Until that card lands, D stands: patched text shows as written in every language.

    Prior rulings read: as the seat ruling above (ADR-0029 D9.2a, ADR-0146 D2/D10, ruling 6631250894 via i18n-resolver.ts:432-461).

  8. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

    Claim amendment · #33800 · route and file surface · 2026-11-15T15:37Z

    Route: half 1 option A per seat ruling 6895879286 (half 2 stays D per maintainer ruling 6896340775). File surface becomes: packages/objectql/src/registry.ts (getPackagedObjectBase carries the field names a code extender adds, same filter as packagedRules; the :8140 ⛔ rewritten keeping the #8037 reason), packages/spec/src/system/i18n-resolver.ts (stale comments only, :375-380 and :2236-2239), protocol-packaged-object-base.test.ts (BY REFERENCE pin flip), the rest meta-object read and echo-restore pins, i18n-resolver.test.ts:4406 comment, one changeset; translateObjectListViews only if included per item 4.
    Pre-claim deps: registry.ts is also on open PR #33821 (no hunk near :8147); git merge-tree before push decides order.
    Clause-②: no (narrowing is not claimed; the seat's item 6 re-check decides the final line, and the changeset names the changed non-default-locale reads)
    Metadata-protocol: none

  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv
    os-dev-report

    {
     "issue": 33800,
     "status": "done",
     "branch": "claude/area-A2-33800",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34156",
     "head": "ecffbe8d0",
     "session": "session_01QsR2jVPGBoi3MCGoKbW1Hv",
     "premise_still_valid": true,
     "summary": "Half 1 is done as seat ruling 6895879286 option A. SchemaRegistry.getPackagedObjectBase now also carries the field names a CODE extender adds (same filter as packagedRules; owner-declared fields, scalars and fieldPatches stay the owner's; tenant and stored extensions add nothing). So /meta under a non-default locale serves a dependent package's added fields with their pack's translations, and the #29673 save door stores the source text again. Origin is #29624 (59775a0d, 18.3.0), not #29948. Half 2 stays D (maintainer ruling 6896340775, own card).",
     "clause_2": "Clause-②: no. Nothing is refused, no accept set, export or shape changes; only label text for code-extender fields on non-default-locale /api/v1/meta/object reads changes, and the changeset says so. This matches the claim's line. Measured with dispatch-gates --tier against #33646 (yes (narrowing): refused-to-served answers) and #33769 (yes (widening): new exports), neither of which applies here.",
     "item2_reporter_shape": "NOT MEASURED directly: steedos-labs/os-project-blackcat-crm is not readable (add_repo: no access). Inferred to be a code package from the card ('through objectExtensions', unsuffixed field names, 'passes validate'). A stored object_extension row from a code-provenance package is also covered by the isCodeArtifactBody filter; an org-provenance row is not.",
     "item4_listViews": "Not applicable, no card: ObjectExtensionSchema refuses listViews on an extension (object.zod.ts guidance), so translateObjectListViews never sees an extender's view.",
     "tests": "Red first on 45dee177 plus the pins: objectql 4 failed/9 passed, rest 4 failed/8 passed ('expected Market to be 市场'). Final head ecffbe8d0 (locked VERDICT command-exit 0): objectql pins 38/38, rest pins 12/12. Suites on c856cd3b7: objectql 598 files/13250 tests, metadata-protocol 342 files (9 skipped)/22923 tests, rest 413/8459, spec 843/26966, all exit 0. Ablations (ablation-replace, build, dist-preflight, restore with blob == HEAD): A1 owner guard 3 red, A2 code filter 1 red, A3 fieldPatches fold 7 red. A3's first run was a no-op (drop 0, refused) and was rerun; A1's first run failed dts and was rerun.",
     "gates": "dispatch-gates --ran: 93 derived, 92 run with exit 0 (check:test-source-alias red once, fixed with a module-top import), 1 unrun: check:dual-build-cjs-loads, left to CI. Final head reruns: objectql/rest typecheck, spec check:generated, dts-closure, published-files, sourcemap, lean-entry-closure, test-source-alias, nul-bytes, type-check-debt all exit 0. pnpm lint exit 0. PR-body gates (no-major, adr-0087, closing-keyword-parity, partof) exit 0. merge-tree clean against origin/main, #33821 (merged) and #34025. CI at open: in_progress (Build Core, Type Check, Lint lanes running; Governed Surface Queue Guard, PR-body guards success).",
     "dogfood_battery": "n/a — no ! in the title and no (narrowing) arm",
     "files_changed": [
      "packages/objectql/src/registry.ts",
      "packages/objectql/src/protocol-packaged-object-base.test.ts",
      "packages/objectql/src/protocol-meta-effective-schema.test.ts",
      "packages/rest/src/meta-object-field-patch-i18n.test.ts",
      "packages/spec/src/system/i18n-resolver.ts",
      "packages/spec/src/system/i18n-resolver.test.ts",
      ".changeset/33800-extender-added-fields-translate.md"
     ],
     "line_budget": "under the 3000 human-merge threshold (dispatch-gates: 432 changed lines at 1437b8f5e, plus a 2-line import and a 3-line typing fix)",
     "tests_placement": "All new pins are top-level describes in existing harness files (ruling 6583487846): protocol-packaged-object-base.test.ts (getPackagedObjectBase), meta-object-field-patch-i18n.test.ts (meta-object extension i18n exit), protocol-meta-effective-schema.test.ts (#29673 door).",
     "mcp_calls": "0",
     "api_writes": "2 — relay pr_create (#34156), this post-stamped comment",
     "deviations": [
      "Package-suite runs were on c856cd3b7, not on the final head; the final head reran the pins, typechecks and the dist-reading gates. The later main merge touched spec CHANGELOG and kernel/public-auth-features only.",
      "Direct dependents of objectql were narrowed to the consumers of the changed method (metadata-protocol, rest), measured by grep; the other ~30 dependents are left to CI.",
      "The i18n-resolver.ts translateObject docblock sentence (~:4923) was also rewritten (stale for the same reason), beyond the :375-380 and :2236-2239 the amendment names.",
      "The rest pin file gained a module-top import of @objectstack/spec/ui, which check:test-source-alias requires."
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": []
    }
  10. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv
    os-dev-report

    Delta on report 6902334065: round 3, the should-fix from review 6903069973.

    {
     "issue": 33800,
     "status": "done",
     "branch": "claude/area-A2-33800",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34156",
     "head": "265a82f18",
     "session": "session_01QsR2jVPGBoi3MCGoKbW1Hv",
     "premise_still_valid": true,
     "delta": "packagedAddedFields now skips extensions from disabled packages, as the served fold does (withholdDisabledExtensions). getPackagedObjectBase filters out each extend contributor whose package isPackageDisabled before it reads the added fields. packagedRules is unchanged. The two comment nits are fixed. The i18n-resolver packagedBase doc now reads: '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.' The broad 'a stored extension' wording is now 'an extension of tenant provenance (_provenance: org)' in registry.ts, i18n-resolver.ts, its test comment and the changeset. A stored row of package provenance is a code layer and does add. The helper moved above the mergeObjectDefinitions docblock, which the round-2 insert had separated from its function. origin/main is merged in.",
     "commits": "e2c5196a9 fix · 8c317692c changeset · 265a82f18 merge of origin/main",
     "new_pin": "packages/rest/src/meta-object-field-patch-i18n.test.ts, an existing harness: 'a later extender that adds the same name and is DISABLED is withheld from the base as from the fold: the enabled one's field is translated'. com.example.later adds cb_market at priority 300 labelled 'Sales Market' and is then disabled. Asserts: served label is Market; base cb_market label is Market; the zh-CN read gives 市场 with options 内销, 出口.",
     "ablation": "The disabled filter was swapped for the bare contributors list, with marker ABLATED-R3-DISABLED, using ablation-replace. Anchor count went 1 to 0 and the marker count to 1. objectql build exit 0, dist preflight exit 0. Pins: objectql 38/38, rest 1 failed / 12 passed. The failing case is the new one: 'expected Sales Market to be Market' at :248, the base assertion. Restore: blob equals HEAD and git diff HEAD is empty. Rebuild exit 0, preflight --absent exit 0, pins rerun 38/38 and 13/13.",
     "tests": "At 265a82f18, under os-verify-lock (command-exit 0):\n- install exit 0; rest... closure build exit 0\n- pins: objectql 2 files 38/38; rest 1 file 13/13\n- objectql typecheck exit 0; rest typecheck exit 0\n- objectql test: 598 files, 13273 tests\n- metadata-protocol test: 342 passed + 9 skipped files, 22926 passed + 45 skipped tests\n- rest test: 413 files, 8468 passed + 332 skipped tests\n- spec test: 843 files, 26982 passed + 1 todo\n- spec check:generated exit 0",
     "gates": "dispatch-gates --commands at 265a82f18 derived 94 commands; all 94 run with exit 0. check:type-check-debt first exited 3 (PREREQUISITE NOT MET, a lock queue-timeout). It was rerun under the lock with a slot: exit 0. check:dual-build-cjs-loads exit 0 (123 entries, 72 packages). Also exit 0: pnpm lint, check-nul-bytes. --ran: all 94 derived families accounted for, 0 not measured. merge-tree exit 0 against origin/main and against #34025 (b63efd089) and #33821 (8f2c22d91). PR mergeable_state clean. CI check-runs for this head not yet read: in_progress.",
     "loose_ends": [
      "packagedRules has the same disabled-package gap. It was measured and left unchanged, as ordered. Probe against the built dist SchemaRegistry: base package p.base; p.a extends with rule cb_rule 'Enabled says.' (priority 200); p.b extends with the same name 'Disabled says.' (priority 300) and is then disabled. Reading: {served: [Enabled says.], base: [Disabled says.]}. So the packaged base's rule comes from a package the served object withholds. Under a non-default locale, translateObject sees the served message differ from the base, so the enabled package's message stays in its source text. engine-validation-messages reads the same base. Fix shape (for the card): apply the same isPackageDisabled filter to the contributors that getPackagedObjectBase hands to packagedRules and uses in its extended test. Dedupe words: packagedRules disabled package, getPackagedObjectBase validations disabled, withholdDisabledExtensions packaged base."
     ],
     "pr_body": "Not patched (dev writes the body only at pr_create). The seat may add one line under What changes: 'an extension from a disabled package adds nothing to the base, as the fold withholds it'.",
     "mcp_calls": "0",
     "api_writes": "2: git push (8c317692c..265a82f18; the round-3 commits were pushed earlier this round) and this comment through post-stamped / fleet-write relay",
     "security_findings": "none"
    }
  11. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

    Landed: PR #34156 merged as 98a4449; card closed by its Fixes line (half 1, option A; half 2 stays D as ruled). The sibling packagedRules gap is #34217. pm:dispatched removed · 2026-11-16T02:07Z

  12. removed
    pm:dispatched
    on Nov 16, 2026
  13. added a commit that references this issue on Nov 16, 2026
    98a4449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:serverpriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions