You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finding(fields,tests): every unit test for the type="number" widgets drives a string no browser can deliver — oracle and product disagree in 6 of 10 measured cases #6793
⚠️This is relayed, not measured by me. The source is #6765 and PR #6777's divergence pin; #6780's body states it as:
Also now pinned: the oracle and the product disagree in 6 of 10 measured cases (0x10 emits 0 under happy-dom and 10 in Chromium), so every existing unit test for these widgets drives a string no browser can deliver.
So the unit tests for the type="number" widget class — CurrencyField, PercentField, NumberField, GeolocationField, all in packages/fields/src/widgets/ (this path I did verify, on origin/main at d06059f24) — assert behaviour against inputs the browser sanitises before any handler sees them. Those tests are green for a world that does not exist.
#6780 was ruled option A (announce on validity.badInput). Per triage's analysis on that card, this survives every arm:
Under A, the new guard has real Chromium measurement behind it, but the existing test bodies still drive impossible strings — they keep providing green for a fiction.
Under B (do nothing) it survives untouched, and B's entire justification was "zero risk, zero cost" — a justification that did not count this.
Under C it would have been forced, because moving to type="text" invalidates the old tests' premise wholesale.
It is therefore independent of the ruling, which is why it is a separate card rather than a rider on #6780's PR. The #6780 dispatch names it explicitly as out of scope.
Deliverable
Make these widgets' tests drive inputs a real browser can actually produce — i.e. either drive the post-sanitisation value the browser really delivers, or move the affected assertions to a channel that measures a real browser, so that a green test means the product works rather than that the oracle agrees with itself.
Not measured: how many test files are actually affected. "Every existing unit test for these widgets" is the card's phrasing, not a file count I have taken.
Not measured: whether a happy-dom shim is the cheaper answer than relocating assertions — that trade-off has not been priced by anyone yet.
Related
#6780 (the ruling, option A, in flight) · #6765 (the measurement) · PR #6777 (the divergence pin) · #6716 · #6715 / PR #6766
Blocked-by: #6801
Filed by the
domain:uiexecution seat (PM sessionsession_01CRJge11jso9TpXRWFt1Z49) at triage's explicit request, recorded on #6780:The observation
So the unit tests for the
type="number"widget class —CurrencyField,PercentField,NumberField,GeolocationField, all inpackages/fields/src/widgets/(this path I did verify, onorigin/mainatd06059f24) — assert behaviour against inputs the browser sanitises before any handler sees them. Those tests are green for a world that does not exist.Why it is not covered by any of #6780's arms
#6780 was ruled option A (announce on
validity.badInput). Per triage's analysis on that card, this survives every arm:type="text"invalidates the old tests' premise wholesale.It is therefore independent of the ruling, which is why it is a separate card rather than a rider on #6780's PR. The #6780 dispatch names it explicitly as out of scope.
Deliverable
Make these widgets' tests drive inputs a real browser can actually produce — i.e. either drive the post-sanitisation value the browser really delivers, or move the affected assertions to a channel that measures a real browser, so that a green test means the product works rather than that the oracle agrees with itself.
Confidence gaps, stated rather than hidden
0x10→0/10split, are quoted from [Decision] Atype="number"widget can display one value and store another with nothing said — announce it, and at what scope? #6780, which sources them to finding(fields): CurrencyField/PercentField lean entirely on browser number-input sanitization, which happy-dom does not implement #6765 / PR docs(fields): record the measured browser reading behind CurrencyField/PercentField #6777. Whoever takes this should re-derive the divergence table on their own base before scoping — the count decides how much of the suite moves.Related
#6780 (the ruling, option A, in flight) · #6765 (the measurement) · PR #6777 (the divergence pin) · #6716 · #6715 / PR #6766
Generated by Claude Code