Skip to content

Narrow cache load exception handler#46

Merged
johmathe merged 1 commit into
mainfrom
johmathe/narrow-cache-exception
May 12, 2026
Merged

Narrow cache load exception handler#46
johmathe merged 1 commit into
mainfrom
johmathe/narrow-cache-exception

Conversation

@johmathe
Copy link
Copy Markdown
Collaborator

Summary

  • Replace bare except Exception in _load_sparse_cache with explicit (OSError, RuntimeError, KeyError, pickle.UnpicklingError)
  • Avoids silently swallowing unexpected errors while still handling all known corruption/incompatibility cases

Test plan

  • pytest tests/test_coverage_gaps.py::TestSO3SparseCacheIO — 5 passed

Made with Cursor

Replace bare `except Exception` with explicit
`(OSError, RuntimeError, KeyError, pickle.UnpicklingError)` to avoid
silently swallowing unexpected errors during cache loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
@johmathe johmathe merged commit 8a51518 into main May 12, 2026
2 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.50%. Comparing base (b1111a2) to head (712ffa8).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #46   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files          11       11           
  Lines        2134     2135    +1     
=======================================
+ Hits         2038     2039    +1     
  Misses         96       96           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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