mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1415] [Issue]: Long-Term Memory won't start when a settings file has a field from a newer version #719
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#719
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?
Originally created by @Promansis on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1415
Originally assigned to: @Promansis on GitHub.
Summary
Long-Term Memory's activation check parses its settings files strictly. A settings field written by a newer version therefore stops an older version from starting, which leaves no recall and no extraction in any chat until someone edits the file by hand. This bites hardest after a failed update: the Engine rolls back to the previous version, and that version then can't read the settings the newer one saved.
Each settings schema already drops fields that older versions used and later removed. This issue covers the other direction: fields added by a newer version. #1328 left this out of scope on purpose ("changing it needs its own decision"); this issue is that decision.
Affected package
long-term-memory1.4.38 (upstream/staging97c0486f8), underpackages/long-term-memory/src/engine/packages/:server/.../long-term-memory/runtime.ts:16-24parses the global settings, the extraction settings andagent-settings.json.getLtmGlobalSettings(settings.ts:13-16,config/settings.json);getLtmExtractionConfig(extraction-config.ts:39-45,config/extraction.json);runtime.ts:21-23;backup-restore.ts:47-53), which also reads the retention config.updateLtmGlobalSettings(settings.ts:24-35) andupdateLtmExtractionConfig(extraction-config.ts:69-95).ltmGlobalSettingsShape(shared/.../schema.ts:75),ltmExtractionSettingsShape(:354),ltmAgentSettingsShape(:3222) andltmRetentionConfigSchema(:1356) are all.strict(). Their preprocessors (:99-115,:377,:3234-3243) delete known removed keys only.tests/long-term-memory-storage.regression.ts:287-293("self-check must reject malformed settings", using{"version":1,"unknown":true}).Expected behavior
PUT /settingsparses its body with the same schema,routes.ts:679), so a typo from the client is still rejected.Actual behavior
updateLtmGlobalSettingsmerges the existing file into the request and parses the result strictly.Steps to reproduce
"someNewSetting": trueto<dataDir>/long-term-memory/config/settings.json.tests/long-term-memory-storage.regression.ts: lines 287-293 assert exactly this failure.Environment
>=2.4.1 <4.0.0)upstream/staging97c0486f8)Logs, screenshots, or video
Not applicable; the failure is a Zod "unrecognized key" error during activation.
Minimal fix
getLtmGlobalSettings;getLtmExtractionConfig;updateLtmGlobalSettingsandupdateLtmExtractionConfig, merge the request into the known part only, so the request is still validated strictly.{ ...unknownFromExistingFile, ...parsed }.POST /settings/resetstill writes defaults only, because the user asked for a reset.tests/long-term-memory-storage.regression.ts:287-293with these checks:settings.json,extraction.jsonandagent-settings.json;updateLtmGlobalSettings({ longTermMemoryStopWords: [...] }), the file still contains the unknown key;PUT /settingsbody with an unknown key is still rejected;Validation:
npm run checknode scripts/typecheck-packages.mjs long-term-memorynode scripts/validate-catalog.mjsMARINARA_ENGINE_ROOTset for the last two)Additional context
tests/long-term-memory-storage.regression.ts:703-706)..strict()schemas, about 160 calls for notes, drafts, indexes and backups.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: