fix(cua-driver): bound Linux snapshots after app exit - #2822
Merged
f-trycua merged 1 commit intoAug 4, 2026
Conversation
aryasaatvik
marked this pull request as ready for review
August 3, 2026 19:09
f-trycua
marked this pull request as draft
August 4, 2026 10:29
f-trycua
force-pushed
the
fix/linux-atspi-zombie-snapshots
branch
4 times, most recently
from
August 4, 2026 12:12
9731c7b to
344790d
Compare
Reject dead and mismatched Linux window targets before AT-SPI, and keep one absolute timeout across traversal and geometry collection. Add deterministic process-state, real-zombie, PID-owner, shared-budget, and hosted GTK3 stale-target recovery coverage. Co-authored-by: Francesco Bonacci <f@trycua.com>
f-trycua
force-pushed
the
fix/linux-atspi-zombie-snapshots
branch
from
August 4, 2026 13:11
344790d to
d7b44e0
Compare
f-trycua
marked this pull request as ready for review
August 4, 2026 13:28
This was referenced Aug 4, 2026
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
Prevent Linux snapshots from accepting exited or mismatched GUI targets and keep AT-SPI traversal plus geometry resolution within one operation deadline.
Root cause
A zombie remains present under
/procuntil reaped, so PID existence alone does not prove a process is usable. A PID can also be recycled after exit, making a live-process check insufficient unless the requested X11 window still belongs to that PID. Separately, traversal and bounds collection could each consume timeout budget unless they share one absolute deadline.Changes
/procstatesZ(zombie),X(dead), missing, and malformed status as non-livelist_windowsget_window_statebefore AT-SPI when the process is non-live or the current X11 window owner does not match the requested PID; revalidate Wayland targets against current enumerationIntegration
The final candidate is rebased onto the merged AT-SPI application-selection fix. The one overlapping test-module conflict was resolved by retaining its duplicate-application and enabled-state coverage alongside this PR's one-deadline traversal/bounds test; production behavior from both changes remains intact.
Validation
Final candidate:
d7b44e09a9bed624b075e253889a81ba8f3da69ecargo fmt --manifest-path libs/cua-driver/rust/Cargo.toml --all -- --checkgit diff --checklinux-gtk3-stale-target-recovery-ax-not-applicabledelivered with the AX-state oracle and bound trajectory videoScope
Linux process/window liveness and AT-SPI snapshot budgeting only. This intentionally does not alter AT-SPI application candidate selection or other Linux input/capture behavior.
Authorship
Preserves Saatvik Arya as commit and squash author; adaptation is credited by the existing Francesco coauthor trailer.