Skip to content

fix: store sidecar path relative to scan root (#4)#11

Merged
niranjans merged 2 commits into
mainfrom
claude/gracious-blackwell-62defa
May 22, 2026
Merged

fix: store sidecar path relative to scan root (#4)#11
niranjans merged 2 commits into
mainfrom
claude/gracious-blackwell-62defa

Conversation

@niranjans

Copy link
Copy Markdown
Contributor

What

The sidecar path: field stored an absolute path. write_sidecar wrote str(video), and video comes from root.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-query and fdx-master resolve it back to an absolute path against their --root at 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_sidecar takes root, writes path as video.relative_to(root)
  • fdx-query / fdx-master resolve relative paths against --root; absolute paths pass through
  • README sidecar example updated
  • Tests: writer output, query + master resolution, absolute-path back-compat

Verification

  • pytest — 44 passed; ruff check, ruff format --check, mypy all clean
  • fdx-master smoke-tested end-to-end: trip grouping and cull list resolve correctly
  • Reviewed by Codex (gpt-5.5, high): fix sound, relative_to can't raise, back-compat correct, trip_summary.py unaffected

🤖 Generated with Claude Code

Simbastack and others added 2 commits May 23, 2026 01:32
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>
@niranjans niranjans merged commit 1aa34f3 into main May 22, 2026
1 check passed
@niranjans niranjans deleted the claude/gracious-blackwell-62defa branch May 22, 2026 23:08
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.

2 participants