mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1688] [Issue]: Long-Term Memory activation fails on Engine staging: lenient settings reader assumes zod v3 issue codes #1665
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#1665
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 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1688
Originally assigned to: @Promansis on GitHub.
Summary
Long-Term Memory no longer activates against Marinara Engine
stagingwhen its settings file holds values from a newer package version. The lenient settings reader assumes zod v3 issue codes, and Enginestagingmoved to zod v4. The non-required "LTM package browser" CI workflow has failed on every LTM PR since at least #1670.Affected package
long-term-memory
Expected behavior
readLtmSettingsFilesplits off settings it doesn't recognise, logs each one by path, and activation succeeds. Examples are an unknown enum option, an out-of-range number, or an unknown key. This is whattests/long-term-memory-storage.regression.tschecks: activation loads a newer file and logssourcesAvailabilityModes.3,reasoningEffort,maxOutputTokens,promptTemplates.0.description,activePromptTemplateIdsByMode.adventure,importSourceandreceiptRetentionDays.Actual behavior
On Engine
staging, the newer values stay in place.safeParsestill fails, andschema.parse(value)throws aZodError, soactivateLongTermMemoryStoragethrows:The issues in the thrown error are zod v4-shaped:
reasoningEffort("xhigh")invalid_valuemaxOutputTokens(100000)too_big,origin: "number"promptTemplates.0unrecognized_keysdescriptionactivePromptTemplateIdsByModeunrecognized_keysadventureCause
splitUnknownLtmSettingsinpackages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/settings.tsmatches zod v3 issue codes:zod v4 reports an enum miss as
invalid_value, notinvalid_enum_value, so the enum branch never runs. The out-of-range branch runs only when nothing else changed (if (!changed) outOfRange.forEach(remove)), so the mix in the fixture still leaves values behind. Thez.ZodType<T, z.ZodTypeDef, unknown>typing in the same file is also v3-only.Engine
stagingswitched in Pasta-Devs/Marinara-Engine0dddb04dc("chore(deps): bump the npm_and_yarn group across 4 directories with 2 updates", 2026-10-23):packages/server:"zod": "^4.6.7", with"zod-v3": "npm:zod@3.25.76"kept as an aliaspackages/shared:"zod": "^4.6.7"CI builds against Engine
staging. A local Engine checkout still on zod 3.25.76 passes this test, which is why it passes locally.This is not only a test problem. Anyone who downgrades the package, or restores a settings file from a newer version, on an Engine with zod v4 will hit a failed activation instead of a logged warning.
Steps to reproduce
staging(zod ^4.6.7), installed and built..github/workflows/ltm-browser.yml:MARINARA_ENGINE_ROOT=<engine> pnpm --dir <engine> --filter @marinara-engine/server exec tsx "$PWD/tests/long-term-memory-storage.regression.ts".long-term-memory-storage.regression.tsthrows at line 366.Environment
stagingatb62d89fe9(zod ^4.6.7); passes on81f0896d3(zod 3.25.76)Logs, screenshots, or video
Failing runs of "Long-Term Memory package browser", step "Run Engine-backed Long-Term Memory regressions":
ZodErrorabove.cf2dd5413):AssertionError: activation must load a newer file and log sourcesAvailabilityModes.3at line 383. This is the same enum-code mismatch. #1670 merged with the workflow failing.Additional context
Possible fixes, for whoever picks this up:
invalid_valuelikeinvalid_enum_value, and check whether the v4too_big/too_smallandunrecognized_keysshapes (keys,path) still line up.zod-v3alias. That needs a fallback for Engines in the supported range (engine.min2.4.1) that don't have the alias.Either way, the regression has to pass against both an Engine on zod v3 and one on zod v4. The workflow isn't required, so nothing blocks merges on this today.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: