Skip to content

fix(cache): Address Review #1580 findings - prevent data loss#66

Merged
wesm merged 1 commit intomainfrom
review-feedback
Jan 22, 2026
Merged

fix(cache): Address Review #1580 findings - prevent data loss#66
wesm merged 1 commit intomainfrom
review-feedback

Conversation

@wesm
Copy link
Owner

@wesm wesm commented Jan 21, 2026

Summary

  • Fix dangerous save_cache fallback that could lose history in filtered view
  • Strengthen test assertions for cache persistence
  • Add test coverage for "both tiers unavailable" edge case

Review Findings Addressed

  • medium: Remove save_cache fallback when both cache tiers unavailable in filtered view. In filtered view, data_manager.df only contains the filtered subset, so saving it would overwrite full cache with partial data and lose historical transactions.
  • low: Strengthen test assertion in test_multiple_sequential_saves_persist_correctly to use a known hot cache ID and assert exact final value (EDIT_4)
  • low: Add test for "both tiers unavailable" path to prevent future regressions

Test plan

  • All 1309 tests pass
  • New test verifies no cache writes happen when both tiers unavailable
  • Improved test assertion validates exact persistence behavior

🤖 Generated with Claude Code

Review findings addressed:
- medium: Remove dangerous save_cache fallback in filtered view when both
  cache tiers unavailable. In filtered view, data_manager.df only contains
  the filtered subset, so saving it would overwrite full cache with partial
  data and lose history. Now just logs error - edits are saved to backend.
- low: Strengthen test assertion in test_multiple_sequential_saves to use
  a known hot cache ID and assert exact final value (EDIT_4)
- low: Add test coverage for "both tiers unavailable" path to prevent
  future regressions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@wesm wesm merged commit bb3f927 into main Jan 22, 2026
8 checks passed
@wesm wesm deleted the review-feedback branch January 22, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant