Expand description
Edge case handlers for V3 Immortal Architecture. Handles storage failures, concurrency, data validation, platform differences, and recovery scenarios. ZERO DATA LOSS. EVER.
Structs§
- File
Lock - File-based lock for concurrent access control
- Index
Consistency Report - Index consistency report
- Project
Isolation - Per-project isolation for multiple Claude instances
- Recovery
Marker - Recovery marker for idempotent crash recovery
Enums§
- Content
Type - Content type detection for binary vs text
- Lock
Error - Lock-related errors
- Normalized
Content - Content normalization result
- Storage
Error - Storage-related errors
- Validation
Error - Validation errors
Constants§
- CHUNK_
SIZE - Chunk size for large content (1 MB)
- MAX_
SINGLE_ BLOCK_ BYTES - Maximum single block size (10 MB)
Functions§
- atomic_
write - Atomic write: write to temp file then rename
- check_
disk_ space - Check available disk space before writing
- detect_
content_ type - Detect if data is text or binary
- find_
writable_ location - Find a writable location from a list of candidates
- merge_
preserving_ user_ sections - Merge content preserving user sections marked with
- normalize_
content - Normalize content for capture
- normalize_
path - Normalize a file path for cross-platform consistency
- paths_
equal - Compare paths with platform-aware normalization
- safe_
path - Sanitize path for filesystem safety
- safe_
write_ to_ claude - Safe write to Claude memory directory (handles locks)
- validate_
content_ size - Validate and potentially chunk large content
- validated_
timestamp - Validated timestamp: clamp to sane range