Repository navigation
fix(transcode): allow catalogued symlink media - #644
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae8b536095
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| WHERE file_path = $1 | ||
| AND missing_since IS NULL |
There was a problem hiding this comment.
Revoke paths removed from library configuration
When an administrator removes a library root, HandleUpdateLibrary commits the new roots before merely queueing an asynchronous library_paths_changed scan; if that scan is delayed or enqueueing fails, the old media_files rows remain with missing_since IS NULL. This query therefore continues authorizing files beneath the removed root—unlike the previous authorizer, which checked the current configured roots immediately—and a still-valid reconstruction token can keep reading that content for up to the token lifetime. Require the catalog row's logical path to remain covered by a currently configured root rather than treating missing_since alone as active.
AGENTS.md reference: AGENTS.md:L12-L14
Useful? React with 👍 / 👎.
Summary
Root cause
The scanner follows readable symlinks and intentionally stores the logical path. The remote transcode node instead resolved both the library root and media path and required the physical target to remain under the logical root. Valid catalogued media was therefore rejected before FFmpeg started whenever its symlink target lived on a separate mounted tree.
Closes #643
Security boundary
The exact active
media_files.file_pathrow is now the authorization boundary. A localos.Statcheck still requires that path to resolve to a regular file on the worker. Arbitrary control-plane paths remain denied, and database errors fail closed.A host operator who can retarget a catalogued symlink can change the file read by FFmpeg; that is the same filesystem trust already required for scanner-supported symlink media.
Validation
go test -race ./internal/transcodenode ./internal/scanner -count=1TestFileRepositoryIsActivePathagainst local Postgresgo vet ./...golangci-lint run --new-from-merge-base=origin/main ./...— 0 issuescd web && pnpm run lint && pnpm run format:check— passes (151 existing warnings, 0 errors)make verify-local-pathsmake test— every package exceptinternal/jellycompatpasses; two unchanged process-lock tests fail on this macOS host (TestBeginWebOperationRecoversDeadProcessLock,TestBeginWebOperationRejectsLiveProcessLock)make lint— full-tree Go lint remains blocked by the repository's existing baseline (305 findings); changed-line CI lint is cleanAI Disclosure