[PR #7838] [MERGED] fix(release): quiet the genai install notice, explain the type-check heap, document the 2.5.0 rollback loss #7963

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7838
Author: @SpicyMarinara
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/ready-install-update-path


📝 Commits (5)

  • 5e6d917 fix(install): stop pnpm asking to approve @google/genai's no-op install script
  • 4352e8b fix(build): say when a NODE_OPTIONS heap is too small for the client type-check
  • c7731b0 docs: warn that going back to 2.5.0 drops data from newer features
  • acc5ae5 fix(build): respect percentage heap limits in diagnostics
  • a3c1ac4 docs: clarify percentage heap troubleshooting

📊 Changes

8 files changed (+130 additions, -9 deletions)

View changed files

📝 docs/FAQ.md (+1 -1)
📝 docs/TROUBLESHOOTING.md (+8 -0)
📝 docs/UPGRADING.md (+6 -0)
📝 docs/installation/containers.md (+3 -1)
📝 packages/client/scripts/build-heap.mjs (+30 -4)
📝 packages/client/scripts/build.mjs (+4 -1)
📝 pnpm-workspace.yaml (+5 -0)
📝 scripts/regressions/launcher/termux-client-build.regression.mjs (+73 -2)

📄 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

No issue exists for these. They came out of the release-readiness check of the install and update path. An issue should be opened before merge if one is wanted for tracking. Translations follow-up: #7839.

Why this change

Three install and update problems found before the next release. They share the install docs, so they come in one PR.

  • Every install and update showed a pnpm warning box. @google/genai@2.21.0 came in after v2.5.0 through @earendil-works/pi-ai@1.2.0. Its only install script is preinstall: echo 'preinstall: no-op', but it is not in onlyBuiltDependencies, so pnpm 10 printed Ignored build scripts: @google/genai@2.21.0. Run "pnpm approve-builds" on every frozen install: start.sh, start.bat, start-termux.sh, the Windows installer, the Docker build and the in-app updater. CI run 39258562188 shows it on ubuntu, windows, both macOS runners and both full container builds. A user who follows that advice changes the tracked root package.json (that is where pnpm writes it in this repo; checked by running approve-builds), and every later launcher update then has to stash it.
  • A desktop build with a small NODE_OPTIONS heap now fails with no explanation. The client grew since v2.5.0 (three.js, VRM and world code). A clean tsc -b in packages/client now runs out of memory at --max-old-space-size=2048 and passes at 2304 (v2.5.0 passed at 2048). The build keeps a heap the user set in NODE_OPTIONS, on purpose, so the user only saw V8's crash output.
  • Rolling back to 2.5.0 silently loses data from newer features. v2.5.0 and staging both report storage format 7, so the downgrade guard lets 2.5.0 start on upgraded data. Its normalizeRow keeps only the columns it knows when it saves a row, so these are lost for good after a rollback round trip: api_connections showUsageFiveHour/showUsageWeekly/videoPromptInstructions/audioTimeoutMs, chat_images.generation, game_checkpoints gameMetadataData/chatCharacterIdsData/gameWorldEditsData, game_state_snapshots.rulesetClocks and game_scene_videos.characterIds. The chat-keyed tables rewrite the whole chat's shard on one save. Changing normalizeRow is a maintainer decision, so this PR only documents it.

What changed

  • pnpm-workspace.yaml: ignoredBuiltDependencies: ["@google/genai"] next to onlyBuiltDependencies. pnpm skips the no-op script quietly. pnpm-lock.yaml is unchanged.
  • packages/client/scripts/build-heap.mjs: new typeCheckHeapHint(), built on splitNodeOptions. When the tsc step stops the way V8 does when it runs out of heap (SIGABRT, or exit code 134 on Windows) and the last --max-old-space-size in NODE_OPTIONS is below 2304 MiB, it returns one line: [build] The client type-check needs about 2.5 GiB of Node.js heap, but NODE_OPTIONS limits it to 2048 MiB. Raise --max-old-space-size in NODE_OPTIONS to 2560 or more, or remove it. When --max-old-space-size-percentage is present, it takes precedence in either flag order: the hint uses V8’s resolved heap limit and advises raising or removing the percentage flag, without blaming an ineffective absolute flag. The heap comment is updated from about 2.1 GiB to about 2.3 GiB.
  • packages/client/scripts/build.mjs: prints that line after a failed tsc step. Nothing else changes: the user's heap is still never raised (raising it automatically is a maintainer decision), and the vite and guest steps are untouched.
  • scripts/regressions/launcher/termux-client-build.regression.mjs: covers the decision (SIGABRT, 134, either spelling, last option wins, 2304 and above not blamed, no user heap, the percentage form (including both flag orders, spaced values and underscore spelling), sufficient resolved heaps, and non-OOM failures) plus an end-to-end build.mjs run whose fake tsc exits 134 under a 2048 MiB heap.
  • docs/TROUBLESHOOTING.md: two entries. One for the desktop type-check heap message, with percentage-first and absolute-only remedies, and one for the genai notice: it is harmless, do not run approve-builds, and how to clear a cached notice.
  • docs/UPGRADING.md: new Going back to 2.5.0 under "Downgrading to an older version". docs/installation/containers.md: back up before updating, and how to pin an older tag and what going back to 2.5.0 loses. docs/FAQ.md: one sentence in "Will I lose my data when I update?" pointing to the downgrade section. README.md and docs/CONFIGURATION.md were checked; neither covers updating or rolling back, so they need no change.

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

Commands run by the agent (macOS arm64, pnpm 10.34.5, Node 24.16.0):

  • Box, on origin/staging first: a fresh pnpm install --frozen-lockfile --prefer-offline printed Ignored build scripts: @google/genai@2.21.0 and Run "pnpm approve-builds".
  • Box, after the fix: a clean corepack pnpm@10.34.5 install --frozen-lockfile --prefer-offline printed no box, and the next install printed none either. node_modules/.modules.yaml has "ignoredBuilds": []. git diff --exit-code pnpm-lock.yaml is clean. node scripts/check-workspace-install.mjs exits 0.
  • Update in place, desktop: installed v2.5.0, checked out this branch in the same tree, then a frozen install. No box, ignoredBuilds is [], check-workspace-install exits 0, and the tree is clean.
  • Update in place, Termux simulation (SHARP_IGNORE_GLOBAL_LIBVIPS=1 ... --os linux --cpu arm64 --cpu wasm32, store never pruned): v2.5.0 updated to origin/staging showed the box and cached genai in ignoredBuilds (control). v2.5.0 updated to this branch showed no box, and ignoredBuilds is []. The lockfile was unchanged in both.
  • A user who already ran pnpm approve-builds (pnpm writes pnpm.ignoredBuiltDependencies into the root package.json here): git stash push -u, check out this branch, git stash apply (applies cleanly), then a frozen install. No box, and the lockfile is unchanged.
  • Docker: a local build of the two real install steps (builder pnpm install --frozen-lockfile and production --prod, same base image) linked every package, but the OrbStack daemon stopped before the build finished, so there is no local Docker proof. The Container runtime (full and lite) jobs on this PR are the proof.
  • Heap, on origin/staging first: a clean NODE_OPTIONS=--max-old-space-size=2048 node <typescript>/bin/tsc -b in packages/client exited 134 with FATAL ERROR: ... JavaScript heap out of memory. At 2304 it exited 0 (peak RSS 2.39 GB).
  • Heap, after the fix: NODE_OPTIONS=--max-old-space-size=2048 node packages/client/scripts/build.mjs printed V8's out-of-memory error, then [build] The client type-check needs about 2.5 GiB of Node.js heap, but NODE_OPTIONS limits it to 2048 MiB. Raise --max-old-space-size in NODE_OPTIONS to 2560 or more, or remove it., and exited 1.
  • node scripts/regressions/launcher/termux-client-build.regression.mjs passes. With the build.mjs change reverted, its new end-to-end case fails (the hint is missing), so it is a real regression proof.
  • pnpm regression:launcher-update, node scripts/regressions/launcher/client-build.regression.mjs and node scripts/regressions/termux-native-deps.regression.mjs pass.
  • pnpm check: passes (exit 0), on this branch rebased onto staging b0de4167f. The one lint warning is pre-existing, in HomeProfessorMariChat.tsx. The branch was then rebased onto 26f774e37 (#7832, Tripo removal), which touches none of these files; CI covers that base.
  • Rollback, on origin/staging: storage-format.json and STORAGE_VERSION are 7 on both v2.5.0 and staging. v2.5.0's normalizeRow copies only meta.columns. The listed columns were all added after v2.5.0 (git diff v2.5.0 -- packages/server/src/db/schema). The game tables and chat_images are sharded by chatId in v2.5.0, and api_connections by primary key.

Review follow-up: percentage heap limits

  • Confirmed the final-head review finding against Node 24.16.0 and Node’s CLI reference: a percentage flag wins over an absolute flag in either order. Before the correction, a real 2649 MiB heap was reported as 1024 MiB; a real 437 MiB heap with an ineffective 4096 MiB absolute flag got no hint.
  • Added deterministic cases to the existing Termux/client-build regression first; the original helper failed the new percentage-only case (returned null). With the fix, the full fixture passes, including the existing Termux, old-launcher, Android-update and desktop paths.
  • Live percentage-only and both mixed-flag orders now use the actual 437 MiB V8 limit and advise changing the percentage flag. No RAM calculation or automatic heap change was added.
  • Focused Prettier and git diff --check passed. pnpm check passed (exit 0) at acc5ae52b3cbcdae22cda3a6fbb664008910b288, with the existing React Hook and Vite chunk warnings. The completed aggregate local CodeRabbit review is recorded below.

Claim boundary (risky lane: installers, launchers, Docker, update flow)

  • Core claim: (1) frozen installs on this branch no longer print the @google/genai approve-builds box on a fresh install or on an in-place update from v2.5.0, and the lockfile is unchanged. (2) A desktop client build whose type-check runs out of a NODE_OPTIONS heap below 2304 MiB now prints one line saying how to fix it; the user's heap is still never raised. (3) The docs explain what going back to 2.5.0 loses.
  • Risk type: installers, launchers, Docker and the update flow.
  • Entrypoints touched: pnpm-workspace.yaml (read by every pnpm install: start.sh, start.bat, start-termux.sh, the Windows installer, Dockerfile, Dockerfile.lite and the in-app updater) and packages/client/scripts/build.mjs (the desktop client build, used by the launchers, the updater, the Docker builder and pnpm build; the Android low-memory path skips tsc, so it is unchanged).
  • Current paths tested: a fresh frozen install on macOS; an in-place update from v2.5.0 on desktop and in the Termux simulation; an in-place update with a stashed approve-builds edit; the real client build at 2048 MiB; tsc at 2304 MiB; the regression fixture's end-to-end out-of-memory run.
  • Legacy paths tested: a staging-channel install that already cached genai in node_modules/.modules.yaml (staging since 2026-10-13) still shows the box once on update. pnpm's headless install re-adds cached ignoredBuilds without applying ignoredBuiltDependencies (pnpm 10.34.5 dist/pnpm.cjs, around line 166172). Deleting node_modules/.modules.yaml and installing again clears it for good (checked). A later @google/genai version clears it too. Release users coming from v2.5.0 never cache it. The Troubleshooting entry covers this.
  • Positive rows tested: the fix on fresh install, the desktop update and the Termux update all show no box; the real build at 2048 MiB prints the hint.
  • Negative controls tested: fresh staging install shows the box; v2.5.0 updated to staging (Termux) shows the box; CI run 39258562188 shows it on all four native runners and both full container builds; the regression's new end-to-end case fails without the build.mjs change; the decision returns no hint for type errors (exit 2), with no user heap, at 2304 MiB or more, or for a sufficient resolved percentage heap.
  • Ground-truth facts used: @google/genai@2.21.0's scripts are only preinstall: echo 'preinstall: no-op' plus prepare, which never runs for registry tarballs, and it has no binding.gyp. On Windows, Node exits with 134 when V8 runs out of heap (ABORT_NO_BACKTRACE uses _exit(134)); on POSIX the child stops with SIGABRT. approve-builds writes to the root package.json here because it already has a pnpm field.
  • Manual blockers: no Windows, Windows installer or real Android run from here; the exit code 134 on Windows comes from Node's source, not a Windows run. There is no completed local Docker build (OrbStack stopped), so the PR's container jobs are the proof.

Manual verification notes

Still to do by a human:

  • Manually run start.bat on Windows on a v2.5.0 install that updates to this branch, and confirm no "Ignored build scripts" box appears.
  • Manually run ./start-termux.sh on an Android phone on a v2.5.0 install that updates to this branch, and confirm no box appears.
  • Manually check the PR's Platform Artifact Checks logs (native installs and the full and lite container builds) for Ignored build scripts. There should be none.
  • Manually run the Windows installer on a clean machine and confirm no box appears.
  • On Windows, manually set NODE_OPTIONS=--max-old-space-size=2048, run pnpm --filter @marinara-engine/client build, and confirm the [build] The client type-check needs about 2.5 GiB ... line appears after the out-of-memory error.
  • Manually read the new docs sections (Upgrading → Going back to 2.5.0, the container guide's Updating section, and the two Troubleshooting entries) for clarity.

Hosted review follow-up: heap troubleshooting

  • Addressed the outside-diff documentation finding in a3c1ac4afe0a0e7453baa50863875eb7f4250ac8. The troubleshooting paragraph now explains that the percentage flag overrides the absolute flag, gives the absolute remedy only when used alone, and says to remove the heap options for automatic selection. This also covers both flags being present.
  • The maintainer independently reviewed the exact wording. pnpm exec prettier --check docs/TROUBLESHOOTING.md and git diff --check passed. An exact-text comparison confirms all opening, restart and data statements, every link and the rest of the guide are unchanged.
  • This follow-up changes only that Markdown paragraph. Runtime, tests and metadata are byte-identical to acc5ae52b3cbcdae22cda3a6fbb664008910b288; its full check, focused regression and substantive local review remain the code evidence. No additional build, test run or local CodeRabbit request was needed for the editorial correction. Hosted checks and substantive review of the new head remain separate gates.

Completed aggregate local review

  • CodeRabbit completed a committed review of aggregate d3a4c0ee41a2ab90dfba454e2049d436d03deb0d against staging 9565a274111ac251ade43f7a2f1f8436a16b7a86. All 26 changed files were reviewed: #7835 at 163f5d11e820460e2624a2c5797c74ae51ba0062, #7836 at 829b16aa7fe6d1be6b4e5fc922fbfe0fcebf5077, and #7838 at acc5ae52b3cbcdae22cda3a6fbb664008910b288.
  • This PR's 8 changed files were included. The aggregate preserves the constituent content; its only additional content in these files is a current-staging Basic Auth troubleshooting note in #7838. No dependency install or build was run for the review-only aggregation; the per-PR validation above remains the build/test evidence.
  • The review reported one minor documentation finding, mapped to #7838 docs/installation/containers.md: add translation tracking. Dismissed because open #7839 already names that guide in its title and body and describes the changed update/rollback guidance. #7838 already links it under Linked issue and Docs and release impact. No local findings remain unresolved.
  • This records local source-review coverage only. Each PR's required hosted checks and substantive final-head review remain separate merge gates.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

Translations: follow-up issue #7839 ([docs-i18n] docs/UPGRADING.md, docs/installation/containers.md, docs/TROUBLESHOOTING.md, docs/FAQ.md).

The release notes should carry the rollback warning; that belongs in the What's New step, not in this PR. No CHANGELOG.md change.

UI evidence (if applicable)

No UI changes.

Summary by CodeRabbit

  • Documentation

    • Added guidance to back up data before updating or rolling back, including a warning that saving chats or connections in version 2.5.0 can discard data added by newer versions.
    • Added troubleshooting steps for desktop type-checking failures caused by insufficient Node.js memory and for an ignored build-script notice.
  • Improvements

    • Desktop builds now provide heap-size guidance for certain type-checking failures.
    • The ignored dependency build notice no longer triggers a build-approval prompt.

🔄 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/7838 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/ready-install-update-path` --- ### 📝 Commits (5) - [`5e6d917`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5e6d9171e83c07e5bc48e7152802f076f283c3e9) fix(install): stop pnpm asking to approve @google/genai's no-op install script - [`4352e8b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4352e8bab7c5b761648334fa8dae9547ca97a003) fix(build): say when a NODE_OPTIONS heap is too small for the client type-check - [`c7731b0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c7731b05b0b40ba3ddc857c3862c12e88c65f61c) docs: warn that going back to 2.5.0 drops data from newer features - [`acc5ae5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/acc5ae52b3cbcdae22cda3a6fbb664008910b288) fix(build): respect percentage heap limits in diagnostics - [`a3c1ac4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a3c1ac4afe0a0e7453baa50863875eb7f4250ac8) docs: clarify percentage heap troubleshooting ### 📊 Changes **8 files changed** (+130 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/FAQ.md` (+1 -1) 📝 `docs/TROUBLESHOOTING.md` (+8 -0) 📝 `docs/UPGRADING.md` (+6 -0) 📝 `docs/installation/containers.md` (+3 -1) 📝 `packages/client/scripts/build-heap.mjs` (+30 -4) 📝 `packages/client/scripts/build.mjs` (+4 -1) 📝 `pnpm-workspace.yaml` (+5 -0) 📝 `scripts/regressions/launcher/termux-client-build.regression.mjs` (+73 -2) </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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue No issue exists for these. They came out of the release-readiness check of the install and update path. An issue should be opened before merge if one is wanted for tracking. Translations follow-up: #7839. ## Why this change Three install and update problems found before the next release. They share the install docs, so they come in one PR. - **Every install and update showed a pnpm warning box.** `@google/genai@2.21.0` came in after v2.5.0 through `@earendil-works/pi-ai@1.2.0`. Its only install script is `preinstall: echo 'preinstall: no-op'`, but it is not in `onlyBuiltDependencies`, so pnpm 10 printed `Ignored build scripts: @google/genai@2.21.0. Run "pnpm approve-builds"` on every frozen install: `start.sh`, `start.bat`, `start-termux.sh`, the Windows installer, the Docker build and the in-app updater. CI run 39258562188 shows it on ubuntu, windows, both macOS runners and both full container builds. A user who follows that advice changes the tracked root `package.json` (that is where pnpm writes it in this repo; checked by running `approve-builds`), and every later launcher update then has to stash it. - **A desktop build with a small NODE_OPTIONS heap now fails with no explanation.** The client grew since v2.5.0 (three.js, VRM and world code). A clean `tsc -b` in `packages/client` now runs out of memory at `--max-old-space-size=2048` and passes at 2304 (v2.5.0 passed at 2048). The build keeps a heap the user set in `NODE_OPTIONS`, on purpose, so the user only saw V8's crash output. - **Rolling back to 2.5.0 silently loses data from newer features.** v2.5.0 and staging both report storage format 7, so the downgrade guard lets 2.5.0 start on upgraded data. Its `normalizeRow` keeps only the columns it knows when it saves a row, so these are lost for good after a rollback round trip: `api_connections` `showUsageFiveHour`/`showUsageWeekly`/`videoPromptInstructions`/`audioTimeoutMs`, `chat_images.generation`, `game_checkpoints` `gameMetadataData`/`chatCharacterIdsData`/`gameWorldEditsData`, `game_state_snapshots.rulesetClocks` and `game_scene_videos.characterIds`. The chat-keyed tables rewrite the whole chat's shard on one save. Changing `normalizeRow` is a maintainer decision, so this PR only documents it. ## What changed - `pnpm-workspace.yaml`: `ignoredBuiltDependencies: ["@google/genai"]` next to `onlyBuiltDependencies`. pnpm skips the no-op script quietly. `pnpm-lock.yaml` is unchanged. - `packages/client/scripts/build-heap.mjs`: new `typeCheckHeapHint()`, built on `splitNodeOptions`. When the tsc step stops the way V8 does when it runs out of heap (SIGABRT, or exit code 134 on Windows) and the last `--max-old-space-size` in `NODE_OPTIONS` is below 2304 MiB, it returns one line: `[build] The client type-check needs about 2.5 GiB of Node.js heap, but NODE_OPTIONS limits it to 2048 MiB. Raise --max-old-space-size in NODE_OPTIONS to 2560 or more, or remove it.` When `--max-old-space-size-percentage` is present, it takes precedence in either flag order: the hint uses V8’s resolved heap limit and advises raising or removing the percentage flag, without blaming an ineffective absolute flag. The heap comment is updated from about 2.1 GiB to about 2.3 GiB. - `packages/client/scripts/build.mjs`: prints that line after a failed tsc step. Nothing else changes: the user's heap is still never raised (raising it automatically is a maintainer decision), and the vite and guest steps are untouched. - `scripts/regressions/launcher/termux-client-build.regression.mjs`: covers the decision (SIGABRT, 134, either spelling, last option wins, 2304 and above not blamed, no user heap, the percentage form (including both flag orders, spaced values and underscore spelling), sufficient resolved heaps, and non-OOM failures) plus an end-to-end `build.mjs` run whose fake tsc exits 134 under a 2048 MiB heap. - `docs/TROUBLESHOOTING.md`: two entries. One for the desktop type-check heap message, with percentage-first and absolute-only remedies, and one for the genai notice: it is harmless, do not run `approve-builds`, and how to clear a cached notice. - `docs/UPGRADING.md`: new **Going back to 2.5.0** under "Downgrading to an older version". `docs/installation/containers.md`: back up before updating, and how to pin an older tag and what going back to 2.5.0 loses. `docs/FAQ.md`: one sentence in "Will I lose my data when I update?" pointing to the downgrade section. README.md and docs/CONFIGURATION.md were checked; neither covers updating or rolling back, so they need no change. ## 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` Commands run by the agent (macOS arm64, pnpm 10.34.5, Node 24.16.0): - Box, on origin/staging first: a fresh `pnpm install --frozen-lockfile --prefer-offline` printed `Ignored build scripts: @google/genai@2.21.0` and `Run "pnpm approve-builds"`. - Box, after the fix: a clean `corepack pnpm@10.34.5 install --frozen-lockfile --prefer-offline` printed no box, and the next install printed none either. `node_modules/.modules.yaml` has `"ignoredBuilds": []`. `git diff --exit-code pnpm-lock.yaml` is clean. `node scripts/check-workspace-install.mjs` exits 0. - Update in place, desktop: installed v2.5.0, checked out this branch in the same tree, then a frozen install. No box, `ignoredBuilds` is `[]`, `check-workspace-install` exits 0, and the tree is clean. - Update in place, Termux simulation (`SHARP_IGNORE_GLOBAL_LIBVIPS=1 ... --os linux --cpu arm64 --cpu wasm32`, store never pruned): v2.5.0 updated to origin/staging showed the box and cached genai in `ignoredBuilds` (control). v2.5.0 updated to this branch showed no box, and `ignoredBuilds` is `[]`. The lockfile was unchanged in both. - A user who already ran `pnpm approve-builds` (pnpm writes `pnpm.ignoredBuiltDependencies` into the root `package.json` here): `git stash push -u`, check out this branch, `git stash apply` (applies cleanly), then a frozen install. No box, and the lockfile is unchanged. - Docker: a local build of the two real install steps (builder `pnpm install --frozen-lockfile` and production `--prod`, same base image) linked every package, but the OrbStack daemon stopped before the build finished, so there is **no local Docker proof**. The Container runtime (full and lite) jobs on this PR are the proof. - Heap, on origin/staging first: a clean `NODE_OPTIONS=--max-old-space-size=2048 node <typescript>/bin/tsc -b` in `packages/client` exited 134 with `FATAL ERROR: ... JavaScript heap out of memory`. At 2304 it exited 0 (peak RSS 2.39 GB). - Heap, after the fix: `NODE_OPTIONS=--max-old-space-size=2048 node packages/client/scripts/build.mjs` printed V8's out-of-memory error, then `[build] The client type-check needs about 2.5 GiB of Node.js heap, but NODE_OPTIONS limits it to 2048 MiB. Raise --max-old-space-size in NODE_OPTIONS to 2560 or more, or remove it.`, and exited 1. - `node scripts/regressions/launcher/termux-client-build.regression.mjs` passes. With the `build.mjs` change reverted, its new end-to-end case fails (the hint is missing), so it is a real regression proof. - `pnpm regression:launcher-update`, `node scripts/regressions/launcher/client-build.regression.mjs` and `node scripts/regressions/termux-native-deps.regression.mjs` pass. - `pnpm check`: passes (exit 0), on this branch rebased onto staging b0de4167f. The one lint warning is pre-existing, in `HomeProfessorMariChat.tsx`. The branch was then rebased onto 26f774e37 (#7832, Tripo removal), which touches none of these files; CI covers that base. - Rollback, on origin/staging: `storage-format.json` and `STORAGE_VERSION` are 7 on both v2.5.0 and staging. v2.5.0's `normalizeRow` copies only `meta.columns`. The listed columns were all added after v2.5.0 (`git diff v2.5.0 -- packages/server/src/db/schema`). The game tables and `chat_images` are sharded by `chatId` in v2.5.0, and `api_connections` by primary key. ### Review follow-up: percentage heap limits - Confirmed the final-head review finding against Node 24.16.0 and [Node’s CLI reference](https://nodejs.org/api/cli.html#--max-old-space-size-percentagepercentage): a percentage flag wins over an absolute flag in either order. Before the correction, a real 2649 MiB heap was reported as 1024 MiB; a real 437 MiB heap with an ineffective 4096 MiB absolute flag got no hint. - Added deterministic cases to the existing Termux/client-build regression first; the original helper failed the new percentage-only case (returned `null`). With the fix, the full fixture passes, including the existing Termux, old-launcher, Android-update and desktop paths. - Live percentage-only and both mixed-flag orders now use the actual 437 MiB V8 limit and advise changing the percentage flag. No RAM calculation or automatic heap change was added. - Focused Prettier and `git diff --check` passed. `pnpm check` passed (exit 0) at `acc5ae52b3cbcdae22cda3a6fbb664008910b288`, with the existing React Hook and Vite chunk warnings. The completed aggregate local CodeRabbit review is recorded below. ### Claim boundary (risky lane: installers, launchers, Docker, update flow) - **Core claim:** (1) frozen installs on this branch no longer print the `@google/genai` approve-builds box on a fresh install or on an in-place update from v2.5.0, and the lockfile is unchanged. (2) A desktop client build whose type-check runs out of a `NODE_OPTIONS` heap below 2304 MiB now prints one line saying how to fix it; the user's heap is still never raised. (3) The docs explain what going back to 2.5.0 loses. - **Risk type:** installers, launchers, Docker and the update flow. - **Entrypoints touched:** `pnpm-workspace.yaml` (read by every `pnpm install`: `start.sh`, `start.bat`, `start-termux.sh`, the Windows installer, `Dockerfile`, `Dockerfile.lite` and the in-app updater) and `packages/client/scripts/build.mjs` (the desktop client build, used by the launchers, the updater, the Docker builder and `pnpm build`; the Android low-memory path skips tsc, so it is unchanged). - **Current paths tested:** a fresh frozen install on macOS; an in-place update from v2.5.0 on desktop and in the Termux simulation; an in-place update with a stashed `approve-builds` edit; the real client build at 2048 MiB; tsc at 2304 MiB; the regression fixture's end-to-end out-of-memory run. - **Legacy paths tested:** a staging-channel install that already cached genai in `node_modules/.modules.yaml` (staging since 2026-10-13) **still shows the box once on update**. pnpm's headless install re-adds cached `ignoredBuilds` without applying `ignoredBuiltDependencies` (pnpm 10.34.5 `dist/pnpm.cjs`, around line 166172). Deleting `node_modules/.modules.yaml` and installing again clears it for good (checked). A later `@google/genai` version clears it too. Release users coming from v2.5.0 never cache it. The Troubleshooting entry covers this. - **Positive rows tested:** the fix on fresh install, the desktop update and the Termux update all show no box; the real build at 2048 MiB prints the hint. - **Negative controls tested:** fresh staging install shows the box; v2.5.0 updated to staging (Termux) shows the box; CI run 39258562188 shows it on all four native runners and both full container builds; the regression's new end-to-end case fails without the `build.mjs` change; the decision returns no hint for type errors (exit 2), with no user heap, at 2304 MiB or more, or for a sufficient resolved percentage heap. - **Ground-truth facts used:** `@google/genai@2.21.0`'s scripts are only `preinstall: echo 'preinstall: no-op'` plus `prepare`, which never runs for registry tarballs, and it has no `binding.gyp`. On Windows, Node exits with 134 when V8 runs out of heap (`ABORT_NO_BACKTRACE` uses `_exit(134)`); on POSIX the child stops with SIGABRT. `approve-builds` writes to the root `package.json` here because it already has a `pnpm` field. - **Manual blockers:** no Windows, Windows installer or real Android run from here; the exit code 134 on Windows comes from Node's source, not a Windows run. There is no completed local Docker build (OrbStack stopped), so the PR's container jobs are the proof. ### Manual verification notes Still to do by a human: - Manually run `start.bat` on Windows on a v2.5.0 install that updates to this branch, and confirm no "Ignored build scripts" box appears. - Manually run `./start-termux.sh` on an Android phone on a v2.5.0 install that updates to this branch, and confirm no box appears. - Manually check the PR's Platform Artifact Checks logs (native installs and the full and lite container builds) for `Ignored build scripts`. There should be none. - Manually run the Windows installer on a clean machine and confirm no box appears. - On Windows, manually set `NODE_OPTIONS=--max-old-space-size=2048`, run `pnpm --filter @marinara-engine/client build`, and confirm the `[build] The client type-check needs about 2.5 GiB ...` line appears after the out-of-memory error. - Manually read the new docs sections (Upgrading → Going back to 2.5.0, the container guide's Updating section, and the two Troubleshooting entries) for clarity. ### Hosted review follow-up: heap troubleshooting - Addressed the [outside-diff documentation finding](https://github.com/Pasta-Devs/Marinara-Engine/pull/7838#pullrequestreview-5576015193) in `a3c1ac4afe0a0e7453baa50863875eb7f4250ac8`. The troubleshooting paragraph now explains that the percentage flag overrides the absolute flag, gives the absolute remedy only when used alone, and says to remove the heap options for automatic selection. This also covers both flags being present. - The maintainer independently reviewed the exact wording. `pnpm exec prettier --check docs/TROUBLESHOOTING.md` and `git diff --check` passed. An exact-text comparison confirms all opening, restart and data statements, every link and the rest of the guide are unchanged. - This follow-up changes only that Markdown paragraph. Runtime, tests and metadata are byte-identical to `acc5ae52b3cbcdae22cda3a6fbb664008910b288`; its full check, focused regression and substantive local review remain the code evidence. No additional build, test run or local CodeRabbit request was needed for the editorial correction. Hosted checks and substantive review of the new head remain separate gates. ### Completed aggregate local review - CodeRabbit completed a committed review of aggregate `d3a4c0ee41a2ab90dfba454e2049d436d03deb0d` against staging `9565a274111ac251ade43f7a2f1f8436a16b7a86`. All 26 changed files were reviewed: #7835 at `163f5d11e820460e2624a2c5797c74ae51ba0062`, #7836 at `829b16aa7fe6d1be6b4e5fc922fbfe0fcebf5077`, and #7838 at `acc5ae52b3cbcdae22cda3a6fbb664008910b288`. - This PR's 8 changed files were included. The aggregate preserves the constituent content; its only additional content in these files is a current-staging Basic Auth troubleshooting note in #7838. No dependency install or build was run for the review-only aggregation; the per-PR validation above remains the build/test evidence. - The review reported one minor documentation finding, mapped to #7838 `docs/installation/containers.md`: add translation tracking. Dismissed because open [#7839](https://github.com/Pasta-Devs/Marinara-Engine/issues/7839) already names that guide in its title and body and describes the changed update/rollback guidance. #7838 already links it under Linked issue and Docs and release impact. No local findings remain unresolved. - This records local source-review coverage only. Each PR's required hosted checks and substantive final-head review remain separate merge gates. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) 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) Translations: follow-up issue #7839 (`[docs-i18n] docs/UPGRADING.md, docs/installation/containers.md, docs/TROUBLESHOOTING.md, docs/FAQ.md`). The release notes should carry the rollback warning; that belongs in the What's New step, not in this PR. No CHANGELOG.md change. ## UI evidence (if applicable) No UI changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added guidance to back up data before updating or rolling back, including a warning that saving chats or connections in version 2.5.0 can discard data added by newer versions. * Added troubleshooting steps for desktop type-checking failures caused by insufficient Node.js memory and for an ignored build-script notice. * **Improvements** * Desktop builds now provide heap-size guidance for certain type-checking failures. * The ignored dependency build notice no longer triggers a build-approval prompt. <!-- 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-24 04:09:12 +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#7963
No description provided.