Skip to content

test(jellycompat): call mediaSourceDTO with its current arguments - #3552

Merged
Quick104 merged 1 commit into
mainfrom
fix/jellycompat-contract-test-args
Nov 5, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/jellycompat-contract-test-args

Conversation

@Quick104

@Quick104 Quick104 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

main doesn't compile the jellycompat tests. The Android TV playback test added in #3522 calls
mediaSourceDTO with a token argument, but #2924 removed that parameter, so go vet and
go test fail for internal/jellycompat. CI tests each pull request merged with main, so the Go
jobs fail on every open pull request until this is fixed.

This drops the extra argument.

Approach

One line in internal/jellycompat/playback_contract_test.go: the call now passes the route item
ID, the play session ID and the source, matching the current signature. No production code changes.

Validation

  • go vet ./... on the whole tree: clean.
  • go test ./internal/jellycompat/: pass.

Evidence

Evidence: none, no user-visible change

Risks

None identified.

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, run from T3 Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a (a one-line test fix with no behavior change)

🤖 Generated with Claude Code

Note

Update mediaSourceDTO test call to current arguments in playback_contract_test.go

The TestJellyfinAndroidTVRetriesCopyVideo test in playback_contract_test.go now calls mediaSourceDTO with only the item and source inputs, dropping the play and token arguments. Assertions for direct-stream URL, transcoding URL, and default audio stream index stay the same.

Macroscope summarized a4e11f4.

The Android TV playback test added in #3522 passes a token to
mediaSourceDTO, but #2924 removed that parameter, so the jellycompat
tests no longer compile on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 9138e635-6d19-461d-bbc2-9142872ed076
Commits

Reviewing files that changed from the base of the PR and between cb4f45d and a4e11f4.

Files selected for processing: 1

  • internal/jellycompat/playback_contract_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 5, 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 ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T16:42:23.278731Z a4e11f4 PR opened
🔒 Security Review ✅ Completed 2026-11-05T16:44:04.537643Z a4e11f4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-triage silo-triage Bot added bug Something isn't working go Pull requests that update go code priority: P2 Limited scope, workaround exists, or polish labels Nov 5, 2026
@Quick104
Quick104 merged commit c44b895 into main Nov 5, 2026
22 checks passed
@Quick104
Quick104 deleted the fix/jellycompat-contract-test-args branch November 5, 2026 20:17
Quick104 added a commit that referenced this pull request Nov 5, 2026
Brings in the jellycompat test compile fix from #3552 so the Go jobs
build again. The merge applied cleanly with no conflicts; regenerating
the OpenAPI document, route inventory, fixtures, and web types produced
no changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104 added a commit that referenced this pull request Nov 5, 2026
Merges main through c44b895, which brings the jellycompat playback
contract test fix (#3552). The merge had no conflicts; the SDK pin stays
at v0.32.2-0.20261105162846-0a3e9dc07ed0, and the regenerated API v2
spec, fixtures, web types, and route inventory match the merged tree.

Empties contracts/api/v2/breaking-approvals.json. Its two
listAdminBackups approvals from #3402 match no change once this
branch's spec differs from main's, so the contract check rejected them
as stale. This branch adds only optional default_schedule fields and
needs no approval of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104 added a commit that referenced this pull request Nov 5, 2026
Brings in main's fix for internal/jellycompat/playback_contract_test.go
(#3552), which kept every Go CI job from compiling.

No conflicts. scripts/ci/db-contracts.txt merged automatically with both
sides' entries; go.mod keeps the plugin SDK pin
v0.32.2-0.20261105162846-0a3e9dc07ed0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104 added a commit that referenced this pull request Nov 6, 2026
…imit (#3562)

* feat(access): let a household allow titles above a profile's rating limit

The household's primary profile can allow a limited profile specific
movies and series above its content-rating or advisory-age limit, one
by one or through a manual personal collection it created (titles added
later are allowed too). Other collections, smart ones included, can be
copied as individual allowances. A series allowance covers its seasons
and episodes. Library restrictions, a custom scope policy's rating
override and a stricter Jellyfin MaxOfficialRating still win.

Enforcement extends the shared maturity predicate to "within limits OR
allowed": the allowed IDs load with the profile row and travel in
access.MaturityLimits, so catalog reads, cache keys, cursors and the
Jellyfin surface pick them up. Allowances have their own Postgres store,
follow title merges, are audited as profile.updated, and are covered by
the backup authority check and table classification.

Adds nine /api/v2 operations behind a capability, the web title-page
"Allow for…" dialog, the profile editor's allowed titles and
collections, and the collection "Allow for…" action. Clears the merged
#3402 breaking-change approvals and carries the one-line jellycompat
test fix from #3552 so the package compiles.

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

* fix(access): close review gaps in title allowances

- Jellyfin Latest and episode browsing now drop allowances when a
  client's MaxOfficialRating narrows the ceiling, like item browsing.
- Copying a collection copies only titles the household manager may
  see, for stored and smart collections alike.
- A live-allowed collection allows only the movies and series it holds.
- A failed search refresh in the profile editor keeps its results and
  offers a retry.

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

* fix(access): recheck the manager's PIN inside allowance writes

Allowance writes are authorized before their transaction, so a PIN
change in between left revoked proof able to finish a pending write.
Each write now locks the acting primary profile and refuses with the
household 403 when its PIN revision changed, as profile writes do.

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

* fix(access): lock the account before the manager profile in allowance writes

Allowance writes locked the acting profile and then updated the users
row, the reverse of account deletion and audited profile writes, so
they could deadlock with either. They now take the audit actor locks
and the account row first.

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

* fix(backup): read title allowances only from schemas that have them

A full restore reads account authority from the backup's own schema
before it migrates. A backup older than title allowances has neither
table, so the read failed and the restore fell back to dropping every
carried credential. Such a backup's profiles now read as allowing
nothing above their limits.

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

* fix(migrations): give title allowances the content ID family's collation and cascade

profile_title_allowances.content_id references media_items, so it takes
COLLATE "C" and ON UPDATE CASCADE like every other content ID reference,
keeping the online re-id working with allowance rows present.

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

* fix(access): cap a collection copy at 10,000 titles

A smart collection with no item limit falls back to the catalog's
10,000,000-item default, so copying it read the whole matching catalog
into one request. A copy now allows at most 10,000 titles, the most a
synced list holds, for smart and stored collections alike.

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

* fix(web): show a retry when a profile's allowed titles fail to load

A failed load of the allowed titles read as "No titles allowed yet" and
let the search offer titles already allowed; a failed load of the
allowed collections hid them. Both now say the list could not load and
offer a retry, and keep showing data a refresh could not update.

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

* fix(access): let repeated collection copies reach every title

A stored collection's copy took its first 10,000 entries before
filtering, so entries that are not movies or series used up the
budget, and a repeated copy re-read the same entries. The copy now
reads only movies and series the profile is not yet allowed, so the
cap counts real candidates and a second copy continues with the rest.

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

* fix(access): page a collection copy past titles the manager cannot see

Titles the household manager cannot see are never allowed, so they
stayed among a stored collection's first candidates on every copy and
a repeated copy could not reach the titles after them. The copy now
reads candidates a page at a time until it has 10,000 visible titles
or has scanned 100,000 entries.

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

* fix(web): say when a profile's allowed lists could not refresh

A failed refresh kept the cached allowed titles and collections without
saying so. Both now keep showing what they have under a "may be out of
date" notice with a retry.

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

* docs(api): state the 100,000-entry scan limit of a collection copy

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

* perf(access): page collection copies by position, not offset

Offset paging re-read every skipped entry on each page, so a copy
past many hidden titles grew quadratically. Pages now continue after
the last (position, media item) read, on the collection's existing
continuation index.

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

* fix(apiv2): declare collection title copies non-retryable

A repeated copy of a stored collection longer than one copy's cap
continues with the next titles, so a retry after a lost response does
not converge. allowCollectionTitles now declares non_retryable and says
to read the allowed titles before copying again.

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

* fix(access): bound the titles one profile may be allowed

The allowed list is read with every request a profile makes, and a
live collection had no size bound. A profile may now be allowed at most
10,000 titles: allowing past that answers 422 too_many_allowed_titles,
a copy stops at it, and the read takes at most 10,000, so a live
collection grown past the bound hides the rest instead of slowing
every request.

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

* fix(access): check copies against the target's libraries; compare live collections on restore

- A collection copy keeps only titles in libraries the target profile
  can reach, as a single allowance does, so a later library change
  cannot switch on an allowance nobody granted.
- A full restore's authority check compares the profile's live-allowed
  collections themselves, so a restored allowance on a collection that
  is empty today cannot grant whatever is added to it later.

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

* fix(access): bound the allowed-title read, not allowance writes

The write-time cap was imprecise (a collection's stale item count,
titles counted twice), racy, and broke idempotent retries at the
limit, while the read still deduplicated every live collection member
before its LIMIT. The read is now a UNION ALL with a LIMIT and no
ORDER BY, so PostgreSQL stops at 10,000 rows; Go sorts and
deduplicates them. Writes are no longer capped: a profile allowed more
than the bound sees 10,000 and the rest stay hidden.

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

* fix(backup): compare every direct title allowance on restore

The restore authority check compared the resolved allowed titles, which
stop at 10,000, so a restored direct allowance past that window was
invisible to it yet could become effective once others were removed.
It now also compares the profile's own allowance rows, uncapped.

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

* fix(access): apply the target's libraries while a copy pages

A copy filtered titles the target profile cannot reach only after
filling its 10,000-title batch, so such titles at the start of a
collection could take the whole batch and stay ahead of every repeat.
The actor's access and the target's library scope now form one filter
that both the stored paging and the smart query apply before counting.

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

* fix(access): keep up to 10,000 distinct allowed titles

The read's row LIMIT counted duplicates before they were removed, so
titles held both directly and through a collection could hide others
below the bound. The collection branch now leaves out titles the
profile is allowed directly, the read takes up to 20,000 rows, and the
profile keeps at most 10,000 distinct titles. Docs say which titles a
profile past the bound sees is unspecified.

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

* fix(access): check actor and target access separately in collection copies

A title can sit in several libraries. Intersecting the actor's and target's
library lists into one filter dropped a title the actor sees through one
library and the target reaches through another. Each title now passes the
actor's check and the target's check on its own.

A smart collection's membership is now its query under the actor's access
and item limit; the target check filters those members afterwards, so it
no longer pulls in titles outside the collection.

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

* fix(access): bound the allowed-title read by distinct titles

Titles held by several live collections each took a row of the read's
LIMIT before deduplication, so overlapping collections could use up the
bound and hide titles that were allowed, even with fewer than 10,000
distinct allowed titles. The collection branch now leaves out a title an
earlier live collection holds and reads only whole-title entries, so every
title comes back once and the LIMIT is exactly MaxAllowedTitles.

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

* docs(access): say the allowed-title bound caps returned rows, not scanned ones

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

* fix(access): pass episodes through their series' allowance on the episode relation

The episode relation exposes an episode's own ID as content_id and its
series' rating, so keying the allowance on content_id compared episode IDs
with title IDs and hid an allowed series' episodes. Mixed search hydration
(Meilisearch results, watch-together member state), episode-scope queries
on that relation (episode-scope search) and episode-scope browse facets now
key it on episode_series_id, as the episode_catalog_entries reads already
key on series_id.

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

* fix(access): rebuild a profile's recommendations when its allowances change

Cached recommendation rows are built under a profile's scope and only
filtered when read, so they could not gain a newly allowed title until the
daily job. Allowing or removing a title or collection, and copying a
collection, now tell the recommendations worker to rebuild the target
profile when the write changed a row, as a change to its limits does.

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

* fix(access): limit collection copies to what the owner can access

Every read of another profile's shared collection limits it to what its
owner can access, but a copy filtered members by the acting profile's
access alone, so a member hidden from its owner could become an allowance.
A copy now reads the collection the way the actor sees it, through
catalog.PersonalCollectionFilter, for both stored and smart collections.

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

* perf(access): intersect shared-collection allowances with a set

Reading another profile's collection when both profiles have allowances
compared every viewer allowance with every owner allowance, up to 10^8
comparisons at the 10,000-title bound. A set of the owner's allowances
makes it linear.

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

* fix(access): page the allowed-title listing

Repeated collection copies can give a profile any number of direct
allowances, and listAllowedTitles read and rendered all of them in one
response. It now pages by keyset (created_at, content_id), newest first,
with the standard limit and cursor, over a matching index; the cursor is
bound to the account, both profiles and the viewer policy. A title's
per-profile standing checks its one allowance instead of listing every
allowance of each profile. The profile editor loads the list a page at a
time with "Show more".

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

* fix(web): start the allowed-title list over after a change; keep its empty state honest

An allowance change invalidated the paged list, which refetches every
loaded page in turn; it now resets that profile's list to its first page
and refreshes the other allowance queries. Cards the acting profile can't
see are dropped from each page, so an empty page shows "No titles allowed
yet" only when no page follows.

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

* fix(access): bound the live-collection entries a profile read scans

The read deduplicated live-collection titles before its LIMIT, so heavily
overlapping collections made every request of the profile scan their whole
membership. It now reads at most 50,000 whole-title entries of the live
collections (five times the 10,000-title bound) and deduplicates within
them, so overlap up to five times over still yields every distinct title,
and past that the rest stay hidden rather than costing every request more.

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

* fix(backup): compare every allowed collection's members on restore

The restore authority check compared a profile's resolved allowed titles,
which the bounded allowance read caps, so a restored live collection could
carry members past the bound that later become effective unchecked. It now
also compares every member of the profile's allowed collections, uncapped,
as it already compares every direct allowance; the comparisons use a set
rather than a search per ID.

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

* fix(access): carry allowed titles in ProfileMaturity

Account restore's preview and apply filter a profile's items with
access.ProfileMaturity, which left out the profile's allowances that
Resolve added separately, so restoring into a limited profile skipped the
history, progress and other data of titles it is allowed. ProfileMaturity
now carries them, and Resolve takes them from it.

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant