Preserve qualified source URIs and prevent slide-ID collisions - #9
Merged
Conversation
Owner
Author
|
Verified before merge: for plain local paths, Scope note: this fixes provenance and IDs only. It does not add remote reading, the reader still opens the source path directly, so |
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.
Summary
file://source URIs verbatim in storeheaders and receipts
against
slide_direxact source URI
image.zarr/0common filesystem limits
Why
Qualified sources were passed through local-path handling in several places. This could
produce malformed provenance such as
file:///.../https:/..., prependslide_dirtoURI manifest entries, and allow unrelated remote slides with common basenames or terminal
components such as
0to target the same output store.Compatibility
Ordinary local paths retain the v0.1 behavior:
file://plusos.path.abspath(...)Explicit
file://inputs are preserved as supplied and derive their IDs from the decodedURI path.
The deliberate local naming exception is a bare image-series path such as
.../image.zarr/0, which now produces a readable, fingerprinted ID rather than0.Remote fingerprints hash the exact preserved URI text. Query strings, fragments,
trailing slashes, and case-sensitive user information therefore participate in identity
but do not appear in the readable filename prefix.
Validation
340 passed, 50 deselectedin the full non-slow suite after rebasing onto mergedPR Fix multi-grid standalone slide embedding #7, on Linux/Python 3.12 with the optional dependencies installed
24 passedintests/test_source_uris.py, covering HTTP, HTTPS, S3, GS, explicitfile URIs, query strings, fragments, trailing slashes, userinfo casing, manifests,
headers, receipts, local compatibility, numeric-series paths, collision cases, and
filename length
ruff check .passesCloses #3
Part of #6