Files
vercel__workflow/.changeset/world-local-windows-unlink-retry.md
Andrew Barba f05f642e89 [world-local] Retry transient EPERM unlink failures on Windows (#3215)
deleteJSON was the one mutation path in the fs layer that neither used
withWindowsRetry nor swallowed unlink errors. On Windows, unlink fails
with a share-violation EPERM while a concurrent reader briefly holds
the file open — hook polling races deleteAllHooksForRun by design — so
a transient EPERM surfaced as a failed operation, e.g. a failed
run.cancel().

Wrap the unlink in withWindowsRetry, matching the rename/link/unlink
guards the write pipeline already has. ENOENT is not in the retryable
set, so the already-deleted tolerance still short-circuits.

Signed-off-by: Andrew Barba <barba@hey.com>
2026-07-30 12:23:20 -07:00

358 B

@workflow/world-local
@workflow/world-local
patch

Retry transient EPERM unlink failures on Windows when deleting hook and entity JSON files. A concurrent reader briefly holding a file open made deleteJSON throw a share-violation EPERM, which surfaced as a failed operation — for example a failed run.cancel() while deleteAllHooksForRun raced hook polling.