mirror of
https://github.com/openai/codex.git
synced 2026-10-19 08:16:48 +00:00
## Why Removing a directory while its lock file is open can leave `.nfs*` entries on NFS and prevent cleanup. ## What changed - Drop the `Arg0PathEntryGuard` lock file before its temporary directory. - On Unix, rename stale helper directories while locked, then close the lock before deleting them. This prevents initializers from publishing at the old path during cleanup. ## Testing Extend the guard lifetime test to all platforms and assert that its directory is removed after main returns. Strengthen the janitor test to check that cleanup leaves the temporary root empty. GitOrigin-RevId: 2524afcc63ed7769a7d16b622c1d447918f9478b