Skip to content

refactor(apiv2): finish server migration cleanup - #1067

Merged
Quick104 merged 1 commit into
apiv2from
fix/apiv2-migration-cleanup
Sep 13, 2026
Merged

Quick104 merged 1 commit into
apiv2from
fix/apiv2-migration-cleanup

Conversation

@Quick104

Copy link
Copy Markdown
Contributor

The server and web app still had a few migration gaps: Audiobookshelf emitted a v1 plugin URL, v2 player operations bypassed the shared authenticated request path, the old catalog benchmark remained, and the API lifecycle docs still described a one-release bridge window.

This change:

  • Routes Audiobookshelf host-proxied content through /api/v2/plugin-content and adds coverage for forwarded-host URL construction.
  • Routes player v2 capabilities, playback, replanning, mutations, and route events through the shared token-refreshing transport, with an expired-token regression test.
  • Removes the obsolete scripts/benchmark_episode_catalog.py benchmark and its v1 dependency from the migration ledger inputs.
  • Documents the intentional v1 bridge window of at least two published pre-1.0 releases and records the retirement gate in issue API v2 Phase 6: Silo 1.0 cutover and v2 lock #886.

Validation:

  • make test-go
  • make test-web (575 files, 4,259 tests)
  • TypeScript build and targeted ESLint
  • API v2 migration ledger, route inventory, offline-route, OpenAPI, contract, fixture, scenario, and web-type verification
  • Focused Audiobookshelf and player tests

The v1 bridge, operational probes, and compatibility adapters remain intentionally available until the tracked retirement decision is made.

Related issue: #886

AI disclosure: Generated with OpenAI gpt-6 in the Codex agent harness. No other AI tooling was used.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5b1d1645-72b7-4ac6-b342-67f3ae36a93b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 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-09-13T16:00:37.911343Z 2aeeaa1 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.

@Quick104
Quick104 merged commit 108c8c0 into apiv2 Sep 13, 2026
7 of 12 checks passed
@Quick104
Quick104 deleted the fix/apiv2-migration-cleanup branch September 13, 2026 15:58
@greptile-apps

greptile-apps Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR should not merge until production Audiobookshelf URLs use an identifier accepted by the v2 plugin-content route.

Findings

  1. P1 Invalid plugin content identifier ▶

Reviews (1) · Last reviewed commit: "refactor(apiv2): finish server migration..."

}
if r.Header.Get("X-Silo-User-Id") != "" {
return scheme + "://" + host + "/api/v1/plugins/" + h.deps.InstallID()
return scheme + "://" + host + "/api/v2/plugin-content/plugins/" + h.deps.InstallID()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Invalid plugin content identifier

For host-proxied Audiobookshelf responses, this builds URLs with h.deps.InstallID(). Production does not supply that dependency, so it defaults to the nonnumeric value silo.audiobooks. The v2 plugin-content handler parses this path segment as an integer and returns 400 invalid installation id, breaking generated cover and playback URLs. The new test misses the production failure because it injects "42" directly. Production must provide the actual numeric installation ID or use a mount that accepts the stable Audiobookshelf identifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant