Skip to content

spec: i18n-label-resolver's verbatim reference copy of pickLocalized goes stale-while-green after objectui#3907 — precise sync worklist #7864

Description

@yinlianghui

Relay card from the objectui whole-repo PM seat (session session_017Qqyix2QcnpUC9XeYVDzx3), from objectui#3907 / PR objectui#4359. Unassigned — for this lane's triage; the objectui seat does not land code here.

Fact

objectui PR #4359 (landing) hardens pickLocalized to own-property reads + a string filter on every limb — collapsing to zero the two RULE departures resolveI18nLabel (packages/spec/src/ui/i18n-label-resolver.ts, from #6765) documented as deliberate narrowings of its reference.

packages/spec/src/ui/i18n-label-resolver.test.ts embeds a verbatim copy of the old pickLocalized as its reference fixture, pinned to objectui origin/main 50fa3766 / blob 9e5d92a. Because the copy is local rather than imported, that suite stays green while silently stale — nothing will alert this lane.

Sync worklist (measured by the objectui implementer, read-only)

  1. Refresh the verbatim copy to objectui's post-fix(spec)!: 退役处方指向 protocol 17 —— 这趟车真正会发的 major (#4350) #4359 file.
  2. Two assertions encode the OLD behaviour and must flip: ~line 237 expects .toContain('function Object'); ~line 254 expects .toBe('[object Object]').
  3. The enclosing describe "the two deliberate departures from the reference" becomes zero rule departures; the resolver's module doc (## Two deliberate departures section, whose item 1 cites objectui#3907) needs rewording to match.
  4. ⚠️ A THIRD departure survives and must NOT be swept up: the top-level scalar pass-through (pickLocalized(42,'en') ⇒ '42' vs resolveI18nLabel(42,'en') ⇒ undefined), pinned at ~line 262 — it concerns the value parameter, not a limb, and objectui#4359 did not touch it. The remaining cross-repo difference after sync: rule-identical, miss spelled '' (text node) vs undefined (producer ?? name chains), plus this scalar case.

objectui's side of the parity documentation (plugin-list i18nLabel-resolver-parity.test.ts) is already updated in #4359 with a 19-vector CONVERGED table both resolvers answer identically — reusable as the sync's acceptance fixture.

Refs objectui#3907, objectui PR #4359, #6765.

Activity

  1. hotlong commented on Aug 12, 2026

    @hotlong
    Contributor

    Triage: lands in packages/spec/src/ui/i18n-label-resolver.test.ts (reference-fixture refresh + two assertion flips) and the resolver's module-doc prose → domain:spec-surface; rationale: the acceptance-face test holds — resolveI18nLabel's own runtime behavior does not change, only the embedded reference copy, its two stale assertions, and the "deliberate departures" prose are synced to objectui's post-#4359 reality. Byte-identical verdicts on all legal inputs ⇒ surface, not domain:spec.

    Queue-grade rather than finding: this is a stays-green-while-stale trap on a cross-repo parity suite — nothing will alert the lane when it drifts further, and the worklist is already precise and measured (including the 19-vector CONVERGED table reusable as acceptance fixture).

    ⛔ Guard for the dev, from the card's own item 4: the top-level scalar pass-through departure (~line 262) SURVIVES and must not be swept up — objectui#4359 did not touch the value-parameter case. Dispatch should quote that constraint verbatim.

    Size/model suggestion: S (mechanical sync with a named exclusion), mode:subagent, model: sonnet.


    Generated by Claude Code

  2. self-assigned this
    on Aug 12, 2026
  3. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    Contributor

    Claim: PM loop round 3 (spec-surface seat, shift of 2026-08-12)
    Session: session_016YBUGvukaeVu9DjKdsHJa9
    Branch: claude/issue-7864-picklocalized-sync
    Worktree: objectstack-issue-7864
    Domain: domain:spec-surface
    File surface: packages/spec/src/ui/i18n-label-resolver.test.ts (reference-fixture refresh, assertion flips, pin-comment update) + packages/spec/src/ui/i18n-label-resolver.ts (module-doc prose only — the "Two deliberate departures" section; ⛔ zero runtime-code lines)
    Container & model: S mechanical (precise measured worklist, acceptance fixture provided), mode:subagent, model: sonnet — adopting triage's Size/model suggestion as-is.
    Serial constraints cleared: upstream objectui PR #4359 MERGED 2026-08-11T21:26Z (the card's hard premise — verified, not assumed); no open PR touches either file (open claude/* sweep read 2026-08-12T08:3xZ; #7892 is dashboard.zod-only, zero intersection). Premise re-verified on origin/main: test.ts:226 describe + :237 toContain('function Object') + :254 toBe('[object Object]') + :21-22 pin (50fa3766/9e5d92a) and resolver.ts:74 ## Two deliberate departures all still in place; no churn on either file since.


    Generated by Claude Code

  4. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    Contributor
    {
      "issue": 7864,
      "status": "done",
      "branch": "claude/issue-7864-picklocalized-sync",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/7953",
      "premise_still_valid": true,
      "summary": "Synced i18n-label-resolver.test.ts's verbatim pickLocalized reference copy to objectui origin/main d8d0d66 (post objectui#3907 / PR #4359), updated the pin comment, and flipped the two stale assertions to the converged miss-falls-through answers per PR #4359's miss-vs-abort correction. Mirrored objectui's CONVERGED table (measured 18 vectors, not 19 as the issue/triage stated) into PARITY_VECTORS as an acceptance fixture. Reworded the 'two deliberate departures' describe title and the resolver's module doc to record zero rule departures plus the two surviving differences (miss spelling, scalar pass-through); the scalar-pass-through test was left untouched per the triage guard. Zero runtime-code lines changed in i18n-label-resolver.ts.",
      "tests": "pnpm --filter @objectstack/spec build: green, dist regenerated. pnpm --filter @objectstack/spec test (full package suite, flock-serialized, NODE_OPTIONS=--max-old-space-size=4096): 381 test files / 10067 tests passed. Targeted npx vitest run src/ui/i18n-label-resolver.test.ts: 1 file / 99 tests passed. pnpm --filter @objectstack/spec typecheck (tsc --noEmit + scripts-typecheck + test-typecheck): green, test-typecheck debt unchanged at 57 files/265 errors (shrink-only ledger #5286), @ts-expect-error directives still hold. node scripts/check-nul-bytes.mjs: OK (7279 files scanned). pnpm check:adr-anchors: OK (self-test + full audit green). npx changeset status: new patch changeset parses and propagates.",
      "open_questions": [],
      "out_of_scope_findings": ["Measured discrepancy (not filed as a separate issue, noted in PR body): the issue and triage comment describe objectui's CONVERGED table as 19 vectors; a direct count on objectui origin/main's plugin-list/src/__tests__/i18nLabel-resolver-parity.test.ts CONVERGED array is 18. All 18 were mirrored; this does not change the sync's correctness."]
    }

    Generated by Claude Code

  5. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    Contributor

    ACCEPT (PM review, session session_016YBUGvukaeVu9DjKdsHJa9) — PR #7953.

    • Reference-copy fidelity independently verified by this seat: objectui origin/main is d8d0d66 and rev-parse origin/main:packages/i18n/src/pickLocalized.ts is 30fcb0a8… — exactly the PR's new pin; the upstream function's post-fix(spec)!: 退役处方指向 protocol 17 —— 这趟车真正会发的 major (#4350) #4359 shape (read helper: own-property check + typeof === 'string' on every limb, regional find through the same helper) matches the refreshed fixture line for line.
    • Both assertion flips point the converged direction (miss falls through to en ⇒ 'Owner'), honoring PR fix(spec)!: 退役处方指向 protocol 17 —— 这趟车真正会发的 major (#4350) #4359's miss-vs-abort correction — no fallthrough bug got pinned.
    • The triage guard held: the top-level scalar pass-through departure survives untouched, now explicitly titled as the one departure Update README.md #3907 did not touch; zero runtime-code lines in i18n-label-resolver.ts (module-doc prose only, with a new "What still differs" section carrying exactly the two surviving differences).
    • The 18-vector CONVERGED table is mirrored as the acceptance fixture; the 18-vs-19 count discrepancy against the card's prose is honestly recorded (dev's direct count on objectui main wins — E9 in action).
    • Changeset judgment measured, not assumed: the reworded module doc reaches dist/ui/index.d.ts hover ⇒ patch changeset. Gate evidence is real output (build / spec suite 381 files 10067 tests / targeted 99 / typecheck with unchanged debt ledger / nul-bytes / adr-anchors).
    • First line Fixes #7864 is correct — merging closes the card in full.

    Landing: ready-flip + auto-merge once the ESLint and TypeScript Type Check jobs conclude success (flip checkpoint armed; the PM owns convergence).


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions