Skip to content

test(fields): wait for the schema-typed range bound before asserting its number value - #35055

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34991-between-bound-flake
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34991-between-bound-flake

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

Part of #34991

The card stays open: two sibling test files with the same race (FilterConditionField.emptyOperators-10790, FilterConditionField.builderRows-8748) follow in a second PR under it (seat order 2026-11-18 00:31Z, claim amendment 6965218495).

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

维护者速读

  • 改了什么:只改一个测试文件。两个“已保存的数值区间”用例改为等待带类型的数字输入框(spinbutton 角色)出现后再断言 toHaveValue(5) / toHaveValue(1)。
  • 为什么改:控件先用已保存的值画出区间行,age 的 number 类型要等异步的 getObjectSchema 返回才生效;在那之前框是文本框,值是字符串 "5"。原测试 findByLabelText 拿到第一个框就断言,在慢机上与 schema 赛跑,队列构建 44173515593 因此误踢 PR feat(flow designer): add variables, say why Runs is empty, Debug takes the side column, and autosave reads 已保存 in the header #34955。
  • 风险与回滚:零产品风险,不改任何发布代码;回滚即还原这一个测试文件。断言没有放宽,仍要求数字 5。
  • 先看:ui/packages/fields/src/widgets/__tests__/FilterConditionField.betweenBlankBound-9914.test.tsx 的 findTypedBound 及两处调用。
  • 两分钟验证:把该文件的 getObjectSchema 改成延迟 300ms 返回后跑 pnpm --filter @object-ui/fields exec vitest run --root ../.. packages/fields/src/widgets/__tests__/FilterConditionField.betweenBlankBound-9914.test.tsx,预期 14/14 通过(修复前同样改动会在 :174 报 5 (string))。
  • 需要你做的:无,席位落地。

What changes

The stored-criteria between tests asserted a typed value straight after findByLabelText. FilterConditionField seeds the row from the stored value at once, but age is typed number only when the async getObjectSchema answers; until then FilterBuilder draws the bound as a text box holding "5". The test now waits for the typed box itself (findByRole('spinbutton', { name })), via one helper findTypedBound, in both tests of this file that had the race (:174 To, and :198 From in the blank-bound migration test).

No skip, no retry, no quarantine; toHaveValue(5) and toHaveValue(1) are unchanged.

Widget reading: after the schema lands the bound IS a number input showing the number, so no product change and no changeset. The untyped text box exists only in the window before the schema answers (see Acceptance notes).

Tests

Reproduction: schema resolution delayed 300 ms (fails before, passes after)

Mutation landed with scripts/ablation-replace.mjs (anchor hit 1, blob changed, restored to HEAD blob, git diff HEAD empty), on the test-only anchor getObjectSchema: async () => OBJECT_SCHEMA replaced by a 300 ms setTimeout promise.

  • Leg A, test as on base 4443014 plus delay: Tests 2 failed | 12 passed (14). :174 expect(element).toHaveValue(5) Expected 5 (number), Received 5 (string), the queue signature exactly; and :198 toHaveValue(1) Received 1 (string).
  • Leg B, test at 6dffff8 plus delay: Test Files 1 passed (1), Tests 14 passed (14).
Package and neighbours at 6dffff8
  • @object-ui/fields package (vitest run --root ../.. packages/fields/, under os-verify-lock): Test Files 307 passed | 1 skipped (308), Tests 4651 passed | 7 skipped (4658), VERDICT command-exit 0.
  • The six FilterConditionField* files: Test Files 6 passed (6), Tests 128 passed (128).

Acceptance notes

  • Same race, other file, not changed here (scope is this file): with the same 300 ms delay, FilterConditionField.emptyOperators-10790.test.tsx fails 6 tests (findByDisplayValue('5') then an edit expects "amount":6, receives "amount":"6"), and FilterConditionField.builderRows-8748.test.tsx fails 1 (findAllByRole('combobox') then toHaveTextContent('Name'), receives empty). Both are latent copies of this flake.
  • Widget behaviour in the pre-schema window: an edit typed into a number bound before getObjectSchema answers is emitted untyped (the emptyOperators probe above emits "amount":"6"). Measured only through the unit harness; not reached through a running app.
  • Type check of the test project (type-check) and the full UI farm are left to CI (Type Check UI, Test UI).

Verification

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

All 26 non-vitest commands exit 0 at 6dffff8 (one check:type-check-debt first run exited 3 while queued behind a held lock; rerun exit 0, 0 raw tsc error(s) total). pnpm --dir ui exec vitest run scripts/ (under os-verify-lock): Test Files 171 passed | 2 skipped (173), Tests 5077 passed | 2 skipped (5079), VERDICT command-exit 0. dispatch-gates --ran: 27 derived, 27 run, 0 NOT-MEASURED (a derived zero, every line carries its exit code).


Generated by Claude Code

…its number value

The stored-criteria `between` tests asserted `toHaveValue(5)` / `toHaveValue(1)`
straight after `findByLabelText('To')`. The widget seeds the row from the stored
value at once but types `age` as a number only when the async
`getObjectSchema` answers, so the first box found can still be the untyped
text box holding "5". Wait for the typed box itself (`spinbutton` role).

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: 6dffff8

This is the first L1 read of #35055 (card #34991) at the head above. The head merges cleanly with current main.

Must-fix

None.

Should-fix

None.

Notes

  • Shape and surface. Fixes #34991 is in the body. One file changed, +19 −3, labelled skip-changeset. That file is the first item of the claim surface (6963436841). The widget and the changeset legs were conditional, and correctly not taken: no product code moved. Clause-②: no and Metadata-protocol: none are correct for a test-only change. check-governed-merges --pr 35055: not governed, 22 lines.

  • Cause. The fix waits on the typed element itself. findByRole('spinbutton', { name }) resolves only once the bound is an <input type="number">, which is the state the schema produces. Both racing call sites in the file use it: :174 (To) and :198. At :198, From is read as a spinbutton after To has been awaited as one; both bounds are typed in the same render, so that read is safe.

  • Scope bans. None is broken. There is no skip, quarantine or retry wrapper, and the assertions are unchanged (toHaveValue(5) and toHaveValue(1), numbers, not strings). Asking for the spinbutton role makes the test stricter than before, not weaker.

  • Reproduction. A 300 ms schema delay was applied through ablation-replace and restored to the HEAD blob.

    This meets "fails before, passes after".

  • Widget reading. The scope's clause, "if the widget itself can show an untyped bound to a real user after the schema lands, say so", is answered in the PR body. The untyped text box exists only before the schema answers; once it lands, the bound is a number input. That matches what the fixed test waits for.

  • Same race elsewhere. The dev found it in emptyOperators-10790 (6 tests fail under the delay) and builderRows-8748 (1 test). Those were sent to the seat as follow-ups, outside this card, which is correct.

  • CI at this head. When I read it, 14 checks were green, and Test UI (16 shards), Type Check UI, Lint UI and Build & E2E UI were still running. Package type-check was not run locally; the PR says so, and Type Check UI covers it. Landing waits on those.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · 2026-11-18T01:50Z

Probe Reading
check-governed-merges.mjs --pr 35055 NOT governed · 22 changed lines (+19 / -3) ≤ 3000, test-only
Head / review 77b2959fe (pure merge of origin/main over the reviewed 6dffff8; delta stat unchanged, 1 file) · L1 ACCEPT 6965205817, the review of record · all required check-runs success or skipped (43 success, 14 skipped)
Freshness K = 5 (merged forward at 01:09Z from K = 20)

Open findings: none. Part of #34991: the two sibling files with the same race follow in #35063 under the same card (seat order 2026-11-18 00:31Z, amendment 6965256074). Lands now to stop the queue ejections this anchor causes.

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

Dev-effort: medium · Rounds: 1

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 18, 2026 01:50
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit d4661df Nov 18, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34991-between-bound-flake branch November 18, 2026 02:11
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

Development

Successfully merging this pull request may close these issues.

2 participants