mempalace/tests
Jeffrey Hein 6e2ced3287
fix: allow Unicode in sanitize_name() — Latvian, CJK, Cyrillic (#637) (#683)
* fix: allow Unicode in sanitize_name() — Latvian, CJK, Cyrillic names (#637)

_SAFE_NAME_RE was ASCII-only ([a-zA-Z0-9]), rejecting valid Unicode
names like "Jānis" or "太郎". Changed to \w which matches Unicode
word characters (letters, digits, underscore) in Python 3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: tighten Unicode regex, add sanitize_name tests

Use [^\W_] for first/last char to allow Unicode letters/digits but
reject leading/trailing underscores (Copilot feedback). Add 7 tests
covering Latvian, CJK, Cyrillic, path traversal, and edge cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 14:23:34 -07:00
..
benchmarks fix: format test_layers_bench.py with ruff to pass CI lint 2026-04-09 08:24:51 +03:00
conftest.py fix: close KnowledgeGraph SQLite connections in test fixtures (#450) 2026-04-11 23:14:23 -07:00
test_backends.py fix: auto-repair BLOB seq_ids from chromadb 0.6→1.5 migration (#664) 2026-04-11 23:06:01 -07:00
test_cli.py fix: align cmd_compress dict keys with compression_stats() return values (#569) 2026-04-11 16:16:31 -07:00
test_config.py fix: allow Unicode in sanitize_name() — Latvian, CJK, Cyrillic (#637) (#683) 2026-04-12 14:23:34 -07:00
test_config_extra.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_convo_miner.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_convo_miner_unit.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_dedup.py style: ruff format 2026-04-10 08:49:35 -07:00
test_dialect.py fix: align cmd_compress dict keys with compression_stats() return values (#569) 2026-04-11 16:16:31 -07:00
test_entity_detector.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_entity_registry.py test: add comprehensive test coverage (35% → 58%, threshold 50%) 2026-04-08 20:54:56 +03:00
test_exporter.py feat: new MCP tools — get/list/update drawer, hook settings, export (resolves #635) (#667) 2026-04-11 21:25:04 -07:00
test_general_extractor.py style: format test files with ruff 2026-04-08 21:08:49 +03:00
test_hooks_cli.py fix: ruff format test_hooks_cli.py and test_knowledge_graph.py 2026-04-08 15:12:12 -03:00
test_instructions_cli.py test: add comprehensive test coverage (35% → 58%, threshold 50%) 2026-04-08 20:54:56 +03:00
test_knowledge_graph.py fix: ruff format test_hooks_cli.py and test_knowledge_graph.py 2026-04-08 15:12:12 -03:00
test_knowledge_graph_extra.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_layers.py Мempalace backend seam (#413) 2026-04-11 16:16:49 -07:00
test_mcp_server.py style: ruff format all Python files (#675) 2026-04-11 22:59:34 -07:00
test_miner.py Мempalace backend seam (#413) 2026-04-11 16:16:49 -07:00
test_normalize.py style: ruff format all Python files (#675) 2026-04-11 22:59:34 -07:00
test_onboarding.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_palace_graph.py style: format test files with ruff 2026-04-08 21:08:49 +03:00
test_query_sanitizer.py fix: mitigate system prompt contamination in search queries (#333) 2026-04-09 23:28:59 +09:00
test_repair.py test: add 33 tests for repair.py and dedup.py 2026-04-10 08:45:27 -07:00
test_room_detector_local.py fix: skip unreachable reparse points in detect_rooms_from_folders (#558) 2026-04-11 16:16:06 -07:00
test_searcher.py Мempalace backend seam (#413) 2026-04-11 16:16:49 -07:00
test_spellcheck.py style: format test files with ruff 2026-04-08 21:08:49 +03:00
test_spellcheck_extra.py test: bring coverage to 85%, set threshold to 85, reset version to 3.0.11 2026-04-08 21:38:12 +03:00
test_split_mega_files.py test: expand coverage to 70%, fix mcp_server CI crash (threshold 60%) 2026-04-08 21:07:03 +03:00
test_version_consistency.py fix: unify package and MCP version reporting 2026-04-07 08:53:25 +01:00