mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1709] [MERGED] fix(long-term-memory): load newer settings on zod 4 and oversized lists (1.4.94) #1701
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#1701
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-Agents/pull/1709
Author: @Promansis
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @Promansis
Base:
staging← Head:fix(long-term-memory)/zod-v4-lenient-settings📝 Commits (4)
a1f8ca8fix(long-term-memory): load newer settings on zod 4 and oversized lists (#1688)4a8e2d6Merge upstream/staging into fix(long-term-memory)/zod-v4-lenient-settings; release long-term-memory 1.4.94a0e6eebfix(long-term-memory): keep a wrong-typed list failing on zod 4 (1.4.94)998e842fix(long-term-memory): only a string enum miss counts as a newer option (1.4.94)📊 Changes
15 files changed (+230 additions, -110 deletions)
View changed files
➕
artifacts/long-term-memory-1.4.94.zip(+0 -0)📝
catalog/catalog.json(+6 -6)📝
catalog/notes.json(+6 -6)📝
catalog/v2/catalog.json(+6 -6)📝
catalog/v2/notes.json(+6 -6)📝
catalog/v3/catalog.json(+6 -6)📝
catalog/v3/notes.json(+6 -6)📝
packages/long-term-memory/CHANGELOG.md(+4 -0)📝
packages/long-term-memory/manifest.json(+3 -3)📝
packages/long-term-memory/server.mjs(+39 -39)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/persistence/backup-restore.ts(+1 -1)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/settings.ts(+51 -14)📝
scripts/build-feature-packages.mjs(+1 -1)📝
tests/long-term-memory-routes.regression.ts(+4 -1)📝
tests/long-term-memory-storage.regression.ts(+91 -15)📄 Description
Pull request
Linked issue
Closes #1688
Why this change
invalid_value(as it does a literal miss), and both zod 4 and the Engine's patched zod 3.25.76 report only the range of a list that is over its maximum, never its entries. So a newer enum value kept the file from loading, or a newer entry in an oversized list dropped the whole list. This is also thelong-term-memory-storagefailure seen in #1670.What changed
long-term-memory(1.4.94, rebuilt manifest,server.mjs,artifacts/long-term-memory-1.4.94.zipand catalog entries).settings.ts:invalid_valuecounts as an unknown enum value except on the top-levelversion, which still fails the parse. When a list is over its range, each entry is checked alone and only the ones with an unknown enum value are dropped; the old whole-list fallback applies only if nothing was dropped.readLtmSettingsFileandbackup-restore.tsreadConfigacceptz.ZodType<T, any, any>so they typecheck under zod 3 and 4.tests/long-term-memory-storage.regression.ts: existing assertions accept both zod 3 and 4 issue codes; one new case runs the splitter against azod/v4schema (unknown key, enum miss, oversized list with one newer entry, a range value,version: 2, and a list still oversized after the drop).staging(now zod^4.6.7) showed zod 4 also reportstoo_bigbesideinvalid_typefor a string given where a list belongs, so the range fallback dropped a wrong-typed field and it loaded.settings.tsnow skips a range issue when the same path has a type error, with a regression case. The storage and route tests also matched zod 3 message text (greater than or equal,invalid_enum_value|Required); they accept zod 4's wording too.invalid_value, includingnulland numbers.isUnknownEnumValuenow takes the stored value and acceptsinvalid_valueonly for a string, with a zod 4 case formode: nullandmodes: ["a", 5]. A list over its maximum with no unknown string entry still falls back as a whole, as documented.upstream/staging(gacha-forge changes) and released throughreland.mjs.Package and security impact
long-term-memoryengine.min/engine.maxExclusiveunchanged.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
998e84237against Engine81f0896d3(zod 3.25.76):test-ltm.sh storage,test-ltm.sh routes-backup,npm run check,npm run typecheck:packages,test-catalog-lanes,validate-package-locales,validate-catalog,catalog-release-notesandcatalog-generatedat-determinismregressions.staging(81f07e4, zod 4.6.7), as the Long-Term Memory package browser workflow does: all nine Engine-backed suites (storage branch-recall engine-fields routes routes-imports routes-scope-identity routes-backup installation host-styles) pass, andnode scripts/typecheck-packages.mjs long-term-memoryreports no strict errors.Documentation impact
UI evidence (if applicable)
None; no UI change.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.