Relative-path resolution and read-range parity
This is a tracking issue for defects caused by divergent code paths that
handle a secondary parameter (path anchor, range restriction) inconsistently
across branches.
Child issues
| Issue |
Locus |
Status |
#64 — Relative paths broken in file_info / repository_dump |
lore-revision/src/util/path.rs:19–34 (make_absolute) |
No PR |
#25 — read_into returns internal error on sub-range request |
lore-storage/src/read.rs:548–569 (both branches) |
PR #37 open |
Shared pattern
In both cases the code has two or more parallel branches that are intended to
be equivalent, but one (or more) branches omit a parameter transformation that
the reference branch performs correctly.
read_into (lore-storage/src/read.rs:548–569):
The fragmented branch handles the read range correctly. The compressed branch
(lines 548–559) decompresses the full buffer without applying the range slice
before the length check and copy. The uncompressed branch (lines 560–569)
compares slice.len() against buffer.len() instead of range.len(). Any
sub-range request on either non-fragmented path returns StorageError::internal
or copies incorrect data. PR #37 fixes both branches.
make_absolute / new_from_user_path (lore-revision/src/util/path.rs):
make_absolute (line 26) calls std::env::current_dir() instead of an
explicit repo root, so relative paths resolve correctly only when the process
CWD happens to match the repository root. new_from_user_path (lines 644–687)
shares the same anchor via std::path::absolute(). This gives the bug wide
blast radius across callers in file_info, repository_dump, and similar
entry points.
Fix directions
Background
Identified in the open-bug theme analysis (triage/2026-06-bug-theme-analysis.md,
branch valentina2509:docs/bug-theme-analysis).
Relative-path resolution and read-range parity
This is a tracking issue for defects caused by divergent code paths that
handle a secondary parameter (path anchor, range restriction) inconsistently
across branches.
Child issues
file_info/repository_dumplore-revision/src/util/path.rs:19–34(make_absolute)read_intoreturns internal error on sub-range requestlore-storage/src/read.rs:548–569(both branches)Shared pattern
In both cases the code has two or more parallel branches that are intended to
be equivalent, but one (or more) branches omit a parameter transformation that
the reference branch performs correctly.
read_into(lore-storage/src/read.rs:548–569):The fragmented branch handles the read range correctly. The compressed branch
(lines 548–559) decompresses the full buffer without applying the range slice
before the length check and copy. The uncompressed branch (lines 560–569)
compares
slice.len()againstbuffer.len()instead ofrange.len(). Anysub-range request on either non-fragmented path returns
StorageError::internalor copies incorrect data. PR #37 fixes both branches.
make_absolute/new_from_user_path(lore-revision/src/util/path.rs):make_absolute(line 26) callsstd::env::current_dir()instead of anexplicit repo root, so relative paths resolve correctly only when the process
CWD happens to match the repository root.
new_from_user_path(lines 644–687)shares the same anchor via
std::path::absolute(). This gives the bug wideblast radius across callers in
file_info,repository_dump, and similarentry points.
Fix directions
read_into(both branches fixed, in flight).repo_root: &Pathparameter toboth
make_absoluteandnew_from_user_path, replacingstd::env::current_dir().Update all callers in the same PR to avoid a partial fix.
Background
Identified in the open-bug theme analysis (triage/2026-06-bug-theme-analysis.md,
branch
valentina2509:docs/bug-theme-analysis).