Repository navigation
fix(macos): verify live process instance when AppKit launch date is skewed - #379
Open
princejain756 wants to merge 1 commit into
Open
princejain756 wants to merge 1 commit into
princejain756 wants to merge 1 commit into
Conversation
…kewed Apps launched as login items can report an NSRunningApplication.launchDate more than 5 s off the libproc process start. The global window inventory treated that offset as a generation change on every attempt, so list-windows and window screenshots retried until the deadline even though nothing was restarting. A launch-time disagreement now falls back to the same live-instance check the scoped path uses; a token whose process is gone still reports churn. The timeout also dropped the pid and phase from the last churn error, which is why the failure surfaced only as an unresponsive-app hint. It now carries last_pid and last_phase. Fixes vercel-labs#374
|
@princejain756 is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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
Login-item apps can report an
NSRunningApplication.launchDatemore than 5 s off the libproc process start, and the global window inventory read that offset as owner churn on every attempt, solist-windowsand window screenshots timed out on a stable desktop. A launch-time disagreement now falls back to the live-instance check the scoped path already uses, and the timeout carries the offending pid and phase.Related issues
Closes #374
Type of change
fix:- bug fixHow tested
cargo fmt --all -- --checkcargo clippy "${HOST_PKGS[@]}" --all-targets -- -D warningscargo test "${HOST_PKGS[@]}" --libcargo test -p agent-desktopcargo test -p agent-desktop-ffi --testsAGENT_DESKTOP_E2E_EXCLUSIVE=1 bash tests/e2e/run.sh(requires--releasebuild + AX permission; run when behavior changes)Also verified by hand:
list-windowson a live desktop still returnsok: true, and the new regression test fails againstmain(process_generation_changedfor the skewed-launch input) and passes on this branch. The reporter's skew detector prints no affected apps on this machine, matching the issue's note that the condition cannot be created on demand; the unit tests drive the exact -9 s offset Grammarly and Raycast showed.Checklist
type: description, lowercase, no capital after colon)cargo fmtandcargo clippy -D warningsare cleanunwrap()added in non-test code///doc-comments on public items)skills/agent-desktop/or the platform skill underskills/agent-desktop-macos/,skills/agent-desktop-windows/orskills/agent-desktop-linux/)Skill docs note: the change adds
last_pidandlast_phaseto theglobal_window_inventory_unstabletimeout details. That kind is not enumerated inskills/, so no shipped doc went stale.