feat: Add disable_permalinks config flag - #313
Conversation
- Add disable_permalinks bool field to BasicMemoryConfig (defaults to False) - Update sync_service to skip permalink updates when flag is enabled - Update entity_service to skip permalink generation when flag is enabled - Update dependency injection to pass app_config to EntityService - Add comprehensive unit and integration tests - Preserve relation formatting throughout When disable_permalinks=True: - New notes won't have permalinks added to frontmatter - Sync operations won't update permalinks - Existing permalinks in notes still work for reading - Move operations won't update permalinks even if update_permalinks_on_move=True Closes #307 Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
Resolved merge conflict in config.py by keeping both new fields: - disable_permalinks from PR #313 - skip_initialization_sync from main - api_url from PR #313 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task —— View job Code Review Complete ✅I've reviewed PR #313 implementing the SummaryThis PR adds a clean, well-tested feature that allows users to disable automatic permalink generation. The implementation is solid with comprehensive test coverage and follows all Basic Memory coding standards. ✅ Code Quality & Standards
Code Quality Notes:
✅ Testing & Documentation
✅ Basic Memory Architecture
Architecture Notes:
✅ Security & Performance
Performance Notes:
🔍 Code-Specific ObservationsExcellent Implementation Details:
Implementation Highlights:
📋 Test Coverage AnalysisUnit Tests (
|
Fixed issue where entities created with disable_permalinks=True were still getting permalinks auto-generated from file paths. Solution: - Use empty string "" as sentinel value in schema._permalink to indicate permalinks are disabled - Updated permalink property to return None when it sees the empty string sentinel - Fixed type annotations to allow Optional[Permalink] return type - Fixed create_or_update_entity to handle None permalinks properly Tests: - All disable_permalinks unit tests now pass - Rewrote integration tests to use current DB API (engine_session_factory) - Added comprehensive integration test coverage for disable_permalinks feature 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>

Closes #307
Summary
Adds a new configuration flag
disable_permalinksthat allows users to disable automatic permalink generation in Basic Memory.Changes
disable_permalinks: boolfield toBasicMemoryConfig(defaults toFalse)sync_service.pyto skip permalink updates when flag is enabledentity_service.pyto skip permalink generation when flag is enabledapp_configtoEntityServiceBehavior
When
disable_permalinks=True:update_permalinks_on_move=TrueTesting
Generated with Claude Code