A film's crew is ordered differently than upstream orders it, and the check was relaxed around it #156
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A film's crew comes out of this server in a different order than upstream's,
and the assertion that would have caught it was relaxed to land batch E.
crates/jellyfin-app/tests/scan_enriched.rs(crewed) andcrates/jellyfin-app/tests/tmdb.rspreviously compared the people listposition by position, including
ListOrder. They now sort the crew and dropListOrder, with the comment stating the fact plainly: the answer the passreplays lists a film's producer before its director, and the row has them the
other way round.
ListOrderis upstream's ordering key for the People list(
upstream/Jellyfin.Server.Implementations/Item/PeopleRepository.cs:43,294), sothis is what a client shows under a film, in the order it shows it. The cast
half is still compared exactly, so the divergence is confined to permutations
within the crew's own slots — but it is a divergence from upstream, not a test
artifact, and the suite can no longer catch a regression in it.
This was filed rather than fixed because it wants the ordering question
answered rather than the assertion re-tightened: what decides a crew member's
ListOrderupstream, and whethercrate::scan::people::add's filing order iswhat disagrees.
How to know it is done
The two assertions compare the crew position by position again,
ListOrderincluded, against the answer key — and fail if the order is perturbed.
House rules
CLAUDE.mdis the short version and these are the parts that bite: tests rununder
cargo nextest; upstream's source is the checkout inupstream/at thepin (
v12.0-rc5,6d501ba4) and not the clone beside the repository;generated files are regenerated rather than edited; a comment says what the code
does, not how it got there; and
Dnreferences stay out of code and comments.A test that cannot fail is not a check — this issue exists because one stopped
being able to.
Closed by
898f22b, but not the way the issue asked — the assertion could not be re-tightened, because a crew's order is not a fact the two halves of the pair can agree on.What decides a crew member's
ListOrderupstream: its position in the list handed toPeopleRepository.UpdatePeople, which numbersdistinctCredits0 upward (PeopleRepository.cs:167-195). That list is the provider's append order:TmdbMovieProvideradds the cast sorted byorder, then walkscredits.crewin array order, keeping the(department, job)pairsTmdbUtils.WantedCrewKindsand_writerJobsname. Nothing between the provider and the row reorders it —PeopleHelper.AddPersonappends,MergePeopleonly fills fields, andMergeDataassigns the list whole.scan::people::addis not what disagrees. The port does the same thing, and its output for Alien is the recorded answer's array order, entry for entry.What disagrees is TMDb. Its
credits.crewarray carries no stated ranking and comes back ordered differently between two answers about one film —348inde-DEandfr-FRputs Walter Hill first whereen-USputs Ridley Scott. Upstream's fetch and the corpus recording are two separate calls, so the two halves can be handed two orders. Measured twice: the committed pair (snapshot of 2026-08-16) has Ridley Scott atListOrder9 and Gordon Carroll at 10 while its recording lists Carroll first; a pair provisioned and cut fresh today has them the other way round, again inverted against its own recording. Re-cutting both halves together does not settle it.What landed instead:
SortOrderincluded — it carriesorder, the provider sorts on it, and both halves agree about it;the_crew_is_filed_in_the_order_the_answer_listed_itincrates/ephyra-app/tests/tmdb.rs, holds the port to the order of the answer it replays — the one place the order is a fact. Verified to fail on a perturbed filing order;crates/ephyra-app/corpus/README.mdgains the note, beside its sibling about the two JPEG encodingsimage.tmdb.orgserves.