Skip to content

Add fixed-path VersionedFileRegistry for legacy cache adoption - #84

Merged
iskandr merged 1 commit into
masterfrom
feature/fixed-path-file-registry
Sep 29, 2026
Merged

iskandr merged 1 commit into
masterfrom
feature/fixed-path-file-registry

Conversation

@iskandr

@iskandr iskandr commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

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 VersionedFileRegistry for 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.

@coveralls

coveralls commented Sep 29, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 36591045296

Coverage increased (+0.1%) to 95.543%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: 2 uncovered changes across 1 file (90 of 92 lines covered, 97.83%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
datacache/file_registry.py 87 85 97.7%
Total (4 files) 92 90 97.83%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1952
Covered Lines: 1865
Line Coverage: 95.54%
Coverage Strength: 7.63 hits per line

💛 - Coveralls

@iskandr
iskandr merged commit 8d651df into master Sep 29, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support fixed-path versioned single-file registries for legacy cache adoption

2 participants