Skip to content

Fix Playground cache leases on macOS#1936

Merged
chubes4 merged 1 commit into
mainfrom
fix/1934-darwin-cache-leases
Jul 21, 2026
Merged

Fix Playground cache leases on macOS#1936
chubes4 merged 1 commit into
mainfrom
fix/1934-darwin-cache-leases

Conversation

@chubes4

@chubes4 chubes4 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • retain descriptor-relative lease access on Linux
  • introduce an explicit generation-checked pathname strategy for Darwin and FreeBSD, where Node cannot traverse /dev/fd/<directory-fd>
  • validate the parent directory generation before and after enumeration, child inspection, open, and unlink operations
  • fail closed when the sidecar path no longer matches the opened directory
  • cover parent-directory replacement during Darwin/FreeBSD lease release

Root cause

Node on macOS can stat /dev/fd/<directory-fd> but readdir() fails with ENOTDIR and child opens fail with ENOENT. #1930 treated Darwin descriptor paths as Linux-compatible, breaking all custom WordPress archive lease acquisition.

Verification

  • npm run build
  • npm run test:playground-custom-archive-cache
  • git diff --check

Fixes #1934

@chubes4
chubes4 merged commit 7befb07 into main Jul 21, 2026
4 checks passed
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.

Playground cache leases cannot traverse directory descriptors on macOS

1 participant