Bug Description
When BASIC_MEMORY_KEBAB_FILENAMES=true, periods in note titles are not converted to hyphens in filenames, though permalinks work correctly.
Example
Title: "Test 3.0 Version"
Expected:
- File path:
test/test-3-0-version.md ✓
- Permalink:
test/test-3-0-version ✓
Actual:
- File path:
test/Test 3.0 Version.md ❌
- Permalink:
test/test-3-0-version ✓ (works correctly)
Root Cause
The Entity.safe_title property uses generate_permalink() which internally calls os.path.splitext(). When processing a bare title like "Test 3.0 Version":
os.path.splitext("Test 3.0 Version")
# Returns: ("Test 3", ".0 Version")
The period is treated as a file extension separator, so only "Test 3" gets kebab-cased, and ".0 Version" is appended back unchanged.
Environment
Proposed Solution
Replace periods with hyphens before calling generate_permalink():
# In src/basic_memory/schemas/base.py
if use_kebab_case:
fixed_title = fixed_title.replace('.', '-') # Prevent splitext confusion
fixed_title = generate_permalink(file_path=fixed_title, split_extension=True)
Also need to convert file_path from @property to @computed_field so it's included in Pydantic's model_dump().
Impact
Affects users with BASIC_MEMORY_KEBAB_FILENAMES=true who have version numbers or other periods in their note titles.
Bug Description
When
BASIC_MEMORY_KEBAB_FILENAMES=true, periods in note titles are not converted to hyphens in filenames, though permalinks work correctly.Example
Title:
"Test 3.0 Version"Expected:
test/test-3-0-version.md✓test/test-3-0-version✓Actual:
test/Test 3.0 Version.md❌test/test-3-0-version✓ (works correctly)Root Cause
The
Entity.safe_titleproperty usesgenerate_permalink()which internally callsos.path.splitext(). When processing a bare title like "Test 3.0 Version":The period is treated as a file extension separator, so only "Test 3" gets kebab-cased, and ".0 Version" is appended back unchanged.
Environment
Proposed Solution
Replace periods with hyphens before calling
generate_permalink():Also need to convert
file_pathfrom@propertyto@computed_fieldso it's included in Pydantic'smodel_dump().Impact
Affects users with
BASIC_MEMORY_KEBAB_FILENAMES=truewho have version numbers or other periods in their note titles.