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
{{ message }}
Repository navigation
Commit 3ea91a3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(interaction): refuse a target with no usable centre
A selector that resolves to a target with no usable centre was dispatched at
the node's origin, and the command reported success. The touch-point layer now
uses the kernel's `isPositiveFiniteRect` guard, so a target with no extent, or
one carrying the failed-read `CGRectInfinite` sentinel, refuses with the
existing typed reason `target_bounds_invalid` and no tap is dispatched.
The layer had no area rule of its own: `normalizeRect` refuses only a negative
width or height, so a zero-area rect passed through it, and so did the
sentinel. The kernel's `isPositiveFiniteRect` refuses both.
The new fixtures publish the capture the issue describes: a zero-area node is
`hittable: false`. ADR 0011 records the guard's rule and names the shapes the
suite keeps, and the runtime-selector and runtime-ref contract suites prove
the refusal in the in-process runtime harness, under the errorTaxonomy cell,
before any dispatch.
Fixescallstack#3841
- Stale or unknown `@ref` (errorTaxonomy) → `ref_not_found` beside the stale-ref hint.
255
-
- A listed `@ref`whose node has no usable centre (missing, non-finite, or negative bounds), or a selector target without one → `target_bounds_invalid`.
255
+
- A listed `@ref`or a selector target whose node carries a zero extent (errorTaxonomy) → `target_bounds_invalid`.
256
256
- A listed `@ref` with no label to wait on or to scope by → `ref_unlabeled`.
- Edge-grazing container (0.07 px viewport overlap, center off-screen) → still refused.
259
259
- Covered node → occlusion refusal.
260
260
- Non-hittable target ± `--verify` → hint present / suppressed by evidence.
261
261
- Stripped-root tree (no Application/Window) → safe-default visibility.
262
262
263
+
The `target_bounds_invalid` refusal is the kernel's bounds guard, `isPositiveFiniteRect`: a node with no rect, a non-finite component, a box whose own right or bottom edge overflows, a zero or negative extent, and the `CGRectInfinite` sentinel all refuse.
264
+
That is the guard's rule rather than this list's inventory: the contract suite keeps the zero extent, and the selectors unit suite and the command-level suite prove the sentinel beside it.
265
+
263
266
Path forcing is explicit and test-only: `AGENT_DEVICE_FORCE_INTERACTION_PATH=runtime|direct|native-ref`.
264
267
Thus, cases stay stable when path-selection heuristics change.
265
268
@@ -380,6 +383,15 @@ Also, the structural rule never reached the read door.
380
383
Verification names the collapsed control too.
381
384
That control is the node that dispatch acted on, and the node that the recorded identity carries.
382
385
386
+
### 2026-10-20 amendment: a target with no usable bounds is refused before dispatch
387
+
388
+
The touch-point layer had no area rule of its own.
389
+
`normalizeRect` refuses a negative width or height, so a zero-area rect passed through it — and so did the `CGRectInfinite` sentinel a failed read carries.
390
+
Both resolved to a point, the sentinel to the origin, so the layer dispatched a tap there and the command reported success.
391
+
The layer now calls the kernel's `isPositiveFiniteRect`, and a target the guard refuses gets the typed reason `target_bounds_invalid` with no tap dispatched.
392
+
The reason a value guard is the rule: a failed read that crossed the wire leaves every component and every extent finite, so only a value guard refuses it (#2891).
393
+
The guard is value-exact, so a huge but finite box whose centre is the origin still resolves; the Swift twin refuses the same values, and a wider rule belongs to the kernel.
394
+
383
395
### Synthesized iOS gesture policy
384
396
385
397
The element dispatch-path matrix above intentionally does not include synthesized iOS gestures:
0 commit comments