[PR #1381] [MERGED] fix(long-term-memory): 1.4.33 — a character's name keeps name credit without capitalisation (#1363) #1429

Closed
opened 2026-10-21 05:11:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1381
Author: @Promansis
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/1363-known-character-names


📝 Commits (4)

  • d6390e2 fix(long-term-memory): 1.4.31 — a character's name keeps name credit without capitalisation (#1363)
  • 5f34569 Merge upstream/staging into fix/long-term-memory/1363-known-character-names
  • 8011836 test(long-term-memory): cover the allowed filter on known names (#1363)
  • 556adfb fix(long-term-memory): 1.4.33 — state the name rule's limits in the release note (#1363)

📊 Changes

14 files changed (+204 additions, -84 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.33.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 (+37 -37)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/keyword-index.ts (+6 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/retrieval.ts (+12 -5)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-index-keys.regression.ts (+105 -0)

📄 Description

Pull request

Linked issue

Closes #1363

Why this change

  • A single exact keyword match keeps full keyword credit only when the query uses it as a name, and a name was detected by capitalisation alone. A character's name at the start of a sentence, in lowercase, or in a script without letter case such as Korean was capped at half credit (#1264). The vault already knows its characters' names, but recall did not use them.

What changed

  • long-term-memory 1.4.33. retrieveLongTermMemory builds a set of known names from the allowed character chunks (each non-stop word of the title, normalised the way query terms are) and passes it to searchLtmKeywordIndex as an optional knownNames. In the single-keyword cap, a term in knownNames keeps full credit. A single ordinary keyword is still capped. No new lane and no change to the threshold, BM25 or vector scoring. Aliases and nicknames are not matched (follow-up in the issue).
  • Source: keyword-index.ts, retrieval.ts. Regression: tests/long-term-memory-index-keys.regression.ts. It covers a sentence-initial, a lowercase and a Korean name, an ordinary keyword staying capped, and that a "Half" world note and an out-of-scope character titled "Half" cannot become known names.
  • Generated outputs rebuilt from source: packages/long-term-memory/{manifest.json,server.mjs}, artifacts/long-term-memory-1.4.33.zip, catalog/** and CHANGELOG.md. The branch is merged with upstream/staging at fb1b3653a; staging already shipped 1.4.31 (#1362) and 1.4.32 (#1364), so this is 1.4.33.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; range unchanged (>=2.4.1 <4.0.0)
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none; no index or storage format change, effective on the next recall after update

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Author-run checks on 556adfba6 (not a substitute for the boxes above): test-ltm.sh index-keys|runtime|routes, npm run check, test-catalog-lanes, validate-package-locales, validate-catalog, catalog-release-notes; a rebuild leaves the tree unchanged. The new regression fails when the allowed or noteType filter is removed.
  • Not done: the issue's step 4 gate (rerun the #1360 evaluation, ship only if F1 rises and off-topic injections do not). Not installed through Marinara Engine.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

  • None; no UI change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Recall now gives character-name keywords fuller credit regardless of capitalization or script casing, including when a name appears at the start of a sentence.
    • Words in a character memory’s title can also match regardless of capitalization; common stop words are ignored.
    • Ordinary single-keyword matches remain capped. Recall lanes, thresholds, text search, and vector scores are unchanged, and nicknames and aliases are not matched.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1381 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1363-known-character-names` --- ### 📝 Commits (4) - [`d6390e2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d6390e209ae408d7c3eca18b5701cadac4c66fd7) fix(long-term-memory): 1.4.31 — a character's name keeps name credit without capitalisation (#1363) - [`5f34569`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5f34569532486fc4a9f87f647fe66c760bae2c85) Merge upstream/staging into fix/long-term-memory/1363-known-character-names - [`8011836`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8011836378f3b8323cd13ae5e32b1f47b9f0bfa9) test(long-term-memory): cover the allowed filter on known names (#1363) - [`556adfb`](https://github.com/Pasta-Devs/Marinara-Agents/commit/556adfba635658da1af04f6aa0294662b9b32ed1) fix(long-term-memory): 1.4.33 — state the name rule's limits in the release note (#1363) ### 📊 Changes **14 files changed** (+204 additions, -84 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.33.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` (+37 -37) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/keyword-index.ts` (+6 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/retrieval.ts` (+12 -5) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-index-keys.regression.ts` (+105 -0) </details> ### 📄 Description # Pull request ## Linked issue Closes #1363 ## Why this change - A single exact keyword match keeps full keyword credit only when the query uses it as a name, and a name was detected by capitalisation alone. A character's name at the start of a sentence, in lowercase, or in a script without letter case such as Korean was capped at half credit (#1264). The vault already knows its characters' names, but recall did not use them. ## What changed - `long-term-memory` 1.4.33. `retrieveLongTermMemory` builds a set of known names from the allowed `character` chunks (each non-stop word of the title, normalised the way query terms are) and passes it to `searchLtmKeywordIndex` as an optional `knownNames`. In the single-keyword cap, a term in `knownNames` keeps full credit. A single ordinary keyword is still capped. No new lane and no change to the threshold, BM25 or vector scoring. Aliases and nicknames are not matched (follow-up in the issue). - Source: `keyword-index.ts`, `retrieval.ts`. Regression: `tests/long-term-memory-index-keys.regression.ts`. It covers a sentence-initial, a lowercase and a Korean name, an ordinary keyword staying capped, and that a "Half" world note and an out-of-scope character titled "Half" cannot become known names. - Generated outputs rebuilt from source: `packages/long-term-memory/{manifest.json,server.mjs}`, `artifacts/long-term-memory-1.4.33.zip`, `catalog/**` and `CHANGELOG.md`. The branch is merged with `upstream/staging` at `fb1b3653a`; staging already shipped 1.4.31 (#1362) and 1.4.32 (#1364), so this is 1.4.33. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; range unchanged (`>=2.4.1 <4.0.0`) - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none; no index or storage format change, effective on the next recall after update ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Author-run checks on `556adfba6` (not a substitute for the boxes above): `test-ltm.sh index-keys|runtime|routes`, `npm run check`, `test-catalog-lanes`, `validate-package-locales`, `validate-catalog`, `catalog-release-notes`; a rebuild leaves the tree unchanged. The new regression fails when the allowed or noteType filter is removed. - Not done: the issue's step 4 gate (rerun the #1360 evaluation, ship only if F1 rises and off-topic injections do not). Not installed through Marinara Engine. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - None; no UI change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Recall now gives character-name keywords fuller credit regardless of capitalization or script casing, including when a name appears at the start of a sentence. * Words in a character memory’s title can also match regardless of capitalization; common stop words are ignored. * Ordinary single-keyword matches remain capped. Recall lanes, thresholds, text search, and vector scores are unchanged, and nicknames and aliases are not matched. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:11:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1429
No description provided.