Repository navigation
Engine: the next engine restores the Chrome EUI a SIGKILLed or crashed engine left on, from a record kept beside its socket (#293) - #333
Merged
Conversation
… next start writes back what a SIGKILLed or crashed engine left on, before it serves (refs #293) The record is enablement/<pid>-<start>.json in the engine's 0700 directory: the target's pid and kernel start time (us), the attribute written, and the owning engine's pid and start time. It is filed before an owned write (A3 settles ownership there) and removed once the write back is done or the process ended; a failed write back keeps it. Each file is written whole and renamed into place, one per process. At start, after engine.lock and before the socket is bound: a dead owner's entry whose target still runs at the recorded start time is written false (0.5 s messaging timeout, 2 s budget) and dropped, and the process is remembered as written back; a gone target or a reused pid is dropped with nothing written; a live owner's entry is left; a malformed entry is skipped with a log line. EnablementRecordTests (12) and the engine's start test in native-engine.test.mjs; 30 mutations, each fails a test. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ugin 0.27.10 (refs #293) Sminos-Session: cursor235#b93055dd (cua on macbook)
…marks a restore's write-back only for the entry's own process, and keeps an uncertain write owned unless rolled back (refs #293) The review of 81a4309..bc44b12, three P2s. (1) The start time is captured with the process's first observation and the entry filed only while the pid still runs that process; otherwise nothing is filed or written. (2) A restored process is remembered as written back under its generation only when the pid still runs the entry's process after the read (currentGeneration), so a pid reused during the restore keeps A3. (3) A write that did not take removes its entry only when it reads back false or a rollback (a write of false) succeeds; a failed rollback keeps the entry and the ownership for the release or the next start. Four new EnablementRecordTests; 39 mutations, each fails a test. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ce Electron's computed getter reads false after enabling, so it is rolled back or kept owned and recorded (refs #293) The re-review of a32d029: a false read back proved that a failed write did not take only where the getter can confirm it (enablementReadBackConfirms: not AXManualAccessibility, #244). A new EnablementRecordTests case; BackgroundPointerTests' failed write now counts its rollback; 41 mutations, each fails a test. Sminos-Session: cursor235#b93055dd (cua on macbook)
…he next start against main's control (refs #293) Sminos-Session: cursor235#b93055dd (cua on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An engine killed with SIGKILL, or one that crashes, used to leave Chrome in complete accessibility mode (AXEnhancedUserInterface, "EUI") for the life of that Chrome. Window moves stayed animated, and Chrome stayed in screen-reader mode. Now every enablement the engine owns is recorded beside its socket, and the next engine's start writes back what a dead engine left on, before it serves.
Closes #293
The rules (the spec's #293 Decision Log entry)
enablement/<pid>-<start>.json, in the engine's state directory besideengine.sock. Each file holds{pid, start, attribute, ownerPid, ownerStart}. The start times are the kernel's, in microseconds.Server.start, aftertakeLockand beforebindSocket. For each entry:Plugin 0.27.10.
Live proof (GitHub-hosted macOS 26.7.2, Chrome for Testing 156; main 81a4309 against 1feda4a; n=6 per cell per head)
The evidence is in
docs/evidence/2026-11-08-eui-restore/. Run: https://github.com/SSFSKIM/cua/actions/runs/42520338893.Limits
CUA_ENGINE_SOCKET, restores only its own directory's entries.Tests and review
EnablementRecordTestsholds 17.node --test test/native-engine.test.mjs: 21 of 21 pass, including a start test that seeds 4,001 dead entries and requires all of them gone before the socket first answers.BackgroundPointerTestsnow counts 2 writes for a failed AXManualAccessibility write, the attempt and its rollback.Round 1, three P2s:
All fixed.
Round 2, one P2: AXManualAccessibility's getter can't confirm a write. Fixed.
Round 3: CORRECT.
Sminos-Session: cursor235#b93055dd (cua on macbook)