Repository navigation
fix: name the processes holding a timed-out desktop lane lock - #58
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
iamnbutler
force-pushed
the
fix/lane-lock-holder
branch
from
October 17, 2026 03:20
b79e1cb to
d5db3a5
Compare
This was referenced Oct 17, 2026
This was referenced Oct 17, 2026
Merged
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.
Closes #48. The coordination root stays shared, by decision.
When a desktop lane lock wait timed out, the error gave only the path ("Timed out waiting for the desktop operation lane lock at ~/.peekaboo/global.lock"). Neither the agent nor the user could see that a hung
swift testhelper was the cause.Change
New patch at the end of the stack:
peekaboo-lock-holder.patch.DesktopOperationLaneCoordinator.checkLockDeadlinenow appends "Processes with it open, one of which holds it:" and lists up to 8 processes. Each has its name, pid and executable path. The timed-out process is markedthis process.… lane lock at /Users/me/.peekaboo/global.lock. Processes with it open, one of which holds it: swiftpm-testing-helper (pid 35219, /…/swiftpm-testing-helper); desktop-tools-app (pid 812, this process, /Applications/Desktop Tools.app/…).flockrecords no owner, andlsofcan't tell holders from waiters.F_GETLKsees a flock conflict but reportsl_pid = -1; I checked both here. So the newLockFileHolderswalks the user's processes' open file descriptors withproc_listallpids,PROC_PIDLISTFDSandPROC_PIDFDVNODEPATHINFO, and matches the lock file by device and inode. The holder is always in the list, along with any other waiters. The lookup takes about 0.2 s and runs only after a 15 s timeout.refusedwith error codetimeout. Other users' processes are unreadable and left out.native/patches/README.mddescribes the patch.docs/build.mdwarns contributors that Peekaboo tests take the real~/.peekaboolocks, thatHOMEdoesn't isolate them, and to use a narrow filter and a time limit. This is the issue's third idea.Coordination root
It stays shared, as the lead decided: serializing with other Peekaboo hosts, such as Ace, is the point.
Tests
swift test --filter DesktopOperationLaneCoordinatorTestsin Core/PeekabooAutomationKit: 19/19 pass. It ran in the foreground with a 600 s limit and an uncommitted isolation edit todefaultURL, which was reverted before generating the patch. Two new tests:git apply --check -Rconfirms the patch is the exact delta on top of the current stack.npm run checkpasses, and the native build is green.Live check (pending)
~/.peekaboo/global.lockfrom a throwaway process, for examplepython3 -c 'import fcntl,time;f=open("<path>","a");fcntl.flock(f,fcntl.LOCK_EX);time.sleep(30)', then calldesktop_windows→ refused after 15 s, naming that Python process. I didn't run this: holding the real lock would block the live MCP and other workers.🤖 Generated with Claude Code