[GH-ISSUE #6245] [Issue]: Shutdown regression can miss the terminal tail after clean exit #3484

Closed
opened 2026-10-21 06:03:33 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The POSIX shutdown regression can stop collecting terminal output as soon as the launcher is reaped, losing its final shutdown log and failing an otherwise clean shutdown.

Expected behavior

Validate the persisted shutdown and process outcomes even if the closed terminal discards unread final log text. Keep all deadline, pending-save, clean-exit, process and writer-lease checks.

Actual behavior

On the v2.4.6 staging matrix, signal/production returned exit code 0 in 0.05 seconds, saved the pending write, released the writer lease, and recorded a clean heartbeat, but the fixture did not capture Shutdown complete. The loop checks waitpid before its next PTY read and has no final drain.

Steps to reproduce

  1. Run scripts/regressions/server-signal-shutdown.regression.ts on Linux.
  2. In signal/production, let the launcher exit between the fixture's PTY reads.
  3. Observe that the fixture can break on waitpid before collecting its final terminal bytes.

Environment

  • Marinara Engine version: v2.4.6 staging cb2a443225
  • Install type: source / hosted CI
  • OS + version: GitHub Actions ubuntu-latest
  • Browser or app shell: real PTY, Node launcher, production logger

Logs, screenshots, or video

Failing job: https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/34999844692/job/104485232551

Reported outcomes before the log assertion: exitCode=0, leaseReleased=true, saved=true, exitKind=clean. The same source passed previously. A controlled one-second parent scheduling pause reproduces the false failure locally; the PTY returns EOF with the messages unavailable. The final fixture passes the identical case while retaining the shutdown outcome assertions. Proof: https://gist.github.com/SpicyMarinara/cbade75da97f256cdbb409cd0a32f247

Additional context

Release tracking: #6242. Owner: @SpicyMarinara, with Codex implementing the small fixture correction. No server behavior change. Only unreliable final terminal-log delivery assertions are removed; storage and process assertions remain unchanged.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Sep 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6245 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The POSIX shutdown regression can stop collecting terminal output as soon as the launcher is reaped, losing its final shutdown log and failing an otherwise clean shutdown. ## Expected behavior Validate the persisted shutdown and process outcomes even if the closed terminal discards unread final log text. Keep all deadline, pending-save, clean-exit, process and writer-lease checks. ## Actual behavior On the v2.4.6 staging matrix, signal/production returned exit code 0 in 0.05 seconds, saved the pending write, released the writer lease, and recorded a clean heartbeat, but the fixture did not capture `Shutdown complete`. The loop checks waitpid before its next PTY read and has no final drain. ## Steps to reproduce 1. Run `scripts/regressions/server-signal-shutdown.regression.ts` on Linux. 2. In signal/production, let the launcher exit between the fixture's PTY reads. 3. Observe that the fixture can break on waitpid before collecting its final terminal bytes. ## Environment - Marinara Engine version: v2.4.6 staging cb2a4432253878a98b87036eb29dad147231007c - Install type: source / hosted CI - OS + version: GitHub Actions ubuntu-latest - Browser or app shell: real PTY, Node launcher, production logger ## Logs, screenshots, or video Failing job: https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/34999844692/job/104485232551 Reported outcomes before the log assertion: exitCode=0, leaseReleased=true, saved=true, exitKind=clean. The same source passed previously. A controlled one-second parent scheduling pause reproduces the false failure locally; the PTY returns EOF with the messages unavailable. The final fixture passes the identical case while retaining the shutdown outcome assertions. Proof: https://gist.github.com/SpicyMarinara/cbade75da97f256cdbb409cd0a32f247 ## Additional context Release tracking: #6242. Owner: @SpicyMarinara, with Codex implementing the small fixture correction. No server behavior change. Only unreliable final terminal-log delivery assertions are removed; storage and process assertions remain unchanged. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:03:33 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 15, 2026):

Fixed on staging by #6246 (e0313a33ca). The complete Node regression suite passes 282/282; CodeRabbit reviewed the final patch with no actionable findings. Controlled before/after shutdown evidence is linked in the PR.

<!-- gh-comment-id:5685137498 --> @SpicyMarinara commented on GitHub (Sep 15, 2026): Fixed on staging by #6246 (e0313a33caef973e645616419d11894f4d8c434e). The complete Node regression suite passes 282/282; CodeRabbit reviewed the final patch with no actionable findings. Controlled before/after shutdown evidence is linked in the PR.
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#3484
No description provided.