[bug] Non-Latin titles collapse to an empty or shared key in ~25 places, so notes,…
What happened
non-Latin titles collapse to an empty or shared key in about 25 places (slugify, kebabCase, storyKey, tokenizers), so records overwrite or merge each other
Summary
Across 8.761.0, names, ids and word lists are built with [^a-z0-9] or [a-z0-9]+. Text in any other script loses every letter. Names collapse to an empty string or one shared fallback ("untitled", "top", "upgrade"), so two unrelated items get the same file, id or key. Word lists come out empty, so search, overlap and duplicate checks see nothing.
This is the same class as #2920 and #2505 (fixed for KnowledgeDistill), at the other sites. It is not a request for a localization layer (#2230): Greek and Chinese break the same way as Russian, and English output can stay byte-identical.
Repro on a clean v8.761.0 checkout, from the repo root:
bun -e '
import {slugify} from "./LifeOS/install/LIFEOS/TOOLS/MemoryTypes.ts";
import {slug} from "./LifeOS/install/LIFEOS/ERRATA/Rules.ts";
import {storyKey} from "./LifeOS/install/LIFEOS/VIGIL/Editor.ts";
import {tokens} from "./LifeOS/install/skills/HillClimb/Tools/Population.ts";
import {hashWords} from "./LifeOS/install/hooks/lib/system-file-guard-core.ts";
const S=["Fund structure decision","Решение по структуре фонда","Выбор депозита","Απόφαση για το ταμείο","基金结构决定"];
console.log(S.map(slugify), S.map(slug), S.map(storyKey), S.map(s=>[...tokens(s)]), S.map(s=>hashWords(s).length));'
Actual: slugify gives untitled for all four non-Latin titles. Rules.slug gives top, storyKey gives "", tokens gives an empty set, and hashWords gives 0 words. The English title works in every case.
Names and keys that collide (same pattern at each line)
LIFEOS/TOOLS/MemoryTypes.ts:375slugify: unrelated notes share one file path.LIFEOS/TOOLS/HarvestExecutor.ts:839kebabCase: a second harvested idea lands on the first one's file and is skipped.LIFEOS/TOOLS/KnowledgeHarvester.ts:530toKebabCase: after the first non-Latin candidate, every later one reads as a duplicate and is dropped with no log line.LIFEOS/TOOLS/CreateUpdate.ts:94kebabCase: the change-log id is a bare timestamp, and two records in the same second overwrite each other.LIFEOS/TOOLS/ISARender.ts:181: all non-Latin headings share one empty anchor, so the contents links go to the wrong place.LIFEOS/TOOLS/Upgrades.ts:145claim hash: a second non-Latin rule is rejected as a repeat of the first.LIFEOS/TOOLS/Upgrades.ts:151slugify: every non-Latin proposal is namedupgrade.LIFEOS/ERRATA/Rules.ts:85slug: every non-Latin section becomes ruletop.hooks/lib/isa-utils.ts:1365task slug: two sessions started in the same minute write one work-registry row, and one drops off the board.hooks/WorkCompletionLearning.hook.ts:189: the second learning file is not written ("already exists").LIFEOS/TOOLS/RecurrenceLedger.ts:111: different tool errors share the signatureunknown.LIFEOS/IDEALSTATE/Wants.ts:102: all non-Latin wants get one id.LIFEOS/VIGIL/Editor.ts:54storyKeyandLIFEOS/VIGIL/Route.ts:98subject key: any two non-Latin events count as the same story, and the second is suppressed.LIFEOS/ASSAY/QuestionSystem.ts:339propositionKey: any two non-Latin yes/no questions fail validation as "the same question".LIFEOS/ATLAS/collectors/Gear.ts:35andProjects.ts:59: keysgear:-andproject:-, so items merge into one node.LIFEOS/PEOPLE/merge.ts:120: non-Latin names normalize to empty, so two cards for one person with a shared phone are not merged.
Word lists that come out empty
hooks/lib/system-file-guard-core.ts:412hashWords(and the pairs at:442): the personal-word leak guard sees no words in non-Latin text, in the pre-commit hook too. A non-Latin private word passes the guard.LIFEOS/TOOLS/Cortex.ts:238terms: a non-Latin record cannot be found, even by its exact title, and a non-Latin query is rejected as invalid input.LIFEOS/TOOLS/HarvestExecutor.ts:488tokenizeForOverlap: an identical existing title scores zero overlap and is harvested again.LIFEOS/TOOLS/lib/rule-duplication.ts:48: a non-Latin rule becomes an empty word list, so duplicates are never flagged.LIFEOS/ERRATA/Rules.ts:195: a complaint cannot be matched to a non-Latin rule.skills/HillClimb/Tools/Population.ts:288tokens: every non-Latin hypothesis has an empty word set, so the similarity gate cannot tell them apart.LIFEOS/ERRATA/Coverage.ts:128: sentences split only before an ASCII capital, so a non-Latin rule excerpt is cut off mid-text.skills/Cortex/Tools/ContextSearch.ts:214tokenize: decomposed (NFD) text is split at the combining mark. This also affects accented Latin text.
Suggested fix
Two small shared helpers would cover every site:
- For names and keys, keep the current ASCII result. When the input contains a letter outside ASCII, append a short hash of the NFC-normalized input. ASCII input gives exactly the name it gives today, so existing files and ids do not move.
- For word lists, use
text.normalize("NFC").match(/[\p{L}\p{N}]+/gu)in place of[a-z0-9]+. ASCII text gives the same tokens as today.
I run both patterns locally at all of these sites. English fixtures give the same output as before.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks for this. Feature requests and larger changes now live in Discussions under Ideas, so the issue list only tracks defects we're fixing now. I moved this one there with your full write-up: https://github.com/danielmiessler/LifeOS/discussions/3107. Nothing is lost, and that's where we'll pick it up. Closing here.