fix(server): lease Darwin server ownership - #57
Conversation
lastobelus
commented
Aug 22, 2026
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:a8202ac657
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
lastobelus
commented
Aug 22, 2026
@codex review |
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39. On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe. This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback. Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard. Built with GPT-5.4 in the Codex harness.
Part of #39.
On macOS, the desktop client and a headless launchd service could otherwise start separate servers against the same LastCode home. Concurrent ownership risks conflicting state writers and makes the service transition unsafe.
This adds a Darwin kernel-backed exclusive lease for each server base directory. Server startup acquires the lease before constructing the runtime, reports a clear error when another owner holds it, rejects unsafe lock paths, and releases ownership with the server scope. Other platforms retain their existing startup behavior rather than gaining a weaker PID-file fallback.
Focused coverage exercises contention, release and reacquisition, canonicalized paths, symlink rejection, invalid lock paths, and the non-Darwin boundary. The rebased patch also passed server typechecking, targeted lint/format checks, and the normal four-stage LastCode quick-CI push guard.
Built with GPT-5.4 in the Codex harness.