Skip to content

ui: romanizeHan.test.ts "before the dictionary has loaded" fails when another unit test in the same worker loaded the pinyin dictionary first (unit project runs with isolate: false) #36653

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Filed by the seat from PR #36651 (#36648). Source: a red Test UI (7/16) on that PR, in a file the PR does not touch.

Suggested-grade: p1 (a red on a PR that does not touch the file; any PR can draw it, and a merge-queue run that draws it ejects the PR)
Suggested-domain: domain:ui
Suggested-area: area:fleet

Signature

  • Job 137580509219 (Test UI (7/16)), PR fix(studio): an edit typed as a Save ends survives the Save's re-read of the object #36651 head 6e21473c66d90fda5eabac0affa9dc6982511c16, 2026-11-23 09:03Z.
  • packages/app-shell/src/views/metadata-admin/romanizeHan.test.ts > romanizeHan before the dictionary has loaded > returns the text unchanged and reports the Chinese text as pending
  • AssertionError: expected ' weixiu zhongxin ' to be '维修中心' at romanizeHan.test.ts:24:33. 1 failed, 2840 passed in the shard.

Reading (by the seat, not yet reproduced)

  • The file is a .test.ts, so it runs in the unit project, which sets isolate: false (ui/vitest.config.mts near line 390). Module state is shared by every file a worker runs.
  • The file's header says its first describe reads the module before the dictionary is loaded, because that state is module-wide. Under isolate: false that holds only if no earlier file in the same worker called loadHanRomanizer(). The output ' weixiu zhongxin ' is the loaded dictionary's reading, so one had.
  • So the red depends on which files the shard puts in the same worker ahead of it, not on the PR under test. A PR that adds or moves test files can shift that and draw it.

Fix direction (for the developer to confirm)

Make the "before load" cases independent of earlier files: e.g. read a fresh module instance (vi.resetModules() + dynamic import) for that describe, or move those cases to a file in an isolated project. Never skip, quarantine or retry. The product behaviour (text unchanged and pending until the dictionary loads) stays pinned.

Re-check

git grep -n "isolate: false" ui/vitest.config.mts and git grep -ln "loadHanRomanizer" ui/packages -- '*.test.ts'

Activity

  1. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

    Claim: PM loop round 4 · 2026-11-23T09:05Z
    Session: session_01JQwxbZeHNsF3RWcWpj7rGj
    Thread session: session_01JQwxbXCSJnUMMhWxyBmuqA
    Account: os-warren
    Branch: the card thread's own branch, named at its first push; the seat amends this claim then
    Worktree: objectstack-issue-36653
    Domain: domain:ui
    Seat: repo:objectstack#1
    Area: card thread #36648 (w3-T5, a second PR from the same thread)
    Dispatch: filed by this seat from its own PR #36651, which this red blocks. A new signature with an assertion first error, so pm-dispatch allows no re-run: the test is fixed instead. Untriaged at claim; triage grades it.
    File surface: ui/packages/app-shell/src/views/metadata-admin/romanizeHan.test.ts and, only if the order-dependence needs it, the unit-project test that loads the dictionary first; no product code, no changeset (stop on breach; explain in the report). Never skip, quarantine or retry the test
    Container & model: XS, mode:thread, model: opus — dispatch-gates --tier: no path-derived mandate, default tier (root-cause diagnosis); the thread's first report states the served tier, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the test's "before load" cases assume module state that the unit project (isolate: false) shares across files | an earlier file in the same worker loaded the pinyin dictionary | any PR whose shard plan puts such a file ahead of it (PR #36651 drew it)
    Thread-read: none
    Premise: one red (job 137580509219); the thread names the neighbour that loads the dictionary, reproduces the order locally, then fixes
    Serial constraints cleared: no open PR names #36653; PR #36651 merges main once this lands

  2. added
    pm:dispatched
    on Nov 23, 2026
  3. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

    Claim amendment · 2026-11-23T09:28Z — completes claim 7096225212.
    Branch: claude/project-thread-d5iokd (the fix rides on PR #36651, whose Test UI red it is; one thread, one branch)
    PR: #36651, which adds Fixes #36653
    Reading (thread): the neighbour is designModeMenuCreate-36364.test.ts (unit project, landed with #36606), which calls loadHanRomanizer() in beforeAll. Run first in the same worker under isolate: false, it reproduces the CI red exactly. Fix, test only: the before-load cases read a fresh module instance (vi.resetModules() + dynamic import), and a new case pins that the same instance stops being pending once it loads. Under load with the neighbour first: red before, 20/20 green after.

  4. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:fleet · domain:ui · priority:p1 · Bug; pm state stays pm:dispatched (claimed by seat 1).
    Rationale: a test-isolation flake that reds PRs which do not touch the file and can eject merge-queue runs — same class and grade as #36640 / #36648 / #36619 (a queue-ejecting flake is p1).

  5. added
    bug
    domain:ui
    finding
    priority:p1
    on Nov 23, 2026
  6. removed
    pm:dispatched
    on Nov 23, 2026
  7. added a commit that references this issue on Nov 23, 2026
    9348f02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:fleetbugdomain:uifindingpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions