Skip to content

Refactor shared file lock handling#724

Merged
ryanfowler merged 1 commit into
mainfrom
refactor-lock-code
Jun 7, 2026
Merged

Refactor shared file lock handling#724
ryanfowler merged 1 commit into
mainfrom
refactor-lock-code

Conversation

@ryanfowler

Copy link
Copy Markdown
Owner

Summary

  • Centralize cross-platform advisory lock open/retry/unlock logic in src/fileutil.rs with a reusable FileLock helper
  • Switch session and update lock paths to use the shared helper while preserving their existing timeout and warning behavior
  • Add regression tests for nonblocking acquisition, timeout mapping, contention hooks, and successful blocking acquisition after release
  • Update AGENTS.md to document the shared lock owner

Testing

  • cargo fmt
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo test --all-features
  • cargo test --all-features --test cli --test formatting --test grpc --test http --test network --test terminal --test update --test websocket -- --test-threads=1

@ryanfowler ryanfowler enabled auto-merge June 7, 2026 22:54
@ryanfowler ryanfowler merged commit b66df54 into main Jun 7, 2026
4 checks passed
@ryanfowler ryanfowler deleted the refactor-lock-code branch June 7, 2026 22:56
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.

1 participant