Add fixed-path VersionedFileRegistry for legacy cache adoption - #84
Merged
Merged
Conversation
Coverage Report for CI Build 36591045296Coverage increased (+0.1%) to 95.543%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hitlist's established single-file registry returns fixed paths and uses a root manifest. Datacache's generation bundle registry cannot adopt those populated directories without changing paths and return values. Add
VersionedFileRegistryfor this compatibility contract, leaving bundle behavior unchanged, so hitlist can replace its registry internals with a thin adapter.Transfers use
fetch_file; new compatibility receipts use bounded-memory hashing and the shared atomic JSON helper. Ordinary legacy cache hits remain offline and do not hash, relocate files, create locks or rewrite manifests. Explicit size/hash checks are honored. A callable root is resolved once per operation. Writer serialization fixes the independently reproduced legacy lost-update race: two downloaded datasets previously produced only one manifest entry. File and receipt publication remain separate, documented operations.Validation: lint and all 764 tests pass (95% coverage). Separate-process regression fails with serialization removed, reproducing the missing entry, then passes with the fix. Tests cover offline legacy reuse, missing-path lookup, dynamic roots, public result/error shapes, raw/decompressed files, explicit cache-hit integrity, failed refresh preservation, receipt-publication failure and platforms without fchmod.
Closes #83. Refs pirl-unc/hitlist#589, pirl-unc/hitlist#618. Version 1.15.0; hitlist adoption and closing its issues follow publication.
Release verification: merged as 8d651df; clean-master ./deploy.sh passed lint and all 764 tests with filelock 3.13.0, then published datacache 1.15.0. Wheel and sdist sizes/SHA-256 match PyPI. Both exact-head CI runs passed every Linux/Python 3.9–3.14, older-dependency, and macOS job.