Skip to content

Linux engine: a Chrome drop's activation is judged by when the watch reads it, not by the server's order (possible false ok) #468

Open

Description

@SSFSKIM

Found 2026-11-21 while checking a -1.3 ms activation in #171 M5's task 132 (rulings 1024/1025). Correctness, fail-open in principle; never observed.

Mechanism. The engine confirms a Chrome drag and drop under way at the release when Chrome sends its own _NET_ACTIVE_WINDOW request (source 1) for the drop window within DROP_CONFIRM (150 ms) after the release. The after-release watch (native/linux-engine/src/dnd.rs, watch_loop) stamps each request with Instant::now() when its thread reads it (dnd.rs:792). It admits one when seen >= at && seen - at <= DROP_CONFIRM (dnd.rs:803), where at is taken just before the button-up goes out (engine/pointer.rs:904; handle.rs for drag_handle). The thread polls every LATE_POLL (2 ms). So a request Chrome sent shortly before the release, but read by a descheduled watch thread only after at, would confirm a drop that never landed: a plain ok, the fault class of #459.

Bounds.

  • A request only matches after confirm_drop_of names the drop window, just before the release (pointer.rs:892, handle.rs release_handle). One read earlier counts for nothing.
  • It takes a source-1 _NET_ACTIVE_WINDOW from Chrome for its own window during the drag itself, which Chrome's drop path (WebContentsViewAura::CompleteDrop → WebContents::Focus) does not send.
  • The window is the watch thread's read lag at the release: a few ms idle, more under load.

Evidence: 0 seen in 486 non-landing drags.

  • Task 68 found the request on 1,861 of 1,861 drops and on none of 354 drags that did not land (m4/drop-signals/).
  • At Independence 4b: cua's own Linux native engine (replace sky_linux), after #117's macOS engine #171 M5 task 132 (arm64 at twice the load, 0.4.3 candidate f9d1f86), the 132 t14-floor left and inzone-out rows had no activation at all. The harness counts every activation from the take on, negative ones included (scripts/linux-engine-diff/drop-signals-judge.mjs signalsOf).
  • It has stood since 0.4.1, and 0.4.3's tail does not widen it: the tail's motions all come before at.

The hardening. Judge the activation in the server's order, not by read time. Just before the button-up, put a marker into the watch connection's own event stream, the way the harness's after-release probe does it. For example, change a property on a window the watch owns, or have the watch make a round trip. Then count only requests read after the marker; a request in the stream before the marker predates the release, whenever it is read.

Tests: a unit test on watch_loop's ordering with an injected pre-marker request read late; a live test with a fake Chrome source that sends its activation 1 ms before the release, with the watch thread delayed.

Not in scope: the harness's activation_after_release_ms can read slightly negative. It measures from --stats wall.release_ms, which is stamped after the release's round trip (pointer.rs:906, input.rs:561). It is documented at drop-signals-judge.mjs:328 and is not this defect.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions