You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(scanner): keep a renamed file's row when the rename changes its parsed title - #4039
Related issue: N/A
Validation tasks: none changed; the change reaches #1231 C1 (webhook-reported paths go through the same per-file scan step) and #1155 C1 (the marker image reset trigger), and neither case's behavior changes
Renaming a file so that its path parses differently gives it a new media_files row, even though its bytes are unchanged. The common trigger is letting Radarr or Sonarr add {tmdb-…}, {imdb-…}, or {tvdb-…} tags to an existing library. Every renamed file then loses its trickplay, chapter images, probe data, subtitles and timing corrections, and offline downloads, and Silo regenerates trickplay and chapter images for the whole library. One user reported this after retagging a large library.
#2877 made a renamed file keep its row, but only when the new path parses to the same title. With this change the bytes alone decide whether the row is kept, and the path only decides whether the row keeps its match.
Approach
A file that appears at a path with no row takes over the one row in the same library with the same size, OSHash, and modification time whose old path is gone under a root that answers and is not empty. If several rows qualify, the one whose old path names the same title wins, but only if exactly one does; otherwise the file is ingested as new, as before.
What the new path says then decides the row's links:
A path that matching would resolve to the linked title: links stay. The check follows matching's own order without calling a provider: a claim on the new content group or root, for a series a title already linked under the same show folder, then the provider IDs the scanner derives for the group, compared with the catalog item in the type's anchor precedence (TMDB first for a movie, TVDB first for a series). An operator override, a different episode, or anything that cannot be known locally means a rematch. This is the Radarr/Sonarr retag case, and it covers tags from any provider. The comparison moved from internal/metadata to internal/catalog unchanged so the scanner and matching share it.
Anything else: the row moves, drops its content and episode links, takes season and episode numbers, edition, and added date from the new path and the current scan, and is matched like a new file. A rename made to fix a wrong match therefore still matches afresh. Detected markers and marker images are cleared by the existing trigger; everything derived from the bytes stays.
When a row leaves its title, a missing stand-in row is written at the old path in the same statement, carrying the old links, held first-seen dates, and missing_since. The old title then goes through the normal removal grace: without the stand-in, reconciliation would delete the item at once, with its collections, manual edits, and added date, even when the rematch finds the same title again. The stand-in names the row it stands for in a new nullable column, media_files.stand_in_for_file_id. If the same bytes come back to the old path, that row takes the path, links, numbers, edition, and dates back and the stand-in is removed, so undoing a rename restores the file as it was. When the scan cannot tell whether the returning file is that row's (a database error, or the path it left is under a root that is unreachable or empty), it fails the file for that scan and a later scan decides. A different file arriving at a stand-in's path is written onto it and clears the marker.
Offline downloads stay with the title they were authorized for. In the same statement that retitles a row, its downloads for the old title move to the stand-in, so they are refused as a missing file's are and deleted with it after the grace, as they were before this change. Undoing the rename moves them back. A prepared remux or transcode is served, and prepared again, only for a download on the file row it was made from, so a moved download never gets the retitled row's copy.
Marker images used to reset on any path change, including a relink that kept the links. The trigger no longer compares file_path; changed bytes are still caught by hash, size, modification time, and duration. Image identities hash the path, so the relink rewrites them for the new path in the same update.
Two migrations: one replaces the marker image trigger function, the other adds the nullable column. No API or settings change, and clients and jellycompat see only a file id that stays the same across more renames. The rule is recorded in docs/architecture/missing-files.md. Extras and Books libraries are unchanged. The user manual's "Renaming and moving files" section does not describe artifact regeneration, so it needs no update.
Validation
The database-backed scanner test runs real files against a freshly migrated Postgres through full, subtree, and file-level scans: 33 cases pass. It covers provider tags on folders, files, and both, from each provider, for movies and series; a folder tag that outranks a conflicting file tag; a tag that contradicts the linked title on its anchor provider; a rename into a root claimed for the title; a filename tag naming another show inside the same series folder; retitles; a reverted retitle; a revert that cannot be decided until its root is healthy again; a stand-in removed by the trash sweep before the file returns; a stand-in whose original row was deleted; two vanished identical copies; and the cases that must still get a new row. Each kept row is checked for its trickplay row, chapter image, subtitle timing, markers, and offline download, and retitled rows are checked for cleared links and a metadata queue entry.
The new cases fail without the change, and the fixes for non-anchor provider tags, the group key version fallback, the reverted rename, and the imported edition were each confirmed by reverting them and watching their cases fail.
go build ./..., gofmt, go mod tidy -diff, go vet ./..., make lint-changed, make lint-router-recovery, make verify-migrations, make verify-local-paths, make verify-case-collisions, make verify-size-ratchet, make verify-bidi, make verify-apiv2-openapi: pass. Both migrations were applied, rolled back, and re-applied.
Focused Go tests for the scanner, chapter thumbnails, naming, models, catalog, and migrations pass on macOS, except two scanner tests that depend on filesystem behavior and fail the same way on main there.
A database-backed downloads test checks that a download moved to a stand-in is neither served nor prepared again from the retitled row's prepared copy.
Not run locally: make test-go as a whole and make verify-route-inventory, which does not type-check on macOS because of a Linux-only cgo file; CI covers both. Web checks were not run; nothing under web/ changed.
Not exercised on a live deployment, and the real matcher does not run in the scanner test, so "the retitled row is matched again" is checked as "unlinked and queued", not end to end.
The retry when a match links the row while it is reclaiming its stand-in has no test; that timing could not be driven deterministically.
Evidence
No user-visible change. The page holds the steps, the build, and the test results.
OSHash samples the first and last 64 KiB, so with size and modification time it is a strong heuristic, not proof. Because the title no longer has to match, two different files that agree on all three, where one vanished as the other appeared, would now share a row even under different titles.
The stand-in is a synthetic missing row. It shows in missing-file lists and counts like the old row did before this change. How admin views display it was not checked.
Undoing a title-changing rename restores trickplay, chapter images, subtitles, downloads, links, and dates, but detected markers and marker images are cleared when the links change and are detected again.
A match job that read a row before it was retitled can still write its result afterwards, because the matcher's link writes are fenced on the row id only. The row is then linked back to the old title and is not rematched. Matched files are not in the queue, so a bulk rename of a matched library is unlikely to hit it; a file being matched or retried as it is renamed can. fix(metadata): refuse a match's link write once the file has moved #4041, stacked on this PR, closes it with a path fence on the matcher's link writes.
A download registered at the moment its file is being retitled can miss the move to the stand-in and stay on the live row under the old title, because registration resolves the file without a lock and inserts later. The window is the time between those two steps. fix(downloads): write a download only while its file names the download's title #4042, stacked on this PR, closes it with a row lock and title check in the download-writing statements.
A plain matcher relink of a file between items (no rename) still leaves its downloads on the old title, as on main.
A file-level scan of only the new path does not reconcile the old title's membership; that waits for the old path's scan or a full scan, as before.
The keep-links check mirrors matching's lookup order but is not compared against a real matcher run. Where the two disagree, a file keeps a link that a rematch would have changed, or is rematched needlessly.
Checklist
I read and can explain the complete diff.
This pull request addresses one concern.
Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
The Evidence section shows every change a user can see, or says there is none.
AI Disclosure
Harness: Claude Code (in T3 Code)
Tool(s): Claude Code agent tools and subagents
Model(s): claude-opus-5-5 (wrote the code; separate instance for adversarial review), claude-fable-5-2 (diagnosis, direction, cleanup pass, verification, this description)
Adversarial review: a separate claude-opus-5-5 instance reviewed the diff twice. The first round led to the reclaim of a reverted rename, the tag comparison against stored provider IDs, the group key version fallback, the added-date reset, and new-path variant hints. The second led to the plain column in place of a foreign key and index, the retry and fall-through on the reclaim's races, and restoring an imported edition. Bot review then led to failing an undecided reclaim instead of ingesting the file, deciding links the way matching would, fewer filesystem probes per lookup, moving downloads with the title they were authorized for, leaving the renamed row out of the series sibling lookup, and tying prepared copies to their own file row.
…arsed title
A file whose bytes are unchanged (same size, OSHash, and modification time)
now keeps its media_files row across any rename or move, so trickplay,
chapter images, probe data, subtitles, and downloads follow it. Before, a
rename that changed what the path parses to, such as adding a provider ID
tag, got a new row and regenerated everything.
When the new path's provider tags agree with the linked title's stored IDs,
the links stay. Otherwise the row drops its links and is matched like a new
file, and a missing stand-in row at the old path holds the old title through
the usual removal grace. Undoing such a rename gives the row its path and
links back.
Marker thumbnails no longer reset on a path change alone; the relink rewrites
their path-hashed identities.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
The scanner now selects moved-file rows using file attributes and title identity. It can retain links, retitle rows, create stand-ins for old paths, and reclaim stand-ins when files return. Marker thumbnails can persist across path changes when their other identity checks pass.
Changes: Moved-file handling
Layer / File(s)
Summary
Identity and thumbnail rules migrations/sql/20261112172920_mark_retitle_stand_in_rows.sql, migrations/sql/20261112170646_keep_marker_thumbnails_across_renames.sql, internal/chapterthumbs/marker_snapshots.go, internal/scanner/file_repo_marker_thumbnails.go, internal/catalog/provider_identity.go, internal/metadata/service.go
The schema adds stand-in tracking. Marker snapshots no longer reject path changes alone, and the migration excludes file_path from thumbnail invalidation in its Up definition. Provider-ID contradiction checks use a shared catalog function.
Candidate selection and title matching internal/scanner/file_relink.go, internal/scanner/file_repo.go, internal/catalog/provider_identity.go, internal/metadata/service.go, docs/architecture/missing-files.md
The scanner selects candidates using file attributes and vanished-path status, then uses title identity and matching evidence to decide whether to retain links or retitle. Repository lookup supports claims and excludes the candidate file when checking observed roots.
Fenced relink, retitle, and reclaim internal/scanner/file_repo_relink.go, internal/scanner/file_repo.go, internal/scanner/scanner.go, internal/scanner/file_repo_marker_thumbnails.go
Repository updates fence changes against the verified row state. Retitles can create stand-ins, and returning files can reclaim them. The scanner checks for reclamation before normal processing.
After a renamed file is retitled, an in-flight metadata match job could still link it back to its old title. The author acknowledges this and defers the fix to a follow-up. The race is narrow, but it should be accepted explicitly before merge.
Security architecture risk: Low · up to d3898
The change preserves derived media data across renames and adds checks that prevent parked downloads from using another file’s prepared output. No new unauthorized access was demonstrated. Concurrent transfers during renames and downgrade behavior remain incompletely validated.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The relevant input boundary is a filesystem path change observed in a configured media folder. A successful transition can reassign every qualifying download referencing the selected row, not just one user’s download. Candidate lookup does not search other media folders, and inspected serving paths retain user, profile/device, and content-access checks.
Trust Boundaries and Controls
observed — Prepared-output serving checks artifact-to-download file identity before constructing either a local or remote target. Original-file serving rejects a missing stand-in. Re-preparation re-reads and locks the stored download after locking its artifact, so a park committed before that locked read is not hidden by the caller’s stale copy.
Resilience and Maintainability Implications
observed — Serving uses a previously loaded download snapshot without holding its row lock through streaming. The inspected tests assert parked-download rejection, stale-copy preparation rejection, return-path reassignment, sweep cleanup, and uncertain-root deferral; they do not establish revocation semantics for a park overlapping an already authorized transfer. This remains an evidence gap, not a demonstrated new access bypass.
Hardening Proposals
proposed — Define the authorization point for transfers overlapping retitle or reclaim, then validate deterministic park-versus-serve and park-versus-reprepare schedules, transaction interruption, and downgrade with populated stand-ins. Verify that failed transitions leave download ownership unchanged and cannot authorize preparation or new transfers from the wrong file.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(scanner): keep a renamed file's row when the rename changes its parsed title" matches the main change in the changeset. The raw summary shows moved-file relinking in internal/scanner/fi…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The pull request description is specific and related to the changeset. It explains the problem (renamed files losing their row and derived artifacts when the parsed title changes), the approach (byte-…
Full details: Title check
Explanation
The title "fix(scanner): keep a renamed file's row when the rename changes its parsed title" matches the main change in the changeset. The raw summary shows moved-file relinking in internal/scanner/file_relink.go, retitling with a stand-in row, and a new stand_in_for_file_id column. The title names the primary behavior, which is keeping the row when the parsed title changes. It is 80 characters, which is a little long but still clear.
Full details: Description check
Explanation
The pull request description is specific and related to the changeset. It explains the problem (renamed files losing their row and derived artifacts when the parsed title changes), the approach (byte-based identity matching, link-keeping rules, stand-in rows for the old title, marker trigger change, and downloads moved with the title), the two migrations, and the validation performed. It also lists risks and the evidence location. This matches the files in the raw summary, including the scanner relink logic, the stand-in column migration, the marker trigger migration, and the downloads changes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: bcb78ac2-eeae-4004-b7bc-d3da926849e0
Commits
Reviewing files that changed from the base of the PR and between 41771e8 and d38988d.
Files selected for processing: 2
internal/downloads/parked_download_db_test.go
internal/downloads/storage_reprepare.go
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Keep a renamed row's links only when matching the new path would resolve to
the title it already has: group and root claims, series siblings under the
observed root, then the group's provider IDs compared in the type's anchor
precedence. The comparison moves from metadata to catalog so both use it.
A stand-in reclaim that cannot be decided (database error, unreachable or
empty old root, fence lost twice) now fails the file for this scan instead of
writing it onto the stand-in.
Probe each library root once per lookup and stop once the pick is settled.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Fence matcher link writes against the file identity they read. · file_relink.go:325
internal/scanner/file_relink.go:325 Major · Data Integrity & Integration · Heavy lift
Fence matcher link writes against the file identity they read.
RetitleMovedFile moves row F to the new path and clears its content link. A matcher job that already read F at the old path can still write its result. FileRepository.UpdateContentID updates by id only, so the stale write links F, now at the new path, to the old title.
The retitle fence covers only the scanner's own statement in moveRowToTitle. The matcher's skeleton write (internal/metadata/service.go:8352) does not check it. The worker guard at internal/metadata/worker.go:965 reads the scanned group, not the file row, so it does not detect the move. The search found no lock shared by scanner and matcher.
Make the link writes conditional on the identity the matcher read, such as file_path. Return an error when no row matches. The same concern applies to UpdateEpisodeLink (internal/scanner/file_repo.go:3960), which also keys only on the file ID. Both changes alter the write contracts, and several callers depend on them, so this needs a design change rather than a local edit.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: b0b17814-264c-4243-a40d-3293dcc34ea4
Commits
Reviewing files that changed from the base of the PR and between c677050 and 22a6c2a.
Files selected for processing: 7
docs/architecture/missing-files.md
internal/catalog/provider_identity.go
internal/metadata/service.go
internal/scanner/file_relink.go
internal/scanner/file_relink_db_test.go
internal/scanner/file_repo_relink.go
internal/scanner/scanner.go
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
A retitle moves the row's downloads for its old title onto the stand-in, so
they are refused and later deleted as they were with the missing row, and a
reverted rename brings them back. Without this a download kept serving a
file that now belongs to another title.
The series sibling lookup that decides whether a renamed row keeps its links
no longer counts the row itself.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
On the outside-diff finding in the latest CodeRabbit review ("Fence matcher link writes against the file identity they read"): confirmed, and not fixed in 5b384bd. A match job holding a snapshot from before a retitle can still link the moved row back to the old title, because UpdateContentID and UpdateEpisodeLink are fenced on the row id only. Matched files are not in the queue, so a bulk rename of a matched library is unlikely to hit it; a file being matched or retried at the moment it is renamed can. The narrow fix is a path fence on the matcher's link writes with a refused write re-run against the current row. That changes matching's write contract, so whether it goes in this PR or a follow-up is the maintainer's call.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 5b2a51a1-49ad-41fb-98e4-0f6e9936ef0d
Commits
Reviewing files that changed from the base of the PR and between 22a6c2a and 5b384bd.
Files selected for processing: 5
docs/architecture/missing-files.md
internal/scanner/file_relink.go
internal/scanner/file_relink_db_test.go
internal/scanner/file_repo.go
internal/scanner/file_repo_relink.go
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
…file row
A download parked on a retitle's stand-in still pointed at the retitled row's
prepared artifact, so its remux or transcode could be served or prepared
again under the old title. Serving and preparing again now require the
artifact to belong to the download's file row.
An unlinked row that still carries downloads for a title now leaves a
stand-in for them, independent of the link comparison.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.
Reviewing changes in Silo
Include the related issue, expected behavior, and validation steps in the PR description.
For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
Follow this repository's AGENTS.md and CONTRIBUTING.md.
Request another review with @kody start-review in a PR comment.
React with 👍 or 👎 to give feedback on individual suggestions.
Review settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 4 Kody Rule(s) were not evaluated
These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:
Preserve optional store capabilities through production wrappers
Detach mandatory cleanup from request cancellation and bound its lifetime
Preserve durable media identity and share identity-evidence precedence
Bound decoder throughput trades and share direct-play eligibility
A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 0ea247c2-bd9c-40c9-828a-9d299a750647
Commits
Reviewing files that changed from the base of the PR and between 5b384bd and 41771e8.
Files selected for processing: 7
docs/architecture/missing-files.md
internal/downloads/parked_download_db_test.go
internal/downloads/service.go
internal/downloads/storage_reprepare.go
internal/scanner/file_relink_db_test.go
internal/scanner/file_repo_relink.go
scripts/ci/db-contracts.txt
Files skipped from review as they are similar to previous changes: 1
docs/architecture/missing-files.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
PrepareDownloadAgain compared the artifact with the download as the caller
read it, so a download parked on a stand-in mid-request still requeued the
retitled row's artifact and became preparing. It now locks the download row
after the artifact and refuses before any requeue when the download's file
is no longer the one read or the artifact's own.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
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
bugSomething isn't workinggoPull requests that update go codeimpact: data-lossUser data deleted, corrupted, or unrecoverableimpact: perfUnusable slowness on normal hardwarepriority: P1Core-path bug; painful workaround — next after P0size/XXL1000–2999 added + deleted lines (all files); change volume, not priority.
1 participant
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.
Problem
Related issue: N/A
Validation tasks: none changed; the change reaches #1231 C1 (webhook-reported paths go through the same per-file scan step) and #1155 C1 (the marker image reset trigger), and neither case's behavior changes
Renaming a file so that its path parses differently gives it a new
media_filesrow, even though its bytes are unchanged. The common trigger is letting Radarr or Sonarr add{tmdb-…},{imdb-…}, or{tvdb-…}tags to an existing library. Every renamed file then loses its trickplay, chapter images, probe data, subtitles and timing corrections, and offline downloads, and Silo regenerates trickplay and chapter images for the whole library. One user reported this after retagging a large library.#2877 made a renamed file keep its row, but only when the new path parses to the same title. With this change the bytes alone decide whether the row is kept, and the path only decides whether the row keeps its match.
Approach
A file that appears at a path with no row takes over the one row in the same library with the same size, OSHash, and modification time whose old path is gone under a root that answers and is not empty. If several rows qualify, the one whose old path names the same title wins, but only if exactly one does; otherwise the file is ingested as new, as before.
What the new path says then decides the row's links:
internal/metadatatointernal/catalogunchanged so the scanner and matching share it.When a row leaves its title, a missing stand-in row is written at the old path in the same statement, carrying the old links, held first-seen dates, and
missing_since. The old title then goes through the normal removal grace: without the stand-in, reconciliation would delete the item at once, with its collections, manual edits, and added date, even when the rematch finds the same title again. The stand-in names the row it stands for in a new nullable column,media_files.stand_in_for_file_id. If the same bytes come back to the old path, that row takes the path, links, numbers, edition, and dates back and the stand-in is removed, so undoing a rename restores the file as it was. When the scan cannot tell whether the returning file is that row's (a database error, or the path it left is under a root that is unreachable or empty), it fails the file for that scan and a later scan decides. A different file arriving at a stand-in's path is written onto it and clears the marker.Offline downloads stay with the title they were authorized for. In the same statement that retitles a row, its downloads for the old title move to the stand-in, so they are refused as a missing file's are and deleted with it after the grace, as they were before this change. Undoing the rename moves them back. A prepared remux or transcode is served, and prepared again, only for a download on the file row it was made from, so a moved download never gets the retitled row's copy.
Marker images used to reset on any path change, including a relink that kept the links. The trigger no longer compares
file_path; changed bytes are still caught by hash, size, modification time, and duration. Image identities hash the path, so the relink rewrites them for the new path in the same update.Two migrations: one replaces the marker image trigger function, the other adds the nullable column. No API or settings change, and clients and jellycompat see only a file id that stays the same across more renames. The rule is recorded in
docs/architecture/missing-files.md. Extras and Books libraries are unchanged. The user manual's "Renaming and moving files" section does not describe artifact regeneration, so it needs no update.Validation
go build ./...,gofmt,go mod tidy -diff,go vet ./...,make lint-changed,make lint-router-recovery,make verify-migrations,make verify-local-paths,make verify-case-collisions,make verify-size-ratchet,make verify-bidi,make verify-apiv2-openapi: pass. Both migrations were applied, rolled back, and re-applied.mainthere.make test-goas a whole andmake verify-route-inventory, which does not type-check on macOS because of a Linux-only cgo file; CI covers both. Web checks were not run; nothing underweb/changed.Evidence
No user-visible change. The page holds the steps, the build, and the test results.
Evidence: https://evidence.siloserver.org/r/silo-server/pr-4039/
Risks
main.Checklist
AI Disclosure
🤖 Generated with Claude Code