mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7838] [MERGED] fix(release): quiet the genai install notice, explain the type-check heap, document the 2.5.0 rollback loss #7963
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
5e6d917fix(install): stop pnpm asking to approve @google/genai's no-op install script4352e8bfix(build): say when a NODE_OPTIONS heap is too small for the client type-checkc7731b0docs: warn that going back to 2.5.0 drops data from newer featuresacc5ae5fix(build): respect percentage heap limits in diagnosticsa3c1ac4docs: 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
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.
@google/genai@2.21.0came in after v2.5.0 through@earendil-works/pi-ai@1.2.0. Its only install script ispreinstall: echo 'preinstall: no-op', but it is not inonlyBuiltDependencies, so pnpm 10 printedIgnored 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 rootpackage.json(that is where pnpm writes it in this repo; checked by runningapprove-builds), and every later launcher update then has to stash it.tsc -binpackages/clientnow runs out of memory at--max-old-space-size=2048and passes at 2304 (v2.5.0 passed at 2048). The build keeps a heap the user set inNODE_OPTIONS, on purpose, so the user only saw V8's crash output.normalizeRowkeeps only the columns it knows when it saves a row, so these are lost for good after a rollback round trip:api_connectionsshowUsageFiveHour/showUsageWeekly/videoPromptInstructions/audioTimeoutMs,chat_images.generation,game_checkpointsgameMetadataData/chatCharacterIdsData/gameWorldEditsData,game_state_snapshots.rulesetClocksandgame_scene_videos.characterIds. The chat-keyed tables rewrite the whole chat's shard on one save. ChangingnormalizeRowis a maintainer decision, so this PR only documents it.What changed
pnpm-workspace.yaml:ignoredBuiltDependencies: ["@google/genai"]next toonlyBuiltDependencies. pnpm skips the no-op script quietly.pnpm-lock.yamlis unchanged.packages/client/scripts/build-heap.mjs: newtypeCheckHeapHint(), built onsplitNodeOptions. 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-sizeinNODE_OPTIONSis 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-percentageis 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-endbuild.mjsrun 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 runapprove-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 checkpasses locallyCONTRIBUTING.mdCommands run by the agent (macOS arm64, pnpm 10.34.5, Node 24.16.0):
pnpm install --frozen-lockfile --prefer-offlineprintedIgnored build scripts: @google/genai@2.21.0andRun "pnpm approve-builds".corepack pnpm@10.34.5 install --frozen-lockfile --prefer-offlineprinted no box, and the next install printed none either.node_modules/.modules.yamlhas"ignoredBuilds": [].git diff --exit-code pnpm-lock.yamlis clean.node scripts/check-workspace-install.mjsexits 0.ignoredBuildsis[],check-workspace-installexits 0, and the tree is clean.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 inignoredBuilds(control). v2.5.0 updated to this branch showed no box, andignoredBuildsis[]. The lockfile was unchanged in both.pnpm approve-builds(pnpm writespnpm.ignoredBuiltDependenciesinto the rootpackage.jsonhere):git stash push -u, check out this branch,git stash apply(applies cleanly), then a frozen install. No box, and the lockfile is unchanged.pnpm install --frozen-lockfileand 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.NODE_OPTIONS=--max-old-space-size=2048 node <typescript>/bin/tsc -binpackages/clientexited 134 withFATAL ERROR: ... JavaScript heap out of memory. At 2304 it exited 0 (peak RSS 2.39 GB).NODE_OPTIONS=--max-old-space-size=2048 node packages/client/scripts/build.mjsprinted 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.mjspasses. With thebuild.mjschange 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.mjsandnode scripts/regressions/termux-native-deps.regression.mjspass.pnpm check: passes (exit 0), on this branch rebased onto stagingb0de4167f. The one lint warning is pre-existing, inHomeProfessorMariChat.tsx. The branch was then rebased onto26f774e37(#7832, Tripo removal), which touches none of these files; CI covers that base.storage-format.jsonandSTORAGE_VERSIONare 7 on both v2.5.0 and staging. v2.5.0'snormalizeRowcopies onlymeta.columns. The listed columns were all added after v2.5.0 (git diff v2.5.0 -- packages/server/src/db/schema). The game tables andchat_imagesare sharded bychatIdin v2.5.0, andapi_connectionsby primary key.Review follow-up: percentage heap limits
null). With the fix, the full fixture passes, including the existing Termux, old-launcher, Android-update and desktop paths.git diff --checkpassed.pnpm checkpassed (exit 0) atacc5ae52b3cbcdae22cda3a6fbb664008910b288, 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)
@google/genaiapprove-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 aNODE_OPTIONSheap 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.pnpm-workspace.yaml(read by everypnpm install:start.sh,start.bat,start-termux.sh, the Windows installer,Dockerfile,Dockerfile.liteand the in-app updater) andpackages/client/scripts/build.mjs(the desktop client build, used by the launchers, the updater, the Docker builder andpnpm build; the Android low-memory path skips tsc, so it is unchanged).approve-buildsedit; the real client build at 2048 MiB; tsc at 2304 MiB; the regression fixture's end-to-end out-of-memory run.node_modules/.modules.yaml(staging since 2026-10-13) still shows the box once on update. pnpm's headless install re-adds cachedignoredBuildswithout applyingignoredBuiltDependencies(pnpm 10.34.5dist/pnpm.cjs, around line 166172). Deletingnode_modules/.modules.yamland installing again clears it for good (checked). A later@google/genaiversion clears it too. Release users coming from v2.5.0 never cache it. The Troubleshooting entry covers this.build.mjschange; 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.@google/genai@2.21.0's scripts are onlypreinstall: echo 'preinstall: no-op'plusprepare, which never runs for registry tarballs, and it has nobinding.gyp. On Windows, Node exits with 134 when V8 runs out of heap (ABORT_NO_BACKTRACEuses_exit(134)); on POSIX the child stops with SIGABRT.approve-buildswrites to the rootpackage.jsonhere because it already has apnpmfield.Manual verification notes
Still to do by a human:
start.baton Windows on a v2.5.0 install that updates to this branch, and confirm no "Ignored build scripts" box appears../start-termux.shon an Android phone on a v2.5.0 install that updates to this branch, and confirm no box appears.Ignored build scripts. There should be none.NODE_OPTIONS=--max-old-space-size=2048, runpnpm --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.Hosted review follow-up: heap troubleshooting
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.pnpm exec prettier --check docs/TROUBLESHOOTING.mdandgit diff --checkpassed. An exact-text comparison confirms all opening, restart and data statements, every link and the rest of the guide are unchanged.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
d3a4c0ee41a2ab90dfba454e2049d436d03deb0dagainst staging9565a274111ac251ade43f7a2f1f8436a16b7a86. All 26 changed files were reviewed: #7835 at163f5d11e820460e2624a2c5797c74ae51ba0062, #7836 at829b16aa7fe6d1be6b4e5fc922fbfe0fcebf5077, and #7838 atacc5ae52b3cbcdae22cda3a6fbb664008910b288.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.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)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
Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.