refactor(sloppak): route the rigs loader through the shared path helper#1041
Open
gionnibgud wants to merge 1 commit into
Open
refactor(sloppak): route the rigs loader through the shared path helper#1041gionnibgud wants to merge 1 commit into
gionnibgud wants to merge 1 commit into
Conversation
#1039 collapsed seven copies of the manifest-path containment guard into `_resolve_pack_path`, and #1040 added an eighth loader carrying its own copy. Both were correct against the base they were written on and both merged in the right order, but #1040 went in without the rebase that would have joined them — so `_load_rigs_file` is now the one loader in this file still open-coding the guard. Route it through the helper like its seven siblings. Same behaviour, same rendered log message ("sloppak: rigs path %r escapes source_dir — skipped"), verified by triggering a traversal against the new path. Full suite unchanged at 2796 passed / 4 skipped. This is the follow-up promised in #1040's description. Signed-off-by: gionnibgud <gionnibgud@gmail.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesRigs path resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
This was referenced Jul 23, 2026
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.
What
Follow-up promised in #1040.
_load_rigs_fileis currently the only loader inlib/sloppak.pystill open-coding the manifest-path containment guard — its seven siblings go through_resolve_pack_path.#1039 (the dedup) and #1040 (the rig reader) were each correct against the base they were written on, and merged in the right order. #1040 just went in without the rebase that would have joined them, leaving the eighth call site behind. Two lines in place of ten.
Verification
sloppak: rigs path '../outside.json' escapes source_dir — skipped, byte-for-byte what the inline copy emitted.test_sloppak_rigs_load.py::test_load_song_rejects_traversing_rigs_pathalready exercises this exact path.No behaviour change, no new validation.
feedpak surface
Checklist
CHANGELOG.md[Unreleased]updated — n/a, internal refactor with no user-visible changegit commit -s)Summary by CodeRabbit