mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5839] [MERGED] feat(storage): default the resident-chat cap to 8 on SteamOS and Termux #6963
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#6963
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/5839
Author: @kolacheee
Created: 9/4/2026
Status: ✅ Merged
Merged: 9/4/2026
Merged by: @kolacheee
Base:
staging← Head:feat/5838-steamos-resident-chats-default📝 Commits (2)
a9d00aefeat(storage): default the resident-chat cap to 8 on SteamOS and Termux (#5838)8b964addocs: invalid cap values fall back to the platform default, they do not override it (CodeRabbit)📊 Changes
4 files changed (+182 additions, -33 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/CONFIGURATION.md(+19 -19)📝
packages/server/src/config/runtime-config.ts(+62 -10)📝
scripts/regressions/lazy-chat-units.regression.ts(+99 -4)📄 Description
Linked issue
Closes #5838
Why this change
A Steam Deck user's server kept dying silently mid session — no console output, "failed to fetch" on their phone, instant clean restart. The triage on #5838 fingerprinted it: every internal exit path on 2.4.4 logs before dying, so a silent death is SIGKILL, and on a device whose 16 GiB is shared with the GPU and the running game, that means the OOM killer. The timing signature confirms the mechanism — it survives idle overnight and dies only under interaction, which is exactly when load-and-keep grows the resident set (their diagnostics already showed RSS at 1.84 GiB).
Staging already has the cure (#5597 lazy loading + #5603 LRU eviction), but the cap defaults to
0— disabled — everywhere except the Termux launcher. This PR gives constrained platforms the default engine-side.What changed
MARINARA_MAX_RESIDENT_CHATSis unset or invalid,getMaxResidentChatUnits()now returns a platform default: 8 on SteamOS (ID=steamosin/etc/os-release, read once and cached) and on Android/Termux,0everywhere else (the prior behavior, unchanged). An explicit value always wins, including0to disable..envload never overrides inherited shell variables while hot reloads do, so astart.shexport would make a.envopt-out flap between boots and reloads. Engine-side has no competing writer, and covers systemd units and directnode dist/index.jslaunches too.${VAR:-8}only covers unset — an invalid value (=eight) was exported verbatim and silently disabled eviction on exactly the most constrained devices. Invalid values now fall back to the platform default, never to a bare 0, and the warning names the value that engaged.docs/CONFIGURATION.mdand a plain-language CHANGELOG entry.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
lazy-chat-unitslane extended and passing: functionaldetectSteamOscases (quoted ID, CRLF,ID=steamosfooandHOME_ID=steamosrejected, missing file fails closed, non-Linux short-circuits); the 8 is observed functionally through the exported seam (platformDefaultMaxResidentChatUnits(true) === 8), not just source-pinned; the invalid path is exercised functionally (banana→ platform default); and the block is platform-aware, so it also passes — and then asserts the constrained default through the full production path — if a contributor runs it on a real Deck or in Termux.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/CONFIGURATION.mdchanged, so this rides the batched[docs-i18n]follow-up per the standing convention (most of the diff there is prettier re-padding the table).UI evidence (if applicable)
Not applicable — server configuration behavior only.
Summary by CodeRabbit
Bug Fixes
0disables eviction.Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.