[PR #8801] [MERGED] fix: Termux startup survives an unremovable pnpm 10 store; clearer retry-limit alert #8814

Closed
opened 2026-11-07 17:39:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8801
Author: @SpicyMarinara
Created: 11/3/2026
Status: ✅ Merged
Merged: 11/4/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/release-prep-coderabbit-followups


📝 Commits (2)

  • 574e8d8 fix(termux): a pnpm 10 store that cannot be removed no longer stops startup
  • 2c8c904 fix(multiplayer): name the exact setting in the retry-limit alert

📊 Changes

3 files changed (+35 additions, -7 deletions)

View changed files

📝 packages/client/src/localization/locales/en.json (+1 -1)
📝 scripts/regressions/pnpm-runner.regression.mjs (+30 -5)
📝 start-termux.sh (+4 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.

Linked issue

Closes #8797

Why this change

These are follow-ups from a local CodeRabbit review of release-prep PRs already merged into staging. #8792 added a bare rm -rf .pnpm-store/v10 to the Termux launcher, which runs under set -e. If that removal fails (a read-only file, a busy mount), the phone launcher exits before installing dependencies or starting the server, although the leftover store only costs disk space. Before #8792 the Termux launcher never removed v10; its only cleanup was store prune, which already warned when it failed. #8784's retry-limit alert told hosts to raise "Maximum AI generations in Chat Settings", but the field is "Maximum AI generations this session" in the Chat Settings Multiplayer section, and it only applies after saving. Hosts could look for a setting that isn't named that way and miss the save step.

What changed

  • Termux launcher: if removing the old pnpm 10 dependency cache (.pnpm-store/v10) fails, it now prints a warning and startup continues, the same way the store prune after it already does. The other launchers already handle this through the postinstall, which catches the error and warns.
  • Regression: the pnpm runner launcher regression now runs the real Termux store cleanup under set -e in a temp checkout. It shows that the cache is removed and the store pruned, that a failed removal warns, still prunes and lets startup go on, and that a failed prune warns and goes on.
  • Multiplayer: the alert shown when a host retries a round at the AI generation limit is now one sentence: "No AI generations are left: raise Maximum AI generations this session in Chat Settings → Multiplayer and save, then try the round again."

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

Manual verification notes

  • On a Termux install that still has .pnpm-store/v10, make it unremovable without root, for example with chmod a-w .pnpm-store so its v10 folder cannot be deleted (restore it with chmod u+w .pnpm-store afterwards). Manually verify that bash start-termux.sh prints "[WARN] Could not remove the pnpm 10 dependency cache" and still installs and starts the server.
  • On a normal Termux update from a pnpm 10 install, manually verify that .pnpm-store/v10 is removed and no warning is printed.
  • Host a multiplayer Game, use up Maximum AI generations this session so a round is interrupted, and press Try the round again. Manually verify in the browser that the alert reads as one sentence, that Chat Settings → Multiplayer has the named field, and that raising it, saving and pressing Try the round again resumes the round.

Agent-run checks (for reference; the launcher regression was shown to fail without the fix):

  • node scripts/regressions/pnpm-runner.regression.mjs (before fix, regression only): exit 1: prune_pnpm_store must not stop startup (failing-rm case)
  • node scripts/regressions/pnpm-runner.regression.mjs (after fix): exit 0, pnpm runner regressions passed
  • node scripts/run-launcher-regressions.mjs: exit 0, all 8 launcher regressions PASS
  • bash -n start-termux.sh: ok
  • shellcheck: not installed locally, not run
  • node_modules/.bin/prettier --check scripts/regressions/pnpm-runner.regression.mjs packages/client/src/localization/locales/en.json: both files use Prettier style
  • node ./scripts/pnpm-runner.mjs localization:check: exit 0, en: 17244 canonical keys, no migrations or new keys
  • node ./scripts/pnpm-runner.mjs impeccable:check: exit 0
  • node ./scripts/pnpm-runner.mjs build:shared && cd packages/client && node ../../scripts/pnpm-runner.mjs exec tsc --noEmit -p .: exit 0 (the first run without shared built failed only on missing @marinara-engine/shared dist)

Independent adversarial review: approve (two wording notes, applied above).

CodeRabbit findings handled here (from a local review of #8784 and #8792 after they merged):

  • Rejected: 2. MultiplayerHostControls.tsx ~line 468: replace text-[var(--destructive)] with a steady error class because --destructive follows the animated primary accent during Accent Pulse. Reason: The premise is false for the current code. MultiplayerGenerationFailed renders only in the host app, where globals.css gives --destructive fixed values: #ff6b9d in the dark theme (line 204) and #c44040 in the light theme (line 470). Commit 84fb03d08d (2026-10-20) moved --destructive off var(--primary). Accent Pulse in App.tsx (applyLiveAccent, and applyAppAccentVariables via APP_ACCENT_CUSTOM_VARIABLES) writes only --primary, --ring, --accent, --sidebar-accent(-foreground), --glow-primary and the --marinara-app-accent-* and --marinara-chat-chrome-accent* tokens, never --destructive. The only place --destructive is var(--primary) is multiplayer-guest.css, which only the separate guest bundle loads (multiplayer-guest-entry.tsx). That bundle doesn't render host controls or run Accent Pulse. text-[var(--destructive)] is also the client's standard error-text class: 278 uses, including every other role=alert in features/multiplayer. So the colour doesn't move and there is no steadier class to switch to. Side note, not fixed here: the comment at globals.css ~1373 ('--destructive defaults to it') is out of date since 84fb03d08d. Because of the rule under it, delete buttons (.mari-chrome-control--danger) switch from the fixed danger red to the static accent colour while Accent Pulse runs. That may deserve its own follow-up.

Known limits and risks:

Low. The launcher change only stops a failed cleanup from ending startup. If v10 can't be removed it stays on disk, as it did before #8792, and the postinstall tries again and warns. The regression shells out to bash, the same way format-guard.regression.mjs already does in the same suite on all CI platforms, including windows-latest via Git Bash. shellcheck wasn't available locally, so only bash -n was run on the script. The copy change is English-only; community locales don't have this key and fall back to English.

  • Not changed, for the maintainer to decide: while Accent Pulse runs, the [data-marinara-accent-animation] .mari-chrome-control--danger rule in globals.css (added in 84fb03d08d) switches delete buttons from the theme's fixed --destructive colour to the static accent. Its comment says --destructive defaults to --primary, which stopped being true in that same commit. The rule still protects custom themes that set --destructive: var(--primary), so removing it is a design call.

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)

🤖 Generated with Claude Code


🔄 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/8801 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/3/2026 **Status:** ✅ Merged **Merged:** 11/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/release-prep-coderabbit-followups` --- ### 📝 Commits (2) - [`574e8d8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/574e8d86be4c61680c3c529770ee6a28fd9a665d) fix(termux): a pnpm 10 store that cannot be removed no longer stops startup - [`2c8c904`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2c8c90487882c033c8f5b1b82c513659cc09d804) fix(multiplayer): name the exact setting in the retry-limit alert ### 📊 Changes **3 files changed** (+35 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/localization/locales/en.json` (+1 -1) 📝 `scripts/regressions/pnpm-runner.regression.mjs` (+30 -5) 📝 `start-termux.sh` (+4 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. ## Linked issue Closes #8797 ## Why this change These are follow-ups from a local CodeRabbit review of release-prep PRs already merged into staging. #8792 added a bare `rm -rf .pnpm-store/v10` to the Termux launcher, which runs under `set -e`. If that removal fails (a read-only file, a busy mount), the phone launcher exits before installing dependencies or starting the server, although the leftover store only costs disk space. Before #8792 the Termux launcher never removed v10; its only cleanup was `store prune`, which already warned when it failed. #8784's retry-limit alert told hosts to raise "Maximum AI generations in Chat Settings", but the field is "Maximum AI generations this session" in the Chat Settings Multiplayer section, and it only applies after saving. Hosts could look for a setting that isn't named that way and miss the save step. ## What changed - Termux launcher: if removing the old pnpm 10 dependency cache (.pnpm-store/v10) fails, it now prints a warning and startup continues, the same way the store prune after it already does. The other launchers already handle this through the postinstall, which catches the error and warns. - Regression: the pnpm runner launcher regression now runs the real Termux store cleanup under set -e in a temp checkout. It shows that the cache is removed and the store pruned, that a failed removal warns, still prunes and lets startup go on, and that a failed prune warns and goes on. - Multiplayer: the alert shown when a host retries a round at the AI generation limit is now one sentence: "No AI generations are left: raise Maximum AI generations this session in Chat Settings → Multiplayer and save, then try the round again." ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `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 - On a Termux install that still has .pnpm-store/v10, make it unremovable without root, for example with `chmod a-w .pnpm-store` so its v10 folder cannot be deleted (restore it with `chmod u+w .pnpm-store` afterwards). Manually verify that `bash start-termux.sh` prints "[WARN] Could not remove the pnpm 10 dependency cache" and still installs and starts the server. - On a normal Termux update from a pnpm 10 install, manually verify that .pnpm-store/v10 is removed and no warning is printed. - Host a multiplayer Game, use up Maximum AI generations this session so a round is interrupted, and press Try the round again. Manually verify in the browser that the alert reads as one sentence, that Chat Settings → Multiplayer has the named field, and that raising it, saving and pressing Try the round again resumes the round. Agent-run checks (for reference; the launcher regression was shown to fail without the fix): - `node scripts/regressions/pnpm-runner.regression.mjs (before fix, regression only)`: exit 1: prune_pnpm_store must not stop startup (failing-rm case) - `node scripts/regressions/pnpm-runner.regression.mjs (after fix)`: exit 0, pnpm runner regressions passed - `node scripts/run-launcher-regressions.mjs`: exit 0, all 8 launcher regressions PASS - `bash -n start-termux.sh`: ok - `shellcheck`: not installed locally, not run - `node_modules/.bin/prettier --check scripts/regressions/pnpm-runner.regression.mjs packages/client/src/localization/locales/en.json`: both files use Prettier style - `node ./scripts/pnpm-runner.mjs localization:check`: exit 0, en: 17244 canonical keys, no migrations or new keys - `node ./scripts/pnpm-runner.mjs impeccable:check`: exit 0 - `node ./scripts/pnpm-runner.mjs build:shared && cd packages/client && node ../../scripts/pnpm-runner.mjs exec tsc --noEmit -p .`: exit 0 (the first run without shared built failed only on missing @marinara-engine/shared dist) Independent adversarial review: approve (two wording notes, applied above). CodeRabbit findings handled here (from a local review of #8784 and #8792 after they merged): - Rejected: 2. MultiplayerHostControls.tsx ~line 468: replace text-[var(--destructive)] with a steady error class because --destructive follows the animated primary accent during Accent Pulse. Reason: The premise is false for the current code. MultiplayerGenerationFailed renders only in the host app, where globals.css gives --destructive fixed values: #ff6b9d in the dark theme (line 204) and #c44040 in the light theme (line 470). Commit 84fb03d08d (2026-10-20) moved --destructive off var(--primary). Accent Pulse in App.tsx (applyLiveAccent, and applyAppAccentVariables via APP_ACCENT_CUSTOM_VARIABLES) writes only --primary, --ring, --accent, --sidebar-accent(-foreground), --glow-primary and the --marinara-app-accent-* and --marinara-chat-chrome-accent* tokens, never --destructive. The only place --destructive is var(--primary) is multiplayer-guest.css, which only the separate guest bundle loads (multiplayer-guest-entry.tsx). That bundle doesn't render host controls or run Accent Pulse. text-[var(--destructive)] is also the client's standard error-text class: 278 uses, including every other role=alert in features/multiplayer. So the colour doesn't move and there is no steadier class to switch to. Side note, not fixed here: the comment at globals.css ~1373 ('--destructive defaults to it') is out of date since 84fb03d08d. Because of the rule under it, delete buttons (.mari-chrome-control--danger) switch from the fixed danger red to the static accent colour while Accent Pulse runs. That may deserve its own follow-up. Known limits and risks: Low. The launcher change only stops a failed cleanup from ending startup. If v10 can't be removed it stays on disk, as it did before #8792, and the postinstall tries again and warns. The regression shells out to `bash`, the same way format-guard.regression.mjs already does in the same suite on all CI platforms, including windows-latest via Git Bash. shellcheck wasn't available locally, so only `bash -n` was run on the script. The copy change is English-only; community locales don't have this key and fall back to English. - Not changed, for the maintainer to decide: while Accent Pulse runs, the `[data-marinara-accent-animation] .mari-chrome-control--danger` rule in globals.css (added in 84fb03d08d) switches delete buttons from the theme's fixed `--destructive` colour to the static accent. Its comment says `--destructive` defaults to `--primary`, which stopped being true in that same commit. The rule still protects custom themes that set `--destructive: var(--primary)`, so removing it is a design call. ## 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:39:54 +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#8814
No description provided.