mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1291] [Feature]: LTM Korean name identity — particle boundaries, short names, source id→name aliases #659
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#659
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 9, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1291
Originally assigned to: @Promansis on GitHub.
What problem does this solve?
Long-Term Memory cannot reliably resolve Korean character names on stock code, without a third-party server patch. This was surfaced while triaging #1277, where the reporter's environment runs a custom
hangul_subjectid_patch.cjsthat normalizessubjectIdvalues and improves Korean name handling. The reporter's guiding principle — identity comes from trusted names and keys, not from a romanizedsubjectId— is already how LTM works, and exact Hangul name matching already succeeds. The gaps are narrower, but they drop or misroute valid Korean memories:A Hangul name followed directly by a grammatical particle no longer counts as present in the source.
isSourceBackedProperNamecallssourceContainsWholeName, which requires a non-letter boundary immediately after the name (SOURCE_BACKED_NAME_BOUNDARY_PATTERN = /[\p{L}\p{N}'-]/u,subject-identity.ts:171). Korean attaches particles with no space, so서무진은 …fails the whole-name test: the trailing은is a letter, so the boundary check rejects the match (subject-identity.ts:1973-1976). The name then fails source-presence and the candidate is treated as untrusted, so no character is resolved or provisionally created. English names are unaffected because a space or punctuation separates them.A 2-syllable Korean short name that is the suffix of a known 3-syllable name is not offered for review.
partialNameTokensMatchsplits on_/whitespace tokens (subject-identity.ts:1900-1905), so진욱 ⊂ 도진욱(written without a space) never reaches the existingpartial_name_requires_reviewflow. It either fails resolution or risks a wrong automatic bind.Both are identity-resolution gaps, not cosmetic: a Korean character fact can be dropped, or filed under the wrong character, even when the name is plainly present in the source.
Proposed package or change
Long-Term Memory, server-side identity resolution (
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts), with Korean regression coverage intests/long-term-memory-extraction-graph.regression.ts. Phased so each step can land and be validated on its own:Particle boundary (bug-shaped). When a name ends in Hangul and the following characters are a permitted particle (
은/는/이/가/을/를/의/에게/와/과/도/로/한테…), treat the particle as a boundary so the name still counts as present. The boundary must match a complete permitted suffix, not simply accept any following text that begins with이,가, or로.Strip a trailing particle from a returned name — but only when the stripped form exactly matches a known, in-scope name; never to create a new character. Some names legitimately end in those syllables (하은, 이수이), so exact full-name matches must win first.
Korean short-name review. A 2-syllable name that is the suffix of a 3-syllable known name (진욱 ⊂ 도진욱) should route to the existing
partial_name_requires_reviewflow, not auto-bind. An independently known character named진욱must keep its exact match; keep선아and서나distinct (no phonetic or romanization-based merging).Optional: read source-stated
id → namepairs (e.g.characters:lines andseo_mujin -> 서무진maps in the source summary) as aliases for that extraction. This adds another identity hint source and needs explicit conflict handling, so it is deferred behind the steps above.Explicitly out of scope: don't remove the existing successful Latin-name fallback, and don't change
subjectIdto carry Hangul — keep Hangul insubjectNames, ASCII insubjectId, and trusted keys as identity.Why should this be optional?
Long-Term Memory is a downloadable Agent package, not Engine core. Korean name handling is package behavior inside LTM's own extraction, subject-identity and validation pipeline, so it ships through the catalog like any other LTM change; the Engine core is unaffected. This also keeps the change localized to the package's identity resolution rather than adding language-specific logic to shared Engine code.
Alternatives considered
subjectId, then match on it. Rejected: identity must not depend on a romanized id, and romanization can collide (the reporter's own patch normalizessubjectId, which is where the reported issues originated). Exact Hangul name matching already works and should stay the source of identity."" → "subject"fallback hardening. Do not port blindly: two different unnormalizable ids could both become"subject"and appear to be siblings, which is unsafe alongside sibling borrowing. An empty sentinel may intentionally mean "no usable identifier".Additional context
bucket + subjectId; particle and short-name handling was deliberately split out because it changes which names count as source-backed and therefore which characters can be created.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: