Skip to content

🐛 fix(cache): retry after cache I/O errors - #216

Merged
gaborbernat merged 3 commits into
tox-dev:mainfrom
gaborbernat:bug/6n6e3mnu-cache-recovery
Nov 3, 2026
Merged

gaborbernat merged 3 commits into
tox-dev:mainfrom
gaborbernat:bug/6n6e3mnu-cache-recovery

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

from_exe() let cache filesystem errors escape interpreter discovery. An unusable cache entry or lock could stop a lookup even when the interpreter itself was available. Discovery now retries without the supplied cache after a cache I/O error. Fixes #187.

Cache errors stopped the lookup

The previous cache path held the lock, read the entry, queried the interpreter, and wrote the result. A filesystem error during that path propagated to the caller. The new from_exe() handling retries through the uncached path after an OSError. The original lock is not bypassed for a cache write; the retry uses no disk cache.

Behavior changes

An unusable cache no longer prevents discovery of a working interpreter. A failed cache write can cause a second interpreter query. The uncached retry returns the interpreter result or its normal query error. Calls with caching disabled keep their existing error behavior.

Reported by Anthropic's OSS Scanner: ANT-2026-6N6E3MNU.

@gaborbernat gaborbernat added the bug Something isn't working label Nov 3, 2026
POSIX cache locks moved under locks-v2 after this branch started. Block the
lock path used on each platform so the recovery test still exercises a cache
I/O failure.
@gaborbernat
gaborbernat merged commit cf71cb8 into tox-dev:main Nov 3, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DiskCache read errors abort interpreter discovery

1 participant