Skip to content

Fix cache cleanup to unlink symlinks without traversing targets - #4

Open
morluto wants to merge 1 commit into
deepseek-ai:mainfrom
morluto:fix/cache-cleanup-symlinks
Open

morluto wants to merge 1 commit into
deepseek-ai:mainfrom
morluto:fix/cache-cleanup-symlinks

Conversation

@morluto

@morluto morluto commented Sep 10, 2026

Copy link
Copy Markdown

An uncommitted build containing a directory symlink could delete files outside its temporary directory during cleanup. Dangling links could leave the build directory behind.

Use symlink_status to classify the entry itself, then unlink symlinks without traversing their targets. This retains the custom deletion walker used for distributed filesystems.

Adds CPU regressions for root and nested directory/file/dangling links, ordinary cleanup, and runtime exception unwinding. Adds a CUDA regression where NVCC produces a CUBIN and a post-hook creates symlinks before failing.

Validation:

  • All 8 CPU cleanup cases pass. On the base revision, directory-symlink, dangling-link, and compilation-failure cases reproduce the defects; file-symlink and ordinary-directory controls pass.
  • CUDA validation passes on an RTX 3060, including the new failing-post-hook regression and existing eight-process cache-publication tests. The local harness excludes the unsupported TMA test and its expected artifact; that harness adjustment is not part of this PR.
  • Independent diff review reports no actionable findings.

Fixes #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Temporary cache cleanup follows directory symlinks and deletes target contents

1 participant