Skip to content

Merge upstream/main into Vio (2026-11-27, non-playback) - #498

Merged
randrini merged 191 commits into
mainfrom
merge/upstream-2026-11-27
Nov 28, 2026
Merged

randrini merged 191 commits into
mainfrom
merge/upstream-2026-11-27

Conversation

@randrini

@randrini randrini commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Vio tracks Silo-Server/silo-server and the fork's delta was last rebased onto upstream on 2026-11-22. Upstream has since landed 152 commits (through 0a631fb9cb, 2026-11-27), and several of them rewrite machinery the fork owns: the playback engine, the transcode-node runtime, the API/handler layer, and the web app. A plain merge produced 139 conflicted files and 295 hunks.

This PR merges the part that does not depend on that machinery, keeps the fork's engine and API/UI layer, and records the deferral in docs/architecture/fork-divergence.md. Upstream's handler and catalog fixes are intentionally deferred: they rewrote items.go, collections.go, the collection repository and the version-liveness reads that the fork's virtual-library and collection divergences sit on.

Approach

Validation

  • scripts/check-fork-invariants.sh: holds, including gofmt and prettier.
  • go build -tags silo_node ./...: passes.
  • Contract checks: verify-apiv2-openapi, verify-apiv2-fixtures, verify-apiv2-web-types, verify-route-inventory, verify-offline-routes, verify-playback-fixtures, verify-settings-bindings, verify-migration-ledger, verify-scenario-catalogs, verify-local-paths: pass.
  • Web: pnpm exec tsc -b and pnpm run build pass.
  • Go tests: the full suite runs green in CI, including the Postgres DB pins, the integration job and the external-auth job.
  • Lint: make lint-changed reports no changed-line findings.
  • The pre-push hook's lint-changed was bypassed for intermediate pushes after gofmt; CI runs the changed-line gate.
Files present upstream but not carried (238)

web (78)
web/eslint-rules/class-tokens.js
web/eslint-rules/text-size-in-rem.js
web/eslint-rules/text-size-in-rem.test.js
web/public/silo-icon-1024.png
web/public/silo-wordmark-sidebar.png
web/src/api/adminCollectionRows.test.ts
web/src/api/v2/adminSessionsCache.test.ts
web/src/components/AdminCatalogImportSource.tsx
web/src/components/AdminSessionActions.message.test.tsx
web/src/components/MediaItemMenu.metadataDetail.test.tsx
web/src/components/MetaLine.tsx
web/src/components/admin/dashboard/DashboardGrid.test.tsx
web/src/components/admin/dashboard/range.test.ts
web/src/components/admin/dashboard/wheelContainment.test.ts
web/src/components/admin/dashboard/wheelContainment.ts
web/src/components/admin/dashboard/widgets/InsightsWidgets.tsx
web/src/components/admin/insights/ActivePeopleChart.tsx
web/src/components/admin/insights/LibraryCoverageList.tsx
web/src/components/admin/insights/PlaysOverTimeChart.tsx
web/src/components/admin/insights/ViewingHeatmap.tsx
web/src/components/admin/insights/ViewingTimeChart.tsx
web/src/components/admin/insights/viewingTime.ts
web/src/components/admin/users/CreateUserForm.test.tsx
web/src/components/collections/ItemCollectionsRow.tsx
web/src/components/sessions/LoginSessionsPanel.reduced.test.tsx
web/src/components/subtitles/SubtitleUploadForm.test.tsx
web/src/components/ui/select.test.tsx
web/src/hooks/queries/admin/backupRestore.test.tsx
web/src/hooks/queries/admin/deviceOverrideWrite.test.tsx
web/src/hooks/queries/admin/insights.keepPrevious.test.tsx
web/src/hooks/queries/admin/insights.ts
web/src/hooks/queries/itemCollections.ts
web/src/hooks/queries/mediaSurfaceRefresh.detail.test.ts
web/src/hooks/queries/notificationPluginDestinations.ts
web/src/lib/calendarWeek.test.ts
web/src/lib/episodeCardLabels.test.ts
web/src/lib/mediaFormat.test.ts
web/src/lib/newPassword.test.ts
web/src/lib/overlays/style.test.ts
web/src/pages/AdminDashboard.refresh.test.tsx
web/src/pages/LegacyAdminActivityRedirect.tsx
web/src/pages/admin-history/HistoryTableRow.tsx
web/src/pages/admin-history/SessionDetailSheet.test.tsx
web/src/pages/admin-history/SessionDetailSheet.tsx
web/src/pages/admin-history/historyFormat.ts
web/src/pages/admin-insights/AdminInsights.tsx
web/src/pages/admin-insights/BandwidthTab.tsx
web/src/pages/admin-insights/DevicesTab.tsx
web/src/pages/admin-insights/DevicesUsageSections.tsx
web/src/pages/admin-insights/InsightsDashboardPins.tsx
web/src/pages/admin-insights/InsightsPlaysChart.tsx
web/src/pages/admin-insights/LibraryTab.tsx
web/src/pages/admin-insights/LiveActivityTab.test.tsx
web/src/pages/admin-insights/LiveActivityTab.tsx
web/src/pages/admin-insights/PeopleTab.tsx
web/src/pages/admin-insights/PersonDetailSheet.tsx
web/src/pages/admin-insights/PlaybackTab.tsx
web/src/pages/admin-insights/TitleDetailSheet.tsx
web/src/pages/admin-insights/TitlesTab.tsx
web/src/pages/admin-insights/insightRefreshProps.test.tsx
web/src/pages/admin-insights/insightsHelpers.ts
web/src/pages/admin-insights/insightsShared.test.ts
web/src/pages/admin-insights/insightsShared.tsx
web/src/pages/admin-insights/insightsTitleFormat.ts
web/src/pages/admin-insights/useInsightsPerson.ts
web/src/pages/admin-settings/AISettings.test.tsx
web/src/pages/admin-settings/LocalPasswordOffDialog.tsx
web/src/pages/admin-settings/MarkerSettingsGroup.tsx
web/src/pages/admin-settings/PausedPlaybackGroup.tsx
web/src/pages/admin-settings/useMarkerSourceDraft.ts
web/src/pages/settings/ApiKeysSettings.test.tsx
web/src/pages/settings/ApiKeysSettings.tsx
web/src/pages/settings/HistoryImportSettings.test.tsx
web/src/pages/settings/PluginDestinationsSection.test.tsx
web/src/pages/settings/PluginDestinationsSection.tsx
web/src/pages/settings/SignedInSessions.test.tsx
web/src/pages/setup-wizard/steps/FeaturesStep.test.tsx
web/src/player/hooks/useMarkerChangeGuard.ts
internal/api/handlers (48)
internal/api/handlers/admin_account_delete_db_test.go
internal/api/handlers/admin_artwork_local_path_test.go
internal/api/handlers/admin_history_read.go
internal/api/handlers/admin_insights.go
internal/api/handlers/admin_insights_bandwidth.go
internal/api/handlers/admin_insights_breakdowns_db_test.go
internal/api/handlers/admin_insights_cache.go
internal/api/handlers/admin_insights_cache_test.go
internal/api/handlers/admin_insights_db_test.go
internal/api/handlers/admin_insights_devices.go
internal/api/handlers/admin_insights_library.go
internal/api/handlers/admin_insights_library_test.go
internal/api/handlers/admin_insights_people.go
internal/api/handlers/admin_insights_plays.go
internal/api/handlers/admin_insights_plays_db_test.go
internal/api/handlers/admin_insights_queries.go
internal/api/handlers/admin_insights_resolution.go
internal/api/handlers/admin_insights_resolution_test.go
internal/api/handlers/admin_insights_titles.go
internal/api/handlers/admin_insights_usage.go
internal/api/handlers/admin_node_key.go
internal/api/handlers/admin_plugin_sign_in_refusal_db_test.go
internal/api/handlers/admin_ported_helpers_test.go
internal/api/handlers/card_availability.go
internal/api/handlers/catalog_episode_labels_test.go
internal/api/handlers/collection_row_cards.go
internal/api/handlers/collection_row_cards_db_test.go
internal/api/handlers/history_import_profile_test.go
internal/api/handlers/item_collections.go
internal/api/handlers/item_collections_db_test.go
internal/api/handlers/libraries_enabled_event_db_test.go
internal/api/handlers/libraries_unmatched_audiobook_db_test.go
internal/api/handlers/playback_attempt_plan_facts.go
internal/api/handlers/playback_paused_timeout.go
internal/api/handlers/playback_paused_timeout_db_test.go
internal/api/handlers/playback_paused_timeout_test.go
internal/api/handlers/playback_ported_helpers_test.go
internal/api/handlers/playback_relay_authority_test.go
internal/api/handlers/playback_session_features.go
internal/api/handlers/playback_transcode_rehome_resume_test.go
internal/api/handlers/playback_v3_surround.go
internal/api/handlers/playback_v3_surround_test.go
internal/api/handlers/policy_test.go
internal/api/handlers/ready_timeout_test.go
internal/api/handlers/session_ws_plan_invalidated_test.go
internal/api/handlers/settings_ported_helpers_test.go
internal/api/handlers/socket_close.go
internal/api/handlers/watch_together_writer_test.go
internal/playback (30)
internal/playback/adaptation_reasons_v3.go
internal/playback/candidate_planner_v3.go
internal/playback/candidate_routes_v3.go
internal/playback/candidate_video_v3.go
internal/playback/cellular_cap_v3_test.go
internal/playback/copy_fmp4.go
internal/playback/copy_fmp4_test.go
internal/playback/copy_group_assembler.go
internal/playback/copy_group_assembler_test.go
internal/playback/copy_keyframe_resume_test.go
internal/playback/directplay_revision_freebsd.go
internal/playback/keyframes/hevc.go
internal/playback/keyframes/hevc_test.go
internal/playback/main_test.go
internal/playback/past_end_segment.go
internal/playback/past_end_segment_test.go
internal/playback/paused_timeout.go
internal/playback/paused_timeout_test.go
internal/playback/plan_refusal_v3.go
internal/playback/plan_refusal_v3_test.go
internal/playback/planstore/paused_timeout_db_test.go
internal/playback/relayed_source_test.go
internal/playback/remote_stop_recipe_test.go
internal/playback/segment_recovery.go
internal/playback/segment_recovery_test.go
internal/playback/stream_end_recorder.go
internal/playback/subtitle_font_priority.go
internal/playback/surround_conversion_v3.go
internal/playback/surround_conversion_v3_test.go
internal/playback/transport_generation.go
contracts (23)
contracts/api/v2/fixtures/admin_playback_sessions_egress.json
contracts/api/v2/fixtures/get_admin_insights_activity_ok.json
contracts/api/v2/fixtures/get_admin_insights_bandwidth_ok.json
contracts/api/v2/fixtures/get_admin_insights_capabilities_ok.json
contracts/api/v2/fixtures/get_admin_insights_devices_ok.json
contracts/api/v2/fixtures/get_admin_insights_library_ok.json
contracts/api/v2/fixtures/get_admin_insights_people_ok.json
contracts/api/v2/fixtures/get_admin_insights_title_ok.json
contracts/api/v2/fixtures/get_admin_insights_titles_ok.json
contracts/api/v2/fixtures/get_admin_playback_history_entry_ok.json
contracts/api/v2/fixtures/get_home_section_items_collections_ok.json
contracts/api/v2/fixtures/get_password_policy_ok.json
contracts/api/v2/fixtures/invitation_lookup_not_found.json
contracts/api/v2/fixtures/list_admin_catalog_items_file_paths.json
contracts/api/v2/fixtures/list_admin_local_password_off_accounts_ok.json
contracts/api/v2/fixtures/list_catalog_item_collections_authentication_required.json
contracts/api/v2/fixtures/list_catalog_item_collections_not_found.json
contracts/api/v2/fixtures/list_catalog_item_collections_ok.json
contracts/api/v2/fixtures/list_catalog_item_collections_single_preview.json
contracts/api/v2/fixtures/notification_mute_many_notification_series.json
contracts/api/v2/fixtures/notification_unmute_many_notification_series.json
contracts/api/v2/fixtures/password_reset_completed_not_found.json
contracts/api/v2/fixtures/password_reset_lookup_not_found.json
internal/apiv2 (19)
internal/apiv2/admin_insights.go
internal/apiv2/admin_insights_library.go
internal/apiv2/admin_insights_test.go
internal/apiv2/admin_insights_usage.go
internal/apiv2/admin_local_password_off.go
internal/apiv2/admin_node_key.go
internal/apiv2/auth_sessions_reach.go
internal/apiv2/auth_sessions_reach_db_test.go
internal/apiv2/auth_sessions_reach_test.go
internal/apiv2/catalog_item_collections.go
internal/apiv2/catalog_item_collections_fixtures_test.go
internal/apiv2/demo_account_test.go
internal/apiv2/demo_login_test.go
internal/apiv2/notification_plugin_destinations.go
internal/apiv2/notification_plugin_destinations_test.go
internal/apiv2/oauth_completion_account_test.go
internal/apiv2/playback_session_subtitle.go
internal/apiv2/playback_stream_reference.go
internal/apiv2/playback_stream_reference_test.go
cmd (10)
cmd/silo/memory_limit_command.go
cmd/silo/node_keys.go
cmd/silo/node_keys_db_test.go
cmd/silo/node_provisioning.go
cmd/silo/plugin_notification_channels.go
cmd/silo/plugin_recovery_command.go
cmd/silo/proxy_declaration.go
cmd/silo/proxy_declaration_test.go
cmd/silo/transcode_node.go
cmd/silo/transcode_node_test.go
internal/transcodenode (9)
internal/transcodenode/jobcap_test.go
internal/transcodenode/nodefakes_test.go
internal/transcodenode/release_fence_test.go
internal/transcodenode/resolve.go
internal/transcodenode/runtime.go
internal/transcodenode/source_input.go
internal/transcodenode/source_input_test.go
internal/transcodenode/thin_node_core_linux_test.go
internal/transcodenode/thin_node_test.go
internal/jellycompat (8)
internal/jellycompat/file_lookup_test.go
internal/jellycompat/mixed_episode_browse_test.go
internal/jellycompat/query_critic_rating.go
internal/jellycompat/query_played_sort.go
internal/jellycompat/relay_authority_test.go
internal/jellycompat/track_memory.go
internal/jellycompat/track_memory_test.go
internal/jellycompat/web_component_unix_test.go
internal/scanner (4)
internal/scanner/file_repo_shorten_duration_db_test.go
internal/scanner/probe_convert_test.go
internal/scanner/probe_repair_copy_safety_cached_test.go
internal/scanner/probe_repair_copy_safety_persist_test.go
internal/downloads (3)
internal/downloads/prepare_observer_test.go
internal/downloads/remote_preparer_jobkind_test.go
internal/downloads/service_disposition_test.go
.macroscope/check-run-agents (1)
.macroscope/check-run-agents/visible-change-evidence.md
internal/api (1)
internal/api/router_panic_test.go
internal/catalog (1)
internal/catalog/library_collection_names_db_test.go
internal/nodepool (1)
internal/nodepool/jobkind_test.go
internal/requests (1)
internal/requests/discoverrows/kinds_mdblist_test.go
internal/userstore (1)
internal/userstore/threshold_test.go

Reconciliation

Follow-up commits make the adopted code meet the fork's contracts; the merge commit itself is unchanged.

  • Kept the fork's behavior in internal/catalog: detail reads surface the title details an admin edits; the external-ID lookup still requires a present playable file; recently-added TV event rows stay independent of the viewing ceiling because their list is cached without it (the play-target resolver applies it later); and a restore plan's collection ID is honored so a selective restore can lock the row it created.
  • Kept the fork's behavior in internal/metadata: "titlecard" resolves to an episode still, and library lookups use the item's own provider chain.
  • Kept the fork's behavior in internal/api/handlers: aggregate Home and library rows with no accessible cards are omitted; a direct section read still answers empty.
  • Kept the stored request outcome "cancelled" and writes a playback stop's progress in the same transaction.
  • Added a migration so episode_aliases foreign keys cascade content-ID renames; the episode search-refresh fixtures clone the alias table.
  • Adopted upstream where it does not collide: internal/nodeinstall waits on the fork node's health status instead of upstream's node-control fields; internal/downloads passes the planner's JobKind (the old two-argument assertion silently stopped matching and fell back locally); internal/policy maps an evaluation timeout to playback's admission sentinel; the collection sync task forwards interim progress.
  • Test expectations that moved: the auth sign-in budget fixtures use policies the assertions exhaust; the stale signup-settings fake returns unset except signup.enabled; the reset-link test accepts the fragment form; monitor-key scopes drop the deferred Insights routes; process and dependency metrics use upstream's silo_* names; the DB pin lists no longer name tests the deferred surface did not carry; the test-database guard accepts the CI job's watch_party database.
  • Lint: corrected spelling and applied staticcheck, perfsprint, govet, sloglint and revive suggestions across adopted files. Persisted status values keep their spelling with scoped //nolint:misspell reasons, and upstream functions over Vio's size or complexity limits carry scoped nolints. Dead test fixtures and the unused node-pool job-kind view were removed.

Risks

  • The v2 API surface and the web app are frozen at the fork's base. Upstream's v2 additions (password-policy endpoints, demo sign-in, Insights, item collections, node keys, playback-history rework) do not ship with this merge.
  • Upstream's handler and catalog fixes are deferred, so bug fixes in those files from this window are not included.
  • The deferred surface is now large enough that the next sync should adopt the upstream handler/catalog layer as a project, not as conflict resolution.

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.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: OpenCode
  • Tool(s): OpenCode coding agent
  • Model(s): deepseek-v4.1-flash:1017
  • Involvement: Fully AI-generated; not human-verified
  • Adversarial review: conflict resolution was reviewed against scripts/check-fork-invariants.sh and focused builds/tests; no independent model review was run.

Quick104 and others added 30 commits November 22, 2026 20:29
…edits (Silo-Server#5133)

* feat(playback): mark an item watched when playback reaches its end credits

A title whose end credits run past the remaining 10% stayed in Continue
Watching when the viewer stopped once the credits began. When the played
file has a stored credits marker in its end-credits window, reaching it now
finishes the item, whichever comes first of the credits and the watched
threshold. Native playback, realtime stops, admin and watch history,
notifications, and Jellyfin-compatible reports share the one rule, which
also decides completion before the min-resume floor.

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

* feat(playback): apply credits only from the played version and report finished stops in full

Address review of the credits rule:

- Use the item kind's credits window where it is known (native playback),
  and either kind's on the Jellyfin path, which doesn't record it.
- On the Jellyfin path, count credits only from a version the play
  identifies, not the first listed one guessed when nothing does.
- Report a finished stop to watch-sync providers as a play to the end, so
  providers that judge completion from progress record it too.
- Explain the credits rule under "Mark watched at" in web admin, and in
  the admin, Jellyfin, and marker API docs.

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

* chore(translations): sync 2026.11.22-d12da65

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

* fix(jellycompat): store each source's end credits when PlaybackInfo builds it

A Jellyfin play session didn't know whether its item was a movie or an
episode, and reloading it from the durable store dropped every credits
occurrence but the first. PlaybackInfo now resolves where each source's
end credits start, with the item's own window and every occurrence, and
stores that one value on the source; progress reports and stop scrobbles
read it. Sessions stored before this keep the percentage rule.

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

* style(jellycompat): use the episode type constant

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

* fix(jellycompat): name the stop's file only from an identified source

A stop scrobbled after the upstream session was reaped took its file from
the first listed source when nothing identified the played version, and
the scrobble then judged that cut's credits as the played one's.

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

* docs: note credits completion below the resume floor and offline sync's rule

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

* fix(playback): count credits only from the file the session streams

When v3 substituted another file for the requested one, such as a
lower-bitrate version or the next part of a multipart title, the native
paths judged the streamed position against the requested file's credits.
Those sessions keep the percentage rule.

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

* fix(jellycompat): judge a detached stop's scrobble on the identified file only

The stop snapshot after a reap refilled the session's file with the first
listed version for the detached history write, and the stop scrobble then
took that guess as the played version and applied its credits. The
scrobble now uses the file the fallback identified; history keeps the
guess as before.

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

* fix(playback): skip credits when a session measures a longer timeline

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

* fix(jellycompat): keep a detached stop's guessed version out of the streamed file

A Jellyfin stop handled after the native session was reaped, for a play
that never identified its version, recorded the first listed version as
the streamed file, so native history applied that version's credits. The
guess now goes in RequestedMediaFileID, which history loads, and the
streamed file stays unknown; credits apply only to a known streamed file.
This replaces the scrobble-only workaround from 1d6b9a0.

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

---------

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

* fix(web): stop reopening a progressive remux that drops at the same point

Chromium reads a progressive remux as a stream: the response is a 200
with no Accept-Ranges and no length. On some sources its media cache
drops bytes it has downloaded but not yet demuxed, then asks for them
again with `Range: bytes=N-`. The remux refuses that with 409. The
player reconnects with seek_reanchor at the playhead, and the server
reopens the remux on the keyframe FFmpeg's input seek lands on, which
for a Matroska source is the one at or before the playhead. With a long
GOP that is the same keyframe, the remux writes the same bytes again,
and Chromium drops before the playhead gets past the same point. The
player stays on "Reconnecting" until the reconnect budget runs out.

A reconnect that reopens a progressive remux now remembers that plan
and the position it dropped at. If that plan drops again within 30 s
of the reconnect, less than a second past that position, the route
failed rather than the connection: the player sends failure_recovery
with classification progressive_drop_repeated instead of starting
another reconnect cycle, keeping the viewer's play intent. That
excludes the route, and the planner picks another one, such as HLS. If
no other route can play, the player shows the server's refusal instead
of starting over on the same remux. A server restart or a dead node can
also drop the stream there, so a recovery request that cannot reach the
server, or that finds the session gone (404), goes back to the
reconnect cycle. A drop further along still reopens the remux. The
playback protocol's reconnect section describes the exception.

* fix(web): show a refused repeat-drop recovery and keep seeks out of it

A progressive remux that drops again at the same point now recovers the
route, and these cases around that path were wrong:

- The player hid the server's refusal. The drop came through
  reportConnectionLost, which never marked the revision's transport as
  failed, so the viewer was left on a frozen frame with no message.
- A viewer seek kept the reopened record. In Firefox, where a seek inside
  the buffer doesn't reanchor, a later drop at an earlier position counted
  as a repeat and excluded a working remux.
- Only a 404 on the recovery went back to the reconnect. Other failed
  requests, such as installation_changed, and any failure on a stream that
  showed frames but never played, ended on an update error instead of a
  new session.
- The policy merge for reconnectWhenSessionGone never took effect, so it
  is reverted.

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

* refactor(web): name the repeat-drop policy flag for what it does

Any failed request on the recovery now goes back to the reconnect, not
only a missing session.

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

---------

Co-authored-by: zenjabba <679864+zenjabba@users.noreply.github.com>
Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…r it (Silo-Server#5078)

* fix(web): end a dashboard pointer resize when the layout changes under it

Pressing the mouse on a resize handle leaves keyboard focus where it was,
so Reset to default layout or a widget's Remove button could change the
layout while the mouse held the handle. The release then saved the size
measured on the old layout: Reset was undone by the pre-reset size, and
after a Remove the size followed the pointer's distance from a corner
that had moved away. A pointer resize now ends without saving when the
widget order or sizes change during it, which also covers a different
server layout arriving mid-resize. Range and view changes leave the
resize running.

* fix(web): release the resize handle's pointer when a layout change ends the resize

* fix(web): check the stale save first in the resize cancel test

On the base the cancel test stopped at the pointer-capture assertion and
never reached the save from Silo-Server#4966. It now asserts the save first, so it
fails on the base for the reported reason. The layout effect's comment
now says a server layout arriving mid-resize is covered only once it
commits, since a release can land in the task before that.

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>
…pgrades (Silo-Server#5116)

* fix(admin): refuse an invalid client_ip filter before the audit log socket upgrades

The admin log socket passed client_ip through unchecked, so a value the
history endpoint refuses upgraded the socket and then closed it with 1011
when the snapshot query could not cast it to inet. A zero-padded mask that
PostgreSQL accepts matched snapshot rows but never live events.

History and the socket now share activitylog.NormalizeClientIPFilter, so
the socket refuses the same values before the upgrade and both use the
same canonical filter.

Closes Silo-Server#5051

* ci: rerun checks after a runner build-cache miss

* ci: rerun checks after the runner lost contact
…ver#5144)

* refactor(playback): stop ending stream copies on the copy-safety verdict

The H.264 multi-PPS verdict no longer withdraws a copy that is playing or
refuses to rebuild one. A copy that plays has shown its decoder handles the
source; one that fails reports it, and the recovery replan plans against the
persisted verdict.

Removes CopySafetyNotifier and its handler adapter, the race's notify and
recheck passes, and the revival, reconstruct and rehome refusals. The race now
only scans and persists. The plan_invalidated protocol stays, with no producer.

* fix(playback): rescan a file whose scan request arrived mid-scan

The race deduped a request for a file whose scan was already running and
dropped it. When the file was rewritten in place during that scan, the scan
came back stale and persisted nothing, so the replacement stayed unscanned
until a later play asked again. A request that lands mid-scan now owes the
running goroutine one more pass, as main's race did before the notifier was
removed. That pass takes the known-verdict path, with no ffmpeg, unless the
verdict is still unknown.

* fix(playback): stop forcing a transcode for multi-PPS H.264

A source flagged multi-PPS skipped every video stream-copy route, so a client
that could not direct-play it always got a full transcode, even when its
decoder (Media3 on Android, the Apple app's FFmpeg fallback) plays a copy
cleanly. That gate dates from #424, when the web player stopped on the first
decode error.

The planner now treats such a source like any other. A strict decoder
(VideoToolbox in a browser) fails direct play and each copy, reports it, and
the ordinary recovery walk ends at the encode. Downloads, which cannot
recover, still encode these sources through the download policy.

* test(playback): keep the start-path copy-safety race covered

Restore TestStartPlaybackV2DoesNotBlockOnCopySafetyScan without the deleted
RaceScan and VideoCopyUnsafeKnown stubs. Start still uses only the cached
ensure and hands its plan to the racer, which is now the only way a play
persists the verdict. The race dedupe test waits for the race to retire
instead of a fixed sleep, so it would catch an extra follow-up scan.

* fix(playback): keep strict browsers encode-first for multi-PPS H.264

Safari and Chrome on a Mac fail every copy of a copy-unsafe source. The
recovery walk got them to the encode, but a track, quality or reconnect
replan drops the attempted keys, so the planner offered the failed copies
again in the middle of playback. Web clients other than Firefox now get
the encode up front for these sources, as before; Firefox and the native
apps keep the copy.

The flagged-source test now also walks a strict decoder's recovery to
the encode and covers the Safari, Chrome and Firefox user agents.

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

* docs(playback): describe the copy-safety verdict as it now works

Drop comments and docs that still describe the removed withdrawal of a
playing copy, say that downloads never remux a flagged source rather than
always encoding it (Resolve keeps the original when the client plays it),
note that a failed synchronous scan also marks a source copy-unsafe,
document the strict-browser exception, and bound the wait for the first
scan in the mid-scan rescan test.

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

* fix(playback): keep strict browsers off direct play of multi-PPS H.264

Safari and Chrome fail a multi-PPS H.264 source as is, not only copied.
An MP4 they accept still got direct play, and a track, quality or
reconnect replan offered it again after it failed. They now get neither
direct play nor a copy of a flagged source; Firefox keeps both. The test
covers an MP4 source for each browser. The docs now also say when a
download keeps the original file and which plans start the scan.

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#4480)

* fix(metadata): drop a removed match's values on a complete refresh

A Complete Refresh rebuilds an item from its files, but its match step merges
the rebuilt item back onto the existing item that holds one of its provider
IDs. When an admin had cleared a wrong match's TMDB, TVDB and IMDb IDs, that
item still held the wrong title's tagline, overview, rating, year, credits and
rating sources, and the ordinary refresh that ended the Complete Refresh kept
every value the remaining provider left empty. Nothing counted as a match
correction, because no TMDB, TVDB or IMDb ID was left to compare.

A Complete Refresh of a movie or series now ends with a rebuild refresh. Like
Reset to Provider, it empties every unlocked field, credit and rating source
the providers don't send. Unlike a reset, it keeps the item's locks. When a
provider doesn't answer, or an enrichment provider rejects its key, the
rebuild can't tell a missing value from a failed lookup, so it runs as an
ordinary refresh instead and the job still succeeds. The item keeps its
content ID, files and history. Season and episode targets keep the ordinary
refresh.

* fix(metadata): redact the provider error a complete refresh logs

* test(metadata): split the cleared-match complete refresh test for the linters

* chore(adminjob): keep item_refresh.go within the 1000-line limit

Merging main brought the file to 1001 lines, past the size ratchet. Shorten
the rebuild comment by one line; its meaning is unchanged.

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

* test(metadata): require both fixture files to stay linked after a cleared-match complete refresh

The check looped over whatever files were linked, so a refresh that removed
every file in the library passed it. Name both fixture files and require
each to exist, stay on the series and keep an episode link.

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

* test(metadata): check that an outage keeps an unlocked value through the rebuild

The outage test asserted on the tagline, which the seeded overview lock
also holds, so it passed even when the rebuild cleared unlocked fields
during an outage. Seed an unlocked content rating no provider sends and
require it to stay.

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

* docs(admin-catalog): say a complete refresh's rebuild leaves other languages' text

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

---------

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

* fix(web): size pixel text in rem so it grows with Text Size

Text written with an arbitrary pixel size such as text-[12.5px] stayed the
same size at Large and Extra large while the text around it grew. A list of
!important overrides in app.css scaled only thirteen of the sizes the app
uses, and where a pixel size had a responsive variant, the override beat it
and showed the phone size on wider screens.

Size those classes in rem instead (text-[12.5px] becomes text-[0.78125rem]),
so they follow the root font size like the rest of the app, and remove the
overrides. A new lint rule, silo/text-size-in-rem, flags pixel font sizes and
fixes them with eslint --fix. The two class-rewriting rules now share their
token parsing in eslint-rules/class-tokens.js, and CI's lint cache key
includes the repository rules.

The policy editor's text moves to rem too, the 22px collection tags take a
minimum height so their text can't spill out, and the text-scale fallback
factor matches the root sizes. On Admin > Devices, a saved-view label wraps
instead of cutting off now that its count grows, and the search placeholder
ends with an ellipsis when it doesn't fit.

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

* fix(web): keep A-Z letters inside their rows and the collection picture fixed

Review fixes for the rem conversion:

- The library A-Z letters now also follow the browser's font size, so with
  a large browser font and Extra large they outgrew the rail's rows and ran
  into each other. Cap each letter at 80% of its row height.
- The New collection cards' decorative picture sits in a fixed 168px frame;
  keep its sample rows in pixels so they don't wrap or spill out of it.
- The rule also converts text-[length:Npx], and a colon inside brackets no
  longer splits a class token into a variant.

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

* fix(web): parse nested arbitrary variants in the class-token lint rules

A variant like [&_[data-slot=input]]: has brackets inside brackets; the
parser stopped at the inner one, so both rules skipped the utility after it.

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

* fix(web): let fixed-height chips grow with their text; tighten the rem rule

Text in these chips and badges now follows the browser's font size as well
as Text Size, so their pixel heights could clip it. Give them the same
heights in rem (h-[30px] becomes h-7.5), unchanged at the default size.

The lint rule now converts only whole class tokens, and converts a pixel
line height after the size (text-[13px]/[18px]) along with it.

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

* fix(web): split class variants at any bracket depth in the lint rules

Find the last colon outside brackets and parentheses instead of matching a
fixed nesting depth, so deeper arbitrary variants and text-(length:--x)
stay whole.

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

* fix(web): match the px unit in any case in the rem lint rule

CSS units are case-insensitive, so text-[length:13PX] and a /[18PX] line
height compile to pixels too. Cover them, and a quoted selector variant,
in the rule's tests.

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

* fix(web): keep A-Z letters growing with Text Size and close rem rule gaps

- LetterBar: cap a letter at its full row height (less the rail's border)
  rather than 80% of it. On a 600-760px tall window at the default browser
  font, the 80% cap made Large and Extra large letters smaller than Default.
- NewCollectionPicker: keep the synced picture's posters and row gap in
  pixels too, so its poster row isn't cut off at Large and Extra large,
  and give the lint exception its real reason.
- text-size-in-rem: also convert `[font-size:Npx]` and `.Npx` sizes, and
  match the unit alone case-insensitively, so `text-[LENGTH:13px]` (a colour
  to Tailwind) and upper-case non-class text are left alone.

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

* fix(web): keep the lint rules' test strings out of Tailwind's sources

Tailwind scans the whole web directory, so the class names in the rule
tests were compiled into the production CSS, and an invalid one
(`text-[LENGTH:13px]`, a colour to Tailwind) broke `vite build`. Exclude
`eslint-rules` from its sources and write that test case as a plain string.

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

---------

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

* fix(jellycompat): keep the Jellyfin Web build within memory on many-core hosts

The managed Jellyfin Web install builds the web player with webpack, whose
minimizer starts one worker per CPU after the first. A container memory
limit doesn't lower that count, so the build's peak grows with the host's
cores (about 16 GB with 56 CPUs) and the kernel OOM-kills it. cross-env
turns that kill into exit status 1, npm prints nothing, and the installer
dropped the exit status, so the error ended at an unrelated webpack note.

Preload a script through NODE_OPTIONS that caps os.availableParallelism()
and os.cpus() at three, which holds the build near 4 GB on any host. Keep
the exit status in installer command errors, and when the cgroup's
oom_kill counter rises during a failed build, say the system ran out of
memory and how much the build needs.

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

* fix(nodemetrics): read no ancestor's OOM counter when Silo's cgroup has none

When Silo's own cgroup exists but has no memory.events, because its parent
didn't enable the memory controller there, the mount-root counter it fell
back to can also count kills in sibling cgroups. Read the mount root only
when Silo sits at it, or when its reported path doesn't exist under the
mount, where the mount is the container's own cgroup.

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

---------

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

Co-authored-by: zZebrahz <11633690+zZebrahz@users.noreply.github.com>
… on library tabs (Silo-Server#5152)

* fix(collections): list a profile's own collections in its saved order on library tabs

The library Collections tab's My collections group and
GET /api/v2/library/{id}/user-collections sorted personal collections by
name, so the order a profile saved on its Collections page had no effect
there. List them in the same order as GET /api/v2/collections: the
profile's own in its saved order, then other profiles' shared ones grouped
by creator, each in its creator's order.

Closes Silo-Server#5149

* docs(collections): note the library tab's personal collection order

* test(collections): pin the library tab's personal collection order

Add a Postgres contract test that fails if the library Collections tab
goes back to listing personal collections by name, and name
listCollections as the order the docs paragraph refers to.

---------

Co-authored-by: zZebrahz <11633690+zZebrahz@users.noreply.github.com>
…order finalizations arrive in (Silo-Server#4620)

* fix(playback): keep the latest subtitle in playback history whatever order finalizations arrive in

Admin playback history ordered the subtitle by ended_at, which only moves
when a finalization gets further. A finalization that got no further and
repeated the row's subtitle was dropped, so a delayed earlier one with
another subtitle could replace it, and a subtitle change alone moved
ended_at.

The subtitle now has its own subtitle_at, ordered like end_reason and
end_reason_at, and no longer moves ended_at. A lifecycle sweep that only
has the play's live or start row orders that row's subtitle by when it was
synced, so it no longer replaces a later recorded subtitle or stamps the
sweep time as the play's end.

Closes Silo-Server#4614

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

* fix(playback): keep a pre-column row's subtitle order when ended_at moves

A row recorded before subtitle_at existed orders its subtitle by
ended_at. When a finalization that gets further moved ended_at first, the
subtitle comparison that follows used the new end, so a sweep's subtitle
synced after the recorded one lost. The upsert now keeps the old ended_at
as subtitle_at before it moves.

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

* test(playback): cover a pre-column row through the lifecycle sweep

Keeps the history facts test buildable against main, so it still shows
the out-of-order finalizations failing there.

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

* test(playback): split the sweep subtitle test to fit funlen

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

* docs(admin-api): say how playback history picks its subtitle

The history section described the order rule for every field a
finalization writes except the subtitle, which now has its own order.

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

* fix(playback): record the attempt's committed subtitle from a stale copy

History keeps the subtitle recorded latest, so a copy that missed a
replan on another server could tear down after the real stop was built
and replace its subtitle. A native play's history entry now takes the
subtitle its attempt's last replan committed, as the sweep and the
detached stop already did.

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

* fix(playback): read a history entry's attempt only for a native session ID

Skip the attempt read for session IDs that can't name an attempt, match
the profile as the other attempt readers do, and log a failed read
instead of dropping it.

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

---------

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

* fix(reader): keep one search time budget across ebook sections

A whole-book search restarted its 25 ms budget at every section, so a book
of many short sections (FB2 parses each synchronously) searched in one task
and an abort waited for the end. Track the budget across sections and pause
after loading and after finishing each one.

* test(reader): check the in-section search pause with a one-section search

The pause after a section loads now stops a whole-book search before the
section scan, so the long-section case searched one section to keep
checking the pause inside it.
…o save toasts (Silo-Server#5115)

When a save never reached the server, the admin Home sections editor
showed "Couldn't save Home sections: Failed to fetch" and the player's
audio track pick toasted "Failed to fetch", the browser's English text
in every interface language. Both now go through readableErrorText, as
the other preference saves do since Silo-Server#4537: a failed fetch falls back to
the existing "Couldn't save Home sections" and "Failed to save audio
preference" messages, and a server refusal still shows its own reason.

Closes Silo-Server#5101
…times out (Silo-Server#5161)

* fix(jellycompat): stop the whole Jellyfin Web build when the install times out

The installer started git and npm with exec.CommandContext, so the
45-minute timeout killed only npm. cross-env, webpack and its workers
kept running and held the output pipe, so the install returned only when
webpack finished, and the operation stayed "running" until then.

Install commands now start through procgroup.CommandContext, which kills
the command's process group when the context ends and bounds the wait
for its pipes. The timeout carries a cause, so the error says the
install timed out instead of only "signal: killed".

Closes Silo-Server#5156

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

* fix(cli): stop the Jellyfin Web build when compat-web install is interrupted

The installer now runs git and npm in process groups of their own, which
a terminal's Ctrl-C no longer reaches. silo compat-web cancels its
context on SIGINT and SIGTERM, so the installer kills the build and
removes its workspace.

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

* fix(jellycompat): stop a command's leftover children and skip activation after cancel

npm can exit while its children run on. WaitDelay then closes the pipes
after five seconds without killing the group, so the install finished
and released its lock while the build kept running. The runner now kills
the group once the command returns.

An install that times out or is interrupted while staging now keeps the
current release, and a second Ctrl-C on silo compat-web exits at once.

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

* fix(jellycompat): wait for a finished command's pipes instead of killing its group after Wait

Killing the process group after Wait panicked when a command failed to
start, and could reach an unrelated group once the original id was
reused. The runner now waits for the output pipes with no WaitDelay: on
timeout or interrupt the group kill closes them at once, and an npm that
exits before its children waits for them as before.

The cancellation check now runs right before the release is replaced.

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

* fix(jellycompat): stop a background Jellyfin Web install when the server shuts down

The installer now starts its build in its own process group, so a Ctrl-C to
`silo serve` in a terminal no longer reaches the build, and the background
install wasn't tied to server shutdown: the build kept running after Silo
exited. Start the install under the server's lifetime context, so shutdown
cancels it and the process-group kill stops the whole build.

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

* fix(cli): let compat-web status and remove keep the default signal handling

Only install and update use the context the interrupt cancels; status and
remove ignored it, so intercepting the first Ctrl-C left them running until
they finished. Intercept signals only for install and update.

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

---------

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

* fix(jellycompat): stop a Jellyfin Web build after npm already exited

The install runner now reads the command's output to the end before
Wait. os/exec stops killing the process group on ctx once Wait has
reaped the command, so with CombinedOutput a timeout or shutdown that
came after npm exited, while webpack still held the output, killed
nothing and the runner waited for webpack. Until Wait, npm stays at
least a zombie, so its group id can't be reused and the group kill
stays safe.

Closes Silo-Server#5168

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

* fix(jellycompat): stop reading install output WaitDelay after the install ends

A process that left the group keeps the output open past the group
kill, and os/exec only closes the pipe itself when it copies the output
in goroutines.

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

* fix(jellycompat): name the install's end in a command start error

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

---------

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

* fix(web): restart the hero progress rail when the hero comes back into view

The Featured hero stops its slide timer while it is out of view or the tab
is hidden, but the progress rail kept filling. On return the timer started
a fresh 8 s cycle while the rail sat full. The rail now pauses while the
hero is not shown and restarts with the timer when it is shown again.

Closes Silo-Server#4925

* docs(web): rewrap and trim the hero progress rail comments

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>
…ilo-Server#5123)

The season poster's completed check was a bare icon, so a screen reader
gave a finished season the same name as one never started. The check now
carries the Watched label, as poster cards do.
…es tie (Silo-Server#5178)

* fix(recommendations): order tied Watch Tonight cards by recent activity

Every Continue Watching item the recommendations do not hold scores the
same, as does every such Next Up item, and the merged cards came out of a
map, so with two or more of either the five cards changed order, and which
ones made the cut, from one request to the next. Ties now go most recent
activity first (progress time for Continue Watching, the time the Next Up
row ranks by for Next Up), then in the recommendation reader's order, then
by content ID. Progress from a store that keeps only the whole-second time
string is parsed for its time.

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

* fix(recommendations): keep Watch Tonight candidates in a stable order

The reader gathered Watch Tonight candidates in a map and sorted them by
score alone, so equal scores, common on the cold-start path where Popular
scores are account counts, came back in a different order on each read and
trimming kept a different subset. Candidates now keep the order their
source rows hold them in, higher bands first, and a stable sort uses it to
break ties.

Recently Added was banded from its score, the time added in Unix seconds.
Those all sit within a sliver of the newest, so every title landed at
about 0.35, above most Popular titles. It is now banded by rank, so it
spreads across 0.15 to 0.35 and interleaves with Popular.

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

* fix(userstore): break ties in progress listings by item ID

Continue Watching pages progress by updated_at alone, so when several
in-progress items share a timestamp, a page boundary could fall on a
different one per request and Watch Tonight's stable sort could not
recover the item left off the page. Both stores now order by
updated_at DESC, media_item_id.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ing catch-up requests (Silo-Server#5179)

* perf(recommendations): drain the stale sweep's backlog each tick

The stale sweep refreshed one batch of 50 profiles every 5 minutes, so a
large backlog, such as an access change marking many accounts, took hours
to clear even when each refresh took a fraction of a second.

A sweep now pages through every profile marked before it started, oldest
mark first, until none is left or a one-minute budget runs out, and runs
every 2 minutes. It stays sequential on the sweep lock's connection. A
keyset cursor steps past profiles already queued on this server, which
keep their old mark at the front until the queue clears it, and the
start-time bound leaves the newer marks of deferred or failed refreshes
to the next sweep, so each profile is taken at most once per sweep. The
budget is checked before each refresh, so an embeddings reset, which the
sweep's lock refuses, waits at most a minute plus one refresh.

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

* fix(recommendations): run a catch-up pass asked for during an embedding run

EmbedMissingNow dropped its request when an embedding run already held the
job on this server, and nothing asked again until the next catch-up tick,
up to 15 minutes later. Content IDs are not ordered by age, so the running
pass's cursor can already be past items added after it started.

The request is now recorded under the worker's lock, and the running
embeddings job, whether the nightly run, a manual trigger or a catch-up
pass, runs Pass 1 again before it releases its claim. Requests made during
one pass come to one more pass. A request while another server holds the
job is still left to that run and the next tick.

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

* perf(recommendations): store each embedding chunk in one transaction

The backfill embeds ten items per provider call but stored each vector in
its own transaction: about seven round trips and a commit per item. Each
chunk is now written in one transaction, with the inserts sent as one
batch and one search index enqueue for the chunk. Against a local
Postgres with 2,000 vectors already indexed, writing a chunk of ten
768-dimension vectors took about 40 ms instead of 80 ms.

Each vector is still checked against the embedding lock in order before
the write, and the first storable one still writes a missing lock; when
one does not fit, the vectors before it are stored and the run ends, as
before. When the chunk's write fails, its items are stored one at a time,
so a bad row costs only its own item, which is counted as failed and
retried next run, and only stored items mark their profiles stale.

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

* fix(recommendations): start a catch-up pass asked for as an embedding run ends

EmbedMissingNow could set the pending flag after the running job last read
it but before the job cleared its running mark, and the request was lost
until the next 15-minute tick. The job now checks the flag again when it
lets go of the claim, after releasing its cluster lock, and starts the pass
then. This also covers a run that failed or timed out.

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

* fix(recommendations): keep the stale sweep inside its budget

The budget was checked only before each profile, so a refresh started near
the end could run again up to twice for changes made during it, and the
ticker could start the next sweep as soon as a long one ended, leaving an
embeddings reset no window. Past the deadline a sweep refresh is no longer
run again (the change's stale mark waits for the next sweep, and a refresh
clears only marks older than its start), and the next sweep is timed from
the end of the last one.

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

* perf(recommendations): index stale marks for the sweep's pages

The stale sweep now reads marked profiles a page at a time after the last
profile it took, ordered by (stale_at, user_id, profile_id). Without an
index each page read and sorted all of user_taste_profiles, so a large
backlog cost a full scan per 50 profiles. A partial index on those columns
over marked rows lets each page seek to its start; it is built
concurrently so a running server keeps writing.

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

* fix(recommendations): drop a catch-up asked for during a failed embedding pass

A catch-up request left pending when an embedding pass failed (a provider
error, a quota, the job's timeout) restarted the pass as soon as the job
released its claim, retrying straight into the same failure. The worker now
records whether the last pass failed, and releaseJob starts the pending
catch-up only after one that succeeded; otherwise it waits for the
15-minute tick.

The docs and the admin status field now say the sweep starts 2 minutes
after the previous one ends and starts refreshes for up to a minute, so a
refresh started near the end finishes after it.

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

* docs(recommendations): describe the stale sweep interval as per server

Each server times its own sweep attempts from the end of its last one, and
only one server sweeps at a time, so in a cluster another server's sweep
can follow one at once. The docs, the admin status field and the worker's
comments said sweeps were two minutes apart and that an embeddings reset
always had that window; they now describe the interval per server, and a
refused reset as a conflict the admin retries.

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

---------

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

* fix(playback): decode on the CPU when VA-API or QSV cannot decode the source

Windows Media Video 7 and 8 and the Microsoft MPEG-4 variants have no GPU
decoder in FFmpeg, so they are now planned on CPU decode. VA-API, QSV and
VideoToolbox keep their GPU encoder through the upload graphs; an explicit
NVENC setting encodes them on libx264, as it does H.264 High 10 (Silo-Server#4319).

The start-path CPU-decode retry now also runs when FFmpeg reports that its
AV1 decoder has no GPU to run on, or that the hardware-frame graph cannot
take CPU-decoded frames. The AV1 decoder has no software path and reads
the whole input before exiting, so FFmpeg's process group is stopped as
soon as it prints that line (Silo-Server#4279).

* fix(playback): stop FFmpeg only on the AV1 decoder's own line on a GPU-decode command

FFmpeg echoes input paths in other stderr lines, so a file named after the message could stop a transcode that was working, including a CPU-decoded one.

* test(playback): poll the stopped attempt's child with a ticker and fix a lint spelling

* fix(playback): stop the AV1 decode in downloads and restarts too

Download preparation now watches FFmpeg's stderr for the AV1 decoder's
rejection, as a playback start does, so its CPU-decode retry runs without
reading the whole input first. A session that FFmpeg was stopped in
restarts on CPU decode, as one that failed to set up its filter graph
does, instead of running the same GPU-decode command again.

The stop also skips the kill once Wait has reaped FFmpeg: Wait reaps the
process before it finishes copying stderr, and the group id may then
belong to another process.

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

* test(playback): count a killed zombie child as exited; correct two comments

The AV1 startup test now uses procgrouptest.RequireExited, which treats an
unreaped zombie as exited, so it passes where PID 1 doesn't reap orphans.
The reconstruct doc says the filter-format line counts whatever caused it,
and the WMV3 comment no longer says every GPU decodes VC-1.

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

* docs(playback): say the reconstruct decode retry skips tone-mapped recipes

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

* fix(playback): kill right after the reap check; watch only GPU-decode downloads

The AV1 stop now signals FFmpeg straight after checking it wasn't reaped
and logs afterwards, so the window between the two stays as short as it
can be. Download preparation adds the line watcher only to a command that
decodes on the GPU. The CPU-decode restart log no longer blames the
filter graph when the AV1 decoder was the cause.

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>
…ht-to-left languages (Silo-Server#5041)

* fix(web): keep the start of a name inside a joined meta line in right-to-left languages

The home row editor's "by" owner, the MDBList "by" user and the invitations
"invited by" inviter now get their own dir="auto" element inside a " · "-joined
line, through a shared MetaLine. The name keeps its start and is cut first;
the other parts keep the page's order and are cut with their own "…" after it.

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

* fix(web): cut a joined detail line from its end and keep short names and notes readable

A name that leads a MetaLine (the MDBList author) now keeps its width and the
details after it are cut first, as on main; a name that ends the line is still
cut first. Names of three characters or fewer are kept whole, as in the
impersonation banner, so "김님 작성" has no gap. Screen readers read an inline
copy of the line, so words joined to a name stay joined. The invitation note
gets its own dir="auto" element, so a cut note keeps its start, and an MDBList
result with no author name drops the "by" phrase.

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

* fix(web): keep a letter of every part of a cut detail line

Every part of a MetaLine now keeps a letter and "…" (or all of a part of three
characters or fewer) when the line is cut, so the details before a long
translated phrase no longer collapse and leave a bare " · ", and a one-letter
invitation note no longer vanishes between its quotes. The note is a LineName,
and the part at the end of the line is the one cut first, one rule for names
and plain text alike.

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

* fix(web): keep a detail line's screen-reader copy inside the line

MetaLine's inline screen-reader copy is absolutely placed. In a scrolling list
under a positioned page, such as the MDBList results on the collection editor,
each copy sat at its row's place outside the scroll box and stretched the page
(Chromium). The line now wraps both copies in a relative box, and the copy is
left out of a selection. The Add row chooser describes its item with the line
itself when it has no separate screen-reader text, instead of a second copy,
and the MDBList author is trimmed once.

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

* refactor(web): share the cut-name floor and build invitation details once

The short-name floor in MetaLine copied the impersonation banner's line for
line; both now use nameFloor from lib/direction. The invitations card and
table row built the same note and "Invited by" phrases in two lists; one
builder now serves both, wrapping the user text for the row. The i18n README
points a one-line, cut detail line to MetaLine, and LineName's doc points
titles to LineTitle.

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

---------

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

* fix(playback): report whether the player received an admin message

An admin message answered 202 "dispatched" once the frame was written to
the session's realtime socket, even when the player's connection had died
without closing. Waiting up to 3 seconds for the player's result, outside
the ledger lock, lets the receipt say "acknowledged" when the player
answered; otherwise it stays "dispatched", now documented as written but
unconfirmed. The relay reply timeout grows to cover the wait, and the web
admin warns when a message wasn't confirmed.

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

* fix(playback): count a player answer that lands with the wait's deadline

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

* chore(web): sync translations 2026.11.20-c9bad11

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

* fix(web): close the message dialog when a replayed message is unconfirmed

A replayed message that came back unconfirmed showed the warning but kept
the dialog open with its text, so a second Send made a new command and the
viewer could see the message twice. Only an acknowledged replay keeps the
text for a deliberate resend now.

Also:
- test a player answer that arrives during the unlocked wait, not only
  inside the write;
- test which toast and dialog state each receipt produces;
- stop describing `dispatched` as "not confirmed": a pause or resume the
  player confirms after its receipt was recorded still reads `dispatched`.

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

* test(web): type the mocked message receipt as a v2 result

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

* fix(playback): report a player's answer without waiting on other sessions

A message whose player answered took the ledger lock again to record the
answer. Another session's lane write can hold that lock for up to its 5 second
write deadline, so a relayed message the player had confirmed could pass the
relay's reply wait and come back as no reply. The answer now lives on the
receipt itself and is recorded without the lock.

A retry that arrived while the first request still waited replayed the
provisional "dispatched", so the web admin warned even when the player then
answered. A replay now waits for the same answer, outside the lock.

Only a relayed message gets the extra 3 seconds of reply wait. Pause, resume,
stop and terminate keep 8 seconds, so a terminate whose owning replica died
starts its local fallback on the usual schedule.

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

* fix(playback): end a message's wait when the player rejects it

A player that rejected a message still held the administrator's request for
the whole 3 second wait, though its answer had already arrived. The waiter
now receives the result's status: a rejection ends the wait at once and the
receipt stays "dispatched".

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

* test(playback): check a replayed message's outcome and that it was sent once

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

* test(playback): wait on the replay and relay handler instead of sleeping

The replay test now waits for a hook that fires when the replay starts
waiting for the player's answer, so it always exercises a pending replay.
The relay test holds the owner's handler on a gate instead of sleeping
past a 50 ms reply timeout.

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

---------

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

TestPushSenderRegistersRelayOnFirstSendWithoutCredential registered a
credential that expires on 2026-12-01. The sender renews a credential within
seven days of expiry (plus jitter), so from 2026-11-23 the first send renewed
it and the test failed on an unexpected relay path on every branch. The
fixture now expires 90 days after the run.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…es in one pass, and measure both (Silo-Server#5174)

* test(recommendations): add a temporal-holdout evaluation of personal rows

TestRecommendationHoldoutEvalPostgres seeds the toy catalog plus titles for
four ranking cases (multi-genre decoys, unembedded titles, obscure
high-rated titles, non-unit embeddings), writes each persona's signals up to
a cutoff, and holds out the titles it enjoys afterwards. The real refresh
builds the rows, and the test logs Recall@20, NDCG@20 and intra-list
diversity per persona for the main, cluster, Because You Watched and
Similar Users rows, so later ranking changes can be compared before and
after. The run is the same every time.

It fails when a held-out title reaches the engine's input, a row holds a
title its persona engaged with before the cutoff, or the focused persona's
main-row recall drops below 0.25. It is listed in the database contracts.

The toy catalog's vector construction moves into toyVector so the
evaluation builds its extra titles in the same space; the catalog it builds
is unchanged.

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

* test(recommendations): make the holdout evaluation fail on missing rows and stale data

A run cut short left its accounts, with their ratings and watches, and the
next run reused the same title IDs, so old activity could count toward peer
and co-watch thresholds. The fixture now clears the evaluation's accounts
too. The test also failed only on leaks and the focused main-row floor, so a
refresh that stopped writing cluster, Because You Watched or Similar Users
rows passed; every measured persona must now build every row kind, and a row
serving a title twice fails rather than inflating recall.

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

* test(recommendations): vacuum embeddings after the holdout evaluation

The evaluation writes and then deletes about a thousand embeddings. Deleted
vectors stay in the HNSW graph until a vacuum, and on a reused database they
lowered the next run's recall enough that
TestFindSimilarAppliesAccessLimitsInSQLPostgres failed about one run in
three (main passed every run). The fixture now vacuums the table after its
delete; eight consecutive full-package runs passed afterwards.

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

* test(recommendations): spell neighbor the way the linter expects

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

* fix(recommendations): stop distant, obscure and unembedded titles crowding personal rows (Silo-Server#5175)

* fix(recommendations): keep genre-constrained taste candidates in distance order

FindTasteProfileCandidates fetched limit×5 nearest neighbours when genres
were given and then ordered them by how many selected genres each shared
before distance. A distant title matching every dominant genre pushed close
matches out of the limited pool, so cluster rows filled with off-taste
titles. The genre constraint now only filters (mi.genres && $genres) and the
pool is the nearest limit titles in distance order; the limit×5 over-fetch
had no purpose left and is gone.

Watch Tonight cards still order their pool genre-first through
FilterAndRankGenreMatches; their pool is now the nearest titles sharing a
selected genre.

Holdout evaluation (seeded data), before -> after:
  clusters R@20 0.117 -> 0.145, N@20 0.107 -> 0.124
  focused clusters R@20 0.119 -> 0.190, decoys in window 5.3 -> 1.3
  page recall 0.907 -> 0.921
  main, byw, similar unchanged

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

* fix(recommendations): give MMR candidates without embeddings a neutral penalty

applyMMR scored a candidate without an embedding by its normalized
relevance alone, with no lambda and no redundancy penalty, while every
embedded candidate scored lambda × relevance minus (1-lambda) × its
similarity to the picks. An unembedded title therefore beat embedded ones
of noticeably higher relevance: in Similar Users, peer-loved titles from
relevance positions 15-31 landed at positions 2-8.

Such a candidate now scores lambda × relevance minus (1-lambda) × the mean
similarity of the embedded candidates still in the pool, the round's typical
redundancy, so it ranks near its relevance position. An empty embedding
counts as missing everywhere; before, an empty slice was treated as an
embedding with zero similarity. With no embedded candidates left, the
penalty is zero and the order stays relevance order. defaultMMRLambda is
unchanged.

Holdout evaluation (seeded data), before -> after:
  similar N@20 0.132 -> 0.175 (R@20 0.143 unchanged)
  focused similar N@20 0.530 -> 0.700
  unembedded titles in the similar window 6.0 -> 1.5 (the other personas'
  peer-loved titles now sit at positions 22-33, about where relevance puts
  them, instead of 2-8)
  main, clusters, byw unchanged

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

* fix(recommendations): read quality-prior ratings for notable titles only

The quality prior read catalogRatingSQL for every candidate, while the
rating-led rows order through catalogRatingOrderSQL, which puts notable
titles (a logo and at least five keywords) first. An obscure title rated
8.8 to 9.4 on a handful of votes got the prior's full lift and pushed
well-known neighbours out of the window. itemQualityRatingsQuery now applies
notableSQL, so a title that is not notable reads as unrated; applyQualityPrior
leaves an unrated candidate's score as it is and keeps it out of the
pool's rating statistics, so the gate is neutral, not a penalty.

Holdout evaluation (seeded data), before -> after:
  main R@20 0.443 -> 0.502, N@20 0.472 -> 0.521 (obscure in window 5.0 -> 2.5)
  focused main R@20 0.429 -> 0.500, N@20 0.425 -> 0.586
  clusters R@20 0.145 -> 0.177, N@20 0.124 -> 0.163
  byw R@20 0.253 -> 0.270, N@20 0.247 -> 0.288
  page recall 0.921 -> 0.939
  similar unchanged

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

* fix(recommendations): score co-watch-only neighbors by their similarity too

Because You Watched and "More like this" blend 0.7 × embedding similarity
with 0.3 × co-watch Jaccard. A co-watch neighbor the embedding search did not
return, because nearer titles filled its limit, got the co-watch share alone,
so it ranked below every title the search found however often the two were
watched together, even though its embedding was loaded right afterwards for
MMR (and, in "More like this", validation).

Both paths now read those embeddings before blending, and
withCowatchSimilarity adds each such neighbor with its cosine similarity to
the source, on the same scale as the search's candidates. A neighbor without
an embedding keeps its co-watch share alone, as the blendScores comment now
says. Neither path issues an extra query: Because You Watched reads the
embeddings once for blending, aversion and MMR, and "More like this" reads
the co-watch details before blending instead of after. Marked titles leave
the co-watch map before that read, which is equivalent to removing them
after the blend.

Holdout evaluation (seeded data), before -> after: unchanged
  byw R@20 0.270, N@20 0.288; similar R@20 0.143, N@20 0.175
  The evaluation's co-watched titles have no embedding, so it cannot show
  this; the new database test does, and fails without the change.

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

* fix(recommendations): log co-watch neighbor read failures

Because You Watched and "More like this" discarded the error from
GetCowatchNeighbors, so a failing co-watch read silently turned both into
embedding-only rankings. They now log it at warn and drop any partial result,
keeping the embedding-only fallback.

Holdout evaluation (seeded data): unchanged (no read fails there).

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

* fix(recommendations): validate Because You Watched candidates like Similar

rankSimilar runs applyValidation (a genre gate and a remake/title-overlap
penalty) on every candidate; becauseYouWatched never did, and no history
shows that was intended. Because You Watched now validates its blended
candidates against the source too.

To read what validation needs without extra queries, it takes the source's
embedding and metadata from GetSimilarSource (one read instead of
GetEmbedding plus GetItemMetadata, whose error it ignored and could leave the
metadata nil), the candidates' details from FindSimilarCandidates, and the
co-watch neighbors' details from GetCandidateDetails, which replaces its
GetBatchEmbeddings read. The co-watch detail read and the embedding map are
shared with rankSimilar (addCowatchDetails, candidateEmbeddings).
applyValidation returns its candidates unchanged without source metadata, so
a nil source can no longer be dereferenced. GetItemMetadata has no caller
left and is removed.

Trade-off: a co-watched title sharing no genre with the source is now dropped
from Because You Watched, as from "More like this". The relevance test whose
co-watched movie was of another genre now uses one of the source's genre; it
checks the media-type rule, not cross-genre co-watch.

Holdout evaluation (seeded data), before -> after:
  byw R@20 0.270 -> 0.270, N@20 0.288 -> 0.289
  everything else unchanged

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

* test(recommendations): describe the holdout cases by the rule each guards

The case notes described how the ranking misbehaved before the fixes on
this branch. They now say what each set of titles checks, so they stay true
as the ranking changes.

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

* fix(recommendations): keep Watch Tonight cards reading past their pool for genres

The taste candidate query now returns the nearest titles sharing a selected
genre in distance order, without its old five-fold over-fetch, so the cards'
genre-first ranking only saw the pool's nearest titles. A title matching
every selected genre a little further out could no longer lead. With genres
selected the cards read five times the pool, up to 2000, rank by genre
matches as before and keep the pool's worth.

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

* fix(recommendations): keep MMR and the remake penalty right for odd scores

MMR scaled relevance by the highest score, which reverses a pool whose
scores are all negative, and treated a zero vector as an embedding similar
to nothing, so it escaped the redundancy penalty a missing one takes. It now
scales by the largest magnitude and counts a zero vector as missing, as
co-watch blending also does. The remake penalty halved a score, which
raises a negative one; it now always lowers it. The holdout evaluation's
numbers are unchanged.

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

* fix(recommendations): leave Because You Watched unvalidated

Running "More like this" validation in Because You Watched dropped every
candidate sharing no genre with the source. On a small library few of the
nearest titles do, so rows came back with a handful of titles or not at
all, and the row left Home on a test library of a few dozen titles. The
holdout evaluation gained almost nothing from it (Because You Watched NDCG@20
0.288 -> 0.289), so the row goes back to unvalidated candidates; co-watched
titles of another genre are kept, and the relevance test checks that again.
It still reads the source and candidate details in one query each.

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

* fix(recommendations): sort taste candidates exactly after the relaxed scan

The candidate query's outer ORDER BY distance could reuse the relaxed
iterative scan's order through the inlined CTE on PostgreSQL 17 and later,
leaving its small inversions in place; the genre-first sort this branch
removed had hidden that. The CTE is now materialized and the sort is on
distance + 0, as pgvector documents for relaxed ordering.

The MMR test's quadratic oracle now follows the same rules as applyMMR (a
zero vector counts as missing, relevance is scaled by the largest
magnitude), and its random pools include zero vectors and all-negative
scores.

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

* perf(recommendations): read candidate details with the candidate scans (Silo-Server#5176)

The row builder read each candidate pool's embeddings, media types, added
dates and quality ratings in four further queries after its HNSW scan, for
every main-row anchor, cluster row, type supplement and Because You Watched
pool. The taste candidate scan now returns those columns
(FindTasteProfileCandidatesWithDetails), the Similar scan and the co-watch
details read add type, added date and quality rating, and the row builder
ranks from them. The per-ID lookups GetItemAddedDates, GetItemMediaTypes and
GetItemQualityRatings lose their last callers and go; Watch Tonight keeps
the genres-only FindTasteProfileCandidates, so its pools of up to 500
candidates do not carry embeddings.

Measured on the holdout evaluation's four measured personas, five traced
refreshes each:

- statements per refresh: 146 before, 114 after (-32, -22%); the focused
  persona alone: 145 before, 114 after
- removed reads, before: 32 statements, about 59 ms of database time per
  refresh (about 8% of a 760 ms refresh)
- wall time per refresh, four interleaved A/B runs on a loaded host:
  before 710-856 ms (median ~826), after 729-843 ms (median ~780); database
  time median ~448 ms before, ~413 ms after. The time gain is within the
  host's noise; the statement cut is exact.

The evaluation's metrics table is byte-identical before and after, and the
cached rows hold the same titles in the same order with the same reasons.
Scores of the persona with Not interested marks differ below 1e-7, as they
do between two runs of the old code: the aversion decays by wall-clock time.

TestProfileRefreshStatementBudgetPostgres pins the focused persona's refresh
at 114 statements (145 on the parent commit) in scripts/ci/db-pins.txt.
TestGetItemQualityRatingsPostgres becomes TestCandidateQualityRatingsPostgres
and reads the ratings from the candidate details.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(recommendations): cut the Watch Tonight card pool after shown titles leave it

The cards cut their genre-ranked pool to its size before removing the
titles the client already showed. The cold-start rows are not filtered for
those titles, so when the top Popular titles had all been shown, the cut
kept only them and the page came back empty. The pool is now cut after
they leave it.

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

---------

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

* fix(blobstore): stop local artwork writes at a free-space reserve

A local artwork store wrote generated images until its disk had 0 bytes
left. On a disk shared with PostgreSQL that left the server unusable.

Every local blob write now checks the filesystem's available space first
and fails with ErrStorageFull, which wraps ENOSPC, when it would leave less
than 2 GiB, or a tenth of a smaller filesystem. The store logs a warning
when it starts refusing writes and again hourly while it lasts. Reads and
deletes are not limited.

The image cache queue defers a job that hits a full store instead of
failing it, so the queue does not spend its attempts and park for a week,
and trickplay releases the file for an hour instead of counting a failure.

Closes Silo-Server#4390

* fix(blobstore): share the free-space budget across concurrent writes

Each write read free space on its own, so concurrent writes could each
spend the whole budget and together cut into the reserve. Writes in flight
now claim their bytes from one shared count: a sized write before it
creates anything, a stream as it writes. The bytes are given back once the
write is published or discarded, when statfs counts them.

* fix(blobstore): count each in-flight byte once against the reserve

The shared budget held a write's bytes until it was published, but a
fresh statfs reading already counts the bytes on disk, so concurrent
writes that fit were refused. A rejected claim was also briefly visible
to other writes.

The store now keeps two running totals: bytes claimed and bytes settled
(written or abandoned). A write records the settled total when it reads
free space and counts only what was claimed beyond it, which covers its
own later bytes and other writes without counting a byte twice. Claims
check the limit before taking bytes, in a compare-and-swap loop.

* fix(blobstore): address review of the free-space reserve

- Count statfs blocks in f_frsize on Linux, where FUSE can report a larger
  f_bsize, and compute free bytes in int64 so FreeBSD builds.
- Log the recovery only after a write succeeds, so a filesystem out of
  inodes does not log a recovery before every failed attempt.
- Let a long stream read free space again when a chunk does not fit, so
  a competing write that failed and removed its file no longer counts
  against it.
- Time the image cache's pause after a full store with the monotonic
  clock.
- Close the test's pipe when the stream returns, so a failure cannot hang
  the test.

* fix(blobstore): keep ErrExists at the reserve and log recovery from a fresh reading

- CreateExclusive on an existing key returns ErrExists before the
  free-space check, since it adds no bytes. A restore run again on a full
  volume compares those objects instead of failing them.
- The recovery line reads free space again after the write, so a write
  that used up the room does not log a recovery.
- The reserve test pins the 2 GiB cap, waits for its stream goroutine
  before restoring the statfs stub, and deletes with the store at the
  reserve.

* fix(blobstore): log recovery only from a confirmed reading

- A failed free-space reading after a write keeps the low state, so a
  later write checks again instead of logging a recovery nothing showed.
- The recovery check reads the settled total before statfs, as
  writeBudget does.
- The reserve test installs its statfs stub before seeding the store, so
  the real disk's free space cannot fail it.

* fix(blobstore): let a restore's rollback use the reserve, and recheck long streams

A restore that stopped at the free-space reserve, or failed later with the
store inside it, rolled back by putting each preserved file back through
the same check, which refused it. The rollback stopped and left every
database closed until an admin freed space and ran --recover. Writes on a
context from WithoutFreeSpaceReserve are not limited, and restoreBlobs
uses one; the forward restore still stops at the reserve, which leaves
the rollback the room it needs.

A stream read free space again only once a chunk no longer fit its first
reading, so space PostgreSQL or another writer took meanwhile never
counted against it. A stream now reads free space again after every
32 MiB it writes.

The backup preflights read raw free space with a 1 GB margin, so a backup
they accepted could run its dump and then stop at the reserve with a
generic error. StoreDestination.FreeBytes now reports the space above the
reserve (blobstore.FreeForWrites), and the preflights refuse up front.

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

* fix(trickplay): pause claiming work after the store is found full

A file whose sheet write hit a full store is released for an hour, but the
service claimed the next file at once and decoded its first chunk before
that write was refused too. With a backlog, the worker decoded file after
file for as long as the disk stayed full. After an ENOSPC the service now
claims nothing for 10 minutes.

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

* fix(metadata): keep scans and refreshes from undoing a storage-full wait

A deferral for a full artwork store counts no attempt, so a scan's
discovery copy reclaimed every waiting sidecar job and read, decoded and
encoded the file again, only for its write to be refused. Discovery now
honours the storage-full wait, and right after a full-store failure it
defers without processing, as background drains do.

A manual refresh kept the storage-full error on the job it pulled
forward, so the next refusal took the 1-hour repeat delay. It now starts
the deferral over, as it already does for missing storage.

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

* test: satisfy lint on the storage-full fixes

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

* test(blobstore): check the rollback exemption in its own test

The reserve test went past the funlen limit with the exemption check in it.

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

* fix(blobstore): address the second review round of the reserve fixes

- A stream whose free-space reading failed went unlimited for the rest of
  the write. It now reads again every 32 MiB in that case too, and a
  failed reading keeps the last good one.
- The backup preflights counted the reserve on top of their 1 GB margin,
  so a backup that fit above the reserve could be refused, and a required
  upgrade backup could stop startup. They now need the larger of the two.
- A refresh of an artwork job already due kept its storage-full error, so
  the next refusal still took the 1-hour delay. It starts over now.
- Discovery copies again claim a job waiting for space, as before this
  branch: the upsert's discovery hold moved a due job forward, and the
  stricter claim then refused it, delaying the retry after space came back.
  The pause after a full-store failure still keeps them from reprocessing.

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

* test(ci): run the storage-full refresh test in the database contracts

TestLocalArtworkWaitsForStorageSpaceDB needs Postgres, and the Go DB job
runs only the tests its lists name, so CI skipped it on every run. It
fails without the refresh fix, so list it beside the other local artwork
contracts.

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>
…ntal controls (Silo-Server#5177)

* fix(recommendations): read every taste signal and match peers by parental controls

The taste rebuild and its summary read only a profile's 1000 newest ratings,
favorites and watchlist entries, while the exclusions and aversion read every
rating, so a heavy user's older signals stopped shaping the profile. They now
read every rating and walk the favorites and watchlist by keyset.

Similar Users read each peer's 100 newest ratings and favorites and kept the
likes afterwards, so newer low ratings and episode entries pushed a peer's
older likes out. It now reads the 100 newest 4- and 5-star movie and series
ratings, filtered in SQL, and the 100 newest favorites of recommendable
titles.

The stored max content rating counted every rated title, so disliking an R
film made a profile look like an R viewer. It now counts only titles with a
positive combined weight that are not marked Not interested, with ties
broken by title ID.

Peers were matched under the viewer's own watch-derived max, so an
unrestricted adult whose highest-rated title was PG only got PG peers. Peers
are now matched under the viewer's configured parental controls: its
content-rating ceiling, or its advisory-age limit as a bare age, whichever is
stricter. An unrestricted viewer can match any peer. The row's titles are
still filtered by the viewer's access, and the account floors are unchanged.

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

* fix(recommendations): keep the taste summary on its newest signals

The summary only uses top-rated and favorited titles to pick directors, so
reading a heavy profile's whole history there costs a full scan per request
for no benefit. It reads the newest 1000 of each again; the profile rebuild
keeps reading everything.

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

* fix(recommendations): build a taste profile from its 2000 heaviest titles

Reading every rating, favorite and watchlist entry left the taste rebuild
loading an embedding for every signaled title and clustering all the
positive ones, so a long history cost memory and k-means time without
bound (watch history was already read in full). The rebuild now loads
embeddings only for the 2000 titles with the most combined weight; time
decay leaves the rest of a long history little weight. Signal counts, the
maximum content rating and the exclusions still read every signal.

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

* fix(recommendations): fill the taste-title cap with embedded, engaged titles

The cap took the 2000 heaviest positive titles before checking which had an
embedding, so heavy titles without one could take every place and clear a
profile that had usable history, and a long, heavily weighted watchlist
could push out every rated, favorited or watched title and reset its
cold-start level. Titles the profile rated, favorited or watched now come
before watchlist-only ones, and embeddings are read down that order, 2000
titles at a time, until 2000 titles with an embedding are found.

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

* test(recommendations): budget the Similar Users type checks in the refresh pin

With main's statement-budget pin merged, a refresh of the evaluation's
focused persona sends 119 statements instead of 114. Similar Users now
keeps only each peer's movie and series favorites, one type check per
peer (6 here), and no longer reads the taste profile meta for a
watch-derived peer ceiling (1 fewer); each peer's liked ratings remain one
query. The budget and its comment record the new count.

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

---------

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

* feat(playback): end native sessions paused past an administrator timeout

The lifecycle sweep ends a native session whose lifecycle row has said paused for longer than playback.paused_session_timeout_minutes (default 15, 0 off) while its client still reports. Watch Together members, Cast receivers and audio-only files are exempt, and a session another server holds is left to that server. ExpirePausedAttempt locks the attempt and reads the lifecycle row after the lock, so a resume that commits first or while it waits keeps the session. The end is recorded as expired.

Progress, replan and the control-ticket mint answer 410 playback_session_paused_timeout to an attempt that listed the new attempt-sticky client feature paused_timeout_v1, and 410 playback_session_ended otherwise.

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

* feat(web): add the paused playback timeout to playback settings

A Paused playback group holds the minutes after which the server ends a paused session, with its two search entries.

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

* feat(web): leave the player with its own notice when a pause ran too long

The video player advertises paused_timeout_v1. On 410 playback_session_paused_timeout from progress, a replan or a reconnect it leaves the way it does after an administrator's end, but says playback stopped because it was paused for too long.

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

* docs(playback): describe the paused-session timeout

The lifecycle doc gains its eligibility, claim, ownership and answers; protocol v3 the client feature, the problem type and the client contract; the playback and realtime API docs their 410 answers.

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

* chore(i18n): sync translations 2026.11.23-73e6a54

Brings in the paused playback setting and the player's paused-too-long
notice.

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

* refactor(playback): drop the in-memory paused-attempt expirer

The paused timeout runs only in the lifecycle sweep, which needs
Postgres, so the memory store's ExpirePausedAttempt and the pause
tracking it added to ApplyProgress had no caller.

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

* fix(playback): recheck the paused timeout's exemptions in its claim

ExpirePausedAttempt now refuses an attempt a Cast receiver renders, under
the attempt's lock, and a session an open Watch Together room lists, in
the statement read after the lock. The membership check treats a room
whose runtime has no members object (JSON null from a nil map) as having
no members, instead of failing the statement.

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

* fix(playback): make the paused timeout sweep reach every session it should end

- Page candidates by (updated_at, session id), up to three pages a sweep,
  continuing from the last sweep's cursor, and leave sessions another
  server holds out in SQL, so skipped rows cannot starve eligible ones.
- Drop the copy held here when the end could not be finished (lease held
  elsewhere, writers failed), without history; the lifecycle sweep's
  stopped-attempt recovery finishes it once.
- Each sweep, run the stale-copy path for held copies whose attempt
  another server stopped under the paused timeout's stop id.
- Guard the Watch Together membership check against a members value that
  is not an object.
- Keep the claim's interface with its caller, and cache the setting for a
  minute so the cache is used.

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

* fix(playback): check replan ownership before answering a stopped attempt

ReplanPlaybackV2 answered a stopped attempt's 410 before checking that
the caller owns it, so another profile learned the session had ended.
It now answers 403 first, as progress does.

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

* docs(playback): describe paused timeout paging, copy teardown and limits

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

* fix(web): leave the player when a control ticket learns of a paused timeout

The ticket mint stopped retrying on any 410 but never told the player.
A 410 playback_session_paused_timeout now ends the session the way a
progress report does, with the paused-timeout notice. A 410
playback_session_ended is left as it was: the server answers it for
every stopped attempt, an expiry included.

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

* fix(web): report pause and resume as they happen

Progress went out every 10 seconds, so a resume could reach the server
that much late and the paused timeout could end a session the viewer
had just resumed. The video element's play and pause events now send a
report at once, handled like the interval's.

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

* fix(playback): drop copies another server's paused timeout ended

A holder's copy of a session another server stopped under the paused
timeout went through expireSessionCopy, which expects the reaper to have
removed the copy already: when the stop was finalized elsewhere it only
closed the transcode, so the copy kept its slot, its live row and its
control lane until the reaper ran. The holder now finishes the end under
the finalization lease when nobody has, then drops the copy and its live
row. It does so even while its own timeout reads zero, and a sweep that
runs out of time resumes at the first candidate it did not reach.

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

* refactor(web): move the paused playback group into its own component

Keeps PlaybackSettings.tsx under its 800-line size limit.

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

* fix(playback): read a sweep page's files in one lookup and detach its teardown

The paused timeout resolved each candidate's media file with its own
query, so exempt audio-only sessions, which stay candidates, cost one
query each on every sweep. A page's distinct files are now read in one
batched lookup when the resolver can batch.

The teardown after a won claim, and for a copy another server's timeout
ended, ran on the sweep's deadline; it now runs on a detached context
bounded at 30 seconds, so a sweep that runs out of time can't leave a
stopped session's copy behind.

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

* fix(playback): recheck that the client still reports when claiming a paused timeout

The sweep selects only sessions whose client accepted a sample within
PausedStreamSlotGrace, but the claim did not repeat it, so a client that
went quiet between selection and the lock could be ended by the paused
timeout instead of the idle expiry. The locked read now requires it too.

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

* test(notifications): keep the first-send relay credential outside its renewal window

The fixture's credential expired on 2026-12-01, which entered the 7-day
(plus jitter) renewal window on 2026-11-23, so the first send also
renewed and the test failed on every branch. Its expiry is now 90 days
from the test's start.

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

* chore(playback): regenerate the protocol v3 fixtures for paused_timeout_v1

The decision fixtures list the server's /api/v2 features, which now
include paused_timeout_v1.

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

* fix(playback): claim a paused timeout only for the file the sweep classified

The sweep decides that a session is not audio-only from the attempt's
effective file, but a replan can move the attempt to another file before
the claim. The claim now requires the attempt still to play that file.
A page's files also fall back to one-by-one reads when the batched read
fails, so one unreadable file no longer holds every session on the page.

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

* docs(playback): stop the reconnect cycle on an ended session's 410

Reconnect step 3 read as starting a new attempt for a 410 too; both
ended-session answers leave playback, as section 6.3 says.

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

* chore(i18n): sync translations 2026.11.23-ad35254

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

* docs(playback): keep the ended-session 410s out of the reconnect cycle's restart

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

* docs(playback): let step 3 decide what a reconnect answer means

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

* fix(playback): wait for the paused timeout setting before ending sessions

A server whose first read of playback.paused_session_timeout_minutes failed
answered with the 15-minute default, so it could end paused sessions on a
server where the administrator had turned the timeout off. CachedSetting
gains Lookup, which reports whether its answer came from a read, and the
sweep ends nothing until one succeeds. An unsaved setting still reads as
the default.

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

* fix(playback): retry the paused timeout claim the sweep deadline cut short

The cursor moved past a candidate even when the sweep's deadline cancelled
its claim, so that session waited until the cursor wrapped instead of being
retried on the next sweep.

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

* perf(playback): share the paused timeout's room exemption and skip ended rooms

The sweep and the claim each spelled out the Watch Together membership
check. It is now one fragment, and it names the open phases so the
(phase, created_at) index skips the ended rooms the table keeps.

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

* refactor(web): drop isPlaybackSessionEndedError, which nothing calls

Its callers moved to playbackSessionEndReason.

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

---------

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

* fix(artwork): cache SVG logos at full size instead of their tiny canvas

The image cache drew an SVG at its declared canvas. TMDB logos declare
canvases a few dozen units wide, so a cached logo's original and every
rung were a 54px image, and title pages stretched it into a blur.

Rasterize now draws an SVG at the cache's 3840px original width through
libvips' SVG scale option, or as large as the node's decode budget
allows, and the budget is charged for that raster. A migration
re-queues the cache jobs of logos already cached from an SVG, an hour
out so old nodes in a rolling upgrade leave them alone, and points the
ones from metadata providers back at their provider source.

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

* fix(artwork): size SVG rasters from libvips and draw previews small

bimg rounds an SVG's declared canvas to whole pixels, and libvips
scales the fractional canvas, so the decode budget could be charged
for a smaller raster than the one drawn. The scale and the reservation
now come from libvips' own header at each scale, which also lands the
cached original exactly on 3840px.

The admin artwork picker drew each SVG sidecar at 3840px only to
shrink it to a 300px preview; RasterizeWithin draws it at preview size.

The migration also re-queues jobs for library-file SVG logos, whose
sources end in a "?v=" fingerprint, and the full-size test no longer
depends on the machine's memory.

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

---------

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

- The old backend releases the advisory lock only when it exits, which happens after the client hangs up. Until then, reacquiring the lock right after Close could fail and make the test flaky.
- Before the test reacquires the lock, it now blocks on pg_advisory_lock (5s timeout) and then unlocks.
…-Server#5219)

SkippedRootRepository.UpsertObservedFile counted present files under a
root with strpos(mf.file_path, $2 || '/') = 1, which cannot use
idx_media_files_folder_file_path_pattern and scans every media_files row
in the folder on each call.

Compute bytewise lower and upper bounds via pathscope.DescendantRange
and filter with mf.file_path ~>=~ $5 AND mf.file_path ~<~ $6 so
generic prepared plans seek the existing text_pattern_ops index, and pin
the plan and counting behavior in scripts/ci/db-pins.txt.

Co-authored-by: Gemini 4 Neon <noreply@google.com>
…m key fields

Upstream's macOS installer waits for node_control_version and key_rejected in
the node's own health answer. Vio's transcode node shares the server's worker
signing secret and reports neither field, so the installer reads the health
status value instead: it must be ok, draining, or drained. The node still
opens its port only once the server accepts its key.
make playback-fixtures output after the fork playback files were kept. The
generator no longer emits the upstream default_audio_reconcile_answer replan
scenario, matching the fork's conformance matrix.
…ields

The upstream sync brings 63 unchecked errors and 5 context-in-struct fields
under Vio's lint configuration. Handle the errors where they matter (close,
rollback, cleanup, handler registration, queueing) and explicitly discard
only best-effort cleanup and hash writes. The five structs carrying a
context.Context are request-scoped helpers or test rows whose shape comes
from upstream's API; each gets a scoped nolint with the reason, not a
file-level suppression.

Also drop the two stale playback launch-guard entries whose functions no
longer launch a process.
Restore classification for the virtual-library settings (network gates stay
stricter access settings, library IDs and the monitor file are server state,
indexer/altMount/TMDB endpoints are external services) and the media_files
copy-safety switch. Add the fork-only and merged tables to the data, server
state, per-user exclusion, and switch lists so the classification contract
sees every table the schema has.

Drop notifications.fanout_enabled and notifications.release_events_enabled:
upstream retired them, a migration already deleted their rows, and nothing
reads the defaults. Classify playback.transcode_vpp_tone_map_enabled, which
the fork's playback engine still reads.
…chain

The merge took upstream's ImageTypeFromString, which reads "titlecard" as a
poster; the fork's artwork rulings depend on it resolving to the episode
still. It also hard-coded the series chain in resolveSeriesRefreshProviderIDs,
which FetchLibraryMetadata calls for movies too, so a movie lookup resolved
the wrong chain and could panic on a nil chain repository.

Restore both fork behaviours and check the folder-id parse error.
The v2 insights surface is deferred with the pinned API layer, so no
/api/v2/admin/insights operation exists. A monitor key cannot reach a route
the server does not serve; remove the two scope patterns and their rows so
the scope table keeps matching the documented contract.
- downloads: the merged planner takes a JobKind, so the old two-argument
  interface assertion silently stopped matching and every tone-map or
  multi-track preparation fell back locally without dispatch.
- policy: map a policy evaluation timeout to playback's admission sentinel,
  as the fork's admission fallback expects, while other errors still deny.
- taskmanager: forward the collection scheduler's interim progress instead
  of dropping the callback.
- auth: the scenario executor reseeds a scratch database between scenarios
  and writes device sign-in rows with no concurrent uninstall, so list it
  with that rule.
- fspath: two playback functions no longer launch a process.
- mail: the default brand name is the fork's server name.
- playback: adopt upstream's silo_subprocess_* metric names, which the
  merged processmetrics package and docs use.
Season and episode details carry the title details an admin edits, which the
fork already stores and updates but the detail builders never copied.

The external-ID lookup fixture seeds a present file per item: the fork only
reports a title the viewer can play, which upstream's fixture predates. The
recently-added TV event list is cached without the profile's quality ceiling
(RecentTVQuery.PlayContentID), so the arrival row stays and the play-target
resolver applies the ceiling later; the fixture now pins that.
episode_aliases joined the content_id family after the online re-id was
defined, so renaming a series or episode failed on its foreign keys. Cascade
the UPDATE on all five keys, including the two composite same-series keys.

The episode search refresh fixtures clone the functions into an isolated
schema; the fork's functions resolve canonical episodes through
episode_aliases, so the schema needs that table too.
… atomic

The request outcome value must stay "cancelled": it is the v2 contract enum
and the media_requests check constraint's value, so the merge's "canceled"
spelling made every withdrawal violate the constraint.

A playback stop writes its progress inside the stop transaction, under the
same watch-state series lock. The previous path opened its own transaction,
so progress survived a later failure in the stop's span history.
…ndex

Marker history reports the editor's address, so use host() rather than a text
cast of the inet column.

The theme directory test guards that a subtree read stays bounded by a path
index. PostgreSQL's generic plan may choose the global path index instead of
the folder-prefixed one; both bound the same subtree, so accept either.
A curated or collection row whose titles all sit outside the viewer's access
has no cards; the aggregate Home and library reads now leave it out, while a
direct section read still answers the row empty. Rows of collection posters
carry their cards in Collections, so they stay.
- The reset link is a fragment (\/reset-password#token), so accept either
  form when capturing it.
- The stale signup-settings fake returns unset for every key except
  signup.enabled, keeping the password policy at its default, as upstream's
  test does.
- The Jellyfin hash-name test uses a two-attempt policy so two wrong
  passwords exhaust the budget.
- Drop five deferred v2 session-reach DB pins whose tests were not carried
  with the pinned v2 layer.
Both are measured facts about a registered device, so a restore keeps the
backup's value and the client refreshes them.
The sync's changed lines bring upstream code under Vio's lint configuration.
Correct spelling in comments and display copy, keep persisted status values
("cancelled", "cancelling") with scoped misspell suppressions, delete dead
test fixtures and the unused nodepool job-kind view, apply the staticcheck,
perfsprint, govet, sloglint and revive suggestions, and use a scoped nolint
with a reason where an upstream function exceeds the fork's size/complexity
limits or a test waits on observable state with a bounded sleep.
The backup restore creates a collection with the ID its plan will lock and
report on; CreateLibraryCollectionInTx generated a new ID and ignored it, so
the follow-up lock failed with ErrLibraryCollectionNotFound. Editors still
leave the ID empty and get a generated one.
The trusted CI workflow starts a disposable PG17 database as watch_party and
hands it to test binaries that call SetupPackage; the guard refused a name
without a test marker and the integration job exited before running them.
The deferred handler/catalog/v2 surface did not bring these upstream tests;
a pin that names no test fails the db-pins job even though nothing regressed.
The dependency metric is silo_dependency_operations_total like the process
metrics, and the throttle fixture needs a budget the second attempt exhausts.
The seed and restore paths name the collection ID they will add items to or
lock; Create generated a new ID and ignored it, so the next call failed with
ErrLibraryCollectionNotFound. An editor's create still leaves the ID empty.
The DB pins runner already hands each package a migrated clone, and the trusted
integration job runs this package's prebuilt binary against a plain Postgres
that cannot apply the vector migration. With no TestMain the integration
pattern (which names no test this fork carries) exits cleanly, and the DB pins
job still isolates the package.
…in one

The trusted workflow runs the handlers binary against watch_party on a plain
Postgres, while its migrated pgvector database sits on port 5433. SetupPackage
now uses that sibling when present, so the package's destructive fixtures run
against a migrated clone; the fixture guards accept the plain name only as a
fallback.
pgxpool.Config.ConnString returns the original string, so the rewritten port
and database never reached the probe. Rewrite the URL itself.
@randrini

Copy link
Copy Markdown
Collaborator Author

Playback matrix on a deployed build of this branch (8f6a85cf), as the pre-merge gate:

  • stress-4 twice: 30/30 presses, 0 superseded, fence_replays = 0, playhead advancing in both.
  • ds-seek: one run failed a −60 s pair because presses at 0.85 s spacing outran two replans of 2.1 s and 2.5 s; the identical rerun passed at 4 188 ms with replans of 173–376 ms. No fence, 412, 5xx or session teardown in either.
  • tv-seek: pass (−60 at 4 316 ms).
  • pr-seek-retry: refusal 5.03 s, card 5.14 s, retry at the refused target, 15 s grant, honest seek_anchor_unavailable terminal.
  • Segment integrity: 1 561 responses, 0 truncated, 0 implausible, 0 503, 0 repeated 412, minimum body 63 732 B.

Net playback delta from main is a 13-line StreamEnd type, consistent with the deferred engine.

The matrix covers playback only. The auth, backup, collections, uploads, metadata and config surfaces rest on the reconciled test suite and the expectation changes listed above.

@randrini
randrini marked this pull request as ready for review November 28, 2026 18:51
@randrini
randrini merged commit 36eb063 into main Nov 28, 2026
19 checks passed
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.

9 participants