Skip to content

Linux engine: an Electron page's key release shows in the tree after the 100 ms action settle #302

Open

Description

@SSFSKIM

Problem

In #171 M4 T8 (task 62), the settle experiment judged keydown and keyup in the Electron input-page press_key cell. In about a third of the runs, the keyup's AT-SPI update came 60-150 ms after the engine's answer. That held at every settle step from 0 to 100 ms, on the background and desktop routes, idle and at twice the load. The confirmation on the shipped 100 ms missed 10 of 33 idle.

Electron's accessibility updates are bimodal: they arrive at once or about 65 ms later, sometimes about 130 ms. The vendor's own 100 ms misses this too. A key into a page field holds at 10 ms on Electron.

T7 saw the same lag: key-then-paste missed 13 of 60 on Electron at a 75 ms paste settle under twice the load, and held at 100 ms.

press_key keeps 100 ms.

Next step

Either:

  • measure an Electron-only press_key settle (150 ms, 200 ms) by the wait rule, the smallest value passing 30/30 idle and at 2x; or
  • have the observation wait on the tree's change.

Evidence

  • docs/evidence/2026-10-28-own-linux-engine/m4/settle/ (search/constants.md)
  • m4/paste-settle/

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 6, 2026
  2. added 2 commits that reference this issue on Nov 7, 2026
  3. SSFSKIM commented on Nov 14, 2026

    @SSFSKIM
    OwnerAuthor

    New sighting on the desktop route, 2026-11-14, in cua #171 M4's release gate (step L3b, Electron settle at double load, candidate 2 f969289). electron-input press_key on the desktop route was late on 6 of 31: the key-down inside the settle, the key-up at 239–317 ms, every answer ok, the desktop clean. So the late key release is not background-only, and a fix (or the settle wait for an Electron key-up) has to cover both routes. The gate's re-judge counts it under this ticket. The script's background-only check is now front_active !== false, so null on the desktop route passes and false still fails.

  4. added 3 commits that reference this issue on Nov 14, 2026
  5. SSFSKIM commented on Nov 14, 2026

    @SSFSKIM
    OwnerAuthor

    Landed with #171 M4, PR #380 (78b4959, linux-engine-v0.4.0).

    Candidate 3 (c55c8e0) of M4's release gate, re-judged by scripts/rejudge-302.mjs. S1, idle: electron-input press_key background had 5 #302 runs in 32 (206.4–222.7 ms), 0 failing. L3b, at twice the load: background 1 in 59 (314.5 ms), and desktop 9 in 34 (229.8–294.7 ms), 0 failing. c3-c55c8e08/out/S1.rejudge-302.txt and L3b.rejudge-302.txt.

  6. added 2 commits that reference this issue on Nov 14, 2026
  7. SSFSKIM commented on Nov 19, 2026

    @SSFSKIM
    OwnerAuthor

    Sighting: #302 in key_up's form, on arm64 (#171 M5). At the frozen head H⁗ (3b5c044), on linux-engine-v0.4.1, arm64's L3b at twice the load failed one cell: electron-input key_up desktop, shipped lane, with 5 late runs in 33 (trials 7, 12, 15, 25 and 32). Each key_up answered in 0.2–3.5 ms. The key-up reached the page 187–264 ms after the answer (186.8, 251.4, 212.4, 188.1 and 263.9 ms). Nothing was lost: every release had arrived by the next before-read.

    This is a separate form from press_key's. A key held across a separate key_down and key_up gets X autorepeat under load, as a person's held key does. So the page's key-downs run ahead of its key-ups (the gap grew from 1 to 217 over the series), and late repeats arrive with the late release: 1 to 4 key-downs came after the answer in each of the five runs. press_key's conditions cannot hold on this page. Its key-downs are not exactly one more inside the settle, and its key-ups never equal its key-downs at the next before-read.

    The design session's rulings 864 and 865 add key_up's form, separate from press_key's. press_key's form is unchanged. A failing Electron key_up run counts as #302 only when all of these hold:

    1. its class is late;
    2. the held key's press landed before the run's before-read;
    3. at the next before-read on the same page, key-ups are exactly one more, and key-downs have grown only by the next run's own press;
    4. the late events are only that key's release and its autorepeats;
    5. the desktop is clean and the front window was not lost (desktop_clean === true && front_active !== false).

    A lost, refused or invalid run still fails, and so does a hard failure under ruling 650.

    The settle judge now has this form as heldKeyUpMiss (scripts/linux-engine-diff/action-settle-cells.mjs, branch m5-302-keyup). Every stored L3b was re-judged read-only. arm64's L3b at H⁗ moves from FAIL to PASS, with these 5 of 33 counted as #302. No other stored L3b moves: x64 at H and at H⁗, and both pilots. The arm64 pilot's one late key_up, the first run of its series, stays an honest miss, because no earlier reading shows that its press landed. The engine's own notes (native/linux-engine README, beside the deviations) say that a key held across a key_down and a key_up is subject to X autorepeat. The line is not in the agent-facing docs, because the model's API exposes no separate key_down or key_up.

  8. added 2 commits that reference this issue on Nov 19, 2026
  9. SSFSKIM commented on Nov 19, 2026

    @SSFSKIM
    OwnerAuthor

    Correction to the comment above: the X-autorepeat note is in the harness README (scripts/linux-engine-diff/README.md), not native/linux-engine's README. Any change under native/linux-engine/ would make the harness refuse every run pinned to linux-engine-v0.4.1. A tracker entry moves the note into the engine README at the next engine release.

  10. added 2 commits that reference this issue 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