Origin: Surfaced by the live probing done for issue #437 (delivered as PR #486). Deliberately deferred — it is a distinct defect from the media-type modelling that PR was scoped to, and its fix is undecided. PR #486 records the measurement in knowledge/tmdb-api-notes.md.
Problem
/person/{id}/tagged_images ignores the page query parameter. The library sends it — Sources/TMDb/Domain/Adapters/Person/PersonTaggedImagesRequest.swift builds page as a query item, and TMDbPersonService.taggedImages(forPerson:page:) exposes it — but TMDb returns the same rows regardless, so the parameter is inert.
As of main @ d455d45 (behaviour is server-side, so no library line is wrong; the issue is that the public API advertises pagination the endpoint does not honour).
Failure scenario
Measured 2026-08-20 against person 17419, 24 requests / 378 rows:
?page=1, ?page=2 and ?page=3 return identical result ids.
- The response's own
page field is 0 on every request — not 1, and not the requested value.
- It reports
total_pages: 2 and total_results: 35 while only ever serving one page's worth of rows.
Two concrete consequences:
allTaggedImages(forPerson:) yields duplicates. PagedAsyncSequence advances page and requests the next one; the API serves the same rows again. A caller iterating the sequence sees each image repeated once per page walked, and the sequence terminates only because total_pages is finite — not because the data was exhausted.
taggedImages(forPerson:page:) silently ignores its own argument. A caller passing page: 2 gets page 1's contents with no error and no indication.
The captured fixture Tests/TMDbTests/Resources/json/tagged-image-pageable-list.json preserves the "page": 0 quirk verbatim, and TaggedImagePageableListTests.swift asserts it with a comment, so the evidence is pinned in-repo.
Fix sketch
The library cannot make the endpoint paginate; the question is what to do about advertising it.
Options, roughly in increasing cost:
- Document it. Add a DocC note on
taggedImages(forPerson:page:) and allTaggedImages(forPerson:) stating that TMDb ignores page here, so the sequence may repeat rows. Cheapest, non-breaking, and honest.
- Deprecate the
page parameter on this one method, since it cannot do anything.
- De-duplicate in
allTaggedImages by tracking seen image ids and stopping when a page adds nothing new. This changes PagedAsyncSequence behaviour for one endpoint and needs care — see knowledge/gotchas.md → An all-dropped page doesn't shorten the sequence — it ends it, which is the neighbouring hazard.
- Report it upstream to TMDb as an API bug, and do (1) meanwhile.
Worth confirming first whether other PageableListResult endpoints share the quirk, or whether tagged-images is unique — a one-endpoint fix and a library-wide one are different changes. Nothing else was measured this way.
Decision needed: whether to document, deprecate, or de-duplicate. All three are defensible and they are not mutually exclusive.
Breaking class: none for option 1; source-breaking for option 2; behavioural for option 3.
Origin: Surfaced by the live probing done for issue #437 (delivered as PR #486). Deliberately deferred — it is a distinct defect from the media-type modelling that PR was scoped to, and its fix is undecided. PR #486 records the measurement in
knowledge/tmdb-api-notes.md.Problem
/person/{id}/tagged_imagesignores thepagequery parameter. The library sends it —Sources/TMDb/Domain/Adapters/Person/PersonTaggedImagesRequest.swiftbuildspageas a query item, andTMDbPersonService.taggedImages(forPerson:page:)exposes it — but TMDb returns the same rows regardless, so the parameter is inert.As of
main@ d455d45 (behaviour is server-side, so no library line is wrong; the issue is that the public API advertises pagination the endpoint does not honour).Failure scenario
Measured 2026-08-20 against person 17419, 24 requests / 378 rows:
?page=1,?page=2and?page=3return identical result ids.pagefield is0on every request — not1, and not the requested value.total_pages: 2andtotal_results: 35while only ever serving one page's worth of rows.Two concrete consequences:
allTaggedImages(forPerson:)yields duplicates.PagedAsyncSequenceadvancespageand requests the next one; the API serves the same rows again. A caller iterating the sequence sees each image repeated once per page walked, and the sequence terminates only becausetotal_pagesis finite — not because the data was exhausted.taggedImages(forPerson:page:)silently ignores its own argument. A caller passingpage: 2gets page 1's contents with no error and no indication.The captured fixture
Tests/TMDbTests/Resources/json/tagged-image-pageable-list.jsonpreserves the"page": 0quirk verbatim, andTaggedImagePageableListTests.swiftasserts it with a comment, so the evidence is pinned in-repo.Fix sketch
The library cannot make the endpoint paginate; the question is what to do about advertising it.
Options, roughly in increasing cost:
taggedImages(forPerson:page:)andallTaggedImages(forPerson:)stating that TMDb ignorespagehere, so the sequence may repeat rows. Cheapest, non-breaking, and honest.pageparameter on this one method, since it cannot do anything.allTaggedImagesby tracking seen image ids and stopping when a page adds nothing new. This changesPagedAsyncSequencebehaviour for one endpoint and needs care — seeknowledge/gotchas.md→ An all-dropped page doesn't shorten the sequence — it ends it, which is the neighbouring hazard.Worth confirming first whether other
PageableListResultendpoints share the quirk, or whether tagged-images is unique — a one-endpoint fix and a library-wide one are different changes. Nothing else was measured this way.Decision needed: whether to document, deprecate, or de-duplicate. All three are defensible and they are not mutually exclusive.
Breaking class: none for option 1; source-breaking for option 2; behavioural for option 3.