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
fixup! feat(core.utils): address review findings on cache key and eviction
High: make_program_cache_key() now refuses to build an NVRTC key when
options.name carries a directory component and neither extra_digest nor
no_source_include=True is set. NVRTC searches the directory portion of
the name for #include "..." lookups, and the cache cannot fingerprint
those files -- a stale header would otherwise yield a stale cache hit.
Names without a directory separator fall back to CWD (the same search
root every NVRTC compile sees) and remain accepted unchanged.
Medium: FileStreamProgramCache._enforce_size_cap() now decrements the
running ``total`` whether it unlinks the candidate itself or a concurrent
pruner already removed the file. Previously the suppressed
FileNotFoundError left ``total`` inflated, so the loop kept evicting
newer entries to "hit" a cap that had already been met -- turning
ordinary contention into cache data loss.
Tests cover: path-like names on POSIX/Windows separators with and
without extra_digest / no_source_include; names without a directory
component (default_program, bare labels, filenames) must stay allowed;
non-NVRTC backends are exempt from the new guard. The eviction test
monkeypatches Path.unlink to simulate a concurrent deleter winning the
race and verifies the freshly-committed entry survives.
0 commit comments