[PR #6246] [MERGED] fix(ci): validate persisted shutdown outcomes after terminal exit #7104

Closed
opened 2026-10-23 04:16:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6246
Author: @SpicyMarinara
Created: 9/15/2026
Status: ✅ Merged
Merged: 9/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/shutdown-terminal-proof


📝 Commits (2)

  • 83c45dd docs: track shutdown terminal proof correction
  • 8846e92 fix(ci): verify shutdown outcomes after terminal output is lost

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 scripts/regressions/fixtures/posix-terminal-shutdown.py (+1 -3)

📄 Description

Linked issue

Closes #6245

Why this change

The POSIX shutdown fixture can reap the launcher before reading its final buffered terminal output, then fail its log assertion despite confirming clean exit, saved data and a released writer lease. This false failure appeared during v2.4.6 release validation.

What changed

Remove the two final PTY log-string assertions: a closed terminal can discard those unread bytes, and macOS returns EOF after reaping, even when shutdown succeeded. Keep the actual safety checks unchanged: pending-save precondition, exit0 before the backstop, elapsed<9s, released writer lease, persisted value, clean heartbeat/exitCode, and no surviving server. Startup still exercises the real colored pino-pretty worker, and the shared SIGINT pipe proof still checks the completion message. No application behavior changes or new helper.

The precise coverage change is that SIGHUP-specific final terminal log delivery/wording is no longer asserted after terminal closure.

Validation

  • pnpm check: PASS, including production build and localization.
  • Existing complete server-signal-shutdown regression: PASS, including all six real PTY production/development signal/hangup/busy-hangup cases and the PID/duplicate-signal checks.
  • Controlled actual-fixture proof: insert a one-second parent scheduling pause before waitpid in a temporary copy. Original fixture fails only on absent tail text despite exit0, saved=true, leaseReleased=true and exitKind=clean. The final fixture passes the identical case with all functional assertions executed; both tail-text flags remain false. No deadlines were increased or temporary test files committed.
  • Independent review confirms the retained storage/process guarantees and explicitly identifies the dropped log-delivery-only coverage.

Evidence and exact commands/logs: https://gist.github.com/SpicyMarinara/cbade75da97f256cdbb409cd0a32f247

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

The controlled delayed-parent case and all six existing PTY cases were executed locally as described above. Hosted Linux validation remains required. No physical-device or browser behavior claim is made.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Contributor-facing validation fix is recorded under the release being prepared, v2.4.6. No version or user guide changes.

UI evidence (if applicable)

No UI change.

Summary by CodeRabbit

  • Bug Fixes

    • Improved shutdown validation to confirm successful cleanup using persisted results, preventing false failure reports when closed terminals discard final output.
  • Documentation

    • Added a v2.4.6 changelog entry documenting the improved shutdown regression checks.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6246 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/15/2026 **Status:** ✅ Merged **Merged:** 9/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/shutdown-terminal-proof` --- ### 📝 Commits (2) - [`83c45dd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/83c45dd68e51bf404b50f8ab78323b15ffb89566) docs: track shutdown terminal proof correction - [`8846e92`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8846e92a1f43b5e772c02ebcfab51984e841c31b) fix(ci): verify shutdown outcomes after terminal output is lost ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `scripts/regressions/fixtures/posix-terminal-shutdown.py` (+1 -3) </details> ### 📄 Description ## Linked issue Closes #6245 ## Why this change The POSIX shutdown fixture can reap the launcher before reading its final buffered terminal output, then fail its log assertion despite confirming clean exit, saved data and a released writer lease. This false failure appeared during v2.4.6 release validation. ## What changed Remove the two final PTY log-string assertions: a closed terminal can discard those unread bytes, and macOS returns EOF after reaping, even when shutdown succeeded. Keep the actual safety checks unchanged: pending-save precondition, exit0 before the backstop, elapsed<9s, released writer lease, persisted value, clean heartbeat/exitCode, and no surviving server. Startup still exercises the real colored pino-pretty worker, and the shared SIGINT pipe proof still checks the completion message. No application behavior changes or new helper. The precise coverage change is that SIGHUP-specific final terminal log delivery/wording is no longer asserted after terminal closure. ## Validation - `pnpm check`: PASS, including production build and localization. - Existing complete server-signal-shutdown regression: PASS, including all six real PTY production/development signal/hangup/busy-hangup cases and the PID/duplicate-signal checks. - Controlled actual-fixture proof: insert a one-second parent scheduling pause before waitpid in a temporary copy. Original fixture fails only on absent tail text despite exit0, saved=true, leaseReleased=true and exitKind=clean. The final fixture passes the identical case with all functional assertions executed; both tail-text flags remain false. No deadlines were increased or temporary test files committed. - Independent review confirms the retained storage/process guarantees and explicitly identifies the dropped log-delivery-only coverage. Evidence and exact commands/logs: https://gist.github.com/SpicyMarinara/cbade75da97f256cdbb409cd0a32f247 - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes The controlled delayed-parent case and all six existing PTY cases were executed locally as described above. Hosted Linux validation remains required. No physical-device or browser behavior claim is made. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Contributor-facing validation fix is recorded under the release being prepared, v2.4.6. No version or user guide changes. ## UI evidence (if applicable) No UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved shutdown validation to confirm successful cleanup using persisted results, preventing false failure reports when closed terminals discard final output. - **Documentation** - Added a v2.4.6 changelog entry documenting the improved shutdown regression checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:16:33 +07:00
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#7104
No description provided.