Repository navigation
fix(metadata): harden provider decoding and refresh lifecycle - #318
Merged
Merged
Conversation
Reset metadata for the item and its descendants before queueing replacement data. Add an administrator unlink endpoint that suppresses automatic matching until an explicit rematch. Invalidate obsolete queued and running metadata writes, and release affected activity ownership while preserving the rest of a library refresh.
Add Unlink metadata alongside item refresh controls. Refresh the visible item and invalidate browse caches immediately after unlinking or rematching, including during theme playback. Keep mock rematches queued and reject obsolete refresh completions. Cover immediate clearing, descendant cards, pending unlink controls, and viewer permissions.
TheTVDB can return no results for a full official title while finding the same record without standalone the words. Retry empty searches once with those articles removed for both manual and automatic matching. Preserve successful search results, original matching scores, provider errors, and existing response decoding. Add regressions for the reported 2021 series, bounded retries, Unicode, and unchanged successful searches.
ReenigneArcher
force-pushed
the
codex/fix-metadata-agents
branch
from
October 17, 2026 16:51
7d1b87b to
88f3a6f
Compare
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #318 +/- ##
==========================================
+ Coverage 54.63% 61.03% +6.39%
==========================================
Files 40 45 +5
Lines 13396 13237 -159
==========================================
+ Hits 7319 8079 +760
+ Misses 6077 5158 -919
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
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.



Description
Metadata refreshes could reject valid provider responses, leave TV libraries partially matched, and display stale metadata, artwork, or progress after a refresh or rematch. This change makes provider decoding explicit and carries refresh state through movies, shows, seasons, episodes, and translations.
URL-specific artwork files are retained because other links or in-flight work may still use them. Reference-aware cleanup is tracked as follow-up maintenance work.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
Added or updated provider contract fixtures and regressions for locale state, cache behavior, unlink/rematch, overlapping artwork requests, out-of-order browser polls, restart recovery, and nested refresh progress. The artwork, polling, and pending-locale defects were reproduced before their fixes.
Local Windows validation passed with
KOKO_SKIP_FFMPEG_DOWNLOAD=1,KOKO_SECRET_STORE=sample, and the UCRT64 runtime on PATH:cargo test -p koko --no-default-features -j 1 --lib: 75 passed.cargo test -p koko --no-default-features -j 1 --test main --test metadata_regressions: 169 integration tests and 13 metadata regressions passed.cargo clippy -p koko --no-default-features --all-targets -j 1 -- -D warnings: passed.cargo +nightly fmt --all -- --check: passed.crates/client-web:npm run check,npm test(155 passed), andnpm run build: passed.Packaged platform builds and browser end-to-end tests were not run locally. Hosted CI results are separate from these local checks.
Type of Change
Checklist
AI Usage
See our AI usage policy.