You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
consult: agy-auth-cache tests hit EPERM on temp-dir cleanup under load on Windows; find the cause and re-enable #1925
agy-auth-cache.test.ts (consult's Gemini/agy lane) failed in roughly every other full-suite run on a native Windows developer machine with EPERM deleting its temp directory, on a different test in the file each time. It always passes in isolation. By owner ruling (2026-11-18) the file is skipped on native Windows in #1922 until the cause is understood; this issue is to find it and re-enable the file.
The hold on the directory outlasted ~10 s of delete retries and was gone about 4 minutes later; a manual delete then succeeded.
Directories were ordinary: plain files, inherited ACLs, nothing read-only or reparse.
No live process mentioned the directory or the fake agy in its command line when checked afterwards. The lane launches node <dir>\agy.cjs directly (no cmd.exe wrapper).
In-run probe at the moment of EPERM: worker cwd was packages/codev (not the dir); the worker still held an active ChildProcess handle for one of the lane's fake agys although kill(pid, 0) reported it dead.
The survivor check was blind to one of three fake agys: PIDs were appended to a shared spawns.log and one write was clobbered (8, 35220, 26900).
The lane resolves right after proc.kill without waiting for the child's close.
Does the production lane leak or leave an un-awaited agy process (resolving after kill without awaiting close, or a speculative auth probe that is not tracked)? If so that is a consult bug, not a test bug.
Is the same pattern behind the other temp-dir EPERM flakes seen under load (e.g. tripwire-wiring)?
Acceptance
The cause is demonstrated with a capture, not inferred.
If the lane leaks or under-waits, it is fixed with a regression test.
agy-auth-cache.test.ts is re-enabled on native Windows and passes 10 consecutive full-suite runs on a developer machine with a live Tower.
From CMAP review of #1926: an option for re-enabling this file on Windows before the cause is found is for removeFakeCliTempDir (packages/codev/src/commands/consult/__tests__/fake-cli-temp-dir.ts) to tolerate a lingering EPERM on Windows the way it already tolerates EBUSY, i.e. leave the dir to OS temp cleanup with a warning. That would restore the #1077 burst-regression coverage on Windows while this issue looks for the holder. Not done in #1922, by owner ruling (skip, and track here).
Activity
[Bugfix #1922] Test: skip agy-auth-cache on native Windows until #1925 …
amrmelsayed commentedon Nov 18, 2026
From CMAP review of #1926: an option for re-enabling this file on Windows before the cause is found is for
removeFakeCliTempDir(packages/codev/src/commands/consult/__tests__/fake-cli-temp-dir.ts) to tolerate a lingeringEPERMon Windows the way it already toleratesEBUSY, i.e. leave the dir to OS temp cleanup with a warning. That would restore the #1077 burst-regression coverage on Windows while this issue looks for the holder. Not done in #1922, by owner ruling (skip, and track here).