Commit 2c694da
committed
fix(config): negative cache age must miss, not hit
Registry.from_url checked `if age < cache_max_age_seconds` to
decide cache hit/miss. On Windows, the freshly-renamed cache file
sometimes reports an `st_mtime` slightly in the future of
`time.time()` due to filesystem-time vs wall-clock precision skew.
That made `age` negative, which (correctly per <) satisfied any
positive `cache_max_age_seconds`, but also incorrectly satisfied
`cache_max_age_seconds=0` — turning the documented "always
refetch" semantic into "use stale cache".
Tightened to `0 <= age < cache_max_age_seconds`. Negative ages now
trigger a refetch on every platform; positive ages behave
unchanged.
Surfaced by tests/test_remote_registry.py::test_from_url_refresh_
bypasses_cache on windows-latest after the matrix cleanup in
56c3bfd exposed Windows runners (previously all queued behind ARM).1 parent aae2045 commit 2c694da
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
| |||
0 commit comments