Normalize status cache path persistence#2308
Normalize status cache path persistence#2308KristopherKubicki wants to merge 1 commit intostagingfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in the status cache persistence logic that would fail when STATUS_CACHE_PATH contains no directory component (e.g., just a filename like "cache.json"). The fix ensures that os.makedirs() is called with "." instead of an empty string when the path has no directory.
- Modified
_persist_status_cache()to handle paths without directory components by usingor "."fallback - Added comprehensive test coverage for the edge case of persisting cache files in the current working directory
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/utils/status_cache.py | Fixed _persist_status_cache() to handle cache paths without directory components by defaulting to "." when os.path.dirname() returns empty string |
| tests/test_status_cache.py | Added new test class TestStatusCachePersistenceNoDirectory with regression test for persisting cache files without directory paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Stale pull request message |
Summary
Testing
Codex Task