fix: store sidecar path relative to scan root (#4)#11
Merged
Conversation
write_sidecar recorded `path: str(video)`, and `video` is an absolute path off a `.resolve()`'d root, so every sidecar leaked an absolute path — breaking portability when the archive is moved or remounted. Store the path relative to the scan root instead. fdx-query and fdx-master resolve it back to an absolute path against their --root; older sidecars with absolute paths pass through unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_index_videos.py imports framedex.index_videos, which loads the
heavy runtime stack (whisperx, torch) at module level and exits if it
is missing. CI installs only the dev + test dependency groups, so the
import aborted the whole pytest run.
Guard the module with pytest.importorskip("whisperx"). It runs wherever
the full runtime is installed; CI skips it. The sidecar consumers
(query, master_index) stay covered by stdlib-light tests that run
everywhere.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 22, 2026
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.
What
The sidecar
path:field stored an absolute path.write_sidecarwrotestr(video), andvideocomes fromroot.rglob()on a.resolve()'d root — so it was always absolute. Moving or remounting the archive left every sidecar pointing at a stale path.Now
path:is stored relative to the scan root.fdx-queryandfdx-masterresolve it back to an absolute path against their--rootat runtime, so output stays pipeable and trip grouping still works. Older sidecars with absolute paths pass through unchanged — no migration needed.Reported in #4.
Changes
write_sidecartakesroot, writespathasvideo.relative_to(root)fdx-query/fdx-masterresolve relative paths against--root; absolute paths pass throughVerification
pytest— 44 passed;ruff check,ruff format --check,mypyall cleanfdx-mastersmoke-tested end-to-end: trip grouping and cull list resolve correctlyrelative_tocan't raise, back-compat correct,trip_summary.pyunaffected🤖 Generated with Claude Code