M3: Fix identity projection (discover → media → request) #21

Merged
gronod merged 2 commits from m3-identity-projection into develop 2026-09-19 09:39:20 +01:00
Owner

Fixes missing, duplicated, and mislabelled identifiers so follow-up tools (read_media, write_request_create, read_requests get) can be called from discover/search/recent results.

Closes #6, #2, #9, #11 (milestone M3 — Identity projection).

Changes

  • #6 read_media details: unique identifiers; movie tmdb falls back to id when theMovieDbId is absent; belongsToCollection.id is not treated as the movie; v2 seriesId is no longer labelled tvmaze (that field only means TVMaze on v1 TVMaze-backed routes).
  • #2 read_discover browse/collection members: when theMovieDbId is missing, id is labelled with the origin namespace (tmdb on v2) so items are usable for details/request.
  • #9 read_search multi: mediaType is matched case-insensitively (Artist → artist + musicbrainz).
  • #11 read_requests recent: target.id is requestId for every kind; a provider-shaped id on TV payloads is not the target (it goes in identifiers).

#6 landed before #2's id fallback so v1 TV results still emit tvdb/tvmaze and never grow a bogus tmdb label.

Tests

Unit tests in internal/tools/project_test.go; mock contract tests for each issue; live tests for TV browse identifiers and multi artist mapping (skip without OMBI_URL).

Fixes missing, duplicated, and mislabelled identifiers so follow-up tools (`read_media`, `write_request_create`, `read_requests get`) can be called from discover/search/recent results. Closes #6, #2, #9, #11 (milestone M3 — Identity projection). ## Changes - **#6** `read_media` details: unique identifiers; movie `tmdb` falls back to `id` when `theMovieDbId` is absent; `belongsToCollection.id` is not treated as the movie; v2 `seriesId` is no longer labelled `tvmaze` (that field only means TVMaze on v1 TVMaze-backed routes). - **#2** `read_discover` browse/collection members: when `theMovieDbId` is missing, `id` is labelled with the origin namespace (`tmdb` on v2) so items are usable for details/request. - **#9** `read_search` multi: `mediaType` is matched case-insensitively (`Artist` → `artist` + `musicbrainz`). - **#11** `read_requests` recent: `target.id` is `requestId` for every kind; a provider-shaped `id` on TV payloads is not the target (it goes in `identifiers`). `#6` landed before `#2`'s `id` fallback so v1 TV results still emit `tvdb`/`tvmaze` and never grow a bogus `tmdb` label. ## Tests Unit tests in `internal/tools/project_test.go`; mock contract tests for each issue; live tests for TV browse identifiers and multi artist mapping (skip without `OMBI_URL`).
gronod added 2 commits 2026-09-19 09:26:32 +01:00
Remove original schema documentation files
Build and publish / Test and build (darwin) (push) Successful in 2m5s
Build and publish / Test and build (linux) (push) Successful in 2m51s
Build and publish / Test and build (windows) (push) Successful in 3m12s
Build and publish / Build and publish Docker image (push) Successful in 2m21s
e83d9739b9
The schema-orig directory contained assessment, authentication, tool mapping, input schemas, and endpoint coverage documentation that has been superseded by the current implementation. These files were design artifacts from an earlier phase and are no longer needed.
Fix identity projection so discover/search/recent results stay callable.
Build and publish / Test and build (darwin) (pull_request) Successful in 1m58s
Build and publish / Test and build (linux) (pull_request) Successful in 2m42s
Build and publish / Test and build (windows) (pull_request) Successful in 3m5s
Build and publish / Build and publish Docker image (pull_request) Successful in 2m31s
Build and publish / Test and build (darwin) (push) Successful in 1m58s
Build and publish / Test and build (linux) (push) Successful in 2m51s
Build and publish / Test and build (windows) (push) Successful in 3m4s
Build and publish / Build and publish Docker image (push) Successful in 2m25s
b6e1822291
Movie and TV details were dropping or duplicating identifiers (missing
tmdb, doubled imdb, collection id treated as the movie, v2 seriesId
labelled tvmaze). v2 browse and collection members only populate `id`,
so those lists arrived with identifiers: []. Multi-search emitted
media=unknown for capitalised Artist. Recent TV items put a provider id
in target.id, so follow-up get calls failed.

Label identifiers by origin route, fall back to `id` in that same
namespace, emit seriesId as tvmaze only on v1 TVMaze routes, map
mediaType case-insensitively, and prefer requestId for request targets.

Closes #6, #2, #9, #11
gronod merged commit b6e1822291 into develop 2026-09-19 09:39:20 +01:00
gronod deleted branch m3-identity-projection 2026-09-19 09:39:21 +01:00
gronod added this to the M3 — Identity projection (discover → media → request) milestone 2026-09-19 09:40:04 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/ombi-mcp#21