[PR #4437] [MERGED] Fix dev startup after dependency updates #6379

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4437
Author: @SpicyMarinara
Created: 8/1/2026
Status: ✅ Merged
Merged: 8/1/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/fix-stale-dev-dependencies-4436


📝 Commits (2)

  • fad5d37 fix dev startup after dependency updates
  • 4b97749 surface dev dependency validation failures

📊 Changes

3 files changed (+96 additions, -28 deletions)

View changed files

📝 scripts/check-workspace-install.mjs (+66 -28)
📝 scripts/dev.mjs (+13 -0)
📝 scripts/regressions/launcher-update.regression.mjs (+17 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #4436

Why this change

  • A source checkout could retain pnpm's previous installed dependency graph after pnpm-lock.yaml changed. Current server source then imported Fastify 5.11's LogController from a stale Fastify 5.8.5 link and crashed before startup.
  • Fresh installs and automatic launcher updates were safe, but manual source updates followed by npm run dev or pnpm dev had a sharp edge.

What changed

  • Compare pnpm's installed lock snapshot with the repository pnpm-lock.yaml as part of workspace install validation.
  • Make the development entrypoint run pnpm install --frozen-lockfile only when that validation reports missing or stale dependencies, then validate again before startup.
  • Add regression coverage for absent, matching, and stale installed lock snapshots and guard the dev synchronization path.

Validation

  • 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

Completed local evidence:

  • pnpm check
  • node scripts/check-workspace-install.mjs
  • node scripts/regressions/launcher-update.regression.mjs
  • pnpm exec prettier --check scripts/check-workspace-install.mjs scripts/dev.mjs scripts/regressions/launcher-update.regression.mjs
  • git diff --check

Manual verification notes

  • Deliberately changed the generated installed-lock snapshot so validation reported it stale.
  • Ran npm run dev with isolated storage and port 17861.
  • Observed the dev preflight run a frozen pnpm install, repair the lock snapshot, start Fastify 5.11, and report the server ready in 2.6 seconds.
  • Stopped the isolated process after Vite became ready; no browser click-through was performed.

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] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

No user-facing documentation or release metadata changed. This is development/install validation behavior.

UI evidence (if applicable)

Not applicable; no UI changes.

Summary by CodeRabbit

  • Bug Fixes

    • Development startup now detects stale or incomplete workspace dependencies before building or launching services.
    • Automatically refreshes dependencies with a frozen lockfile install when needed.
    • Provides a clear error when dependencies remain invalid after installation.
    • Added validation for platform-specific runtime components, including Android support.
  • Tests

    • Expanded regression coverage for lockfile version mismatches and dependency validation behavior.

🔄 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/4437 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/1/2026 **Status:** ✅ Merged **Merged:** 8/1/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-stale-dev-dependencies-4436` --- ### 📝 Commits (2) - [`fad5d37`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fad5d37285baad55f90d66226b9e0b0ecd23abe6) fix dev startup after dependency updates - [`4b97749`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4b9774947718a5e8d083aee2ad43841a9a55a02d) surface dev dependency validation failures ### 📊 Changes **3 files changed** (+96 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `scripts/check-workspace-install.mjs` (+66 -28) 📝 `scripts/dev.mjs` (+13 -0) 📝 `scripts/regressions/launcher-update.regression.mjs` (+17 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #4436 ## Why this change - A source checkout could retain pnpm's previous installed dependency graph after `pnpm-lock.yaml` changed. Current server source then imported Fastify 5.11's `LogController` from a stale Fastify 5.8.5 link and crashed before startup. - Fresh installs and automatic launcher updates were safe, but manual source updates followed by `npm run dev` or `pnpm dev` had a sharp edge. ## What changed - Compare pnpm's installed lock snapshot with the repository `pnpm-lock.yaml` as part of workspace install validation. - Make the development entrypoint run `pnpm install --frozen-lockfile` only when that validation reports missing or stale dependencies, then validate again before startup. - Add regression coverage for absent, matching, and stale installed lock snapshots and guard the dev synchronization path. ## Validation - [ ] `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` Completed local evidence: - `pnpm check` - `node scripts/check-workspace-install.mjs` - `node scripts/regressions/launcher-update.regression.mjs` - `pnpm exec prettier --check scripts/check-workspace-install.mjs scripts/dev.mjs scripts/regressions/launcher-update.regression.mjs` - `git diff --check` ### Manual verification notes - Deliberately changed the generated installed-lock snapshot so validation reported it stale. - Ran `npm run dev` with isolated storage and port `17861`. - Observed the dev preflight run a frozen pnpm install, repair the lock snapshot, start Fastify 5.11, and report the server ready in 2.6 seconds. - Stopped the isolated process after Vite became ready; no browser click-through was performed. ## 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] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) No user-facing documentation or release metadata changed. This is development/install validation behavior. ## UI evidence (if applicable) Not applicable; no UI changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Development startup now detects stale or incomplete workspace dependencies before building or launching services. - Automatically refreshes dependencies with a frozen lockfile install when needed. - Provides a clear error when dependencies remain invalid after installation. - Added validation for platform-specific runtime components, including Android support. - **Tests** - Expanded regression coverage for lockfile version mismatches and dependency validation behavior. <!-- 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:09:51 +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#6379
No description provided.