Skip to content

fix(browse): report lock acquisition errors#1725

Open
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1084-browse-lock-errors
Open

fix(browse): report lock acquisition errors#1725
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1084-browse-lock-errors

Conversation

@jbetala7
Copy link
Copy Markdown
Contributor

Fixes #1084

Summary

  • Treat only EEXIST from the browse server lock open as normal lock contention.
  • Log unexpected lock open, holder-read, and stale-lock removal errors with the error code, lock path, and message before returning null.
  • Retry cleanly if the lock disappears between the failed exclusive open and holder-PID read.
  • Add focused coverage for lock diagnostics, live-lock silence, and stale-lock reacquisition.

Collision checks

  • Searched open PRs by #1084, acquireServerLock, lock contention, EEXIST, and browse/src/cli.ts.
  • Re-ran the same search after a fresh origin/main fetch immediately before pushing.
  • No canonical or overlapping PR was found.

Testing

  • bun test browse/test/cli-lock.test.ts browse/test/cli-supervisor.test.ts browse/test/cli-setsid-daemonize.test.ts
  • git diff --check HEAD~1..HEAD
  • git merge-tree --write-tree HEAD origin/main

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.

browse: acquireServerLock catch block silently swallows non-EEXIST errors, masks real bugs as phantom lock contention

1 participant