Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
+ Coverage 65.48% 74.80% +9.32%
==========================================
Files 46 46
Lines 2393 2366 -27
==========================================
+ Hits 1567 1770 +203
+ Misses 605 594 -11
+ Partials 221 2 -219 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Host-path fallbacks can still target a replacement tree after the opened destination is renamed.
2 open findings
What changed in this PR
Updates archive extraction to resolve symlinks through an open os.Root handle using root-relative paths.
Changes:
- Reworks root-path resolution around
*os.Root. - Updates extraction, xattr, whiteout, and Darwin device paths.
- Adapts Unix path-resolution tests.
| File | Description |
|---|---|
rootpath.go |
Implements handle-relative resolution. |
archive.go |
Uses resolved root-relative archive paths. |
diff.go |
Passes the open root for whiteouts. |
dev_darwin.go |
Passes the open root for mknod. |
archive_unix_test.go |
Updates resolver tests for os.Root. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
vvoland
force-pushed
the
parents-root
branch
2 times, most recently
from
October 13, 2026 14:21
5de6ce2 to
7563da8
Compare
Extraction opens its destination as an os.Root, but resolved parents of missing or escaping paths through root.Name(). If the destination was renamed and replaced during extraction, that fallback resolved symlinks in the replacement directory. resolveRootPath now walks symlinks through the os.Root handle and returns root-relative paths. The opaque whiteout walk now uses fs.WalkDir over root.FS(), so it no longer needs a host path. xattrs and darwin mknod have no portable handle-relative API, so they still use a host path from fsRootPath. fsRootPath now takes the caller's *os.Root, resolves through it, and returns a breakout error if the host path's parent is not the same file as the parent resolved through the handle. The remaining window between that check and the host-path operation is the same one that existed before. Signed-off-by: Paweł Gronowski <git@grono.dev>
vvoland
force-pushed
the
parents-root
branch
2 times, most recently
from
October 13, 2026 14:35
7563da8 to
5a27407
Compare
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.


Extraction opens its destination as an os.Root, but resolved parents of missing or escaping paths through root.Name().
If the destination was renamed and replaced during extraction, that fallback resolved symlinks in the replacement directory.
resolveRootPath now walks symlinks through the os.Root handle and returns root-relative paths.
fsRootPath now takes the caller's *os.Root as well, so xattr, opaque whiteout, and darwin mknod paths also resolve through the open handle. It still joins the result with root.Name() though because those operations need host paths.