Skip to content

fix(backend-rs): port upstream Seerr backend fixes through af0356245 - #46

Merged
selmant merged 14 commits into
developfrom
fix/upstream-backend-sync
Nov 3, 2026
Merged

selmant merged 14 commits into
developfrom
fix/upstream-backend-sync

Conversation

@selmant

@selmant selmant commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Description

Ports the upstream Seerr backend fixes made after our last sync into backend-rs. Range: 59d5947b4..af0356245 (upstream develop head af0356245d95246ea4641da4e3908b02ad1b114f). I triaged all 52 upstream commits in that range. Each ported fix is its own commit, or shares one where the fixes touch the same code, and each commit message names the upstream PR or advisory it ports.

Security (published upstream advisories):

  • GHSA-8j73-j6rc-q8xh. A user nested inside another response used to carry its eager settings, which hold Pushover, Pushbullet, Telegram, Discord and PGP values. The affected responses were requests, request approve/decline/edit, issues, issue comments, watchlist, Plex watchlist pages, push subscriptions and the bulk PUT /user. Nested users now serialize like Node's User.toJSON, so the settings are left out. They still appear in User.filter(true) (your own profile, or a user manager's view). /auth/me already sent its own allowlist.
  • GHSA-xc6j-6p6h-p799. GET /movie/{id} and GET /tv/{id} returned, in mediaInfo, every requester's email and Plex id, plus full issues including comment bodies. Requests' users now go through User.filter(). Issues are only sent to viewers with an issue permission, and without comments, problemSeason or problemEpisode. The same filtering now also applies to the other requests embedded in the POST /request answer, which upstream doesn't do yet.

Requests:

Scanners and jobs:

Other: seerr-team#3425 (watchlist POST body schema and 201 in seerr-api.yml; route table regenerated, no changes), seerr-team#3599 (frontend: plex.tv PIN 404s retried until the deadline), zh-Hant notification translations.

794743a45 (seerr-team#2164, override rules for advanced requests and the /overrideRule/advancedRequest endpoint) is ported separately and isn't in this PR. seerr-team#3538/seerr-team#3539/seerr-team#3674 touch the same code in routes/requestcreate.rs (matching_rule / apply_rule), so that port will need a rebase onto this one.

Triage

upstream sha upstream PR status note
af03562 seerr-team#3674 ported advanced-request permission on create/edit, is4k-checked override server
b185621 seerr-team#3579 ported season-level resets settled at end of run
dca1af6 Weblate n/a adds server id.json; id isn't an available locale
c0759ce seerr-team#3615 n/a Docker/Node deps
bfbb3e9 seerr-team#3662 n/a Node sqlite3
ef39b17 seerr-team#3661 n/a deps; server part is TS type casts only
81da123 seerr-team#3150 n/a Next.js
84eae67 seerr-team#3652 ported Plex admin login sets media server type; job restart reschedules
c167958 seerr-team#3611 n/a docs
d09072a seerr-team#3573 n/a frontend TV modal (202 handling); not ported here
c57dca9 seerr-team#3538 ported rules for the requested server
efbc937 seerr-team#3608 n/a frontend
b4ea6e8 seerr-team#3649 n/a Cypress
3153656 seerr-team#3638 n/a CI
f288fff seerr-team#3648 n/a CI
53299c1 seerr-team#3632 n/a CI
6f63b08 seerr-team#3631 n/a devenv
62ed636 seerr-team#3640 n/a CI
0110e75 seerr-team#3641 n/a Helm
0b27912 seerr-team#3639 n/a Node Docker image
63f4663 seerr-team#3636 n/a docs
f9fe7a9 seerr-team#3637 n/a CI
84ed3c1 seerr-team#3425 ported spec only; Rust already answered 201
31b100d seerr-team#3630 n/a TypeORM savepoint concurrency; Rust saves one at a time
6370562 seerr-team#3593 ported interval minutes (+ UI option)
978f437 seerr-team#3533 ported Radarr search gated on isAvailable
1313800 Weblate n/a frontend translations
f88515b Weblate ported server zh-Hant notification strings
8f2ecee seerr-team#3578 ported title-level resets deferred, requests declined
9e2021b seerr-team#3599 ported frontend src/utils/plex.ts
53e4564 seerr-team#3589 ported added sorts by createdAt, id tiebreak
1406e6e seerr-team#3595 n/a docs
14ed03d seerr-team#3550 n/a docs
9a5c89f seerr-team#3406 ported watchlist cache validation
e00d685 seerr-team#3587 n/a repo chore
2cfbcf8 seerr-team#3575 n/a docs
e959062 seerr-team#3557 n/a frontend settings form
fa58c30 seerr-team#3556 n/a Helm
cd8aa1f seerr-team#3551 ported Jellyfin season/episode items
9fda1c6 GHSA-xc6j-6p6h-p799 ported mediaInfo filtering
53e77bf GHSA-8j73-j6rc-q8xh ported nested users without settings
4fd0da0 seerr-team#3541 n/a CI
103976d seerr-team#3251 ported metadata concurrency 5, network failures skip the item
68e01b9 seerr-team#3536 n/a TypeORM subscriber connection handling
b919443 seerr-team#3539 ported rules keep advanced requesters' values
f92f44b seerr-team#2950 n/a deps
cc6f5c7 seerr-team#3380 ported edits share the create lock (Rust already serialized all creates)
10483e2 seerr-team#3379 ported covered seasons not re-added on edit
8f0a977 seerr-team#3378 ported edit quota and movie owner change; per-user create lock already covered by the global one
794743a seerr-team#2164 separate ported separately
38581ca seerr-team#3017 n/a upstream demo-mode feature, not a fix
7afbb29 seerr-team#3481 n/a docs

How Has This Been Tested?

From backend-rs/: cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings and cargo test --locked all pass. Tests: 698 before, 713 after (15 new). Mapping DB tests skip locally without FORESEERR_MAPPING_TEST_DB.

  • The new tests cover:
    • nested and filtered user serialization
    • the mediaInfo issue gate and its fields
    • create routing for advanced vs. plain requesters, and refused servers
    • override rules filling only unset values
    • is4k-checked server picks
    • quota units credited back on edit
    • season edit planning
    • request sort parsing
    • job reschedule and watchlist interval
    • Radarr search against a fake Radarr
    • watchlist page validation
    • Jellyfin item dispatch
    • deferred movie and show resets
    • season-request trim/decline planning
    • the "pursued by a server" predicate
  • Frontend: bun run typecheck, ESLint and Prettier pass on the touched files.

I didn't test any of this by hand against a live instance.

Checklist:

  • I have read and followed the contribution guidelines.
  • I tested this change manually (see our AI policy)
  • I have updated the documentation accordingly. (API spec)
  • All new and existing tests passed.
  • Successful build bun run build
  • Translation keys bun run i18n:extract
  • Database migration (if required)

🤖 Generated with Claude Code

selmant and others added 14 commits November 3, 2026 22:47
…ponses

A user embedded in another entity's response (a request's requestedBy and
modifiedBy, an issue's users, an issue comment's user, watchlist and push
subscription users, the bulk permission update) carried its eager settings
relation, exposing Pushover, Pushbullet, Telegram, Discord and PGP values.
Nested users now serialize like Node's User.toJSON, without settings; only
a top-level User.filter(true) (own profile, user manager) still includes
them, and /auth/me already sends its own allowlist.

GET /movie/{id} and GET /tv/{id} returned mediaInfo with every requester's
email and Plex id and the full issues, comments included, to any signed-in
user. Requests' users now go through User.filter(), and issues are only
included for viewers with an issue permission, without comments or the
problem season and episode.

Ported from seerr-team/seerr 53e77bf (GHSA-8j73-j6rc-q8xh) and
9fda1c6 (GHSA-xc6j-6p6h-p799).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…outing

POST /request took serverId, profileId, rootFolder, languageProfileId,
metadataLanguageId and tags from any requester, and PUT /request let a
series owner change them, although only MANAGE_REQUESTS or
REQUEST_ADVANCED may pick where a request goes. Those fields are now
ignored for everyone else. A requested server must be a configured
server of the request's quality; otherwise the request goes to the
default server without the requested options, and sending a request
whose stored serverId is no server of its quality falls back to the
default server and its settings.

Override rules now match the server the request is sent to rather than
always the default one, and apply to advanced requesters too, filling in
only what they left unset.

A series edit without seasons answers 400 instead of 500.

Ported from seerr-team#3674, seerr-team#3538 and
seerr-team#3539.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… request

PUT /request credited the request's own quota units back even when they
were never counted: when the request moves to another owner, or was
created before the owner's quota window. It now credits them only when the
owner's quota counted them, and moving a movie request onto another user
answers 403 when their movie quota is spent.

A series edit could add seasons the library already has; those are now
left out unless the request already holds them, and the quota is charged
for the seasons the request ends up with.

Edits now take the same lock as request creation, so an edit and a new
request can't claim the same season or quota at once.

Ported from seerr-team#3378, seerr-team#3379 and
seerr-team#3380.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The job runs every few minutes (every 3 by default), but the jobs list
reported a seconds interval, so the schedule editor offered 30, 45 and
60 seconds. It now reports minutes, and the editor offers 3 minutes too.

Ported from seerr-team#3593.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th Plex

With users already in the database but no media server configured (a
restored database, say), the admin's Plex sign-in left the server type
unset, so the Plex jobs never ran. Signing in as the admin now sets it to
Plex and starts the jobs again. Starting the jobs a second time now drops
the earlier schedule and schedules every job for the new server, where it
used to do nothing.

Ported from seerr-team#3652.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requesting an unreleased movie already in Radarr triggered a search
Radarr can't act on. The search now only runs when Radarr reports the
movie as available; Radarr searches by itself once it is.

Ported from seerr-team#3533.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /request?sort=added (the spec's default) ordered by id, and requests
tied on the sort column came back in an arbitrary order. "added" now
orders by createdAt, and both sorts break ties by id in the same
direction, which also makes the Postgres-only reordering pass that
reproduced the tied order unnecessary.

Ported from seerr-team#3589.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An answer from Plex Discover without a usable MediaContainer (an error
body, say) was cached with its ETag, so every later fetch was answered
304 and kept failing. Only a valid page is cached now, a cached invalid
one is dropped before it is revalidated, and items listed under Video
are read too.

The metadata of every item on the page was fetched at once; at most five
are fetched at a time now, and an item whose fetch times out or can't
connect is skipped instead of emptying the whole page.

Ported from seerr-team#3406 and seerr-team#3251.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
POST /watchlist was documented as taking a whole Watchlist entity and
answering 200; it takes tmdbId and mediaType (required), ratingKey and
title, and answers 201. With the spec validator on, a body without
tmdbId or mediaType is now refused with a 400.

Ported from seerr-team#3425.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jellyfin's recently added list returns seasons and episodes when only new
episodes of a show were added; the scan skipped those, so the show's new
episodes weren't picked up until the full scan. A season or episode now
scans the series it belongs to.

Ported from seerr-team#3551.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d pursuing

When a Radarr movie or Sonarr season that was processing turned
unmonitored with nothing downloaded, the scan reset it to unknown but left
its approved requests approved, so the title could not be requested
again. The reset also depended on which server was scanned first: one
server could reset a title another still pursued, and an abandoned entry
claimed the title's service ids.

The Radarr and Sonarr scans now leave such titles and seasons as they are
until every server was scanned. A title or season no server pursues, and
that no server failed to scan, then falls back to unknown; a title's
approved requests are declined, and a series request loses the abandoned
seasons (keeping its quota units in step), is completed when its remaining
seasons are, and is declined when all its seasons are gone.

Ported from seerr-team#3578 and seerr-team#3579.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plex.tv intermittently answers 404 while polling a PIN that is still
valid, which aborted the Plex sign-in. The poll now retries those until
the PIN's deadline.

Ported from seerr-team#3599.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from seerr-team/seerr f88515b (Weblate).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…swer

POST /request answered with the title's media and its other requests,
each with its requester's email and Plex id. Those users now go through
User.filter(), as mediaInfo's do since the GHSA-xc6j-6p6h-p799 port.
Upstream still sends them; this follows the advisory's intent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 54facc4 and 7e4916f.

Files selected for processing: 30
  • backend-rs/locale/zh-Hant.json
  • backend-rs/src/arr.rs
  • backend-rs/src/db.rs
  • backend-rs/src/jobs/arrscan.rs
  • backend-rs/src/jobs/jellyfinscan.rs
  • backend-rs/src/jobs/plexscan.rs
  • backend-rs/src/jobs/scanbase.rs
  • backend-rs/src/jobs/scanmedia.rs
  • backend-rs/src/jobs/scheduler.rs
  • backend-rs/src/lifecycle.rs
  • backend-rs/src/plexwatchlist.rs
  • backend-rs/src/routes/authplex.rs
  • backend-rs/src/routes/draft.rs
  • backend-rs/src/routes/issue.rs
  • backend-rs/src/routes/movie.rs
  • backend-rs/src/routes/plexdiscover.rs
  • backend-rs/src/routes/related.rs
  • backend-rs/src/routes/request.rs
  • backend-rs/src/routes/requestcreate.rs
  • backend-rs/src/routes/requestedit.rs
  • backend-rs/src/routes/requestepisodes.rs
  • backend-rs/src/routes/requestwrite.rs
  • backend-rs/src/routes/tv.rs
  • backend-rs/src/routes/userextra.rs
  • backend-rs/src/routes/userwrite.rs
  • backend-rs/src/routes/writes.rs
  • backend-rs/src/user.rs
  • seerr-api.yml
  • src/components/Settings/SettingsJobsCache/index.tsx
  • src/utils/plex.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Hey @selmant, thanks for submitting this PR! However, it looks like the PR template hasn't been fully filled out.

Issues found:

  • The contribution guidelines checkbox has not been checked.

Please update your PR description to follow the PR template.
Incomplete or missing PR descriptions may indicate insufficient review of the changes, and PRs that do not follow the template may be closed without review.
See our Contributing Guide for more details.

This check will automatically re-run when you edit your PR description.

@selmant
selmant merged commit da223b0 into develop Nov 3, 2026
19 of 20 checks passed
@selmant
selmant deleted the fix/upstream-backend-sync branch November 3, 2026 20:46
@selmant
selmant restored the fix/upstream-backend-sync branch November 3, 2026 20:47
@selmant
selmant deleted the fix/upstream-backend-sync branch November 3, 2026 20:47
@selmant selmant mentioned this pull request Nov 4, 2026
3 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant