Skip to content

feat(config): set server settings from environment variables - #4498

Merged
Quick104 merged 10 commits into
mainfrom
feat/env-server-settings
Nov 18, 2026
Merged

Quick104 merged 10 commits into
mainfrom
feat/env-server-settings

Conversation

@Quick104

@Quick104 Quick104 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none (no passed case changes unless one of the new variables is set; #1228 C1 covers the server name field, which is read-only only while SILO_SERVER_NAME is set)

Other clients: Apple N/A (no admin settings screen); Android N/A (no admin settings screen); Roku N/A (no admin settings screen)

An operator who deploys Silo from a Compose file or a Kubernetes manifest has to finish the setup by hand in the admin UI: the public URL, S3 storage, SMTP, hardware acceleration, pool sizes. Only trusted proxies, the search provider and REDIS_URL could come from the environment, each through its own code. This change lets 51 more server settings be set from environment variables, through one table.

Approach

internal/config/env_settings.go maps each variable to a setting key and a scope:

  • Stored (cluster-wide, for example SILO_PUBLIC_URL, SILO_S3_PUBLIC_*, SILO_SMTP_*, SILO_HW_ACCEL): an API server validates the value, writes it to server_settings when it differs, and refuses admin saves of the key. The check and the write share one settings transaction, as an admin save's do. Secrets go through the encrypting repository. Every API server needs the same value, or the last one to start wins.
  • Process (SILO_DB_MAX_CONNECTIONS, SILO_USERDB_POOL_MAX_OPEN, SILO_SCANNER_WORKERS, SILO_MATCHER_WORKERS): the value applies to the server that reads it, is never stored, and is re-applied on every settings reload, so replicas can differ. SILO_DB_MAX_CONNECTIONS sizes the first pool, which removes the rebuild after settings load.

A value from the environment passes the checks an admin save passes: per-key normalization, cross-field validation over the settings the server will run on, the artwork folder check, and the guard that stops storage that already holds data from moving. An invalid value stops startup with a message naming the variable. Migration commands skip the table, so a bad value cannot block a migration, and proxies do not read it.

SILO_TRUSTED_PROXIES, SILO_SEARCH_PROVIDER, SILO_MEILISEARCH_URL and SILO_MEILISEARCH_API_KEY keep their names and behavior and now come from the table; their one-off code is gone. REDIS_URL is unchanged.

GET /api/v2/admin/settings/sensitive-status gains managed_by_env_vars, a map from setting key to the variable that sets it; managed_by_env is unchanged. The web settings pages and the setup wizard use it to show any such field read-only with the variable's name, replacing five pages' own handling and hardcoded names.

Two settings were left out on purpose. auth.local_password_login has a save-time check that an administrator can still sign in, which a startup write cannot make. Variants that read a secret from a file are not part of this change.

Validation

  • Go: build, gofmt, go mod tidy -diff, go vet, make lint-changed, make lint-router-recovery and make test-go pass.
  • Web: lint, format check, build, bundle budget and make test-web pass.
  • Contracts and hygiene: settings bindings, playback fixtures, route inventory, OpenAPI, web types, the v2 contract comparison, v2 fixtures, the committed-artifact test, local paths, case collisions, size ratchet, bidi and migrations pass.
  • Not run: make verify-actionlint and make verify-shellcheck (neither tool is installed where the gate ran; this change touches no workflow or shell script) and make verify-prometheus-rules (no Docker there).
  • New tests cover reading and normalizing the table, duplicate rows, the checks an environment value goes through including the storage guard, the process overlay surviving a reload, and the storage transition refusal for a new, a staged and an already committed transition.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-4498/

Checked on an isolated stack (one API server with its own Postgres and Redis) built from this branch, with variables added to the server's container:

  • Stored variables: server.public_url was stored without its trailing slash and server.log_level as debug; both showed in stored and effective settings and in managed_by_env_vars.
  • A secret: email.smtp_password was stored as ciphertext, appeared in configured, and was absent from stored and effective reads.
  • Process variables: with SILO_DB_MAX_CONNECTIONS=33 and SILO_SCANNER_WORKERS=3, effective settings showed 33 and 3 while the stored rows stayed 20 and 8.
  • A save of a stored key, a process key and the secret each returned 422 with <key> is managed by an environment variable; a save of a key no variable sets returned 200.
  • SILO_SMTP_ENABLED=true with a mail server address and sender stored email.enabled as true and locked it; without a mail server address the server stopped with email.smtp_host is required when email is enabled.
  • SILO_DB_MAX_CONNECTIONS=0 stopped the server with invalid SILO_DB_MAX_CONNECTIONS: database.max_connections must be an integer between 1 and 10000.
  • After removing SILO_SERVER_NAME and restarting, the key kept its stored value and could be saved again.
  • In the web admin, the General, Logging, Email and Library pages showed each of those fields disabled with "Set by <VARIABLE> in the server's environment.", and fields no variable sets stayed editable.

Not checked on a running server: the settings form holding its loading state until it knows which fields the environment sets (web tests only), the en-XA pseudo-locale, a storage variable against storage that already holds data (unit test only), and two API servers started with different values.

Surface and build: web admin and admin API. The first stack ran this branch's changes as of 56c4e8f, before the rebase onto the current main and the translations pin; the SILO_SMTP_ENABLED and single-transaction checks ran on a second stack built from cb92990, before a last change to which error startup reports.

Risks

  • server.log_format had no validation and now accepts text, json or empty. An admin save of any other value is refused. A stored value outside that set still loads as before.
  • A stored variable is written at every start while it is set. Removing it leaves the last value in the database, editable again.
  • While any storage variable is set, the server that reads it refuses POST /api/v2/admin/storage-transitions, and fails a transition staged earlier when its job runs, because the environment would put its values back at the next start. A transition that already committed still settles. The refusal is per server: an API server started without those variables still accepts a transition.
  • Six catalog keys for the old per-page notes are no longer used. They are removed from the catalog in a follow-up after this merges, because main uses them until then.

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 how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): GitHub CLI, Playwright (headless Chromium)
  • Model(s): claude-opus-5-5 (implementation), claude-fable-5-2 (design, review, verification)
  • Involvement: Fully AI-generated, directed by the maintainer; not yet human-reviewed
  • Adversarial review: none independent. claude-fable-5-2 reviewed the implementing agent's diff and added the three S3 token variables, without which the cloudflare_token URL mode could not be configured from the environment.

🤖 Generated with Claude Code

Note

Set server settings from environment variables

  • Adds a registry in env_settings.go mapping environment variables to setting keys, split into stored and process scopes. At startup, main.go validates and applies these settings atomically, writes changed stored-scope values, and emits settings-changed events.
  • Adds handlers.CheckEnvironmentSettings in admin_settings_env.go to normalize and cross-validate environment settings, and blocks changes to the recorded artwork storage location.
  • The sensitive-status API now reports each managed setting's environment variable name, and admin/setup UI fields with that metadata show a managed-by-environment message and become disabled (SettingField.tsx).
  • Storage transitions are refused with an error naming the managing variables when storage settings are environment-managed (service.go).
  • Replaces the previous per-package environment handling: removes catalog.SearchSettingsFromEnv, catalog.StoreSearchSettings, and trusted-proxy environment reads from clientip.SeedDefaults.
  • Behavioral Change: useSettingsForm treats sensitive-status data as pending, so forms stay in a loading state until it arrives; PlaybackSettings disables all hardware-device switches when playback.hw_device is environment-managed; server.log_format accepts only empty, text, or json.

Macroscope summarized 45c637b.

Quick104 and others added 5 commits November 18, 2026 10:25
One table in internal/config maps each variable to its setting and scope.
Cluster-wide (stored) values pass the admin save checks, are written in one
batch through the encrypting repo, and lock the key; per-process values
overlay the settings at startup and on every watcher reload and are never
stored. SILO_TRUSTED_PROXIES and the search variables move onto the table.
SILO_DB_MAX_CONNECTIONS sizes the first database pool.

Storage location variables are refused once storage is recorded, as an
admin save is, and a managed storage transition is refused while the
environment sets any storage setting. The v2 sensitive-status response
names the variable behind each locked key in managed_by_env_vars.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Any settings field locked by an environment variable now shows the
variable that sets it and disables its control. The admin settings pages
and the setup wizard read the variable from managed_by_env_vars, so the
names hardcoded on the Search, General, Redis and wizard pages go away.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SILO_S3_PUBLIC_URL_AUTH=cloudflare_token needs the token secret, so the
mode could not be configured from the environment alone.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-triage silo-triage Bot added the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Nov 18, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T16:14:53.326568Z 95750a3 New commits
🔒 Security Review ✅ Completed 2026-11-18T16:17:11.396733Z 95750a3 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-kody

silo-kody Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage silo-triage Bot added documentation Improvements or additions to documentation enhancement New feature or request go Pull requests that update go code javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish labels Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1547e7b-a7ae-4179-8dfb-36910714ae3a
Commits

Reviewing files that changed from the base of the PR and between cb92990 and 45c637b.

Files selected for processing: 8

  • .env.example
  • cmd/silo/env_settings.go
  • docs/admin-settings-api.md
  • internal/storagetransition/service.go
  • internal/storagetransition/transition_safety_test.go
  • web/src/hooks/useSettingsForm.ts
  • web/src/pages/admin-settings/LibraryMetadataSettings.tsx
  • web/src/pages/admin-settings/settingsWorkerDefaults.ts
Walkthrough

Environment variables now use stored or process-local scopes, with startup validation and application. Admin status reports the variable for each managed setting. Admin and setup forms display environment-management notices, and storage transitions reject environment-managed storage settings.

Changes: Environment-managed settings

Layer / File(s) Summary
Environment registry and startup application
internal/config/env_settings.go, internal/config/admin_settings.go, cmd/silo/env_settings.go, cmd/silo/main.go, internal/nodeconfig/watcher.go, internal/clientip/config.go, internal/catalog/search_env.go, .env.example, docker-compose*.yml, docs/admin-settings-api.md
Settings are mapped to stored or process scopes, normalized, validated, and applied at startup. Stored values are persisted when they differ; process-scoped values overlay config loads. Startup publishes setting-change events. Documentation describes the environment-setting behavior.
Validation, status, and storage-transition checks
internal/api/handlers/admin_settings_env.go, internal/api/handlers/admin_settings_inspection.go, internal/api/handlers/admin_settings_redis_db_test.go, internal/api/router.go, internal/apiv2/admin_settings_inspection.go, internal/storagetransition/*, contracts/api/v2/openapi.json
Environment settings are checked against stored values and storage constraints. Admin status responses include a map from setting keys to environment-variable names. Storage transitions return a validation error when a requested storage key is environment-managed.
Admin and setup form environment indicators
web/src/api/v2/schema.ts, web/src/hooks/useSettingsForm.ts, web/src/components/settings/*, web/src/pages/admin-settings/*, web/src/pages/setup-wizard/steps/*
The settings form reads environment-variable names from sensitive status. Shared fields and settings pages display environment-management metadata. Setup-wizard fields also receive the metadata.
Localized environment-managed messages
.silo-translations, web/src/locales/*
Locale files add messages for node- and server-environment-managed fields. The translation version and generated message-key union are updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SiloStartup
  participant EnvSettings
  participant SettingsRepository
  participant RunningServers
  SiloStartup->>EnvSettings: Read and validate environment values
  EnvSettings->>SettingsRepository: Persist changed stored-scope values
  SiloStartup->>RunningServers: Publish settings-changed events
Loading

Possibly related PRs

  • Silo-Server/silo-server#3117: It adds the same search environment variables and admin read-only status behavior that this change reorganizes.

Suggested reviewers: blurbery

Merge Risk: Moderate · previous review cb929

This adds environment-variable management of server settings. At the reviewed head, admin forms can still stage edits to environment-managed fields before their status loads, and a stale draft makes later saves fail. A storage transition queued before a restart is not rechecked against environment-managed storage when it runs. Fix these before merging, along with the remaining documentation and UI follow-ups.

Security architecture risk: Minimal · up to cb929

The inspected paths retain server-side save restrictions, secret protection, and transactional validation. No introduced material security or recovery failure was established. Operators must keep cluster-wide environment settings consistent across replicas; removing a variable does not restore its previous stored value.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Control of an API server's deployment environment can now configure registered cluster-wide settings, including signup, proxy trust, storage endpoints and credentials, and SMTP. The maximum configuration scope is the servers sharing its settings database, not merely the starting process. This is deployment-operator authority, rather than a newly introduced end-user input path.

Security Findings and Attack Paths

  • inferred — No expanded unauthenticated reachability or SMTP credential disclosure was established in the traced email entrypoint. Its base-to-head change only adds managedByEnv props. The unchanged email-test operation remains acting-admin-only, and its service returns fixed failure messages rather than provider error text.

Trust Boundaries and Controls

  • observed — Environment ownership is enforced on the server, not solely by disabled form controls. Bootstrap records every active registry key, and both batch and single-key save paths reject managed keys. The only exception in the refusal predicate is clearing redis.db; it does not exempt SMTP settings.

Resilience and Maintainability Implications

  • observed — The startup mutation uses the existing database-wide advisory-lock transaction: it reads current settings, validates, encrypts returned writes, and commits the batch together. Errors before commit take the rollback path. Reapplication compares plaintext values and skips unchanged writes; reload parsing failures return before replacing the active configuration.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: server settings can now be set from environment variables. It matches the changeset, which adds a table-driven env settings registry with stored and process scopes, an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the problem (operators must finish setup by hand in the admin UI), the approach (a table-driven mapping of 51 server settings from environment variables, split into stored and p…
Full details: Title check

Explanation

The title names the main change: server settings can now be set from environment variables. It matches the changeset, which adds a table-driven env settings registry with stored and process scopes, and removes the one-off search and trusted-proxy env handling.

Full details: Description check

Explanation

The description states the problem (operators must finish setup by hand in the admin UI), the approach (a table-driven mapping of 51 server settings from environment variables, split into stored and process scopes), the validation performed, and the evidence checked on a running stack. It matches the changeset, which adds internal/config/env_settings.go, the sensitive-status managed_by_env_vars field, the admin and setup-wizard UI changes, and the removal of the one-off trusted-proxy, search, and Meilisearch handling. The description also covers risks such as storage-transition refusal and the server.log_format validation change, which the changeset includes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 236dedfdce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/silo/env_settings.go Resolved
Comment thread cmd/silo/main.go Resolved
Comment thread internal/config/env_settings.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Report environment-managed storage in the transition capabilities… · StorageSettings.tsx:518-520

web/src/pages/admin-settings/StorageSettings.tsx:518-520
Minor · Functional Correctness · Quick win

Report environment-managed storage in the transition capabilities response.

When an environment variable sets an S3 region, Start refuses every storage transition. The capabilities response does not report this. Its handler sets state from the service's presence and never sets allowed. The page treats an omitted allowed as permitted and opens the transition review. On submit, the server returns a validation error, and the page shows only the generic queue-failed message. The dialog stays open.

The capabilities response must report the environment-managed state, for example by returning allowed: false while any storage setting is environment-managed. The page then disables the transition path before the administrator submits.

Nitpick comments: 1

cmd/silo/redis_bootstrap_test.go: 1

42-42: Trivial · Maintainability & Code Quality · Quick win

Assert the Redis variable names returned to admin status.

Both calls discard the new vars map. If either REDIS_URL assignment is removed, the test still passes while admin status loses the variable name. Assert that the map is empty when REDIS_URL is unset and contains exactly redis.url and redis.db, both mapped to REDIS_URL, in the configured cases.

Also applies to: 55-55

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 67738ad3-4c78-43bb-a736-fea090882a0d
Commits

Reviewing files that changed from the base of the PR and between d15a890 and 236dedf.

Files selected for processing: 92

  • .env.example
  • .silo-translations
  • cmd/silo/env_settings.go
  • cmd/silo/main.go
  • cmd/silo/redis_bootstrap_test.go
  • contracts/api/v2/openapi.json
  • docker-compose.advanced.yml
  • docker-compose.yml
  • docs/admin-settings-api.md
  • internal/api/handlers/admin.go
  • internal/api/handlers/admin_settings_env.go
  • internal/api/handlers/admin_settings_env_test.go
  • internal/api/handlers/admin_settings_inspection.go
  • internal/api/handlers/admin_settings_redis_db_test.go
  • internal/api/router.go
  • internal/apiv2/admin_settings_inspection.go
  • internal/catalog/search_env.go
  • internal/clientip/config.go
  • internal/clientip/config_test.go
  • internal/config/admin_settings.go
  • internal/config/env_settings.go
  • internal/config/env_settings_test.go
  • internal/nodeconfig/watcher.go
  • internal/nodeconfig/watcher_test.go
  • internal/storagetransition/service.go
  • internal/storagetransition/transition_safety_test.go
  • web/src/api/v2/schema.ts
  • web/src/components/settings/PathSettingField.tsx
  • web/src/components/settings/SecretField.tsx
  • web/src/hooks/useSettingsForm.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/bg.json
  • web/src/locales/ca.json
  • web/src/locales/cs.json
  • web/src/locales/da.json
  • web/src/locales/de.json
  • web/src/locales/el.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/et.json
  • web/src/locales/fi.json
  • web/src/locales/fr.json
  • web/src/locales/he.json
  • web/src/locales/hi.json
  • web/src/locales/hr.json
  • web/src/locales/hu.json
  • web/src/locales/id.json
  • web/src/locales/it.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/ko.json
  • web/src/locales/lt.json
  • web/src/locales/lv.json
  • web/src/locales/ms.json
  • web/src/locales/nb.json
  • web/src/locales/nl.json
  • web/src/locales/pl.json
  • web/src/locales/pt-BR.json
  • web/src/locales/pt-PT.json
  • web/src/locales/ro.json
  • web/src/locales/ru.json
  • web/src/locales/sk.json
  • web/src/locales/sl.json
  • web/src/locales/sv.json
  • web/src/locales/th.json
  • web/src/locales/tr.json
  • web/src/locales/uk.json
  • web/src/locales/vi.json
  • web/src/locales/zh-Hans.json
  • web/src/locales/zh-Hant.json
  • web/src/pages/admin-settings/CompatibilityProxiesSettings.tsx
  • web/src/pages/admin-settings/DownloadsSettings.tsx
  • web/src/pages/admin-settings/EmailSettings.tsx
  • web/src/pages/admin-settings/GeneralSettings.tsx
  • web/src/pages/admin-settings/LibraryMetadataSettings.tsx
  • web/src/pages/admin-settings/LoggingSettings.tsx
  • web/src/pages/admin-settings/PlaybackSettings.tsx
  • web/src/pages/admin-settings/RedisGroup.tsx
  • web/src/pages/admin-settings/SearchSettings.tsx
  • web/src/pages/admin-settings/SettingField.tsx
  • web/src/pages/admin-settings/SignInSettings.test.tsx
  • web/src/pages/admin-settings/SignInSettings.tsx
  • web/src/pages/admin-settings/StorageSettings.test.tsx
  • web/src/pages/admin-settings/StorageSettings.tsx
  • web/src/pages/admin-settings/settingsForm.test-support.ts
  • web/src/pages/setup-wizard/steps/ConnectStep.tsx
  • web/src/pages/setup-wizard/steps/PlaybackStep.tsx
  • web/src/pages/setup-wizard/steps/ServerStep.tsx
  • web/src/pages/setup-wizard/steps/StorageStep.test.tsx
  • web/src/pages/setup-wizard/steps/StorageStep.tsx
Files with no reviewable changes: 2

  • internal/catalog/search_env.go
  • internal/clientip/config_test.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Comment thread .env.example Resolved
Comment thread cmd/silo/env_settings.go Resolved
Comment thread cmd/silo/main.go Resolved
Comment thread docs/admin-settings-api.md Resolved
value={form.getValue("branding.server_name")}
onChange={(v) => form.setValue("branding.server_name", v)}
restartRequired={restartKeys.has("branding.server_name")}
managedByEnv={form.envVar("branding.server_name")}

@coderabbitai coderabbitai Bot Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Keep managed settings unavailable when the status request fails.

If the settings query succeeds and the sensitive-status query fails without cached data, General renders the Server name field as editable. handleSave excludes only Redis keys. If an environment variable sets branding.server_name, the admin can therefore stage a change that the server will reject.

Extend the status-error fallback to potentially managed fields outside Redis. Offer a retry for the status request, and keep unrelated fields available when their writability is known.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not changing this. When the status request fails the page cannot know which fields a variable sets, and guessing would lock fields nothing manages. The server stays the authority: it refuses the save and names the key. With 61114a0 a status request that is merely slow no longer leaves fields editable.

🤖 Claude Code in T3 Code (claude-fable-5-2)

email.enabled defaults to false, so the SILO_SMTP_* variables alone could
not make a fresh deployment send mail.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment thread cmd/silo/env_settings.go Resolved
- A storage transition staged before a restart that added a storage
  variable now fails when its job runs, as starting one already does.
- The settings form stays in its loading state until it knows which
  fields the environment sets, so an edit the server would refuse cannot
  be staged first.
- Restore defaults on the Library page skips a worker count the
  environment sets.
- .env.example and the settings API doc say that a blank value counts as
  unset and that the storage transition check is per API server.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment thread internal/storagetransition/service.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c767614-832b-4ddf-9bdc-386180115b0f
Commits

Reviewing files that changed from the base of the PR and between 236dedf and cb92990.

Files selected for processing: 4

  • .env.example
  • cmd/silo/env_settings.go
  • internal/config/env_settings.go
  • web/src/pages/admin-settings/EmailSettings.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Comment thread .env.example Resolved
…e is set by the environment

The refusal ran before the restart-pending check, so a reclaimed job whose
transition had already committed was recorded as failed instead of
settling. It now runs after that check and before any copy.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

…change

A count the environment sets differs from its default without being
restorable, so the button appeared and did nothing.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

…nt check read

The check ran against the settings transaction's snapshot while startup
built its config from the earlier read, so a setting another server
changed in between was validated but not used.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 5 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility
  • Retain distributed firing claims through their own validity windows

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request go Pull requests that update go code javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant