mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1517] [MERGED] fix(long-term-memory): send each extraction rule once and stop asking the model for server-owned values (1.4.65) #1525
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#1525
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/1517
Author: @Promansis
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @Promansis
Base:
staging← Head:fix(long-term-memory)/extraction-envelope📝 Commits (5)
d602e28fix(long-term-memory): send each extraction rule once and stop asking the model for server-owned values (#1512)a934fdfchore(long-term-memory): release 1.4.60 (#1512)0363646Merge upstream/staging into fix(long-term-memory)/extraction-envelope; release long-term-memory 1.4.65720802dfix(long-term-memory): name an imported card's character as the Vault lists it9dee5a7fix(long-term-memory): write a listed character's name exactly as trustedSubjects lists it📊 Changes
16 files changed (+248 additions, -170 deletions)
View changed files
➕
artifacts/long-term-memory-1.4.65.zip(+0 -0)📝
catalog/catalog.json(+8 -8)📝
catalog/notes.json(+6 -6)📝
catalog/v2/catalog.json(+8 -8)📝
catalog/v2/notes.json(+6 -6)📝
catalog/v3/catalog.json(+8 -8)📝
catalog/v3/notes.json(+6 -6)📝
packages/long-term-memory/CHANGELOG.md(+4 -0)📝
packages/long-term-memory/client.js(+4 -4)📝
packages/long-term-memory/manifest.json(+5 -5)📝
packages/long-term-memory/server.mjs(+35 -35)📝
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/evidence-unit-extraction.ts(+19 -55)📝
packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts(+3 -10)📝
scripts/build-feature-packages.mjs(+1 -1)📝
tests/long-term-memory-extraction-graph.regression.ts(+120 -7)📝
tests/long-term-memory-routes.regression.ts(+15 -11)📄 Description
Pull request
Linked issue
Closes #1512
Why this change
validationRules,targetNoteRules), asked the model to copysourceHashand the source evidence that the server sets anyway, and sent keys no rule reads, including the scope's chat, character and persona ids. About 17–19% of Claude Haiku's answer text was copied hash and evidence.evidence: [],title: ""or anulloptional field was dropped as malformed.response_formatnever saw the link object shape, and the relation list left outextracted_from.What changed
long-term-memory: each server link rule is stated once, in the system message. The request no longer carriesvalidationRules,requiredEvidence,scope,modes,allowedStatuses,allowedImportance,streamAllowedStatuses,streamScanOrderor the source note's status, tags, evidence and hash.allowedLinkRelationslists all 12 relations. The links field describes{"target", "relation"}. The "change" rule says the event must be in the same response.trustedSubjectslists it. The card's tags and evidence that used to hint at this are no longer sent.trustedSubjectslists it; other names are still copied from the source text. The resolver matches a listed name before its source-visibility check, so a listed name is accepted where the text uses a longer form.sourceHashlines; the roleplay return line namessummaryandunits.nullfields as absent, a blank title as absent, and always setsevidenceto the trusted source evidence. The provider schema no longer hasevidence.current, and the rejected-suggestion count drops from 11 to 4: 8 rejections came from the fixture's fixed evidence string, and of those units 7 are now kept and 1 is rejected for its link.packages/long-term-memorybundles, artifact and catalog entry.long-term-memory1.4.65 on stagingf260dd3d7, with the CHANGELOG entry, version, manifest, rebuiltclient.jsandserver.mjs, artifact and catalog entries.Package and security impact
long-term-memoryrequiredEvidence.sourceHashorevidence. The response schema losesevidence;additionalProperties: falseis unchanged andsubjectNamesstays required when names are resolved.sourceHashwas already overwritten;evidenceis now always the trusted source evidence (source_note:<id>plus the source's own evidence), so a provider can no longer add its own strings.nullis treated as an omitted field (defaults apply:claimKindchange,importancemoderate,linksandkeywords[]); a blank title is omitted. Nothing else is coerced; wrong types, bad identifiers, unknown buckets and invalid links are still rejected by the same schemas, and every link rule is still enforced after the answer.requiredEvidence,sourceHashorvalidationRulesnames keys that are no longer sent; whatever the model returns for them is replaced by the server.response_format). The live checks usedclaude -pwithout a schema.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
claude-haiku-5-5andclaude-sonnet-5-5throughclaude -p(no response schema), under pass rules written before the runs. Sonnet passed; a three-run Haiku re-check passed every rule. Only aggregate counts are shared (issue).claude-haiku-5-5throughclaude -p, stagingf260dd3d7against this branch, pass rules written before each run. Without the naming rules, the card with a one-word name lost its character's facts to a name variant (untrusted_subject_identity) in 3 of 6 runs, against 0 of 6 on staging. With them: 0 of 6 on that card, 0 of 3 on another, and no timeline event or thread from any card in 15 runs (staging: 7 of 24 runs). Of two cards whose long titles the text never uses (a pre-existing loss on staging, 3 of 3 runs each), one now keeps its facts in 3 of 3 runs and the other still loses them. Kept units, parser and validation rejections and link drops stayed within staging's range.Documentation impact
UI evidence (if applicable)
Not applicable (server only).
🤖 Generated with Claude Code
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.