[GH-ISSUE #5312] [Issue]: Dev watchers repeatedly emit StorageWriterLeaseError #2936

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Abandoned development watcher supervisors remain alive after their owning session disappears. When another Marinara server owns the file-storage lease, every later source edit makes those watchers spawn a server that fails with StorageWriterLeaseError again.

Expected behavior

A dev watcher that cannot acquire the storage writer lease because another live Marinara server owns it should exit. It must not remain resident and retry startup after every file change.

Actual behavior

The failed server child exits, but tsx watch and its pnpm supervisor keep running. Multiple abandoned supervisors accumulate, producing repeated lease errors even though the active lease is valid and storage is safe.

Steps to reproduce

  1. Start the Engine through the development launcher.
  2. End the owning session without allowing its launcher to forward a graceful signal, leaving the detached server watcher behind.
  3. Start one healthy Engine server against the same data directory.
  4. Edit a watched server source file.
  5. Observe the abandoned watcher retry startup and emit StorageWriterLeaseError for the healthy writer's lease.

Environment

  • Marinara Engine version: current staging
  • Install type: source checkout / development watcher
  • OS + version: macOS
  • Browser or app shell: local web development

Logs, screenshots, or video

Observed one healthy server holding .writer-lease and listening on port 7860, alongside eight parentless pnpm --filter @marinara-engine/server dev / tsx watch process groups. The lease error was emitted by the duplicate starts; the lease owner's PID was still live.

Additional context

The storage lease is behaving correctly by preventing concurrent writers. The regression is that the development watcher treats this fatal ownership conflict like an ordinary application crash and continues watching forever.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5312 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Abandoned development watcher supervisors remain alive after their owning session disappears. When another Marinara server owns the file-storage lease, every later source edit makes those watchers spawn a server that fails with `StorageWriterLeaseError` again. ## Expected behavior A dev watcher that cannot acquire the storage writer lease because another live Marinara server owns it should exit. It must not remain resident and retry startup after every file change. ## Actual behavior The failed server child exits, but `tsx watch` and its `pnpm` supervisor keep running. Multiple abandoned supervisors accumulate, producing repeated lease errors even though the active lease is valid and storage is safe. ## Steps to reproduce 1. Start the Engine through the development launcher. 2. End the owning session without allowing its launcher to forward a graceful signal, leaving the detached server watcher behind. 3. Start one healthy Engine server against the same data directory. 4. Edit a watched server source file. 5. Observe the abandoned watcher retry startup and emit `StorageWriterLeaseError` for the healthy writer's lease. ## Environment - Marinara Engine version: current `staging` - Install type: source checkout / development watcher - OS + version: macOS - Browser or app shell: local web development ## Logs, screenshots, or video Observed one healthy server holding `.writer-lease` and listening on port 7860, alongside eight parentless `pnpm --filter @marinara-engine/server dev` / `tsx watch` process groups. The lease error was emitted by the duplicate starts; the lease owner's PID was still live. ## Additional context The storage lease is behaving correctly by preventing concurrent writers. The regression is that the development watcher treats this fatal ownership conflict like an ordinary application crash and continues watching forever. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:58:08 +07:00
Author
Owner

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

Fixed and merged into staging by #5313. The guarded development watcher now exits on the verified writer-lease conflict while preserving the healthy lease owner.

<!-- gh-comment-id:5356061196 --> @SpicyMarinara commented on GitHub (Aug 20, 2026): Fixed and merged into staging by #5313. The guarded development watcher now exits on the verified writer-lease conflict while preserving the healthy lease owner.
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#2936
No description provided.