chore: more Tenantless fixes#457
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
asyncpg uses binary protocol which returns timestamps in UTC but as naive datetimes. The previous ensure_timezone_aware() assumed naive datetimes were in local time, causing a 6-hour offset in CST. Now checks cloud_mode_enabled to determine interpretation: - Cloud mode (PostgreSQL/asyncpg): interprets as UTC - Local mode (SQLite): interprets as local time (original behavior) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
- Rewrite setup_logging() in utils.py with explicit parameters: log_to_file, log_to_stdout, structured_context - Add init_cli_logging(), init_mcp_logging(), init_api_logging() to config.py - Remove old setup_basic_memory_logging() and process name detection - Initialize logging at entry points (CLI, MCP, API) - Add logging section to README with env vars documentation Also fixes: - Remove module-level config in project_service.py (test isolation bug) - Update tests to properly mock cloud_mode config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
Batch entity lookups instead of making individual find_by_id calls for each relation's from_id and to_id. This reduces ~30 queries down to 1 query when building graph context with relations. - First pass collects all entity IDs needed from relations - Single batch query via find_by_ids fetches all entities - Lookup dict provides O(1) access during summary building - to_summary becomes sync function (no longer needs await) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
- Use pathlib.PurePath.as_posix() for Windows-compatible path normalization - Add optional cloud_mode parameter to ensure_timezone_aware() to avoid implicit config loading when caller has the value - Add tests for ensure_timezone_aware cloud_mode behavior - Add tests for file_service read_file_bytes and read_file_content 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 3m 1s —— View job Code Review: Tenantless fixesI've completed a thorough review of this PR against the Basic Memory team checklist. This PR implements important cloud compatibility improvements to support "tenantless" deployments where the file system is abstracted (S3/cloud storage). Code Quality & Standards✅ Follows Basic Memory's coding conventions
|
No description provided.