feat: migrate invariants cache to .muse/cache/invariants.msgpack (Phase 4)
- Add invariants_cache_path(root) to paths.py - _InvariantFileCache: rename _muse_dir → _cache_dir; load() derives cache_dir = muse_dir / 'cache'; save() calls mkdir(parents, exist_ok) - Add size property and prune() method (were missing) - Full docstrings on class, load(), save(), get(), put(), prune(), empty() - New test_invariant_file_cache.py: 29 tests across tiers 1/2/5/6/7 (unit, integration, data integrity, performance, security) - 89 existing invariant tests: all pass
sha256:f3b726b50f0aee3622bba751e0a67aa7ae4cf75a798477dbce581940b6a9cf70
sha
+51
~9
symbols
3 changed · 970 in snapshot
files
sha256:c70c0cc4c2694aa1cd311fe23c839348f317cca2af1d90886d36efc8cc4f8a47
snapshot
+51
symbols added
~9
symbols modified
3
files changed
970
files in snapshot
0
dead code introduced
Semantic Changes
60 symbols
+
test_invalid_entry_skipped_valid_survives
method
method test_invalid_entry_skipped_valid_survives L274–295
+
test_missing_entries_key_returns_empty
method
method test_missing_entries_key_returns_empty L266–272
+
test_dirty_false_after_successful_save
method
method test_dirty_false_after_successful_save L208–213
+
test_load_without_muse_dir_returns_empty
method
method test_load_without_muse_dir_returns_empty L225–229
+
test_save_creates_file_at_correct_path
method
method test_save_creates_file_at_correct_path L173–178
+
test_save_load_round_trip_preserves_all_fields
method
method test_save_load_round_trip_preserves_all_fields L180–200
+
test_second_save_does_not_update_mtime
method
method test_second_save_does_not_update_mtime L215–223
+
test_deeply_nested_payload_does_not_crash
method
method test_deeply_nested_payload_does_not_crash L409–427
+
test_mode_000_file_returns_empty_no_raise
method
method test_mode_000_file_returns_empty_no_raise L393–407
Files Changed
+1
~2
970 in snapshot
+1
~2
970 in snapshot
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:f3b726b50f0aee3622bba751e0a67aa7ae4cf75a798477dbce581940b6a9cf70 --body "your comment"
No comments yet. Be the first to start the discussion.