Repository navigation
fix: resolve both operands in metadata path-within-root checks - #47
Merged
groove-max merged 2 commits intoSep 24, 2026
Merged
Conversation
Owner
|
Thanks, Mike — I reproduced the error with a symlinked config directory and Your commits are now included in main, separately from the inverter work in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey @groove-max 👋
I think this is the separate path-within-root fix you were hoping for when you said that change looked good but should not ride along with the short-ASCII work.
Why
_is_within_rootwas resolving only one side of the comparison, so symlink forms could disagree with the real containment check. This resolves both operands (pathandroot) viaPath.resolve()+is_relative_to, and adds tests for:Touched only the three metadata helpers +
tests/test_local_metadata.py. No short-ASCII in this PR.Context
Just getting around to processing your MX3 / PR45 feedback and reshaping the stack into smaller pieces. I'm still qualifying the inverter-side work locally over more days of data collection, so the bigger short-ASCII slices will follow separately rather than landing as one blob.
Base is current
main(2a945ccat open). Happy to adjust if you'd rather see this shaped differently.Test plan
python -m unittest tests.test_local_metadata(15 OK)Cheers