Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Preserve dangling destination symlinks when MSVC output publication rolls back

Open LunaStev opened this issue 3 weeks ago • 0 comments

Problem

Path::exists follows the final link, so an existing dangling destination link is treated as absent and never backed up. A later independent publication failure loses that original directory entry.

Reproduction and evidence

Audited canonical master 69a67c6e0fb700f37ee6114f5a66d37ee13771a5 (0.0.1-alpha-dev). Matching checkout-built compiler/std were used for compiler probes on Linux amd64 with Rust 1.89.0 and LLVM 21.1.8. Artifact inspection, mocked/projection checks and foreign-target object emission are identified below and are not native execution on those operating systems.

Executed the unchanged output transaction with demo.dll -> missing-old-image and an existing old demo.lib. Stage new DLL/LIB bytes; inject failure renaming the new LIB but allow all restore operations. commit fails, and read_link(demo.dll) returns NotFound instead of the original target. This uses a Linux filesystem adapter; native Windows link permissions/behavior still need coverage.

Scope

Distinguish a destination directory entry from the existence of its referent. Preserve/restore it transactionally or reject the unsupported link before mutation.

Starting points: src/link_outputs.rs:195.

Completion criteria

  • [ ] The original dangling entry is preserved after a later publish failure.
  • [ ] Cover normal links/files and existing link-escape protections.
  • [ ] This regression must not require a second rollback failure to reproduce.

This is a bounded newcomer task with the starting point and focused negative/positive checks above.

Related: #536. Related broad trackers or completed implementations are context, not claims that their entire scope is unfinished.

LunaStev avatar Nov 12 '26 12:11 LunaStev