You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): disclose orphaned temp path and correct --atomic help text (#537)
* fix(cli): correct stale --atomic help text for swap ordering and permissions
The atomic field's doc comment described the pre-#519 removal-before-rename
ordering and never mentioned #531's Unix parent-read-permission requirement.
Update it to match the current backup-then-swap-then-remove implementation.
Closes#532
* fix(cli): disclose surviving temp/backup directory after atomic-force failure
run_atomic_force_extraction creates its temp and backup directories with
path-based calls, and its best-effort cleanup on failure is also path-based.
If an intermediate component of the destination's parent is replaced with a
symlink while extraction is in progress, that cleanup can silently target a
decoy at the redirected location instead of the real directory, leaving
content behind with no indication of where.
Every failure site now captures each directory's (dev, ino) identity via
PinnedDir::entry_status right after creating it (fd-relative to the already-
pinned parent, so unaffected by the redirect), and re-checks that identity
after the cleanup attempt. When content survives, its current path is
resolved fresh from an fd opened on the entry itself rather than the
(possibly still-redirected) logical path, since the logical path does not
necessarily lead there anymore.
This does not, and cannot, discover content written directly to a
redirect-created decoy directory if the redirect reverts before this check
runs: exarch-core's own per-entry extraction writes are path-based, and
making them fd-relative is out of scope for this fix. That narrower case
remains a genuine, undisclosed orphan. Not a security escape and not new
data loss, only a disclosure gap in the error/warning text.
Closes#530
* docs(skills): sync exarch-cli SKILL.md with corrected --atomic behavior
The --atomic flag's skill table entry repeated the same stale
removal-before-rename description cli.rs's help text had (#532), and
didn't mention the temp/backup disclosure added for #530.
Refs #530, #532
0 commit comments