[PR #3779] [MERGED] fix: isolate Playwright startup from an active dev server #6096

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3779
Author: @SpicyMarinara
Created: 7/18/2026
Status: ✅ Merged
Merged: 7/18/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/issue-3778-playwright-shared-isolation


📝 Commits (4)

  • 20df8ea chore: start issue 3778
  • 15fcb06 fix: preserve shared output for Playwright
  • 5d4ccbb fix: keep live server stable during smoke tests
  • 1ef9563 test: exercise Playwright build selection

📊 Changes

6 files changed (+29 additions, -2 deletions)

View changed files

📝 packages/server/package.json (+1 -1)
📝 packages/shared/package.json (+1 -0)
📝 playwright.config.ts (+1 -0)
➕ scripts/dev-shared-build.mjs (+4 -0)
📝 scripts/dev.mjs (+3 -1)
📝 scripts/regressions/open-issues.regression.ts (+19 -0)

📄 Description

Why

Playwright starts a second development stack on isolated test ports. That stack previously ran the normal clean shared-package build, which removed packages/shared/dist while an existing API server could still be importing from it. The live server then restarted into a missing module and exited.

Closes #3778.

Summary

  • Add a shared build mode that refreshes TypeScript output without deleting dist.
  • Select that preserved build only for Playwright-started development stacks.
  • Keep the normal API watcher from reacting to shared artifacts written by the test stack.
  • Keep normal clean development and production builds unchanged.
  • Add regression guards for the Playwright-to-dev wiring.

Validation

Automated validation completed locally:

  • pnpm --filter @marinara-engine/shared build
  • pnpm --filter @marinara-engine/shared build:preserve
  • pnpm regression:issues
  • pnpm check
  • Focused desktop Chromium smoke test: 1 passed
  • Two-stack reproduction: the original API stayed healthy and did not restart while Playwright rebuilt shared and completed the browser test

Manual verification for the human contributor:

  • Manually start pnpm dev on the normal development ports.
  • Manually start a Playwright smoke test on its isolated ports.
  • Manually verify the original API remains continuously healthy while Playwright runs.

Summary by CodeRabbit

  • Bug Fixes

    • Improved development stability by preserving shared build output when running the development server.
    • Prevented unnecessary server restarts when shared package files change.
  • Tests

    • Added regression coverage for shared build preservation and development environment configuration.

🔄 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/3779 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/18/2026 **Status:** ✅ Merged **Merged:** 7/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/issue-3778-playwright-shared-isolation` --- ### 📝 Commits (4) - [`20df8ea`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20df8eaf95208dc1c2c0b97bd267297bf1264d23) chore: start issue 3778 - [`15fcb06`](https://github.com/Pasta-Devs/Marinara-Engine/commit/15fcb06c9ccc88a09261eafa64816df664cbdc68) fix: preserve shared output for Playwright - [`5d4ccbb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5d4ccbbb5532cb407dadfb135a89909ff67135ae) fix: keep live server stable during smoke tests - [`1ef9563`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ef956391005960442c6f16774a2d0c14427c94d) test: exercise Playwright build selection ### 📊 Changes **6 files changed** (+29 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/package.json` (+1 -1) 📝 `packages/shared/package.json` (+1 -0) 📝 `playwright.config.ts` (+1 -0) ➕ `scripts/dev-shared-build.mjs` (+4 -0) 📝 `scripts/dev.mjs` (+3 -1) 📝 `scripts/regressions/open-issues.regression.ts` (+19 -0) </details> ### 📄 Description ## Why Playwright starts a second development stack on isolated test ports. That stack previously ran the normal clean shared-package build, which removed packages/shared/dist while an existing API server could still be importing from it. The live server then restarted into a missing module and exited. Closes #3778. ## Summary - Add a shared build mode that refreshes TypeScript output without deleting dist. - Select that preserved build only for Playwright-started development stacks. - Keep the normal API watcher from reacting to shared artifacts written by the test stack. - Keep normal clean development and production builds unchanged. - Add regression guards for the Playwright-to-dev wiring. ## Validation Automated validation completed locally: - pnpm --filter @marinara-engine/shared build - pnpm --filter @marinara-engine/shared build:preserve - pnpm regression:issues - pnpm check - Focused desktop Chromium smoke test: 1 passed - Two-stack reproduction: the original API stayed healthy and did not restart while Playwright rebuilt shared and completed the browser test Manual verification for the human contributor: - [ ] Manually start pnpm dev on the normal development ports. - [ ] Manually start a Playwright smoke test on its isolated ports. - [ ] Manually verify the original API remains continuously healthy while Playwright runs. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved development stability by preserving shared build output when running the development server. * Prevented unnecessary server restarts when shared package files change. * **Tests** * Added regression coverage for shared build preservation and development environment configuration. <!-- 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:07:03 +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#6096
No description provided.