Skip to content

fix: disallow relative paths in user-supplied cache dir#182

Merged
stephantul merged 2 commits into
mainfrom
fix-relative-path
Jun 4, 2026
Merged

fix: disallow relative paths in user-supplied cache dir#182
stephantul merged 2 commits into
mainfrom
fix-relative-path

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

This PR disallows relative paths as part of the user-supplied cache dir strategy. If the user supplies a relative path, we revert to the default index, and show a warning.

@stephantul stephantul requested a review from Pringled June 4, 2026 11:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/cache.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 4, 2026

Confidence Score: 4/5

Safe to merge; the change is narrow and correct, with the only open question being test completeness around the emitted warning.

The implementation is straightforward and handles all cases (unset env var, relative path, absolute path) correctly. The sole observation is that the new test does not assert the logger.warning call, so a future removal of that diagnostic would go undetected by the test suite.

tests/test_cache.py — the new test for the relative-path guard omits an assertion on the warning log.

Reviews (1): Last reviewed commit: "fix: disallow relative paths in user-sup..." | Re-trigger Greptile

Comment thread tests/test_cache.py Outdated
Copy link
Copy Markdown
Member

@Pringled Pringled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@stephantul stephantul merged commit 13c88a1 into main Jun 4, 2026
16 checks passed
@stephantul stephantul deleted the fix-relative-path branch June 4, 2026 19:33
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.

2 participants