Skip to content

test(fields): wait for the schema-typed render in the emptyOperators and builderRows FilterConditionField tests - #35063

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-34991-filter-sibling-races
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-34991-filter-sibling-races

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz

Fixes #34991

repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:只改两个测试文件(FilterConditionField.emptyOperators-10790 与 FilterConditionField.builderRows-8748),让断言等到 schema 返回后的带类型渲染再执行。接续 test(fields): wait for the schema-typed range bound before asserting its number value #35055(同一张卡的第一个 PR,修了 betweenBlankBound 文件)。
  • 为什么改:控件先用已保存的条件画出行,字段类型和字段标签要等异步 getObjectSchema 返回才生效。原测试 findBy 拿到第一次渲染就断言:数字框还是文本框时编辑会发出字符串 "6",字段下拉还没有标签 "Name"。慢机上与 schema 赛跑,和 test(fields): wait for the schema-typed range bound before asserting its number value #35055 是同一个队列误踢根因。
  • 风险与回滚:零产品风险,不改任何发布代码;回滚即还原这两个测试文件。断言没有放宽,仍要求数字 6 和标签 Name。
  • 先看:FilterConditionField.emptyOperators-10790.test.tsx 的 findTypedAmountBox;FilterConditionField.builderRows-8748.test.tsx 的 waitFor 标签等待。
  • 两分钟验证:把任一文件的 getObjectSchema 改为延迟 300ms 返回再跑该文件,预期全部通过(修复前 emptyOperators 红 6 个、builderRows 红 1 个)。
  • 需要你做的:无,席位落地。

What changes

Follows #35055, which fixed the same render race in FilterConditionField.betweenBlankBound-9914.test.tsx and lands as Part of #34991. That PR's 300 ms schema-delay reproduction found two sibling files with the same race; this PR fixes them and closes the card.

  • FilterConditionField.emptyOperators-10790.test.tsx: three findByDisplayValue('5') sites (the four RE-SAVE cases and the two OR-group cases) are replaced by findTypedAmountBox(), which waits for the typed number box (findByRole('spinbutton')) and asserts toHaveValue(5) before the edit. The emitted "amount":6 assertions are unchanged; the string "6" is not accepted.
  • FilterConditionField.builderRows-8748.test.tsx: the seeded-row test waits for the field trigger to read its label (waitFor on toHaveTextContent('Name')) before taking the triggers. A combobox takes no accessible name from its content, so findByRole('combobox', { name: 'Name' }) cannot spell it (measured: it fails even with no delay).

No skip, retry or quarantine. Test-only, so no changeset (skip-changeset).

Tests

Reproduction: schema resolution delayed 300 ms, before and after, per file

Each mutation was applied by scripts/ablation-replace.mjs (anchor getObjectSchema: async () => OBJECT_SCHEMA, hit once) and restored to the HEAD blob with git diff HEAD empty. Leg A uses the file as on base 743308b; leg B uses 52bace8.

File Leg A, base plus delay Leg B, fix plus delay
emptyOperators-10790 Tests 6 failed, 30 passed (36) Tests 36 passed (36)
builderRows-8748 Tests 1 failed, 3 passed (4) Tests 4 passed (4)
Neighbours and package at 52bace8
  • The six FilterConditionField* files: Test Files 6 passed (6), Tests 128 passed (128).
  • The @object-ui/fields package (run under os-verify-lock): Test Files 307 passed | 1 skipped (308), Tests 4651 passed | 7 skipped (4658), VERDICT command-exit 0.

Acceptance notes

  • The untyped emit before the schema answers is a widget question and is out of scope here. It is being carded separately.
  • Type check of the test project and the full UI suite are left to CI (Type Check UI, Test UI).

Verification

Derived gate families (dispatch-gates --commands, 27 commands)

All 27 commands exit 0 at 52bace8, including pnpm --dir ui exec vitest run scripts/: Test Files 171 passed | 2 skipped (173), Tests 5077 passed | 2 skipped (5079). dispatch-gates --ran: 27 derived, 27 run, 0 NOT-MEASURED, a derived zero. overlap-check: VERDICT clean exit 0.


Generated by Claude Code

Governing claim for this branch: 6965814231 on #34991.

…and builderRows FilterConditionField tests

Both files asserted on schema-dependent state right after a findBy that can
resolve before the async `getObjectSchema` answers: an edit to the `amount`
box emitted the string "6" (untyped text input), and the field trigger had no
label yet. Wait for the typed number box (`spinbutton` role) and for the
trigger's label, respectively. Same race and fix shape as the betweenBlankBound
file.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 18, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn

L1: ACCEPT
Head-sha: 52bace8

This is the first L1 read of #35063 at the head above. It is the second PR on card #34991 and follows #35055 (my ACCEPT 6965205817). The head merges cleanly with current main.

Must-fix

None.

Should-fix

None.

Notes

  • Shape and surface.
  • emptyOperators-10790. findTypedAmountBox() waits for the spinbutton role, which means the typed render, and then asserts toHaveValue(5) before the edit. That is one assertion stricter than the old findByDisplayValue('5'), which a text box holding "5" also satisfied. It covers all three sites (six tests). The edit assertions still expect "amount":6 as a number, so the queue failure ("amount":"6") stays a red. An unnamed findByRole is safe here because each of those renders has exactly one number comparand. A second one would throw rather than pass silently.
  • builderRows-8748. The test now waits for the first trigger to read Name, which is the schema-labelled render. Its explanation for using a text-content wait instead of findByRole with a name holds: a Radix combobox takes no accessible name from its content. The four existing assertions (length 2, Name, Contains (ignore case), no emit) are unchanged.
  • Scope bans. No skip, retry, quarantine or weakened assertion.
  • Reproduction. A 300 ms schema delay was applied, and each leg was restored to the HEAD blob.
    • emptyOperators: 6 of 36 fail on the base, and 36 of 36 pass with the fix.
    • builderRows: 1 of 4 fails on the base, and 4 of 4 pass with the fix.
    • The six FilterConditionField* files pass 128 of 128, and the fields package passes 4651 tests.
  • CI at this head. It was still running when I read it, so landing waits on Test UI, Type Check UI and Lint UI.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi3ezPzTysQPDEjmVz

Landing · 2026-11-18T01:51Z

Probe Reading
check-governed-merges.mjs --pr 35063 NOT governed, test-only (two sibling test files)
Head / review 52bace8b1 · L1 ACCEPT 6965792940, the review of record · PR-body guards green on the re-run after the second-branch claim 6965814231 (the two earlier red runs read only the first claim) · every other required check-run success or skipped
Freshness merge base K = 14

Open findings: none. Reproduction (schema 300 ms late): emptyOperators-10790 base 6 failed / 36 → 36 / 36; builderRows-8748 base 1 failed / 4 → 4 / 4. Queued behind #35055 (Part of #34991); this PR's Fixes #34991 closes the card.

State: ready + auto-merge armed by area o3-D (lease o3-D).

Dev-effort: medium · Rounds: 1 (second PR on the card)

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 18, 2026 01:51
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 36d46b5 Nov 18, 2026
69 of 71 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34991-filter-sibling-races branch November 18, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants