Skip to content

feat(calendar): list movies on their first digital or disc release - #3240

Merged
Quick104 merged 12 commits into
Silo-Server:mainfrom
Rhainland:feat/calendar-digital-releases
Nov 3, 2026
Merged

Quick104 merged 12 commits into
Silo-Server:mainfrom
Rhainland:feat/calendar-digital-releases

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-apple#944
Validation tasks: changes #1135 S1, S2; changes #1136 C1; changes Silo-Server/silo-apple#303 C1, Silo-Server/silo-apple#304 C1, Silo-Server/silo-android#313 C1, Silo-Server/silo-android#314 C1

The calendar lists each movie on its primary release date, which is usually the theatrical one. A theatrical release can never reach a media server, so the calendar shows movies on days when nothing becomes available to a Silo user. It never shows the days that matter: when the movie can be streamed or bought digitally, or comes out on disc.

This change lists each movie once, on its first home release: the earlier of its earliest digital release and its earliest physical release, each across all countries. The event says which with a digital or physical badge. The web calendar shows it as DIGITAL or PHYSICAL.

Approach

  • Data. Two new nullable media_items columns, digital_release_date and physical_release_date, hold dates the metadata provider sends as metadata Struct keys. The TMDB plugin derives them from TMDB release types 4 and 5 (feat(metadata): send movies' earliest digital and physical release dates silo-plugin-metadata-tmdb#35). The server drops a value that isn't a date. A concurrent expression index on the earlier of the two dates serves the calendar query.
  • Calendar. A movie is listed on LEAST(digital_release_date, physical_release_date). release_date is no longer a candidate, so a movie with no home release date yet stays off the calendar until the provider lists one. When both dates fall on the same day, the badge is digital. Item detail, sorting, filters and the year still use release_date.
  • Refresh. A scheduled refresh normally fills only empty fields. These dates are an exception: they are announced late and revised, and only a provider supplies them, so every refresh replaces a stored date with the provider's current one unless the item's release dates are locked. A date the provider stops sending is kept, because the server can't yet tell a removed date from a provider that didn't answer.
  • API. /api/v2 gains two badge values on calendar events and on the For You row's upcoming_event, which follows the same date. The frozen /api/v1 calendar and discover routes list movies on the same dates, because v1 and v2 call the same service, but they never send the new badges. docs/catalog-api.md describes the rule.

This deliberately changes validated behavior. Calendar acceptance AC1 ("Week view lists upcoming episodes and movie/season releases") still holds, but the movie entries in the S1 and C1 fixtures move from their theatrical dates to their home release dates, or drop out of a week that only had the cinema date. The apps don't know the new badge values yet and skip them, so they show the new dates without a badge until their follow-ups land.

Validation

  • Go tests: the catalog, metadata, handler, apiv2, sections and recommendations suites pass against a migrated Postgres. A new DB contract test, listed in scripts/ci/db-contracts.txt, covers the calendar rule: digital first, physical first, a tie, a movie with only one home date, a theatrical-only movie (not listed), and the stored round trip of both dates. Unit tests cover the plugin key mapping, the lock and refresh merge rules, and the badges.
  • Lint and generated files: make lint-changed reports 0 issues. make verify-apiv2-openapi, make verify-apiv2-web-types and make migrate-validate pass.
  • Web: tsc and prettier pass, and so do the existing calendar vitest files.
  • Manual: I ran a local server and web app with three movies. The API and web calendar show the digital-first and disc-first movies on their home release days with the right badge. The theatrical-only movie doesn't appear, and v1 returns the same dates without the badges.
  • Not passing, pre-existing: TestPlaybackInfoWithoutStripOrToneMapStillHasNoRoute and TestPlaybackInfoSkipsStripWhenRPUCannotBeStripped in internal/jellycompat fail on this machine on the base commit too, unrelated to this change.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3240/

Surface and build: web app at desktop and phone width. Before is main at the merge base, after is this branch, with the same three movies and week. The movie in cinemas on Oct 28 leaves the calendar. The other two appear on Oct 30 (digital) and Oct 31 (disc); on main they sat on their theatrical dates in August and September.

Risks

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; Codex CLI for an independent review; Playwright for the captures
  • Model(s): claude-opus-5-5; gpt-6.1-sol (review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: independent reviews of the full branch and the plugin change by claude-opus-5-5 and gpt-6.1-sol, each covering correctness, standards and spec, and a second pass over the fixes. They found:
    • the new badges leaking into the frozen v1 calendar and discover responses (fixed: v1 strips them);
    • a scheduled refresh keeping a revised home release date (fixed: providers' current dates win unless locked);
    • undocumented badge values on the discover upcoming_event (fixed);
    • a field-copy test and duplicate test rows (removed).

Note

Show movies on the calendar at their first digital or disc release

  • Stores digital and physical release dates on MediaItem via a new migration, and persists them through ItemRepository writes and plugin metadata parsing (merge.go, plugin_provider.go)
  • Calendar movie events now use the earlier of the two home-release dates instead of release_date, and carry a digital or physical badge (calendar_repo.go)
  • Home-release dates follow existing release-date field locking; rematches replace both dates even when empty, unlocked refreshes only replace on non-empty values
  • The web UI labels and colors the new badges, and the v2 API schema documents them
  • Behavioral Change: v1 calendar and recommendation responses strip the digital and physical badges via v1CalendarBadges in calendar.go

Macroscope summarized f030bfe.

@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Oct 29, 2026
@silo-kody

silo-kody Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 29, 2026

Copy link
Copy Markdown

The PR changes visible movie calendar dates and release badges, but Evidence: (publishing) provides neither a reviewable URL nor attached captures, so the described comparison cannot be checked.

  • internal/catalog/calendar_repo.go: Movies move from theatrical dates to their first home-release dates, or leave the calendar if neither date is available. Provide same-week, same-data before-and-after calendar captures for desktop and mobile web.
  • internal/api/handlers/calendar.go, internal/api/handlers/recommendations.go, and web/src/lib/upcomingEventPresentation.ts: Calendar and For You upcoming events gain DIGITAL/PHYSICAL badges. Provide before-and-after captures showing the badges on both surfaces for desktop and mobile web.

Suggested fix: No diff — publish the captures and replace (publishing) with the evidence URL.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

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.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
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: 14be4dfc-99c0-4b4f-af93-2403f3124ae2
Commits

Reviewing files that changed from the base of the PR and between d69ba0c and 87db4cc.

Files selected for processing: 8
  • docs/catalog-api.md
  • internal/api/handlers/recommendations.go
  • internal/metadata/identify_reanchor_db_test.go
  • internal/metadata/identify_rematch_test.go
  • internal/metadata/merge.go
  • internal/metadata/service.go
  • internal/metadata/types.go
  • scripts/ci/db-contracts.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Movie digital and physical home-release dates are parsed from provider metadata, merged, and stored on media items. Movie calendar events use the earlier home-release date and identify its type. API responses filter badges for v1, and API documentation and web presentation include the new movie badges.

Changes: Movie Home-Release Calendar

Layer / File(s) Summary
Capture and persist home-release dates
migrations/sql/20261029101739_add_movie_home_release_dates.sql, internal/models/media.go, internal/metadata/*, internal/catalog/item_repo.go, internal/catalog/episode_catalog_source.go
Plugin metadata supplies validated movie home-release dates. Metadata merges honor the release-date lock, and item persistence carries the dates. The migration adds nullable date columns and a movie index.
Select movie calendar dates
internal/catalog/calendar_repo.go, internal/catalog/calendar_repo_test.go, scripts/ci/db-contracts.txt
Movie calendar results use the earlier home-release date and identify its type. Tied dates are labeled digital. Movies without a qualifying home-release date are omitted.
Expose and present home-release badges
internal/api/handlers/calendar.go, internal/api/handlers/calendar_test.go, internal/api/handlers/recommendations.go, internal/apiv2/*, contracts/api/v2/openapi.json, web/src/api/v2/schema.ts, web/src/lib/upcomingEventPresentation.ts, docs/catalog-api.md
Calendar events add digital or physical badges. The v1 calendar and recommendation response filter these badges. API descriptions and web presentation include the movie badge values and labels.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PluginProvider
  participant MetadataService
  participant ItemRepository
  participant media_items
  participant HandleGetCalendar
  participant CalendarRepository
  PluginProvider->>MetadataService: Provide validated home-release dates
  MetadataService->>ItemRepository: Persist merged release dates
  ItemRepository->>media_items: Write digital and physical dates
  HandleGetCalendar->>CalendarRepository: Load calendar events
  CalendarRepository->>media_items: Query earlier home-release date
  media_items-->>CalendarRepository: Return release dates
  CalendarRepository-->>HandleGetCalendar: Return event date and HomeRelease
Loading

Possibly related issues

  • Issue 1209: The PR adds release-date lock and Identify behavior for digital and physical release dates.
  • Issue 1211: The PR adds persistence and lock handling for home-release dates during Identify rematches.
  • Issue 1210: The PR updates server-side Identify and refresh handling for home-release dates.
  • Issue 1145: The PR changes upcoming event data in the recommendation response, but does not change recommendation generation.
  • Issue 1146: The PR changes upcoming event data and release badges rendered in the For You row.
  • Issue 1139: The PR changes the upcoming event shown in For You output, but leaves recommendation selection unchanged.

Possibly related PRs

Suggested labels: javascript, api-v2, impact: usability

Suggested reviewers: quick104

Merge Risk: Low · previous review 87db4

Correcting a movie match can leave an incorrect calendar date. This narrow issue warrants follow-up.

Security architecture risk: Low · up to 87db4

The change affects shared scheduling data, but the reviewed calendar paths preserve existing library and maturity restrictions. No introduced security vulnerability was established. Database migration ordering and compatibility with the metadata provider remain deployment considerations.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — An accepted provider date affects the shared catalog movie and can change its schedule for every calendar or recommendation consumer permitted to see it. The affected data is not viewer-specific, but the inspected consumers continue to supply library and maturity restrictions.

Trust Boundaries and Controls

  • observed — Plugin-controlled values cross into persisted calendar metadata only for movies and only when they are strings parsing as real YYYY-MM-DD dates. Malformed values and values for other content types are discarded.
  • observed — The movie query retains its library, maturity, and selected-item predicates when changing the date expression. Empty allowed-library or restricted-item scopes fail closed, and requested library IDs are checked against the allowed and disabled library scope.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 69.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: listing movies on their earliest digital or physical home-release date.
Description check Passed The description directly explains the calendar behavior change, data model updates, API effects, validation, risks, and follow-up work. It is fully related to the changeset.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 69.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 23 functions across 19 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added enhancement New feature or request go Pull requests that update go code priority: P2 Limited scope, workaround exists, or polish labels Oct 29, 2026
@coderabbitai coderabbitai Bot added api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code labels Oct 29, 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: 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: ca13c635-39d0-4ff4-acfe-030d234db28e
Commits

Reviewing files that changed from the base of the PR and between cc85149 and 32e97ea.

Files selected for processing: 22
  • contracts/api/v2/openapi.json
  • docs/catalog-api.md
  • internal/api/handlers/calendar.go
  • internal/api/handlers/calendar_test.go
  • internal/api/handlers/recommendations.go
  • internal/apiv2/catalog_types.go
  • internal/apiv2/home.go
  • internal/catalog/calendar_repo.go
  • internal/catalog/calendar_repo_test.go
  • internal/catalog/episode_catalog_source.go
  • internal/catalog/item_repo.go
  • internal/metadata/merge.go
  • internal/metadata/nfo_merge_semantics_test.go
  • internal/metadata/plugin_provider.go
  • internal/metadata/plugin_provider_test.go
  • internal/metadata/service.go
  • internal/metadata/types.go
  • internal/models/media.go
  • migrations/sql/20261029101739_add_movie_home_release_dates.sql
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/schema.ts
  • web/src/lib/upcomingEventPresentation.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread internal/metadata/service.go Resolved
@macroscopeapp

macroscopeapp Bot commented Oct 29, 2026

Copy link
Copy Markdown

Major validation impact: the shared movie-calendar query switches from theatrical release_date to the earlier home-release date, so fixture movies move between weeks or disappear. This affects silo-server#1135 S1/S2 and C1/C2 in silo-server#1136, silo-apple#303, silo-apple#304, silo-android#313, and silo-android#314; the accepted cross-client check silo-server#1134 X1 is also affected. The PR must explain why this validated behavior changes—the current body does—and these cases need re-validation after merge. The Validation tasks: line omits the affected C2 cases.

Suggested fix — no diff: Replace the line with:

Validation tasks: changes #1135 S1, S2; changes #1136 C1, C2; changes Silo-Server/silo-apple#303 C1, C2; changes Silo-Server/silo-apple#304 C1, C2; changes Silo-Server/silo-android#313 C1, C2; changes Silo-Server/silo-android#314 C1, C2

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

…mary

A movie appeared on the calendar only on its primary release date, usually
the theatrical one, so a title that reaches streaming first showed up weeks
late. Store each movie's earliest digital release across all countries,
supplied by metadata plugins as the digital_release_date metadata key, and
list the movie once on the earlier of the two dates. When the digital date
wins, the event carries a "digital" badge, which the web calendar renders.
Address review: v1 lists movies on the same dates but keeps its original
badge set. Test the badge through the shared Calendar service, drop a
field-copy test, trim duplicate bad-input rows, and document that the For You
upcoming titles follow the same date.
A theatrical release can never reach a media server, so listing a movie on
its primary (usually theatrical) date tells a Silo user nothing they can act
on. Store the earliest physical (disc) release beside the digital one and list
each movie on the earlier of the two, with a digital or physical badge. A movie
with no home release date yet is not listed.
…sed dates

Address review: the For You discover row reuses calendar badges, so the frozen
/api/v1/recommendations/discover now strips them too, and the v2 upcoming-event
badges document the new values. A scheduled refresh fills only empty fields,
which kept a stored home release date after the provider revised it; a stored
movie now takes the provider chain's current dates unless release dates are
locked.
@Quick104
Quick104 force-pushed the feat/calendar-digital-releases branch from 32e97ea to 4d67961 Compare November 2, 2026 03:15
@silo-kody

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Nov 2, 2026

Copy link
Copy Markdown

The Evidence section describes the desktop/mobile web calendar comparison, but not these other visible effects:

  • internal/api/handlers/recommendations.go and web/src/lib/upcomingEventPresentation.ts: The For You row's upcoming movie dates and DIGITAL/PHYSICAL badges change. Add before-and-after desktop and phone-width web captures of the same row and data to the evidence page.
  • internal/catalog/calendar_repo.go and internal/api/handlers/calendar.go: Apple and Android calendar screens show movies on the new home-release dates. Add before-and-after captures of the same calendar week and data in each app to the evidence page.

Suggested fix: No diff — add these comparisons to the linked evidence page and mention these surfaces in the Evidence section.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

A refresh keeps a home release date the provider stops sending, but
Identify rematches the item to a different movie. When the new match has
no digital or physical release yet, the old match's dates stayed and kept
the item on the calendar. An unlocked rematch now takes the new match's
dates even when they are empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@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


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: 1c267d1e-dd21-47dd-b917-d007ac5762c7
Commits

Reviewing files that changed from the base of the PR and between 32e97ea and 4d67961.

Files selected for processing: 8
  • contracts/api/v2/openapi.json
  • docs/catalog-api.md
  • internal/apiv2/catalog_types.go
  • internal/catalog/item_repo.go
  • internal/metadata/service.go
  • internal/models/media.go
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/schema.ts
Files skipped from review as they are similar to previous changes: 2
  • internal/apiv2/catalog_types.go
  • web/src/api/v2/schema.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread internal/catalog/item_repo.go Resolved

@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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

Major · Queue existing movies before enabling the new… · 20261029101739_add_movie_home_release_dates.sql:10-11

migrations/sql/20261029101739_add_movie_home_release_dates.sql:10-11
Major · Data Integrity & Integration · Heavy lift

Queue existing movies before enabling the new calendar predicate.

The migration adds both date columns as NULL without backfilling them. The calendar now filters with LEAST(...) BETWEEN ..., so every pre-existing movie is initially excluded. The six-hour refresh task only processes due metadata-debt rows, and complete existing movies may have no such row. The full-library refresh is manual-only and can take hours.

Add a one-time upgrade backfill that queues existing enabled movies for metadata refresh before applying this calendar behavior.

Major · Ship the TMDB provider mapping with this calendar change. · plugin_provider.go:324-325

internal/metadata/plugin_provider.go:324-325
Major · Data Integrity & Integration · Heavy lift

Ship the TMDB provider mapping with this calendar change.

TMDB v1.2.28 requests release_dates, but its movie mapping emits only ReleaseDate. Its metadata serializer emits only keywords, so it does not construct either digital_release_date or physical_release_date. New TMDB matches therefore have no home-release dates and cannot satisfy the calendar’s LEAST(...) BETWEEN ... filter.

A refresh cannot populate missing dates because empty provider values are ignored. Existing dates remain preserved, but movies without dates remain absent.

Release, catalogue, and roll out a TMDB provider version that emits the exact keys before relying on this server change. Existing installations require an automatic or equivalent provider update.

Nitpick comments: 1
internal/metadata/nfo_merge_semantics_test.go: 1

106-130: Trivial · Functional Correctness · Quick win

Add a service-level test for the unlocked Identify rematch that clears home-release dates.

TestMerge_ReleaseDatesLockBlocksReplace calls refreshHomeReleaseDates(&rematched, undated, nil, true) directly. No test in the inspected repository drives the service path that passes the Identify flag. The production call at internal/metadata/service.go:2937 passes req.Mode == ModeIdentify. If that call were removed, or the flag were passed incorrectly, stored home-release dates would persist after a rematch. The inspected tests would not fail.

Add a test that runs the service merge with ModeIdentify on a stored movie that has digital and physical dates. Assert that the persisted item has both dates cleared. Model the setup on existing ModeIdentify tests, such as internal/metadata/identify_rematch_test.go.


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: 36fe1c5c-862e-4e2f-a0b4-641964f77551
Commits

Reviewing files that changed from the base of the PR and between 4d67961 and 9950912.

Files selected for processing: 4
  • docs/catalog-api.md
  • internal/metadata/merge.go
  • internal/metadata/nfo_merge_semantics_test.go
  • internal/metadata/service.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Comment thread internal/metadata/service.go Resolved
A bulk enrichment write merges one enrichment provider's answer with
fill-empty rules, but the home release refresh let that provider replace
the dates the provider chain set, moving the calendar day and badge.
Enrichment writes now only fill empty dates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added size/XL 500–999 added + deleted lines (all files); change volume, not priority. and removed size/L 200–499 added + deleted lines (all files); change volume, not priority. labels Nov 2, 2026
@silo-kody

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Scope the replacement claim to non-enrichment refreshes. · catalog-api.md:999-1008

docs/catalog-api.md:999-1008
Minor · Functional Correctness · Quick win

Scope the replacement claim to non-enrichment refreshes.

The reachable persistEnrichment path calls mergeAndPersist with ModeScheduledRefresh and enrichmentOnly: true. That path uses fill-empty semantics and skips refreshHomeReleaseDates, so a nonempty stored date remains unchanged when enrichment supplies a different date. The current sentence tells API users that every scheduled refresh replaces the date.

Suggested fix
-Every refresh, scheduled ones included, replaces a stored date with the one the provider sends now,
-because providers revise them.
+Every refresh that is not enrichment-only, including scheduled refreshes, replaces an unlocked
+stored date with the one the provider sends now, because providers revise them. Enrichment-only
+scheduled refreshes fill empty dates and preserve nonempty dates.

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: fef78683-5506-434b-80a2-1e76205c5d61
Commits

Reviewing files that changed from the base of the PR and between 9950912 and d69ba0c.

Files selected for processing: 1
  • internal/metadata/service.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Comment thread internal/metadata/service.go Resolved
Identify also confirms or extends an item's existing match, and those
writes cleared its home release dates whenever the provider sent none.
Clear them only when identityChoiceCorrects finds a correction, which
also covers a manual refresh whose NFO names a different movie.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment thread internal/metadata/service.go Resolved
Quick104 and others added 2 commits November 2, 2026 15:22
# Conflicts:
#	internal/api/handlers/recommendations.go
#	scripts/ci/db-contracts.txt
A correction that re-anchors or rebinds onto an item already matched to
the chosen movie writes that item, whose home release dates are its own.
Recheck the correction against the item being written, so only an item
that still stores the wrong match's identity loses its dates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment thread internal/metadata/service.go Resolved
…ase dates

The correction check read the stored identity after a correction's
rejected IDs were removed, so an item whose wrong match was stored only
in durable provider-ID rows looked unmatched and kept that match's home
release dates. Read it after stale IDs leave and before rejected ones do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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 settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 merged commit 90f88f2 into Silo-Server:main Nov 3, 2026
24 checks passed
Quick104 pushed a commit to Silo-Server/silo-android that referenced this pull request Nov 4, 2026
)

* feat(calendar): show DIGITAL and PHYSICAL badges on movie releases

Silo-Server/silo-server#3240 lists calendar movies on their first home
release and tags each with a digital or physical badge. Label both in
the phone and TV calendars through one shared badge-label function.

Closes #720

* ci: re-run after an unrelated flaky TV unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request go Pull requests that update go code impact: usability Core flow broken or severely blocked javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants