Skip to content

fix(macos): verify the live process when an AppKit launch date is skewed - #383

Draft
lahfir wants to merge 2 commits into
mainfrom
laf/macos-skewed-launch-date
Draft

lahfir wants to merge 2 commits into
mainfrom
laf/macos-skewed-launch-date

Conversation

@lahfir

@lahfir lahfir commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator
  1. Login-item apps can report an AppKit launch date more than 5 s off the libproc process start, and the global window inventory read that as owner churn on every attempt, so list-windows and window screenshots timed out on a stable desktop (fix(macos): verify live process instance when AppKit launch date is skewed #379).
  2. A launch-time disagreement now falls back to the live-instance check that owners without a launch date already use. A token whose process is gone still reports churn.
  3. The timeout now carries last_pid and last_phase, so the failing owner and reason show up instead of an unresponsive-app hint.

Closes #374

Co-authored-by: Prince Jain 117412569+princejain756@users.noreply.github.com

roboeve Bot and others added 2 commits October 31, 2026 09:52
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 on a stable desktop. A launch-time disagreement now falls back to the live-instance check that owners without a launch date already use; a token whose process is gone still reports churn.

The timeout dropped the pid and phase of the last churn error, so the failure surfaced only as an unresponsive-app hint. It now carries last_pid and last_phase.

Fixes #374

Co-Authored-By: Prince Jain <117412569+princejain756@users.noreply.github.com>
A launch date outside the tolerance now falls back to a libproc read, so the existing churn test reached whatever process the host runs as pid 10. It now uses a pid macOS never assigns, so the live check finds no process and the test keeps asserting process_generation_changed on every machine.
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
agent-desktop Ignored Ignored v0 Oct 31, 2026 9:53am UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: macOS: an app whose launchDate is more than 5 s off its process start fails every list-windows and window screenshot

1 participant