Skip to content

merge: bring upstream main into Vio (109 commits) - #443

Merged
randrini merged 117 commits into
mainfrom
merge/upstream-2026-11-11
Nov 13, 2026
Merged

randrini merged 117 commits into
mainfrom
merge/upstream-2026-11-11

Conversation

@randrini

@randrini randrini commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Related issue: N/A
Validation tasks: none

The fork has not taken an upstream merge since the last sync, and the scheduled
automation/upstream-sync workflow fails on this merge (run 43108451322, "Merge
conflict encountered merging upstream/main into automation/upstream-sync"). This
branch performs the merge by hand so main can move to upstream 2ee1b7248
(109 commits since merge base a52941174) and the scheduled sync can continue.

Approach

Merge commit 2fd918f98 with the fork's acd935f94 as first parent and
upstream's 2ee1b7248 as second, followed by small fixes for the CI seams it
exposed: the web tree's i18n catalog plugin and test alignment, the settings
binding copy, the disposable-database guards the DB job uses, and two
pre-lock contract approvals. Resolutions follow
docs/architecture/fork-divergence.md.

Of the 176 conflicted files:

  • 101 kept the fork's version: playback/stream handlers, the V3 planner, virtual
    library routes and services, transcodenode, jellycompat, the plugin catalog,
    contribution/evidence docs, and the image pipeline files (Dockerfile, compose,
    .env.example).
  • 25 took upstream's version: files whose fork delta was cosmetic (lint style,
    spelling) or whose v1 handler upstream retired.
  • 50 were merged by hand: the router, Makefile, AGENTS/CONTRIBUTING, API docs,
    settings handlers, playback tests, web player and detail components, and the
    seams where upstream's new v2 services call renamed helpers.

Generated contract files were not hand-merged. After the Go tree compiled, these
targets regenerated them and their output won: make apiv2-openapi,
make apiv2-fixtures, apiv2-fixtures-sync, apiv2-web-types,
make route-inventory, make playback-fixtures, make offline-routes, and
make verify-migration-ledger's section assignment pass. That covers the
conflicted OpenAPI document, v2 fixtures and index, web schema/operations types,
route inventory, playback fixtures, offline route set, and migration ledger.

Upstream retired /api/v1 (Silo-Server#3200) in this window. The fork adopts the
retirement and its tombstone test. Three Vio-only operations still have no v2
operation and stay on their old paths ahead of the tombstone: deleting a catalog
item, purging a collection's zero-storage items, and listing a plugin's dynamic
config options. The v1 migration ledger and scenario-catalog coverage gate
validate against a frozen copy of the pre-retirement route inventory
(contracts/api/v2/migration-inventory.json) so those gates keep auditing the
historical alpha surface; verify-offline-routes regenerates against the
tombstones.

Divergence rows audited and pinned:

  • Client identity: X-Vio-* stays canonical in the web client and v2 device
    headers; the legacy X-Silo-* spelling is still accepted on ingest.
  • Virtual routing: no virtual→plugin dispatch; router_virtual_library_core_test.go
    and the invariant script pass.
  • Virtual network permissions: the allow_insecure_http / allow_private_streams
    split and its boundary tests are unchanged.
  • Collections virtual_playback default-on and the settings-check kinds survive;
    the invariant script pins them.
  • Audio selection keeps MULTi trackHasLanguage/MatchRank and the regional and
    script discrimination.
  • V3 planner: the fork keeps plan_v3.go and its ladder policy. Upstream's
    candidate-list planner files are not carried. Portable pieces kept: remux
    range refusal, the HLS copied-AAC fix, and the detached terminal-scrobble
    helpers.
  • Image builds: decoupled node-base, cache mounts, buildkit-cache-dance,
    :dev tags and pinned base images are untouched; the invariant script passes.
  • Contribution docs: the pre-docs(contributing): require evidence for user-visible changes Silo-Server/silo-server#2016 evidence policy stays; upstream's visible-change
    gate and Evidence section are not reintroduced.

Validation

  • go build ./... and go vet on the resolved packages: pass (Go 1.26 with
    libvips in a container).
  • scripts/check-fork-invariants.sh: pass, including gofmt and prettier.
  • make verify-apiv2-openapi, verify-apiv2-fixtures, verify-playback-fixtures,
    verify-route-inventory, verify-migration-ledger, verify-scenario-catalogs,
    verify-offline-routes, verify-local-paths: pass.
  • make lint-changed (the same script CI runs, against acd935f94): 0 issues.
  • go test ./... (CI): pass. The v1 scenario-catalog executor is skipped with
    its reason in the test: those catalogs describe the retired /api/v1 surface,
    while the coverage gate still checks them against the frozen inventory.
  • Locally, four timing-sensitive playback tests fail the same way on the
    pre-merge tree in this environment (sub-second probe budgets and segment
    timing under load). None were changed to pass.
  • Web: tsc passes, eslint reports 0 errors, prettier is clean.

Risks

  • The merge is large. Review should focus on the hand-merged router, playback
    handlers, settings handlers, and the web player/detail components.
  • Two pre-lock breaking changes are approved in
    contracts/api/v2/breaking-approvals.json: the nullable dashboard layout and
    the retired single-entry download read. The web client is already adapted to
    both.
  • Fork-owned UI files are still untranslated against upstream's i18n lint rule;
    their existing findings are added to eslint-suppressions.json rather than
    translated in this change.
  • Dead v1 handler code remains in the tree (unrouted) because it lives in files
    the fork still owns; removing it is follow-up work.
  • Untranslated fork UI and the dead v1 handlers are the two places where a later
    upstream change can collide again.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md (no new tests).
  • The Evidence section shows every change a user can see, or says there is none (none attached; the fork attaches media only on request).

AI Disclosure

Posted by an AI agent (Muse Spark, OpenCode harness).

  • Harness: OpenCode
  • Tool(s): OpenCode agent
  • Model(s): DeepSeek V4.1 Flash 1017 (the identifier OpenCode reports for this run)
  • Involvement: Fully AI-generated, human verified (this draft awaits maintainer review)
  • Adversarial review: independent review not run; the draft PR exists for maintainer review

Quick104 and others added 30 commits November 8, 2026 13:21
* feat(web): import history for a Plex Home user

After signing in with Plex, the history import page now lists the
account's Plex Home members, managed users included. Picking one switches
to that member on plex.tv (with their Home PIN when they have one) and
starts the import with their own server token and plex.tv token, so the
run reads their watch state and watchlist instead of the account owner's.

One member is imported per run. The Plex sign-in stays on the page, so the
next member can be picked once the previous import finishes.

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

* fix(web): keep Plex sign-in and import selections steady around Home lookups

Show the Plex sign-in as soon as the servers load and fetch Plex Home
users afterwards, so a slow optional lookup cannot keep the signed-in
account from importing. Lock the server, Home user, PIN, and profile
fields while an import is starting, so a change made during the Home
switch cannot leave the run going to a profile other than the one shown.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…library (Silo-Server#3667)

A watched import reads the provider incrementally, so a watch of a title no library held when it was read was skipped and never returned again. Keep those watches in watch_provider_pending_watches, owned by the connection's provider account and capped at 50,000 per connection, and match them again on every sync in batched catalog reads. The plugin watched cursor key moves to plugin.remote.watched.v2, so every connection reads its watched history once more and keeps what it skipped before.

Closes Silo-Server#3665

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lo-Server#3668)

* fix(watchsync): import provider watches once their title reaches the library

A watched import reads the provider incrementally, so a watch of a title no
library held when it was read was skipped and never returned again. Keep
those watches in watch_provider_pending_watches, owned by the connection's
provider account, and match them again on every sync in batched catalog
reads. The plugin watched cursor key moves to plugin.remote.watched.v2, so
every connection reads its watched history once more and keeps what it
skipped before.

Closes Silo-Server#3665

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

* feat(watchsync): accept a finished series as plugin watched state

Simkl lists no episodes for a show on its completed list, so the Simkl
plugin had no way to import one and every finished show stayed unwatched.
A plugin can now return watched state for a SERIES item with its
last_watched_at. It marks the regular-season episodes in a library that had
aired by then, leaving out specials, which providers leave out of a finished
show's count. The marker stays kept with the number of episodes it covered;
each sync counts every kept marker's episodes in one query and applies a
marker again when it covers more, so an episode a library gains later is
marked.

Related: Silo-Server/silo-plugin-watchprovider-simkl#11

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

* fix(watchsync): check the pending-watch account under the connection lock

The account check ran in the write's own statement, on its snapshot, while
the conflict update saw the newest row. A save from the previous provider
account racing a rebind and the new account's save could replace the new
account's kept watch, which the next sync then dropped. Check the account
under a lock on the connection row, which a rebind waits for, and hold it
through the write.

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

* test(watchsync): wait on the save's result instead of sleeping

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

* fix(watchsync): re-apply a series marker when its episodes change

A kept series marker recorded how many episodes it covered, so an episode
swapped for another between two syncs left the count unchanged and the new
episode unmarked. Record a hash of the covered episodes instead, computed for
every kept marker in one query, and apply a marker again whenever that set
changes.

Raise the plugin watched cursor key to plugin.remote.watched.v3. A host with
pending watches but without finished-series support skipped series rows and
moved its cursor past them, so every connection reads its watched history
once more.

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

* chore(migrations): name the applied-episodes migration after its column

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

* fix(watchsync): expand a series marker only to the profile's libraries

A finished-series marker expanded to the series' episodes in every library,
so it could record watches, and a second provider's export could send them,
for episodes in libraries the connection's profile may not open. Resolve the
profile's libraries once per watched import and limit the expansion and the
kept-marker check to episodes there, with the series in one of them too.

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

* test(watchsync): assert the stale-account save waits for the rebind

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

* test(watchsync): require the stale-account save to wait for the rebind

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

* docs(watchsync): document the series expansion and pending-watch helpers

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

* fix(watchsync): bound kept watches and recheck the account when listing

A connection's kept watches had no limit, and every sync reloads them, so a
provider history that matches little of the library could grow that work
without bound. Keep the newest 50,000 per connection. Listing also returns
nothing to a caller whose account is no longer the connection's, so a sync a
rebind overtook doesn't import the previous account's kept watches.

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

* fix(watchsync): keep series markers within the profile's maturity limits

A finished-series marker was limited to the profile's libraries but not to
its maturity limits, so a series above a profile's rating ceiling could
still be recorded as watched there, and sent on by another provider's
export. Resolve what the profile may open once per watched import and keep
only the expanded episodes that pass the catalog's own access check
(libraries and maturity limits); a kept marker for a series the profile may
not open covers nothing.

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

* fix(watchsync): drop imported kept watches before saving new ones

The save trims a connection's kept watches to the cap, and it ran before the
watches that had just imported were deleted. At the cap, that could drop an
older unmatched watch for good although the deletes brought the set below
the cap. Delete first, then save.

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

* fix(watchsync): resolve a sync's profile access through access policies

With the policy system on, every viewer read resolves scope through the
policy-aware resolver, but the watched import used the legacy one, so a
custom policy that narrows a profile's libraries or maturity limits did not
limit which episodes a finished-series marker covered. Use the policy
resolver when it runs, and pass the scope's disabled libraries to the
access check too.

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

* perf(watchsync): trim kept watches only when a connection is over the cap

Every save sorted the connection's kept watches to find what to trim, under
the connection lock. Count them first and sort only when over the cap.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…eld (Silo-Server#3704)

* fix(web): give the collection editor's Description box the same field styling as Name

The Description textarea was transparent with a faint border, so on the
editor's panel it looked like empty space. Add a shared Textarea that uses
Input's fill, border, shadow and focus ring, and use it for Description.

* ci: rerun checks after an unrelated flaky Watch Party test
…-Server#3705)

* fix(web): drop the empty Collections page's New collection card

A profile with no collections of its own saw a dashed New collection card
in the poster wall, sized to its label rather than a poster, next to the
header button that does the same thing. The header button is now the one
create action. A view that would be empty says so in one muted line: Mine
when the profile has no collections, and All only when there are no
shared or server collections either.

Closes Silo-Server#3692

* docs(web): describe the Collections page component
…lo-Server#3674)

The personal list and ratings plan tests failed on any Sort node, so
statistics left in a shared database could fail them even when the index
can supply the page order. Disable sorts in their plan transactions: a
sort still appears when no index can supply the order.

Closes Silo-Server#3634
…r saves (Silo-Server#3710)

* fix(collections): require a rule before a smart collection previews or saves

A smart collection with no complete rule matched every title: the editor
previewed the whole catalog and let it be created or saved, and the
/api/v2 create and update operations accepted it.

The editor now sends no preview, asks for a rule, and keeps Create and
Save off until one rule has a field, an operator and a value. The v2
admin and personal create and update operations answer 422 at
body.query_definition.groups for a smart collection left without one.
Updates that leave the rules alone, /api/v1 and backup restore are
unchanged, so collections saved before the check keep working.

Closes Silo-Server#3695

* test(collections): pin the rule check's edge cases from review

Add web cases for hasCompleteRule matching the server's, check that the
editor previews only the complete rule, and cover a list toggle on a
smart collection saved with no rules. Say in the API doc that only the
admin update can switch a collection to smart.
…sult (Silo-Server#3660)

* fix(tonemap): ship Intel's legacy OpenCL runtime and log the probe result

Intel's current compute runtime only drives Gen12 and newer graphics, so on
Gen8 to Gen11 GPUs (UHD 630, Jasper Lake) the QSV tone-map probe could not
open an OpenCL device and every HDR transcode fell back to software. Install
the legacy1 runtime and its IGC 1.x compiler alongside the current ones, as
Jellyfin's image does, and retry the runtime downloads.

The probe also dropped every smoke failure silently. Log one line per
distinct result: the executors and source kinds that validated, a warning
with the FFmpeg error when a configured hardware backend validated nothing,
or a warning naming the command that ran out of time when the probe did not
finish.

* ci: rerun checks after GitHub release downloads recovered

* ci: rerun checks after an unrelated flaky test

* test(historyimport): move the list before the fake server writes page one

The fake Jellyfin server moved item-250 only after writing the first page.
The client can decode that page and request the next one before the handler
returns, so on a busy runner page two came from the unmoved list, the read
never restarted, and TestJellyfinFetchPlayedSince_RestartsWhenAPlayMovesTheList
failed. Move the list first and guard it with a mutex.
…ilo-Server#3655)

* docs(readme): centre the Macroscope banner

* docs(readme): tidy the Supporting Silo section

* ci: retrigger checks after GitHub 504s

* ci: retrigger checks after GitHub 504s
…erver#3717)

A target with a download phase but no download_updated_at made every
requests list fail with HTTP 500, because the zero timestamp cannot be
marshaled. Leave that progress out of the response instead.
…rver#3677)

* fix(playback): convert copied ADTS AAC for fMP4 HLS segments

An HLS copy remux of an MPEG-TS source with AAC audio stopped after
init.mp4: the HLS muxer's fMP4 segments can't hold ADTS framing and FFmpeg
does not insert aac_adtstoasc there on its own.

TranscodeOpts now carries the copied source audio codec (CopyAudioCodec),
and buildFFmpegArgs adds -bsf:a aac_adtstoasc when a copied AAC track goes
into fMP4 segments. MPEG-TS segments and other codecs are unchanged. The
filter check is shared with the progressive remux fix from Silo-Server#2698.

The codec reaches every executor: the v3 integrated and remote-node starts,
the recipe card and stream token (the existing cac claim), transcode
rehoming, and the jellycompat integrated, node and proxy paths. An older
node or token without the codec keeps the plain copy.

Closes Silo-Server#2840

* refactor(playback): reuse TranscodesAudio for the copied HLS codec

Drop a handler test that only checked its own fixture; the argument table,
recipe card round trip and jellycompat token rows cover the behaviour.

* fix(transcodenode): refuse nodes that ignore the copied audio codec

A node from before this change ignores copy_audio_codec, so it copies AAC
into fMP4 segments without aac_adtstoasc and the stream stops after the
first segment. Nodes now return the copied codec in their start receipt,
and the API rejects a node that doesn't confirm it, as a retryable start
failure like the other recipe receipts. The check applies only when a copied
AAC track goes into fMP4 segments, so older nodes still take MPEG-TS
sessions and other copied codecs.

The rule for when the filter applies is now one function,
playback.HLSCopiesAACIntoFMP4, shared by the argument builder and the check.

* fix(apiv2): regenerate OpenAPI for the copied audio codec receipt

The transcode node start request and response schemas in the v2 contract
gain the optional copy_audio_codec property. The node API doc describes
the field and when the API requires the node to confirm it.

* fix(playback): match copied audio in any case when adding aac_adtstoasc

appendAudioArgs copies audio for "COPY" or " copy " too, so the fMP4 rule
now uses TranscodesAudio rather than an exact "copy" match.

* docs(transcodenode): say which paths check the copied audio codec receipt

The receipt is checked only on POST /transcode/start. Jellycompat moves and
node-side reconstruction skip it, and the check also refuses older nodes for
MKV and MP4 AAC copies, so state that transcode nodes update first.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ilo-Server#3580)

* fix(notifications): count characters for every Discord embed limit

Discord's embed limits count characters, but truncateWithEllipsis and the
per-embed total counted UTF-8 bytes, so CJK titles, field values and
overview teasers were cut to about a third of what Discord allows.
Truncation now counts the way discordTextLen does (emoji outside the BMP
count as two), still walks at most limit characters, and the Genres field
is clipped to Discord's 1,024-character field limit.

Closes Silo-Server#2867

* refactor(notifications): fold discordEmbedLen into discordEmbedTotal

With byte counting gone, discordEmbedLen's length parameter only ever
received discordTextLen. Count characters directly in discordEmbedTotal
and reuse it for the message total.

Drop the 1 MiB emoji overview row: it passes on the base and repeats the
1 MiB overview row's check; the emoji clipping rows already cover
characters outside the Basic Multilingual Plane.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…erver#3534)

* fix(apiv2): list null in the enum of nullable request members

JSON Schema 2020-12 applies type and enum separately, so a member typed
["string", "null"] whose enum lists only strings still refuses null.
ProfileUpdate.max_playback_quality (null removes the ceiling) and
AdminItemMetadataUpdate.status (null leaves it unchanged) were documented
that way, so a client that validates against /api/v2 refused a null the
server accepts.

GenerateOpenAPI now adds null to the enum of every nullable component
schema after registration, which replaces the per-type transformer on
AdminPlaybackHistoryEntry. The pass runs on the document only: Huma's
validator accepts null on a nullable schema before it checks the enum,
and the registered enum stays as it was, so the 422 message for a bad
value doesn't gain a null.

DownloadSubscriptionPatchBody.quality is held out through
apiv2.NullEnumWithheld: Patch documents it as nullable, but the handler
answers 400 for null on every monitor field.

The spec lint now fails a nullable enum without null, and fails a
NullEnumWithheld entry once its member no longer needs it.

Closes Silo-Server#2980

* refactor(contractspec): name the component schema prefix once

goconst flags a string literal used three times, and the nullable enum
rule added the third use of "components.schemas.". The contract doc
now says which locations the lint checks: members and array items.

* fix(contractspec): check nullable enums wherever the generator adds null

The nullable enum rule walked only members and array items, so a nullable
enum in a oneOf, anyOf or allOf branch or a typed map value passed the lint
although the generator covers those places. The rule now has its own walk
over all of them.
…ilo-Server#3604)

The admin test push routes take a profile ID but no account, and profile
IDs such as the legacy `default` repeat across accounts. Testing `default`
could send another person's phone a real notification and report it as
delivered, and naming their server device ID did the same.

Select only among the calling account's devices, on any of its profiles,
on both the v2 and v1 routes. Another account's profile or device now gets
the same 404 as a device that does not exist.

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
…h the provider (Silo-Server#3678)

* fix(jellycompat): give a Stopped report's confirmed stop time to reach the provider

A Jellyfin client's Stopped report delivered its confirmed stop under the
5-second quick-sync deadline. A watch-provider plugin keeps a 5-second
reserve before the host deadline, so it deferred every attempt, and the stop
was retried every few seconds until the play session expired.

Confirmed stops now get watch-sync's 2-minute per-provider budget plus time
for the reads before dispatch, and the terminal claim lease outlasts that.
The Stopped report waits at most 5 seconds for delivery and the rest runs
detached. A staged stop that keeps failing is dropped with one warning an
hour after the play stopped, so the retry chain and the recovery scan stop
picking it up.

* fix(jellycompat): keep a stalled provider from holding the recovery scan

The recovery scan delivered pending stops one at a time, so with the longer
confirmed-stop budget a stalled provider could hold a 100-stop batch for
hours. Each delivery now runs detached and the scan waits at most five
seconds for it, as the Stopped report does.

* fix(jellycompat): finish the initial recovery scan only after its deliveries

The startup sweep of open scrobbles waits for the initial terminal recovery
scan. Once that scan delivered stops detached, it could finish while a
recovered stop was still in flight, letting the sweep send a second stop
with stale progress. The initial scan now delivers each batch in parallel
and waits for all of it; periodic scans keep the five-second wait.

* fix(jellycompat): keep a stop past its retry window while it is still being confirmed

When watch-sync reports that another dispatch of the same confirmed stop
still holds its claim, the outcome is not known yet: that dispatch may fail
and need a retry. Exempt that error from the one-hour cutoff so the staged
stop is not dropped early. watchsync exports the error so jellycompat can
recognise it.

* docs(jellycompat): say when history export covers a dropped stop

History export reaches a provider only when watched export is on for the
connection and the play was recorded in local watch history, and the
confirmed stop's two minutes include time queued behind earlier events.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): show a removed star rating straight away

Clicking the star that matches the current rating removes it, but the
CSS hover preview kept filling up to that star while the pointer stayed
on it, so the click looked like it did nothing until the pointer moved.

StarRating now sets data-suppress-preview on a pointer click and clears
it when the pointer leaves the clicked star, and the hover rules skip a
suppressed group. The rules are also gated on data-fine-pointer, so a
tap's emulated :hover cannot hold the preview on touch screens. Hovering
the star that is already set dims the stars and shows a "Remove rating"
tooltip, so a removal is visible before the click.

Closes Silo-Server#3528

* docs(web): document StarRating and its click handler

* fix(web): don't hold the star preview after a touch tap

A touch tap fires pointerleave before click, so the suppress flag set by
the tap never cleared, and on a device with both touch and a mouse the
first star the mouse hovered showed no preview. Skip the flag while
data-fine-pointer is false: the hover preview is already off then.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…3659)

* ci: cache the pinned actionlint and shellcheck archives

* ci: say how long release download 504s last only as long as observed

* ci: derive the tool archive cache key from the pinned values

The cache key repeated the tool versions apart from the download URLs and
checksums. A bump that missed the key would restore the old archive and fail
its checksum on every run, and the bump PR's own CI could not show it because
ci.yml runs this workflow from main. Keep both versions and checksums in
job-level env and build the key, URLs, checksums and extract path from them.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…r second (Silo-Server#3645)

* fix(jellycompat): report audio channel layout and bitrates in bits per second

MediaStreams never carried ChannelLayout, so Jellyfin clients could not
show 5.1 or 7.1 badges. Stream BitRate went out in Silo's stored kbps
where Jellyfin expects bits per second, so clients showed 0 kbps, and
device profile AudioBitrate and VideoBitrate caps compared kbps track
values against bps limits.

Scans now also read the audio bitrate from Matroska's BPS statistics
tag, since ffprobe reports bit_rate as N/A for MKV streams.

Closes Silo-Server#3643

* fix(jellycompat): leave device profile bitrate checks unchanged

Keep this change to what MediaStreams reports. Profile bitrate limits
are compared against kbps track values today; changing that alters
direct-play decisions and needs its own maintainer decision.

* fix(jellycompat): keep the MKV bitrate fallback out of this change

A missing audio bitrate fails a required AudioBitrate profile condition,
so filling it in from the BPS tag would change direct-play decisions
while those conditions still compare kbps against bits per second.
Leave it for the change that fixes the condition units.

* fix(jellycompat): trim the channel layout variant like Jellyfin

Jellyfin's ParseChannelLayout keeps the part before the parenthesis, so
ffprobe's 5.1(side) is reported as 5.1. Clients match their channel
badges against that form.
…ilo-Server#3718)

Section browse dropped each row's progress timestamp and item source, so
catalog cards could not build a Continue Watching or Next Up dismissal.
Carry them through the row-backed listing for those rows and share the
card's dismissal logic between the Home row and the catalog grid.
…ilo-Server#3708)

The "retains the refusal" test waited for the refusal text and then
expected one fallback call. The player's first commit shows the refusal
before the fallback effect runs, so on a slow runner the text matched
before the call and the test failed with 0 calls.

Wait for the call first, then for the refusal to come back after the
rejected fallback. Rerender with a fresh room object so the effect runs
again and the loop guard is what keeps the count at one.
…rror (Silo-Server#3576)

A database failure while looking up an item's library folders told the
caller their library_id was invalid. /api/v2 search, apply and hints now
answer it with a 500 internal error problem, with or without a library_id.
The frozen /api/v1 routes keep their 400 "Invalid library_id".
…ilo-Server#3585)

* fix(web): show a collection's backdrop and description on its page

A collection page showed only the collection's name and the generic
catalog subtitle, so the backdrop and description set in the collection
editor never reached viewers on the web.

The page now draws the backdrop behind its header, faded into the page,
and shows the description under the title, clamped to three lines with
a More toggle. A collection without a description keeps the generic
subtitle, and one without a backdrop keeps today's plain header. Nothing
shows in that line while the collection is still loading, so the
subtitle never flashes before the description.

A server collection is read from its library's Collections tab, the
query that tab already makes. When the page has no library_id, the
server-collections list says which library lists it, and past that
list's per-library teaser every library with more collections is asked.
A personal collection's description comes from the snapshot the page's
actions already load.

The detail hero's backdrop artwork moves unchanged into a shared
HeroBackdropArtwork that the collection header also uses.

Closes Silo-Server#3526

* fix(collections): serve a collection's backdrop at hero width

Collection responses resolved the backdrop to its w300 card thumbnail, the
same rung as the poster. A collection page now draws the backdrop across the
whole page, where 300 pixels stretched four times over looked blurry. The
backdrop now resolves at w1920, the width an item detail hero uses; the
poster stays a card thumbnail.

* fix(web): keep a collection's actions beside its title over the backdrop

Over the backdrop the header's padding left the title too little room, so
the actions wrapped under it and sat in the middle of the artwork. The title
now takes the free width and the actions keep their place at the bottom
right, as they do without a backdrop.

* fix(collections): serve the backdrop variant an upload actually stores

An uploaded collection backdrop is stored at w1280 and w300 only, so the
w1920 URL the last change resolved pointed at no object. Resolve the widest
stored width instead, read from the same list the upload uses so the two
cannot drift apart.

The collection page also kept its header through a failed refetch of the
server-collections list only when the first load had failed; a failed
refetch now keeps the list it already has.

* fix(web): let a collection's title take the full width on phones

Over a backdrop the title's flex-1 also applied below the sm breakpoint,
where the header wraps, so the title and actions shared one cramped row on
a phone. The title takes the free width only from sm up; on a phone the
actions sit under it again.

* fix(web): put a collection's actions, Shuffle and count on one row

Edit and the collection menu sat on their own row above Shuffle and the
result count, and the large count sat lower than the Shuffle label. A
collection page now lays them out as one centred row, wrapping on narrow
screens, with the count centred against the Shuffle button.

* fix(collections): keep the card thumbnail for a backdrop outside a backdrop directory

A collection backdrop may be any stored artwork reference. For one such as
the collection's own poster key, BackdropVariantPath picked the poster
ladder's w1000, which collection posters never store, so the backdrop URL
pointed at a missing object. Ask for w1280 only for keys in a backdrop
directory and keep the w300 card thumbnail for the rest, as before.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Silo-Server#2894)

* fix(home): leave rows with nothing to show out of the v2 section lists

The v2 Home and library section lists answered every resolved row, even one
whose titles all sit in libraries or above rating limits the viewer cannot
open. Such a row reached clients with a title and no cards, and each client
had to hide it on its own. Both lists now leave out every row with no items,
as they already did for an off-season seasonal row. A row asked for by ID
still answers empty, and the frozen v1 lists keep their old answers.

* fix(home): keep v1 leaving out rows that hiding watched titles empties

* docs(home): say v2 lists leave out duplicate-emptied and failed rows

The comment on the single-section read still said the aggregate read
answers a failed row empty, which is now only true of v1. The contract
paragraph also left out rows the cross-row duplicate filter empties,
which the per-row read answers with items.

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

* docs(home): record the v2 empty-row difference on the ledger rows

api-contract.md says every deliberate v2 difference from v1 is recorded on
the migration ledger rows, but the listHomeSections row still said "Same body
as v1" and neither ledger row nor either "Deliberate differences" list named
the rows the v2 lists now leave out. Also say in the v1 Home handler comment
that v1 drops a row hiding watched titles emptied.

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

* docs(home): say the empty-row rule applies to each request's own rows

The contract paragraph promised every client the same rows, but a web-only
hero row and the item_limit a client asks for can change which rows a
request resolves or which the duplicate filter empties.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…Silo-Server#3577)

* fix(metadata): clear the old match's values when a match is corrected

Correcting a match with Match Item or an NFO left behind any value the new
match lacks, such as a tagline, because merges skip empty provider values. The
item kept showing the wrong title's text, and a refresh could not remove it.

A correction now empties the stored fields, credits and localized text before
merging the new match. Locks and manual translations hold. Refreshes and
re-applying the same match still keep blanks, since they can't tell a value the
provider lacks from one it failed to send.

Closes Silo-Server#3363

* fix(metadata): clear a corrected match's credits before saving it

A failed credit clear was only logged after the new identity was saved. A retry
no longer counts as a correction, and a refresh with no credits doesn't replace
them, so the old title's credits could stay for good. Clear them before the save
and stop on failure, as localized text already does.

Also cover mixed name and overview locks in the localized text contract.

* fix(metadata): stop a correction when its stored credits can't be read

With one of Cast and Crew locked, a correction reads the stored credits to
keep the locked group and drop the other. A failed read used to fall back to
leaving all credits as stored and still saved the new identity, so the retry
was no correction and kept the previous match's unlocked group for good. The
correction now stops before the identity is stored, like the other clears; a
refresh still leaves the credits as they are.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…3623)

* feat(web): group the dashboard Nodes card by node group

Show stream nodes as one table with a heading per node group, so three
groups fit a default-size widget without scrolling and each reading sits in
a labelled column.

Groups with problems sort first and take their worst node's status. The
card shows CPU, RAM, and GPU, and warns when a transcode directory is more
than 90% full. An unreachable node shows dashes, because a failed health
check reports zeros that would read as an idle node.

Move the node state rule, its labels, and the cap rule into the shared node
presentation module so the Nodes page and this card agree.

* fix(web): check node sample age for GPU-only samples

A healthy node whose sample carries GPU data but no system block skipped the
age check, so an old GPU percentage could read as live. Run the check on its
own so both readings use it.

* fix(web): show no counts for a switched-off node on the Nodes card

A disabled node leaves the pool and is never health-checked again, so its
active_jobs and egress_kbps keep whatever the last check reported. The card
showed those as live numbers in the row and added them to the header totals,
which the server's egress chart leaves out. Treat a disabled node like an
unreachable one: dashes in Active and Mbps, and sum work and egress over
enabled, healthy nodes only.

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

* fix(web): say why a node's load reading is a dash on the Nodes card

A stale or missing sample turned CPU, RAM, and GPU into dashes with no
tooltip, so a stalled sampler looked like one that never ran. Carry the
reason describeNodeSystem already gives into the dash's title.

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

* fix(web): keep full group names when two would shorten alike

Dropping the shared prefix can leave two groups with the same label, as
prod-api-east and prod-api-api-east both become api-east. Those groups now
keep their full names so their headings stay distinct.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…Trending worldwide row (Silo-Server#3646)

* feat(sections): let the Trending worldwide row show movies or TV shows only

The trending_discover row mixed movies and series with no way to keep one
kind. It now takes an optional filter_type (movie or series). Leaving it
unset keeps both, so existing rows don't change.

The filter runs when the row is read, against the same mixed TMDB snapshot
every trending row shares, and before the display limit. No migration or
extra TMDB requests are needed.

The row editor shows the choice as Show: Both, Movies or TV shows, next to
Period, and the row description names the kind.

* fix(web): copy a filtered Trending worldwide row only to libraries it can fill

A Trending worldwide row set to Movies or TV shows was offered every
library page as a copy target, so a Movies row copied to a TV library
saved fine and stayed empty. Treat its filter_type as the row's library
kind, the way book rows already narrow their targets.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…roxies (Silo-Server#3582)

* fix(auth): take request origin forwarded headers only from trusted proxies

requestBaseURL built the device login verification link, the bandwidth
probe URL and the webhook-sync receiver URLs from the raw X-Forwarded-Proto
and X-Forwarded-Host of any client. A value such as "https,http" became the
scheme verbatim, so the link was not a valid URL, and any client could
choose the scheme and host of the link it was handed.

It now delegates to clientip.RequestOrigin, which reads those headers only
from a trusted proxy and falls back to the transport scheme when the proxy's
scheme is ambiguous. The v2 tests that relied on forwarded headers now run
behind clientip.Middleware with a trusted peer, as the API listener does.

Closes Silo-Server#2917

* docs(auth): say what requestBaseURL's trust rule guards against

* ci: retrigger after a package mirror timeout in Go DB external auth

* fix(playback): fall back to the public URL when a proxy's forwarded host doesn't count

bandwidthProbeBaseURL skipped the public URL fallback whenever any
X-Forwarded-Host header was present, while RequestBaseURL now ignores
that header from an untrusted peer and treats a list as ambiguous. A
proxy that rewrote Host to an IP and sent such a header then got a
probe URL on the internal address even with server.public_url set.
Decide on the host clientip.RequestHost resolved instead.

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

* fix(contract): declare DeviceLoginStart.verification_uri as a URI

The shape lint held this member as pending on Silo-Server#2917, which this branch
fixes: the link is now always an absolute URL.

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

* fix(playback): keep the reached IP origin when a trusted proxy names it

The previous commit treated Host as rewritten whenever the resolved
host equalled Host, so a trusted proxy that kept an IP Host and also
sent it as X-Forwarded-Host got the public URL instead of the address
the client used. clientip now exposes ForwardedHost, the header it
accepted or "", and the probe falls back only when none was accepted.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…Silo-Server#3656)

* fix(profiles): hide profile actions an account at its limit can't use

listProfiles now reports max_profiles, the household limit from the
account's effective access policy. CreateProfile and ListProfiles read it
through one helper, so the limit a client shows is the one a create meets.
A limit that can't be read is omitted instead of failing the list, and a
remote-playback handoff, which lists only its own profile, never gets it.
The frozen v1 GET /profiles body is unchanged.

The web app uses it through a canAddProfile helper: the picker's Add
profile tile and Settings' New profile button are hidden once the
household is full (Settings states the limit instead), and Switch Profile
is hidden when there is one profile and no room for another.

Closes Silo-Server#3641

* test(profiles): cover the limit listProfiles reads, including a failed read

* fix(web): refetch the sidebar's household on focus so a raised limit shows Switch Profile

* ci: rerun checks after the shellcheck download outage

* fix(profiles): say a handoff can't create profiles, and test the Switch Profile rule

* fix(profiles): gate onboarding's Add profile and keep Switch Profile for a PIN profile

The post-invite "Who's watching?" page offered Add profile at the
household limit, so an invited account in a group limited to 1 hit a 409
on its first screen. Gate it with canAddProfile, as the picker does.

Switch Profile also locks a PIN-protected profile back behind the picker
without signing out, so keep it for a PIN profile even with one profile
and no room for another.

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

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…lo-Server#3357)

* fix(plugins): show a refused automatic plugin update in web admin

The update check now records the version and the admin-facing reason on
the installation when an automatic update fails, and clears it once the
installed version changes or a later check no longer fails. The v2
installation view returns it as update_failure, and the Plugins page and
the plugin's page show it.

* fix(web): refresh plugin installations after a realtime reconnect

A plugin update check that finished while the events socket was down now
shows its result too. Also keep the PluginRuntime doc comment on its type.

* fix(plugins): keep a refused update from outliving a newer install

A manual replacement returned its installation with the refusal the version
change had just cleared, and an update check that lost a race to a manual
update could record its refusal against the newer version. The replacement
result now drops the record, and the check writes it only while the version
it tried to update from is still installed. A refused update also counts
toward the Plugins page's Needs attention filter.

* fix(plugins): clear a refusal once a plugin has no repository

A refused automatic update stayed on a plugin whose repository was
deleted (repository_id goes NULL), because the update check skips such
plugins before recording or clearing. The notice and Needs attention
flag then never cleared. The check now clears the record for a plugin
without a repository, which has no automatic update left to fail.

A clear that finds the plugin already uninstalled no longer counts as a
failed operation, so removing a plugin during a check doesn't fail the
Check Plugin Updates run.

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

* fix(backup): carry a plugin's refused-update record with its live release

A restore copies the live server's release columns onto each plugin
installation both servers have, but left the backup's refused-update
record in place. A restored plugin could then show "Update to X failed"
for an update from a version it no longer runs, until the next update
check cleared it. Carry the record with the release it belongs to.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…le (Silo-Server#3586)

* fix(playback): break the remux response when the source stops mid-title

When the source file stops being readable partway through a progressive
remux, FFmpeg logs "Error during demuxing", finishes the output as if the
input had ended and exits 0. The copy loop then returned nil on any read
result, so net/http ended the chunked response cleanly and the web player
treated it as the end of the episode: marked watched, next episode started.

Capture FFmpeg's stderr in a bounded tail. When the output closes, reap
FFmpeg without cancelling it first and treat a non-zero exit or the demux
error line as an output that ends short of the source. In that case log a
warning with the stderr tail and abort the response with
http.ErrAbortHandler, so the client sees a broken stream instead of EOF.
A request that went away or a session stop (Abort) still ends quietly.

Closes Silo-Server#3512

* docs(playback): say a progressive remux aborts when its source fails

Clients must treat an incomplete progressive remux response as a transport failure, not the end of the title.

* fix(playback): break the remux response on a failed output read

A read of FFmpeg's output that fails with anything other than EOF now
breaks the response even when FFmpeg then exits 0, unless the request
went away or Abort withdrew the stream.

Also clears the changed-lines lint: the session field that records an
ended context is now contextEnded, and the new test checks the error
from closing the response body.

* fix(playback): keep a complete remux whose pipe outlived FFmpeg

procgroup gives every remux a WaitDelay. When FFmpeg exits 0 but something
it started still holds the stderr pipe, Wait returns exec.ErrWaitDelay after
that delay. finishOutput treated it as an FFmpeg failure and aborted a
response that already carried the whole title. ErrWaitDelay only follows a
successful exit, so the output is complete; the demux-error check still runs.

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

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
blurbery and others added 26 commits November 11, 2026 11:52
…de details (Silo-Server#3954)

* perf(jellycompat): read a page's episodes in one query for episode detail

The Jellyfin episode list builds every episode's detail in one batch when a
client asks for media sources, streams, chapters or people. The batch still
read each episode's row on its own, so a 1000-episode page (the size Infuse
gets when it sends no Limit) cost 1000 extra round trips.

Read the page's episodes with one query and look each one up by ID. Episodes
that no longer exist are skipped as before, and the response is unchanged.

* test(catalog): pin the episode detail batch to a fixed statement count

A Jellyfin season page's episode detail batch must not issue a statement
per episode. The pin compares a one-episode batch with a four-episode one.
* perf(catalog): drop expired query cache entries

The catalog query caches (facet values, seek anchors, letter index and
technical facets) removed an expired entry only when the same key was
asked for again or newer values pushed it out of the budget. On a quiet
node, values for filters nobody revisits stayed in memory for the life
of the process, up to each cache's full budget.

A lookup now sweeps expired entries out, at most once a minute. Fresh
entries and cache keys are untouched, so responses do not change.

* test(catalog): check the expiry sweep keeps fresh query cache entries

Also say in the sweep's comment that a cache with no lookups keeps its
entries.

* fix(catalog): judge query cache freshness after taking the lock

A lookup that waited for the cache mutex judged freshness by the time it
started waiting, so it could return a value that expired during the wait.
…Server#3199)

The trusted CI tools run from main against a pull request's Makefile. Retiring
/api/v1 removes the migration ledger, its contract package and the v1 route
freeze target, so main's copy has to stop naming them before that change can
pass CI. The subprocess-test package list now ignores listed packages that no
longer exist.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Every /api/v1 route on the main API listener now answers 410 Gone with
client_upgrade_required, Cache-Control: no-store and a link to the upgrade
guide. It runs no authentication and never redirects. GET /api/v1/health and
GET /api/v1/ready, and the node health probes, are unchanged. Retired URLs
that carry a credential in the path are registered on the tombstone so the
request and activity logs keep redacting it.

The planned two pre-1.0 bridge releases are waived (Silo-Server#886). The v1 handlers,
the v1 branches in shared middleware, playback and OAuth code, and the
migration harness (ledger, scenario catalogs, offline routes, v1 route
freeze) are removed. Setup the v1 router block did for handlers v2 shares is
moved next to their construction. Tests that exercised shared behavior
through v1 handlers now run against the v2 entry points.

Code that only v1 reached goes with it: the request and response types and
request-reading helpers the handlers left behind, the v1 rule vocabulary and
catalog grammar switches, the v1 watch-together member projection and host
band, the subtitle search bridge, and the request-wrapping admin middleware.

BREAKING CHANGE: clients and integrations that still call /api/v1 receive
410 and must move to /api/v2.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…one query (Silo-Server#3978)

When a Jellyfin episode list is scoped to a library, GetEpisodeDetailsForSeries
checked each episode's library membership with its own query. Check the whole
page with one GetItemsInLibrary call instead. Episodes outside the library are
still left out of the result.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…o-Server#3946)

The start and replan handlers decide what to try after a planner refusal:
another version, the same file without its subtitle, or a retry when
settings or tone-map capabilities failed to load. They decided it from
the planner's strings. Two reasons were re-declared as literals in the
handler, and the settings case matched message text.

The answers now live in internal/playback next to the code that produces
the refusals, as AnotherVersionMayPlay, SubtitleRefusal and
ToneMapDependentRefusal on PlannerResultV3. The planner marks the four
refusals a setting decides with SettingsDependentRefusal, which replaces
the message matching. no_alternate_version and
subtitle_conversion_unsupported are declared once and shared with the
watch-together source fallback.

No change in planner output or in what a client receives.

Part of Silo-Server#3407.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…eds (Silo-Server#3968)

* fix(audiobooks): let only the acting admin open Audiobookshelf RSS feeds

Any signed-in profile on the Audiobookshelf-compatible listener, a child
profile included, could open a public RSS feed for a book it could play.
The feed and its audio files were then served to anyone with the link,
without authentication.

Opening a feed now needs the acting administrator, by the rule the
native API's admin routes use: the account holds the server admin role
and the caller is its primary profile, or the account has no profiles.
Anyone else gets 403 and no feed is stored. The public feed and file
routes apply the same test to the feed's stored owner on every fetch, so
a feed whose owner is not, or is no longer, the acting administrator
answers the same 404 as a closed feed.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* test(audiobooks): pin feed owner lookups that find nothing or fail

An admin account whose feed profile was deleted is an unavailable owner,
so its public feed answers the closed-feed 404 rather than a server
error, and opening a feed stops with 500 when the owner lookup fails
instead of reading the empty filter as unrestricted. Both already hold;
these rows keep them that way.

The comments now say the check is the built-in acting-admin rule: an
operator's custom policy override of the native admin gate is not
consulted here.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
…terminates it (Silo-Server#3969)

* fix(jellycompat): end a Jellyfin play when an administrator stops or terminates it

An administrator's stop or terminate reported success for a Jellyfin-protocol
play, but the stream kept playing: the play's transcode runs in jellycompat's
own manager, and the client's next segment, manifest or progress request
rebuilt the session from the play's row. The admin end path now tells
jellycompat first, which retires the play's row (the terminal state the
client's own stop and the expiry claim already set) and closes its transcode,
so those requests find no play on any API server. The row is found by its
upstream session, so a terminate that lands on a server without the session
ends the play too and reports success. An in-flight progressive remux now
ends when its session is stopped, as on the native stream route.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(jellycompat): keep a direct play's row when an administrator ends its session

Retiring the row of a direct-play Jellyfin play let a Static=true client start
a new play under a new session ID, which the stream deny marker does not
cover, so a proxy that refused the old session served the new one. An
administrator's end now retires only a play the server transcodes or remuxes,
decided from the row's current play method in both stores, and leaves a direct
play as it was. A retirement whose write fails is retried with backoff instead
of being dropped. Tests now cover the hook registration through the real
constructor and the abort of an in-flight progressive remux, and the docs
state what the end does and does not guarantee.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(jellycompat): reread a play's row after a repeated administrator end

A repeated administrator end on the server holding a play found the row
already retired by another server and returned without touching its cached
copy, so that server kept routing the copy until its next revalidation. It
now drops the copy's validation, so the next request reads the retired row.
The session manager methods the handlers probe for at run time are now checked
against the production manager at compile time. Comments and docs state the
holder's idle and revalidation bounds as they are, the transcode a racing
request can leave behind, and the one failed-write case the retry does not
finish.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(jellycompat): never retire a moved play from a stale cached copy

When an administrator ended an upstream session that another API server had
already replaced, a server whose cached copy still owed the row an earlier
write hid the play by its ID, which retired the replacement play, including a
replacement direct play. The retirement now writes rows only through the
statement keyed on the upstream session and play method. A cached copy that
owes writes sends them through the store's update path and the statement runs
again; a copy is hidden without a row write only when the play never reached
Postgres or the statement failed.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(jellycompat): close three races in the administrator end of a Jellyfin play

The in-memory store looked a play up and retired it in two steps, so a method
or upstream switch between them could retire the play it had just attached;
the check and the mark now share one lock, and the durable store's cache-only
hide uses the same step. A transcode that a request started after the end
closed the play's transcode, but before its session stopped, had no session
left to expire it; the end now closes the transcode again once the session
has stopped. A copy hidden by a failed retirement now keeps the writes it owes
the row, and the retry replays them and retires the row in one transaction,
so a play whose attach failed in the same outage is retired too.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(jellycompat): treat a failed replay as a failed retirement

When the retiring statement matched nothing and the cached copy owed the row
writes, the replay's error was discarded: if the replay failed, the end
reported nothing to retire with no error, the copy kept routing the ended
upstream session, and no retry ran. A failed replay now hides the copy with
its owed writes and returns the error, so the caller's retry finishes the
retirement. The failed-statement test now drives the outage through the
retirement itself, and the comments and docs state when the row can be
routable under the ended session.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(jellycompat): report a retirement whose result fails partway as failed

The retiring statement returned the rows it had already read together with
the error when its result failed partway. The caller saw rows, reported the
play retired and dropped the error, so no retry ran even though the statement
may not have committed. The statement now returns no rows with the error, and
the existing failed-statement path hides this server's copy and retries.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
…llection is written (Silo-Server#3976)

* fix(collections): decode a personal collection's poster before the collection is written

Creating or updating a personal collection wrote the collection first and
processed its poster afterwards, so a poster the server refused failed the
request after the collection existed, and a client that retried created a
second one. The 500 that followed repeated the internal error, which can
name the artwork store's bucket and key or a source URL with a credential.

The poster is now read and decoded before the write, so a refused poster,
or a server too busy to decode it, creates or changes nothing. Failures are
answered by cause: 400 for a poster the server cannot use, including an
upload of an unsupported type or over the size limit, 503 when image
processing is busy, and otherwise a 500 with a fixed message whose cause is
logged with the collection ID and without the source URL's credentials.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(collections): log only the host and kind of failure for a failed poster download

When a personal collection's poster source could not be downloaded, the
log line carried the transport error's text. That text quotes the requested
URL and, after a redirect to an address the client cannot parse, the
response's Location header, so a credential in a path segment or in that
header reached the log.

A failed download is now reduced to the host the request named and one of
a fixed set of failure kinds, and is logged as a warning because the caller
chose the source. The server's own failures are still logged as errors.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(collections): record the admin upload answer and use the variant key constant

Merging main left the v1 admin collection routes answering 400 for an uploaded part of an unsupported type or over the size limit, because they now keep client-facing artwork errors and share the multipart reader. The v1 record says so. The poster docs name a refused source address among the 500 answers, and the helper test checks again that the admin helper hides a server failure.

The store step compares against the artwork key package's constant for the original variant, which the changed-line lint asks for.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* docs(collections): tell an unusable poster link apart from a refused address in the v1 record

The row said createCollection answers 422 for a refused poster_source_url, which reads as covering an address the server refuses to fetch. That address keeps its fixed 500; the 422 is for a link the server cannot use.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* docs(collections): name the refused-address answer as the exception to the fixed 500 message

The v1 record said any other failure answers the fixed message Failed to store collection artwork. A source address the server refuses keeps its own fixed message, so both documents now say that.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
…connections (Silo-Server#3966)

* fix(webhooksync): let only the household manager manage webhook sync connections

Webhook sync connections belong to the account, but every profile on it,
including a child or rating-restricted one, could list them with their
receiver secrets, read the delivery log, change or delete them, and remap
which profile an external user's watch state is written to. All v2
connection operations and the v1 webhook-sync and plex-sync management
routes now apply the household-manager rule Discord delivery already uses:
the primary profile, with PIN proof when it is locked, or the documented
profile-less admin cases. The secret-authenticated receivers are unchanged,
and the web offers the settings page only to the primary profile.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(webhooksync): read the v1 request body before the household check

The v1 webhook sync handlers that take a body checked household authority
before decoding it, so a client that held its upload open kept PIN proof
that a PIN change in the meantime had revoked. Create, update, and mapping
replacement on the webhook-sync and plex-sync routes now buffer the body
first, as the other v1 household writes do. That read is capped at 1 MiB,
and a larger body gets 400.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* docs(settings): say who the web shows the webhook sync page to

The page is also shown to an acting admin with no profile selected, whom the API refuses once any profile on the account is limited.

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

---------

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
…-Server#3953)

* perf(database): cap auto-tuned shared_buffers and worker counts

The Postgres auto-tuner gave shared_buffers a quarter of the memory budget with no upper limit, sized worker settings from every CPU the container could see, and let each autovacuum worker use the full maintenance_work_mem. On a large host that reserved many gigabytes for a catalogue database whose hot set is far smaller.

shared_buffers is now a quarter of the budget up to 2GB, or up to POSTGRES_TUNE_SHARED_BUFFERS_MAX when set. The ceiling is fixed and not sized from the database, because shared_buffers changes only at a restart and the omnibus image writes it before the database has content. effective_cache_size is still sized from the whole budget.

A detected CPU count sizes at most 16 workers; an explicit POSTGRES_TUNE_CPUS is used as given. autovacuum_work_mem is always set, to maintenance_work_mem up to 256MB. work_mem keeps its previous basis, so neither bound raises it.

On an existing install the tuner writes the lower values at the next Silo start and logs once per start that a Postgres restart is pending until Postgres restarts.

* style(database): use the spelling the linter expects

* perf(database): fix the shared_buffers ceiling at 2GB

Drop the POSTGRES_TUNE_SHARED_BUFFERS_MAX setting: the auto-tuned
shared_buffers is a quarter of the memory budget up to a fixed 2GB.

* test(database): drop a leftover mention of a configurable ceiling

* docs(database): describe the tuner bounds where they apply

The omnibus note listed autovacuum_work_mem among the settings written
before PostgreSQL starts, which it is not, and did not say that an existing
cluster keeps its old values until one restart. The CPU note now says it
bounds worker settings. The settings test keeps its cases in a table outside
the function and checks the 16 and 17 CPU boundary.

* perf(database): use an explicit POSTGRES_TUNE_MEMORY as given

The 2GB shared_buffers ceiling now applies only when the memory budget is
detected. An explicit POSTGRES_TUNE_MEMORY takes its full quarter, the same
rule POSTGRES_TUNE_CPUS follows, so a database that outgrows the ceiling has
a way up on both the Compose file and the omnibus image.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…ty (Silo-Server#3967)

* fix(auth): let only the household manager disconnect a sign-in identity

Any profile on an account, including a child profile on a household whose
primary profile has a PIN, could disconnect one of the account's external
sign-in identities, and the account's owner cannot always link it again
because that needs the account's local password.

deleteAccountIdentity is now profile scoped and requires the household
manager, the rule personal API key creation uses: the primary profile,
with its PIN verified when it has one. Another profile gets 403
permission_denied and an unverified primary profile gets 403
profile_verification_required. listAccountIdentities answers can_unlink
by the same rule for the profile asking, and the web app shows its
"only way to sign in" hint to the primary profile only.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* fix(auth): restore the web sign-in hint and correct the disconnect docs

The web account page is reachable only by the primary profile or an
acting admin, so the "only way to sign in" hint goes back to following
can_unlink alone; limiting it to the primary profile hid it from an admin
who has not chosen a profile. The docs now say which refusal each caller
of deleteAccountIdentity gets, including the viewer gate's 404 for an
unknown profile and 403 for a PIN-protected profile without its token.
They also say the account cannot always link an identity again by itself,
since an administrator can still link one.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
…t and replan (Silo-Server#3947)

A start and a replan both look for another version of the item when the
planner refuses the one they planned: try each version, hold back one
that drops the subtitle, then try the refused file without its subtitle.
The two handlers held that algorithm as two near-identical loops, and
the planner input was written out inline at eleven sites.

planAlternateVersionV3 is now the one loop. What differs between a start
and a replan is passed in: which versions to try, how the viewer's
tracks move onto each, the replan's fixed refusal message and its
preference for the requested edition. plannerInputV3 builds the planner
input from what the passes of one start or replan share.

Each site lists downloaded subtitles and creates its Dolby Vision probe
as often as before. The escalation of a refused progressive remux still
reads settings again, as it did.

No change in what a client receives.

Part of Silo-Server#3407.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…te fails (Silo-Server#3951)

When the sweep ended a session from its start row and the admin history
write failed, the row stayed at the head of the oldest-first batch and was
retried every 15 seconds on every server, logging an error each time.
Enough such rows would fill the 100-row batch and stop the sweep from
ending any other session.

A failed write now counts as activity on the lifecycle row: the session
stays live so the history row is still written once the cause is fixed,
but it waits another idle grace before the next try and moves behind
sessions idle for longer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ilo-Server#3948)

* refactor(playback): make the planner's bitrate cap and plan annotations explicit steps

PlanPlaybackV3 rewrote its own result from two deferred closures: one
refused any result that broke the server bitrate cap, the other set the
active quality and the native-selectable subtitle rows. Neither was
visible where a route was chosen, and an early refusal had to sit above
the cap closure to avoid being renamed by it.

Both are now ordinary steps at the end of PlanPlaybackV3, which shrinks
to source checks, the cap, route selection, cap enforcement and
annotation. Video route selection moves unchanged into planVideoV3.

No change in planner output: the committed protocol v3 fixtures
regenerate identically.

* refactor(playback): add a candidate-list planner beside the route walk

The planner chooses a route by walking a fixed sequence of branches. The
order of routes exists only as that control flow, so every new case has
to be checked against all the branches around it.

This adds a second planner that lists every way a file could play as a
candidate, sorts the list by five ordered preference rules, and takes
the first viable candidate that has not been attempted. Capability
lookups that reach pooled nodes or run FFmpeg are memoized and run only
for a candidate that needs them.

PlanPlaybackV3 still calls the walk. TestCandidatePlannerMatchesWalk
runs both planners over a generated corpus and fails on any difference
in the result or on any lookup the walk did not make. It samples by
default; SILO_PLANNER_CORPUS=full runs all of it. The test goes away
with the walk once the candidate planner replaces it.

* refactor(playback): choose the route from a candidate list

PlanPlaybackV3 is now the candidate planner: it lists every way the file
could play, sorts the list by five ordered preference rules, and takes
the first viable candidate that has not been attempted. The route walk
it replaces is deleted, along with the test that compared the two.

The route order is now one readable list instead of the order of
branches in a 430-line function. Six behaviours of the walk that the
rules cannot express are kept as explicit, commented special cases, so
the planner returns what it returned before. Capability lookups are
memoized and still run only for a candidate that needs them.

docs/architecture/playback-planner.md describes the model, the rules,
the special cases and what a change has to keep.

No change in planner output: the committed protocol v3 fixtures
regenerate identically, and a generated corpus of 1.9 million inputs
gives byte-identical results before and after.

Closes Silo-Server#3407.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(api): send nosniff on every API response

The web app's Content-Security-Policy allows scripts from its own origin,
and the ebook reader relies on that policy alone to keep a book's markup
from running script. API responses did not send X-Content-Type-Options, so
a browser would run one as a script when a page named it by URL, whatever
Content-Type it carried. API routes return bytes that users and libraries
supply.

The native API, Jellyfin and Audiobookshelf listeners now send nosniff on
every response, so a browser uses a response as a script or stylesheet only
when it is typed as one.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* chore(api): record the nosniff middleware in the route inventory

The route inventory lists the native listener's middleware chain, which now
starts with httpstream.NoSniff.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* chore(api): regenerate the route inventory

The inventory orders middleware chains by content, so adding
httpstream.NoSniff to the native chain renumbers the chains and the routes
that point at them. This replaces the hand edit with the generator's output.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

* chore(api): list nosniff as infrastructure middleware in the route inventory

The inventory marks any middleware it does not know as unclassified, which
tagged the native routes after httpstream.NoSniff joined their chain. It
sets one response header and decides nothing about access, so it joins the
infrastructure list, and the inventory is regenerated.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Mythos 5.2 <noreply@anthropic.com>
…#3994)

The letter index behind queryCatalogLetters sorted the whole title-ordered
list, folded every row's initial to a letter, buffered the list for a total,
then sorted it again by position to find where the letter changes. It now
numbers the rows in one pass over the browse order, keeps only the rows where
the initial changes plus the last row, folds just those to a letter, and
merges neighbouring runs that share a letter in Go. The response is
unchanged.

The DB test now walks the cursor pager a few titles a page and seeds titles
that a linguistic collation interleaves with the letters ('Allo 'Allo!, Ève).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge Silo-Server/silo-server up to 2ee1b72 into the fork. Resolutions
follow docs/architecture/fork-divergence.md:

- Keep Vio's V3 ladder planner and the fork's playback/stream, virtual
  library, transcodenode and jellycompat implementations.
- Adopt upstream's /api/v1 retirement (Silo-Server#3200) with a documented carve-out
  for three Vio-only operations that have no v2 operation yet, and freeze
  the pre-retirement route inventory for the migration-ledger and
  scenario-catalog gates.
- Keep the fork's image pipeline, contribution/evidence policy, audio
  selection, collection virtual_playback default and Vio client identity.
- Regenerate the v2 contract, fixtures, web types, route inventory,
  playback fixtures, offline routes and the settings contract.
The merge left three seams in the web client: upstream's i18n catalog
plugin was missing from the fork's Vite config, several fork-owned
components had been replaced by upstream's, and some tests still expected
the pre-merge contract. Restore the fork components, add the catalog-part
plugin alongside the fork's jassub suppression, carry the device header on
the learned-limit reset, clamp collection limits, expose profile limits,
and regenerate the settings binding copy. Web typecheck, lint and the
affected suites pass.
scripts/ci/dbpins names every copy it makes with a dbpins_ prefix. The
guard in testdb rejected those copies, so every DB-backed test binary
that ran through the wrapper exited before listing or running its tests.
Accept the prefix alongside the test/purge markers.
The destructive handler fixtures guarded their database by name and
rejected the dbpins_ copies the DB contract job hands them. Accept the
prefix, as testdb does, so the virtual_playback and playback evidence
pins run in CI.
…eaks

Device headers keep the spellings the fork's main already published: the
download registry and device list declare X-Vio-Device-Id, while playback,
login and device updates stay on X-Silo where the merge had moved them.
The two upstream breaks left (a nullable dashboard layout and the retired
single-entry download read) carry explicit pre-lock approvals with the
reasons the web client is ready for them.
The operation keeps its X-Silo declaration, so the v2 boundary supplies
the device identity it needs; the web call no longer passes one.
The catalogs describe /api/v1, which now answers the retirement tombstone.
The coverage gate still checks them against the frozen pre-retirement
inventory; only the live execution cannot run.
@randrini
randrini marked this pull request as ready for review November 13, 2026 13:39
@randrini
randrini merged commit a80361c into main Nov 13, 2026
11 checks passed
@randrini
randrini deleted the merge/upstream-2026-11-11 branch November 27, 2026 13:05
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.

6 participants