cleanup_stale unmounts directories it just found unmounted
MountPoint.cleanup_stale runs on every setup() and, for each empty directory under the mount base dir, does:
if Directory.is_empty(file) and not MountPoint.is_active(file) then
MountPoint.unmount(file)
It calls unmount right after establishing the directory is not mounted. unmount then walks the whole escalation — fusermount, fusermount3, umount, diskutil — shelling out for something that was never mounted.
On Linux the tools exist and the calls fail quietly, so the only cost is spawning processes during startup for every leftover directory. It also made a test fail by machine, since a stubbed executable let it reach diskutil.
A plain vim.fn.delete(file, "d") looks sufficient for the not-active branch, but the unmount call may be guarding a case I cannot see — stale fuse entries where is_active returns false while the kernel still holds a mount, perhaps.