Skip to content

feat(metadata): improve match accuracy and localized titles - #461

Merged
Quick104 merged 3 commits into
Silo-Server:mainfrom
Rhainland:fix/match-accuracy
Jul 24, 2026
Merged

Quick104 merged 3 commits into
Silo-Server:mainfrom
Rhainland:fix/match-accuracy

Conversation

@Rhainland

@Rhainland Rhainland commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Part of #196.

Scope

Core metadata identity, scoring, localization, alias persistence, and manual-match explanation. Queue lifecycle and admin queue diagnostics are split into #463.

Review findings addressed

  • Uses published silo-plugin-sdk v0.12.0 with committed go.sum checksums; standalone GOWORK=off builds pass.
  • Centralizes strict positive, nonzero decimal provider-ID validation in internal/providerid.
  • Tracks alias request-snapshot provenance separately from alias language, so a complete language refresh removes every alias from its own prior snapshot without erasing independent language/provider-wide snapshots.
  • Deduplicates the public alias list by its pre-migration normalized identity across snapshots, keeping the newest spelling deterministically.
  • Renders match_score and match_reasons in the manual-match dialog.

Dependencies and rollout

Verification

Passed on head 24b967dfe81ca604f5ec0425088df3e4616bfac8:

  • GOWORK=off go test -count=1 ./internal/providerid ./internal/naming ./internal/catalog ./internal/metadata
  • PostgreSQL-backed TestItemAliasRepository*: 8/8 against the migrated dev database, including cross-language replacement, empty complete snapshots, legacy/provider-wide isolation, and normalized deduplication
  • GOWORK=off go test -run '^$' ./internal/metadata ./internal/catalog
  • MatchItemDialog Vitest: 8/8
  • production frontend build
  • pnpm --dir web run lint: 0 errors (159 existing warnings)
  • pnpm --dir web run format:check
  • make verify-local-paths and git diff --check
  • changed-lines golangci-lint: 0 issues
  • two clean adversarial reviews after the accepted alias-dedup fix (confidence 0.91 and 0.94)

The exact stacked tree containing this head was deployed to the dev LXC. API health/readiness are green, migrations applied, the alias index is valid/ready, source checksums match, and the live UI bundle contains the Match reasons rendering. Browser automation was not attached to the authenticated preview, so visual proof is covered by the deployed bundle and passing component tests.

Repository-wide make lint still reports 306 pre-existing findings outside this diff.

AI Disclosure

  • Tool(s): Codex CLI, Claude Code
  • Model(s): gpt-5.6-sol, claude-fable-5
  • Involvement: AI-assisted
  • Adversarial review: Rechecked provider-ID trust boundaries, alias replacement/provenance, normalized public deduplication, migration behavior, and manual-match rendering. Fixed the accepted cross-snapshot deduplication finding, reran affected tests, and obtained a clean final review.

Summary by CodeRabbit

  • New Features
    • Media item aliases are now included in exact, fuzzy, and misspelled searches.
    • Search results can display alternate, localized, and original titles.
    • Match details now show the selected title, confidence score, and reasons.
    • Metadata matching supports additional identity hints and more reliable episode validation.
    • Added support for identifying provider IDs in more filename and folder formats.
  • Bug Fixes
    • Improved handling of conflicting or invalid provider IDs.
    • Improved queued item recovery when filenames or paths change.
  • Chores
    • Added automatic backfilling of existing media aliases.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 17a0d331-3086-4f1a-b95c-849720a1e780

📥 Commits

Reviewing files that changed from the base of the PR and between 702c1ef and 24b967d.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (37)
  • cmd/silo/main.go
  • go.mod
  • internal/catalog/item_alias_repo.go
  • internal/catalog/item_alias_repo_test.go
  • internal/catalog/item_repo.go
  • internal/catalog/item_repo_test.go
  • internal/catalog/search_indexer.go
  • internal/catalog/search_indexer_test.go
  • internal/catalog/search_postgres_mixed.go
  • internal/metadata/episode_match_validation.go
  • internal/metadata/episode_match_validation_test.go
  • internal/metadata/id_consensus_test.go
  • internal/metadata/match_candidates.go
  • internal/metadata/match_candidates_test.go
  • internal/metadata/match_identity_fallback.go
  • internal/metadata/match_identity_fallback_test.go
  • internal/metadata/match_type_diagnostics.go
  • internal/metadata/nfo_identity_test.go
  • internal/metadata/plugin_provider.go
  • internal/metadata/service.go
  • internal/metadata/types.go
  • internal/metadata/worker.go
  • internal/metadata/worker_test.go
  • internal/models/media.go
  • internal/naming/filename.go
  • internal/naming/filename_test.go
  • internal/naming/folderid.go
  • internal/naming/folderid_test.go
  • internal/providerid/validate.go
  • internal/providerid/validate_test.go
  • internal/taskmanager/tasks/backfill_media_item_aliases.go
  • internal/taskmanager/tasks/backfill_media_item_aliases_test.go
  • migrations/sql/20260721211249_media_item_aliases.sql
  • migrations/sql/20260724135806_add_item_alias_snapshot_language.sql
  • web/src/api/types.ts
  • web/src/components/MatchItemDialog.test.tsx
  • web/src/components/MatchItemDialog.tsx

📝 Walkthrough

Walkthrough

The PR adds provider-confirmed media title aliases, resumable alias backfill, alias-aware catalog search, richer metadata matching decisions, episode corroboration, alternate identity handling, stricter provider-ID parsing, and updated match-candidate presentation.

Changes

Metadata matching and alias-aware search

Layer / File(s) Summary
Matching contracts, normalization, and naming
internal/metadata/..., internal/naming/..., internal/models/media.go, internal/providerid/...
Adds title-alias metadata, structured match decisions, provider-ID validation, alternate identity fallback helpers, plugin alias mapping, and stricter filename/provider-ID parsing.
Episode corroboration
internal/metadata/episode_match_validation.go, internal/metadata/episode_match_validation_test.go
Validates series candidates with bounded concurrent episode-provider checks, title similarity, coordinate evidence, and season-shape rules.
Metadata pipeline and queue identity wiring
internal/metadata/service.go, internal/metadata/worker.go, internal/metadata/*_test.go
Integrates language-aware matching, alternate identities, quarantined provider IDs, structured outcomes, alias persistence, reparsed queue identities, and refresh behavior.
Alias schema, repository, and backfill
migrations/sql/*media_item_aliases.sql, internal/catalog/item_alias_repo.go, internal/taskmanager/tasks/*alias*, cmd/silo/main.go
Creates alias storage and cursor state, implements provider replacement and resumable backfill operations, adds the backfill task, and registers it during startup.
Alias-aware catalog indexing and search
internal/catalog/search_indexer.go, internal/catalog/search_postgres_mixed.go, internal/catalog/item_repo.go
Loads aliases into catalog documents, adds alias title variants, and incorporates aliases into mixed and fuzzy search matching and ranking.
Match diagnostics and candidate presentation
web/src/api/types.ts, web/src/components/MatchItemDialog.tsx, web/src/components/MatchItemDialog.test.tsx
Exposes match title metadata and diagnostics in API types and renders native, original, matched-title, score, and reason details conditionally.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • Silo-Server/silo-server#386: Modifies the catalog’s trigram and fuzzy-search SQL construction paths that this PR also extends for alias matching.
  • Silo-Server/silo-server#397: Modifies the mixed catalog search query and ranking pipeline touched here for media-item alias matching.

Suggested labels: v1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.94% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main metadata matching and localized title changes, even if it doesn't mention every detail.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the v1.0 Silo v1 scope - auto-adds to the Silo v1 project label Jul 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
internal/api/handlers/libraries.go (1)

1625-1639: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Log RetryNowByFolder failures for parity with the rest of the handler.

The SyncForFolder branches log via slog.ErrorContext before returning 500, but the two RetryNowByFolder failure branches return the generic 500 with no server-side log. This makes a retry-now failure undiagnosable from logs, unlike every other error path here (and unlike wakeMetadataMatcher, which warns).

🪵 Add error logs
 		if _, err := h.SeriesMatchQueueRepo.RetryNowByFolder(r.Context(), id); err != nil {
+			slog.ErrorContext(r.Context(), "metadata queue: failed to retry series queue", "component", "api", "library_id", id, "error", err)
 			writeError(w, http.StatusInternalServerError, "internal_error", "Failed to retry metadata matcher")
 			return
 		}
@@
 		if _, err := h.MovieMatchQueueRepo.RetryNowByFolder(r.Context(), id); err != nil {
+			slog.ErrorContext(r.Context(), "metadata queue: failed to retry movie queue", "component", "api", "library_id", id, "error", err)
 			writeError(w, http.StatusInternalServerError, "internal_error", "Failed to retry metadata matcher")
 			return
 		}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/api/handlers/libraries.go` around lines 1625 - 1639, In the
handler’s SeriesMatchQueueRepo and MovieMatchQueueRepo RetryNowByFolder error
branches, add server-side slog.ErrorContext logging before returning the
existing 500 response. Include the request context, queue/failure context,
library id, and error, matching the existing SyncForFolder logging style while
preserving the current response behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Line 112: Publish the github.com/Silo-Server/silo-plugin-sdk v0.11.0 tag, then
refresh dependency checksums with go mod tidy so go.sum contains the v0.11.0
entries referenced by go.mod before merging.

In `@internal/catalog/item_alias_repo_test.go`:
- Around line 72-78: Add the standard to_regclass('public.media_item_aliases')
migration skip guard at the start of
TestItemAliasRepositoryLanguageRefreshPreservesOtherLibraryLanguages, matching
the guards in TestItemAliasRepositoryReplacesOnlySuccessfulProviderAndCascades
and TestItemRepositorySearchesPersistedAliasesAcrossExactFTSAndFuzzyPaths.
Ensure the test skips before repository operations when the aliases table is
unavailable.

In `@internal/metadata/service.go`:
- Around line 1857-1880: Update the title-alias attribution flow around
mergePreferredTitleMetadata so providers implementing IdentityHintProvider are
excluded from titleAliasProviders and TitleAliases. Determine this from the
original provider instance using the p.(IdentityHintProvider) check, while
preserving normal alias attribution for other providers and retaining the
underlying metadata.

In `@migrations/sql/20260721211627_metadata_match_queue_state.sql`:
- Around line 33-35: Move idx_media_files_folder_root_active into a separate
non-transactional migration marked with -- +goose NO TRANSACTION. Create it with
CREATE INDEX CONCURRENTLY IF NOT EXISTS, and update the corresponding Down
migration to remove it using the concurrent, idempotent form.

---

Nitpick comments:
In `@internal/api/handlers/libraries.go`:
- Around line 1625-1639: In the handler’s SeriesMatchQueueRepo and
MovieMatchQueueRepo RetryNowByFolder error branches, add server-side
slog.ErrorContext logging before returning the existing 500 response. Include
the request context, queue/failure context, library id, and error, matching the
existing SyncForFolder logging style while preserving the current response
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3745b1c7-6b7d-4b27-802e-3feb0a8f228e

📥 Commits

Reviewing files that changed from the base of the PR and between 5e2dd91 and 01132fa.

📒 Files selected for processing (46)
  • cmd/silo/main.go
  • go.mod
  • internal/api/handlers/libraries.go
  • internal/api/handlers/libraries_match_test.go
  • internal/catalog/item_alias_repo.go
  • internal/catalog/item_alias_repo_test.go
  • internal/catalog/item_repo.go
  • internal/catalog/item_repo_test.go
  • internal/catalog/search_indexer.go
  • internal/catalog/search_indexer_test.go
  • internal/catalog/search_postgres_mixed.go
  • internal/metadata/episode_match_validation.go
  • internal/metadata/episode_match_validation_test.go
  • internal/metadata/id_consensus_test.go
  • internal/metadata/match_candidates.go
  • internal/metadata/match_candidates_test.go
  • internal/metadata/match_identity_fallback.go
  • internal/metadata/match_identity_fallback_test.go
  • internal/metadata/match_queue_coordinator.go
  • internal/metadata/match_queue_state_db_test.go
  • internal/metadata/match_type_diagnostics.go
  • internal/metadata/movie_match_queue_repo.go
  • internal/metadata/plugin_provider.go
  • internal/metadata/series_root_match_queue_repo.go
  • internal/metadata/service.go
  • internal/metadata/types.go
  • internal/metadata/worker.go
  • internal/metadata/worker_test.go
  • internal/models/media.go
  • internal/models/media_group.go
  • internal/naming/filename.go
  • internal/naming/filename_test.go
  • internal/naming/folderid.go
  • internal/naming/folderid_test.go
  • internal/plugins/service.go
  • internal/plugins/service_admin_config.go
  • internal/taskmanager/tasks/backfill_media_item_aliases.go
  • internal/taskmanager/tasks/backfill_media_item_aliases_test.go
  • migrations/sql/20260721211249_media_item_aliases.sql
  • migrations/sql/20260721211627_metadata_match_queue_state.sql
  • web/src/api/types.ts
  • web/src/components/MatchItemDialog.test.tsx
  • web/src/components/MatchItemDialog.tsx
  • web/src/hooks/queries/admin/libraries.ts
  • web/src/pages/AdminLibraries.test.tsx
  • web/src/pages/AdminLibraries.tsx

Comment thread go.mod Resolved
Comment thread internal/metadata/service.go Resolved

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes after reviewing live base 5e2dd91d6bbf2824ffcc1e363943e968a890af45 against head 01132fa39bbc812717515daa7c8898c9a7dcbec0.

The seven correctness/deployment findings are attached inline: 3 P1, 3 P2, and 1 P3. The highest-risk issues are refreshes bypassing provider-ID quarantine, two-hour batch leases stranding unstarted work, and a transactional index build blocking writes to media_files during deployment.

Standards/process concerns also need resolution:

  • The PR spans SDK contracts, matching, naming, queue lifecycle, search, migrations, API, and UI despite the repository's one-concern-per-PR rule.
  • Movie and series queue state/reset/retry policy is substantially duplicated rather than extracted into shared logic.
  • The submitted commit is not independently buildable with GOWORK=off: SDK v0.11.0 is unpublished and go.sum lacks its checksums. This is acknowledged in the PR but remains a merge blocker.
  • Required verification evidence is incomplete: the body summarizes results instead of pasting real output, omits make lint/make verify-local-paths evidence, and includes no screenshot or recording for the UI change.
  • Failure outcomes/states remain raw strings across services, repositories, SQL, and API code, and MetadataMatcherQueuesSection should be extracted from the already-large AdminLibraries.tsx page.

Validation performed against the pinned head:

  • Focused Go tests passed for metadata, catalog, naming, API handlers, and task manager using exact SDK PR #11 head 443e4d6747d030ea7473a89afac4472a7b36abd6 through an isolated temporary module replacement.
  • Focused go vet, git diff --check, and make verify-local-paths passed.
  • Frontend: 18 focused tests, production build, ESLint, and Prettier passed.
  • Normal GOWORK=off testing fails on the missing SDK checksums as expected.
  • SILO_TEST_DATABASE_URL was unset, so DB-backed queue and migration behavior was not rerun.

Comment thread internal/metadata/service.go Resolved
Comment thread internal/metadata/match_candidates.go Resolved
Comment thread internal/catalog/item_alias_repo.go Resolved
Comment thread web/src/pages/AdminLibraries.tsx Resolved
@Rhainland
Rhainland force-pushed the fix/match-accuracy branch from 01132fa to 702c1ef Compare July 23, 2026 22:58
@Rhainland Rhainland changed the title feat(metadata): improve match accuracy with title aliases, language-aware matching, and parked queue states feat(metadata): improve match accuracy and localized titles Jul 23, 2026
@Rhainland
Rhainland marked this pull request as draft July 23, 2026 22:59
@Rhainland
Rhainland force-pushed the fix/match-accuracy branch from 702c1ef to 17370c6 Compare July 23, 2026 23:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/metadata/worker.go`:
- Around line 838-845: Update the reparsed-file handling around
reparseQueuedFileIdentity so currentFile.BaseYear only overwrites the
provisional year when it is nonzero, matching the conditional BaseTitle and
BaseType updates while preserving the existing fallback otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ffdbda10-d382-433d-bc92-deea1001f316

📥 Commits

Reviewing files that changed from the base of the PR and between 01132fa and 702c1ef.

📒 Files selected for processing (34)
  • cmd/silo/main.go
  • go.mod
  • internal/catalog/item_alias_repo.go
  • internal/catalog/item_alias_repo_test.go
  • internal/catalog/item_repo.go
  • internal/catalog/item_repo_test.go
  • internal/catalog/search_indexer.go
  • internal/catalog/search_indexer_test.go
  • internal/catalog/search_postgres_mixed.go
  • internal/metadata/episode_match_validation.go
  • internal/metadata/episode_match_validation_test.go
  • internal/metadata/id_consensus_test.go
  • internal/metadata/match_candidates.go
  • internal/metadata/match_candidates_test.go
  • internal/metadata/match_identity_fallback.go
  • internal/metadata/match_identity_fallback_test.go
  • internal/metadata/match_type_diagnostics.go
  • internal/metadata/nfo_identity_test.go
  • internal/metadata/plugin_provider.go
  • internal/metadata/service.go
  • internal/metadata/types.go
  • internal/metadata/worker.go
  • internal/metadata/worker_test.go
  • internal/models/media.go
  • internal/naming/filename.go
  • internal/naming/filename_test.go
  • internal/naming/folderid.go
  • internal/naming/folderid_test.go
  • internal/taskmanager/tasks/backfill_media_item_aliases.go
  • internal/taskmanager/tasks/backfill_media_item_aliases_test.go
  • migrations/sql/20260721211249_media_item_aliases.sql
  • web/src/api/types.ts
  • web/src/components/MatchItemDialog.test.tsx
  • web/src/components/MatchItemDialog.tsx
🚧 Files skipped from review as they are similar to previous changes (24)
  • internal/taskmanager/tasks/backfill_media_item_aliases_test.go
  • go.mod
  • web/src/components/MatchItemDialog.test.tsx
  • internal/metadata/match_type_diagnostics.go
  • internal/models/media.go
  • internal/metadata/match_identity_fallback.go
  • internal/metadata/plugin_provider.go
  • internal/naming/folderid.go
  • internal/taskmanager/tasks/backfill_media_item_aliases.go
  • internal/metadata/match_identity_fallback_test.go
  • internal/catalog/search_indexer_test.go
  • internal/catalog/search_indexer.go
  • internal/naming/folderid_test.go
  • internal/naming/filename_test.go
  • internal/catalog/item_repo_test.go
  • web/src/components/MatchItemDialog.tsx
  • internal/metadata/episode_match_validation.go
  • internal/metadata/types.go
  • internal/catalog/search_postgres_mixed.go
  • internal/catalog/item_repo.go
  • internal/metadata/match_candidates_test.go
  • internal/metadata/episode_match_validation_test.go
  • internal/metadata/match_candidates.go
  • internal/metadata/service.go

Comment thread internal/metadata/worker.go Resolved
@Rhainland
Rhainland force-pushed the fix/match-accuracy branch from 17370c6 to 206f513 Compare July 23, 2026 23:11

Copy link
Copy Markdown
Contributor Author

@Quick104 All of your findings are now addressed and the work has been split per policy:

I also completed another adversarial pass after your review and resolved the broader findings it surfaced: identity-hint alias attribution, scoped authoritative-empty aliases, duplicate-provider completeness, current-path year fallback, legacy full-metadata SDK decoding, migration test guards, and entity-specific TVDB IDs.

Current verification is green for all changed packages, real-PostgreSQL alias/queue coverage, SDK/TMDB/TVDB suites, frontend lint/format/tests/build, migration validation, and changed-code lint (0 issues). The only intentionally open thread is the external release-order blocker: upstream SDK v0.11.0 must be published before this draft can receive valid go.sum entries.

Could you please re-review the core diff and the queue-specific commit in #463?

@Quick104
Quick104 marked this pull request as ready for review July 24, 2026 16:02

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the published v0.12 dependency, provider-ID trust boundary, alias snapshot replacement and deduplication, manual-match explanation UI, migration behavior, and live dev validation. All requested changes are addressed; focused and database-backed tests pass.

@Quick104
Quick104 merged commit 383973e into Silo-Server:main Jul 24, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24b967dfe8

ℹ️ 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".

Comment on lines +985 to +986
for _, alias := range doc.Aliases {
variants = append(variants, alias, normalizeTitleForComparison(alias))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bump the Meilisearch schema for alias variants

When a deployment already has an active Meilisearch index, adding aliases to title_variants here does not update existing documents unless they later receive an upsert, and SearchMeilisearchSchemaVersion still stays at 3 so the provider continues accepting the old index instead of falling back or prompting a rebuild. In that setup, searches by newly supported localized/alias titles will work in Postgres but silently miss in Meilisearch for the existing catalog until every item is manually backfilled/reindexed; please force a schema mismatch/rebuild or otherwise enqueue all affected documents.

Useful? React with 👍 / 👎.

Comment on lines +1897 to +1899
accumulator.Title = title
accumulator.TitleLanguage = titleLanguage
accumulator.TitleIsFallback = fallback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute sort titles when alias titles win

When a requested-language alias wins over a provider fallback title, this only replaces Title; the same provider result can still contribute its non-empty SortTitle in the following merge, and browse ordering uses sort_title before falling back to title. For providers that return a native/fallback sort title alongside an English alias, the item will display the English title but continue sorting under the native title, so clear or recompute the sort title when the preferred display title is changed this way.

Useful? React with 👍 / 👎.

Comment on lines +260 to +263
if best.evaluated {
return best
}
best.err = lastErr

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate episode validation provider errors

When a candidate has multiple episode validators, an early transient error is dropped if a later validator returns a zero-evidence success, including all-season 404s, because this returns best whenever it was evaluated and never copies lastErr. In that failure mode validateSeriesMatchByEpisodes treats the rival as successfully checked with zero evidence and can auto-promote another candidate even though the unavailable provider might have matched the local episodes; keep the error if any selected validator failed so transient provider failures don’t become negative evidence.

AGENTS.md reference: AGENTS.md:L13-L17

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1.0 Silo v1 scope - auto-adds to the Silo v1 project

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants