Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

[bug] Prioritize stableId gives every non-Latin title in a category the same id, so…

Open IvanLeontev-stack opened this issue 1 week ago • 1 comments

What happened

Prioritize stableId gives every non-Latin title in a category the same id, so they are dropped as duplicates

Summary

Component: Prioritize, skills/Prioritize/Tools/Prioritize.ts (stableId, line 462 on current main)

What happens: stableId() normalizes the title with .replace(/[^a-z0-9]+/g, " ").trim(), which deletes every non-ASCII letter. A title written entirely in Cyrillic, CJK, Greek, Arabic, etc. becomes an empty string, so every such recommendation in a category gets the same id: <category>-e3b0c44298 (the sha256 of the empty string).

Repro:

stableId("work", "Купить датчик воздуха")  // work-e3b0c44298
stableId("work", "Позвонить врачу")        // work-e3b0c44298
stableId("work", "購入する")                // work-e3b0c44298

Effect: in validate, ids.has(id) drops every non-Latin recommendation after the first in each category as a duplicate, and dismissing one of them dismisses all of them (ctx.dismissed.has(id)). For a principal who writes in a language without Latin script, Prioritize shows at most one recommendation per category.

Suggested fix: keep Unicode letters and digits in the hash input; the id itself stays ASCII because only the hash is used:

const norm = title.normalize("NFC").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").trim();

This leaves ids of ASCII-only titles unchanged (for them the result is identical), so existing dismissals keep working.

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.

IvanLeontev-stack avatar Nov 22 '26 23:11 IvanLeontev-stack

[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

Thanks @IvanLeontev-stack for the report.

This is fixed in our source and goes out in the next release. Prioritize stableId uses the letters in non-Latin and mixed-script titles when generating IDs, so different titles in the same category can get distinct IDs.

Please reopen if it still happens after you upgrade.

danielmiessler avatar Dec 02 '26 08:12 danielmiessler