You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f6eafa3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(apple-runner): refresh a served macOS read against a relaunched pid
A read served in place resolved through `resolveAppWithoutActivation`, which returns the
cached handle when the cache names the app — and a cached handle can record a pid an
outside relaunch replaced. The activating route never answers from that residue because
it runs `refreshCachedTargetIfProcessChanged` before its `targetNeedsActivation` read;
the new arm bypassed the shared identity rule, so between an outside relaunch and the
next read, a served read could address the dead process while claiming to observe the
live one. Reachability: an `open`-bound session whose app is quit and reopened by the
user leaves exactly this residue, and macOS `notRunningRefusal` never intercepts it.
The fix runs the shared rule on the arm before resolution, so identity is settled once
and both routes read the same live pid.
Pinned by a host-lane test that plants the residue (live app, bogus cached pid) and
asserts the served preparation refreshes without activating; canary: deleting the
refresh call fails the test with the bogus pid still in place. Also drops the probe
wrapper the arm no longer needs: a served read is one `state` query, and the
activating route's second read cannot reuse the first because the refresh between them
may have replaced the process the first answered for. The arm's and the predicate's
comments are cut to the invariant they protect, per AGENTS.md; the decision record
lives in #3338.
Partial #3254
0 commit comments