Build and publish / Test and build (darwin) (push) Successful in 2m3s
Build and publish / Test and build (linux) (push) Successful in 2m45s
Build and publish / Test and build (windows) (push) Successful in 3m13s
Build and publish / Build and publish Docker image (push) Successful in 2m30s
Ombi's v2 Search/tv/{tvdbId} route is a TMDB-keyed alias despite its parameter name, so read_media details and write_request_create season expansion resolved the wrong series for TVDB ids (Gitea issue #1). Repoint tvdb to the legacy v1 Search/tv/info route, label theMovieDbId by origin route (tvdb on TVMaze-backed v1 results, tmdb on the v2 engine) and emit the new tvmaze identifier namespace from seriesId.
4.7 KiB
4.7 KiB
Phase 02 — Specification Harmonisation
Objective
Bring docs/schema/ into agreement with the Phase 01 behaviour: the routing contract, input catalogue, output contract and endpoint ledger must describe the TVDB v1 info route, the per-origin theMovieDbId labelling and the new tvmaze namespace, and the embedded internal/tools/schemas.json must be regenerated so the advertised output schema accepts the new namespace.
Prerequisites
- Phase 01 complete — the code and tests are the source of truth this phase documents.
- Source documents to mutate:
docs/schema/02-tool-mapping.md,docs/schema/03-input-schemas.md,docs/schema/04-results.md,docs/schema/05-endpoint-coverage.md,docs/schema/06-verification.md; regenerateinternal/tools/schemas.jsonviago run ./tools/schemagenfrom the repository root (never hand-edit).
Specification
Mutations
docs/schema/02-tool-mapping.md—read_media.detailsrouting: TVtvdbuses the legacy v1Search/tv/info/{tvdbId}route; record that v2Search/tv/{tvdbId}is a TMDB-keyed alias of moviedb despite its parameter name and must never serve a TVDB lookup. Add the identifier-origin paragraph: v1 TVMaze-backed routes emittheMovieDbId→tvdbandseriesId→tvmaze; v2 routes emittmdb;RecentlyAddedtv keepstmdbpending verification. Note the TVseasonexpansion reads details in the same provider namespace.docs/schema/03-input-schemas.md—read_mediaprose:providerselects the namespaceidbelongs to;tvdbresolves via the v1 info route.write_request_createprose:providerselects theidnamespace andseasonexpansion reads details in the same namespace.docs/schema/04-results.md—identifier.namespaceenum gainstvmaze;media_pageprojection rules document thattheMovieDbIdis origin-dependent (v1 TV →tvdb+seriesId→tvmaze; v2 →tmdb) and labels follow the origin route, never the field name.docs/schema/05-endpoint-coverage.md— #193GET /api/v2/Search/tv/{tvdbId}demotes D→A with the TMDB-alias annotation (never used for tvdb); #235GET /api/v1/Search/tv/info/{tvdbId}promotes A→D as the true TVDB details route owned byread_media / details, noting it is also read privately bywrite_request_createseason expansion and thattheMovieDbIdcarries TVDB whileseriesIdcarries TVMaze; #234 notes the same TVMaze id layout forread_search / text. Disposition totals are net-zero (D 257 / A 37).docs/schema/06-verification.md— new gap-table row "TV search/details id provenance" carrying the Verify items: live-confirm the v1tv/info/{tvdbId}route shape, theRecentlyAddedTV id namespace, the multi-search TVidnamespace, and theby_requestexternalProviderIdnamespace.internal/tools/schemas.json— regenerate from the updated docs; theidentifierdef's namespace enum must containtvmaze.
Target artefacts
docs/schema/02-tool-mapping.md— details routing + identifier-origin paragraph + season-expansion namespace note.docs/schema/03-input-schemas.md— provider-semantics prose onread_mediaandwrite_request_create.docs/schema/04-results.md—tvmazeenum value + origin-dependent labelling rule.docs/schema/05-endpoint-coverage.md— #193 demoted/annotated, #235 promoted/annotated, #234 annotated.docs/schema/06-verification.md— id-provenance Verify row.internal/tools/schemas.json— regenerated, containstvmaze.
Verification gates
grep -n tvmaze internal/tools/schemas.jsonfinds the regenerated enum value;grep -n tvmaze docs/schema/04-results.mdfinds the documented enum value.- Ledger dispositions remain D 257 / A 37 / P 59 / I 12 / X 12 and 377 operations / 321 paths.
- #193 carries the TMDB-alias note and disposition A; #235 carries disposition D and the TVMaze/
seriesIdnote. docs/schema/02-tool-mapping.mdstates the v1 info route for tvdb and the per-origin labelling rule.docs/schema/06-verification.mdlists the id-provenance Verify items.go run ./tools/schemagensucceeds (31 input schemas, 37 defs);CGO_ENABLED=0 go build ./...clean.- No environment-specific URL or secret in any committed doc.
Evidence labels
- Documented — the ledger annotations cite upstream behaviour verified in Phase 01 (v2 alias routes, TVMaze
Id/SeriesIdmapping). - Design — wording choices in the routing prose and the decision to keep
RecentlyAdded/multi-search labels attmdbpending verification are contract decisions, not upstream facts. - Verify — the provenance row in
06-verification.mdis the consolidated Verify list; nothing in this phase asserts an unverified namespace as fact.