[PR #1292] [MERGED] fix(long-term-memory): 1.4.22 — resolve Korean names written with particles (#1291) #1388

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/1291-korean-name-identity


📝 Commits (3)

  • 9e88a8e fix(long-term-memory): 1.4.22 — resolve Korean names written with particles (#1291)
  • c03c76e Merge upstream/staging into fix(long-term-memory)/1291-korean-name-identity
  • ff01e21 fix(long-term-memory): reject 으로 after a final ㄹ in Hangul particle boundaries (#1291)

📊 Changes

13 files changed (+208 additions, -86 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.22.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 (+38 -38)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts (+73 -8)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-extraction-graph.regression.ts (+53 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1291

Why this change

  • Korean text writes particles directly after a name (서무진은, 이수가, 도진욱에게). Before this fix, Long-Term Memory saw no word boundary there, so a name the model returned could fail the source check and be dropped. A name returned with its particle (서무진은) also failed to match the known character 서무진.
  • A 2-syllable short name that is the tail of a known 3-syllable name (진욱 for 도진욱) was treated as a new, separate character instead of a possible reference to the known one.

What changed

  • subject-identity.ts (long-term-memory):
    • Source presence: sourceContainsWholeName now also accepts a whole Hangul particle right after a Hangul name. The particle has to agree with the name's last syllable: 이수 takes 가, so 이수이가 does not count as 이수. After a final ㄹ only the 로 forms count (한별로 yes, 한별으로 no). A 1-syllable name never gets this boundary.
    • Returned name with a particle: a new helper, matchDirectName, tries an exact match first. Only if that fails does it strip the trailing particle and bind to a known exact name or alias. Stripping never creates a character. Both name-resolution paths use it.
    • Short names: partialNameTokensMatch treats a 2-syllable Hangul name that ends a known 3-syllable name as a partial match, so it goes to Review Queue (partial_name_requires_review).
    • A ponytail: comment records the deliberate limits: the fixed particle set, 2-into-3-syllable short names only, and stems of 2+ syllables.
  • One table-driven regression block in tests/long-term-memory-extraction-graph.regression.ts.
  • Release: long-term-memory 1.4.22 (patch bump, CHANGELOG entry). Rebuilt with the builder: server.mjs, manifest.json, artifacts/long-term-memory-1.4.22.zip and the catalog/notes lanes. client.js is unchanged.
  • Merged upstream/staging (slurp2 0.3.19). It merged cleanly, and rebuilding LTM afterwards produced no further changes.

Unchanged: exact and alias matches still win first, so a known 진욱 keeps its exact match. English boundaries and possessives are unchanged. Hangul stays in subjectNames, and subjectId stays ASCII.

Out of scope: step 4 of the issue (source id→name aliases), romanization, the ""→"subject" fallback, and Hangul name discovery. An unknown name returned with its particle and no known stem (서무진은) still creates a local character, as before.

Known limits:

  • A name that is itself <stem>+이 is ambiguous when the stem is a known name (e.g. 도진이 vs 도진).
  • Chained particles such as 이라는 and 에게서 are not recognized and fall back to the old behaviour.
  • 4-syllable and 1-syllable names keep the old matching.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none (the manifest engine range is unchanged; no Engine changes)
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none. No schema or storage change, only name-matching logic in the server bundle.

Validation notes (executable server code changed): server.mjs was rebuilt from source with node scripts/build-feature-packages.mjs long-term-memory, not hand-edited. Its hash and size match the manifest and all catalog lanes. Rebuilding again after the staging merge produced no diff.

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

Automated checks run locally by the author's agent on the pushed HEAD (Node v24.15.0). This is not a manual install test:

  • LTM engine regressions pass: extraction-graph, local-characters, routes-scope-identity, routes, candidate-reconciliation.
  • The new regression block fails on the pre-fix source and passes with the fix, including the ㄹ + 으로 row.
  • test-catalog-lanes, validate-package-locales, validate-catalog and catalog-release-notes pass.
  • npm run check reports 0 errors, and git diff --check is clean.
  • Not done: installing or updating through Marinara Engine, and checking restart/uninstall.

Documentation impact

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

UI evidence (if applicable)

N/A, no UI change.

🤖 Generated with Claude Code


🔄 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/1292 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1291-korean-name-identity` --- ### 📝 Commits (3) - [`9e88a8e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9e88a8e29b8f7692d82086979b4127368e3bbca1) fix(long-term-memory): 1.4.22 — resolve Korean names written with particles (#1291) - [`c03c76e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c03c76e4d90f92bf4229fa8b4fd472db4274b6a0) Merge upstream/staging into fix(long-term-memory)/1291-korean-name-identity - [`ff01e21`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ff01e2131813d6bf04ea5d14538310150c9386f5) fix(long-term-memory): reject 으로 after a final ㄹ in Hangul particle boundaries (#1291) ### 📊 Changes **13 files changed** (+208 additions, -86 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.22.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` (+38 -38) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts` (+73 -8) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+53 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1291 ## Why this change - Korean text writes particles directly after a name (`서무진은`, `이수가`, `도진욱에게`). Before this fix, Long-Term Memory saw no word boundary there, so a name the model returned could fail the source check and be dropped. A name returned with its particle (`서무진은`) also failed to match the known character `서무진`. - A 2-syllable short name that is the tail of a known 3-syllable name (`진욱` for `도진욱`) was treated as a new, separate character instead of a possible reference to the known one. ## What changed - `subject-identity.ts` (long-term-memory): - **Source presence:** `sourceContainsWholeName` now also accepts a whole Hangul particle right after a Hangul name. The particle has to agree with the name's last syllable: `이수` takes `가`, so `이수이가` does not count as `이수`. After a final ㄹ only the `로` forms count (`한별로` yes, `한별으로` no). A 1-syllable name never gets this boundary. - **Returned name with a particle:** a new helper, `matchDirectName`, tries an exact match first. Only if that fails does it strip the trailing particle and bind to a known exact name or alias. Stripping never creates a character. Both name-resolution paths use it. - **Short names:** `partialNameTokensMatch` treats a 2-syllable Hangul name that ends a known 3-syllable name as a partial match, so it goes to Review Queue (`partial_name_requires_review`). - A `ponytail:` comment records the deliberate limits: the fixed particle set, 2-into-3-syllable short names only, and stems of 2+ syllables. - One table-driven regression block in `tests/long-term-memory-extraction-graph.regression.ts`. - Release: long-term-memory **1.4.22** (patch bump, CHANGELOG entry). Rebuilt with the builder: `server.mjs`, `manifest.json`, `artifacts/long-term-memory-1.4.22.zip` and the catalog/notes lanes. `client.js` is unchanged. - Merged `upstream/staging` (slurp2 0.3.19). It merged cleanly, and rebuilding LTM afterwards produced no further changes. **Unchanged:** exact and alias matches still win first, so a known `진욱` keeps its exact match. English boundaries and possessives are unchanged. Hangul stays in `subjectNames`, and `subjectId` stays ASCII. **Out of scope:** step 4 of the issue (source id→name aliases), romanization, the `""→"subject"` fallback, and Hangul name discovery. An unknown name returned with its particle and no known stem (`서무진은`) still creates a local character, as before. **Known limits:** - A name that is itself `<stem>+이` is ambiguous when the stem is a known name (e.g. `도진이` vs `도진`). - Chained particles such as 이라는 and 에게서 are not recognized and fall back to the old behaviour. - 4-syllable and 1-syllable names keep the old matching. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none (the manifest engine range is unchanged; no Engine changes) - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none. No schema or storage change, only name-matching logic in the server bundle. **Validation notes (executable server code changed):** `server.mjs` was rebuilt from source with `node scripts/build-feature-packages.mjs long-term-memory`, not hand-edited. Its hash and size match the manifest and all catalog lanes. Rebuilding again after the staging merge produced no diff. ## 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 Automated checks run locally by the author's agent on the pushed HEAD (Node v24.15.0). This is not a manual install test: - LTM engine regressions pass: `extraction-graph`, `local-characters`, `routes-scope-identity`, `routes`, `candidate-reconciliation`. - The new regression block fails on the pre-fix source and passes with the fix, including the ㄹ + `으로` row. - `test-catalog-lanes`, `validate-package-locales`, `validate-catalog` and `catalog-release-notes` pass. - `npm run check` reports 0 errors, and `git diff --check` is clean. - Not done: installing or updating through Marinara Engine, and checking restart/uninstall. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) N/A, no UI change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:10:14 +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#1388
No description provided.