Repository navigation
fix(metadata): call enrichment-only plugin providers by declared lookup IDs - #1428
Conversation
…up IDs A metadata plugin provider only ran when the item carried an ID of the provider's own. The MDBList plugin never identifies titles, so no item ever had an "mdblist" ID and Silo never called it: the advisory age from #1417 and MDBList's ratings stayed empty on every library. A capability can now declare lookup_provider_ids in its manifest metadata, a list of provider-ID keys it can look an item up by. Silo calls GetMetadata when the item carries any one of them, with an empty ProviderId. Images, seasons and episodes stay gated on the provider's own ID, since those address the provider's own catalog. The key is new rather than a reuse of required_external_ids, which the markers capability reads as "all of these are required". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Quick104 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change reads ChangesPlugin metadata lookup IDs
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant CapabilityMetadata
participant ChainResolver
participant PluginProvider
participant PluginClient
CapabilityMetadata->>ChainResolver: provide lookup_provider_ids
ChainResolver->>PluginProvider: construct provider with lookup IDs
PluginProvider->>PluginClient: request metadata when own or declared ID is present
Merge Risk: ⚪ Minimal · up to The change appears mergeable after normal checks. A live MDBList refresh remains unvalidated, but that alone does not establish a defect. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Problem
Silo never calls the MDBList metadata plugin, so the advisory age added in #1417, and MDBList's ratings, stay empty on every library.
PluginProvider.GetMetadatareturns early unless the item already carries a provider ID keyed by the plugin's own capability ID (mdblist). An enrichment-only provider never assigns such an ID: it looks titles up by the IMDb or TMDB ID a primary provider resolved. So the host skips it on every refresh. The existing advisory test passed only because it keyed the request onmdblist, which a real item never has.Solution
A metadata capability can now declare
lookup_provider_idsin its manifest metadata: a list of provider-ID keys it can look an item up by. Silo callsGetMetadatawhen the item carries the provider's own ID, as before, or a non-empty value for any declared key. In the second caseProviderIdis empty and the plugin reads the IDs it needs fromProviderIds.metadataenvelope, the same waydefault_priorityanddefault_enabledare. Both chain paths load it: explicit library chains and the chain-less fallback. The explicit path now reads display name and metadata in one query instead of the display name alone.GetMetadataopens up. Images, seasons and episodes address the provider's own catalog and stay gated on its own ID.The key is new rather than a reuse of
required_external_ids. The markers capability already reads that name as "all of these are required", while a lookup provider needs "any one of these". Nothing in the metadata chain ever readrequired_external_ids.MDBList v0.2.0 is released and in the plugin catalog. It declares
"lookup_provider_ids": ["imdb", "tmdb"]and dropsrequired_external_ids. Either side can upgrade first: an older server ignores the key, and a server with this change behaves as before for a plugin that does not declare it.Validation
GetImagesstaying gated. There are also parser cases for top-level, nested and malformed metadata.{imdb, tmdb}IDs and asserts the plugin is called.Not validated: a live refresh against the real MDBList API.
Risk
The plugin now runs on every movie and series metadata refresh, spending one request per title against MDBList's 1000/day free tier. When the quota runs out it returns nothing, and the refresh is unaffected. A refresh that gets nothing from it never clears an advisory age already stored.
It only sees IMDb or TMDB IDs if it runs after the primary provider. Seeded priorities do that (MDBList 8, TMDB 2/3, TVDB 2, metadb 1). A custom library chain has to keep that order.
Related issue: N/A
Validation tasks: reaches #1250 C2 (metadata through the provider chain); providers without
lookup_provider_idsbehave as beforeAI disclosure
Written by Claude Opus 5.5 (model identifier
claude-opus-5-5[1m]) running in Claude Code as the agent harness, driven interactively by the maintainer. Claude Code subagents on the same model were used for code search and planning. No other AI tooling was used. The maintainer chose the new manifest key over reusingrequired_external_idsand reviewed the approach.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes