[GH-ISSUE #5194] [Issue]: Reclaim stale macOS writer leases after network changes #2872

Closed
opened 2026-10-21 05:57:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Aug 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5194

Originally assigned to: @SpicyMarinara on GitHub.

Summary

A stale file-storage writer lease can block startup on macOS even after its owning process has exited. The lease's v1 host fingerprint includes all visible network-interface MAC addresses, so VPN, privacy, and virtual interfaces can make the same Mac appear to be a different host.

Expected behavior

When the PID recorded by a same-machine lease has exited, Marinara Engine should safely reclaim the stale lease and start.

Actual behavior

The changed network-interface set produces a different host fingerprint. Marinara Engine treats the stale lease as potentially foreign and throws StorageWriterLeaseError, requiring manual removal of .writer-lease.

Steps to reproduce

  1. Start Marinara Engine on macOS so it creates a writer lease.
  2. Stop the owning process without a clean lease release.
  3. Change the visible network-interface set, for example by connecting or disconnecting a VPN or virtual interface.
  4. Start Marinara Engine again.

Environment

  • Marinara Engine version: current staging at feb276cd8
  • Install type: source
  • OS + version: macOS 26.5
  • Browser or app shell: not applicable; server bootstrap fails first

Logs, screenshots, or video

The stale lease recorded a dead PID and the current hostname, but its hostId no longer matched the fingerprint computed from the current network-interface list. Startup failed with StorageWriterLeaseError instead of reclaiming it.

Additional context

Use a stable per-machine identifier on macOS and retain a narrowly scoped compatibility path for v1 leases already written with the unstable fingerprint. Live writer protection and foreign-host safety must remain intact.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5194 Originally assigned to: @SpicyMarinara on GitHub. ## Summary A stale file-storage writer lease can block startup on macOS even after its owning process has exited. The lease's v1 host fingerprint includes all visible network-interface MAC addresses, so VPN, privacy, and virtual interfaces can make the same Mac appear to be a different host. ## Expected behavior When the PID recorded by a same-machine lease has exited, Marinara Engine should safely reclaim the stale lease and start. ## Actual behavior The changed network-interface set produces a different host fingerprint. Marinara Engine treats the stale lease as potentially foreign and throws `StorageWriterLeaseError`, requiring manual removal of `.writer-lease`. ## Steps to reproduce 1. Start Marinara Engine on macOS so it creates a writer lease. 2. Stop the owning process without a clean lease release. 3. Change the visible network-interface set, for example by connecting or disconnecting a VPN or virtual interface. 4. Start Marinara Engine again. ## Environment - Marinara Engine version: current `staging` at `feb276cd8` - Install type: source - OS + version: macOS 26.5 - Browser or app shell: not applicable; server bootstrap fails first ## Logs, screenshots, or video The stale lease recorded a dead PID and the current hostname, but its `hostId` no longer matched the fingerprint computed from the current network-interface list. Startup failed with `StorageWriterLeaseError` instead of reclaiming it. ## Additional context Use a stable per-machine identifier on macOS and retain a narrowly scoped compatibility path for v1 leases already written with the unstable fingerprint. Live writer protection and foreign-host safety must remain intact. ## Template check - [x] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:57:20 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (Aug 17, 2026):

Fixed and verified in #5195, now merged into staging.

<!-- gh-comment-id:5316757353 --> @SpicyMarinara commented on GitHub (Aug 17, 2026): Fixed and verified in #5195, now merged into staging.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2872
No description provided.