Skip to content

fix(jellycompat): default server name to Silo - #553

Merged
Quick104 merged 1 commit into
mainfrom
codex/jellycompat-default-server-name
Aug 8, 2026
Merged

Quick104 merged 1 commit into
mainfrom
codex/jellycompat-default-server-name

Conversation

@Quick104

@Quick104 Quick104 commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • default the Jellyfin compatibility server name to Silo for fresh databases
  • migrate only the untouched legacy StreamApp value on existing databases
  • add regression coverage for both the baseline seed and guarded upgrade predicate

Why

The runtime fallback and admin-settings default already use Silo, but the initial schema still persisted StreamApp. Because the persisted database value wins, Jellyfin-compatible clients continued to see the legacy product name.

Impact and risk

Existing installations are updated only when jellyfin_compat.server_name is exactly StreamApp; operator-customized names are preserved. The down migration is intentionally a no-op because a migrated Silo value cannot be distinguished safely from an operator-selected Silo value.

Validation

  • make migrate-validate — passed
  • go test ./internal/database ./internal/config -run 'TestJellycompatServerNameDefaultsToSilo|Test.*JellyfinCompat|Test.*RestartRequired' -count=1 — passed
  • golangci-lint run --new-from-merge-base=origin/main ./... — 0 issues.
  • cd web && pnpm run lint — passed with 0 errors and 157 pre-existing warnings
  • cd web && pnpm run format:check — passed
  • make verify-local-paths — passed
  • git diff --check — passed
  • make lint — reports the repository's documented full-tree backlog (303 findings); none are on this diff
  • make test — package tests for this change passed; the full run hit two unrelated macOS process-identity failures in TestBeginWebOperationRecoversDeadProcessLock and TestBeginWebOperationRejectsLiveProcessLock. An isolated playback-package rerun passed after the full run also encountered a flaky playback failure.

Adversarial review

The review identified two data-safety risks: overwriting customized server names and changing an operator-selected Silo back to StreamApp on rollback. The migration now matches only the exact legacy default, and its down section is non-destructive.

AI Disclosure

  • Tool(s): OpenAI Codex
  • Model(s): gpt-5
  • Involvement: fully AI-generated
  • Adversarial review: identified custom-name overwrite and destructive rollback risks; resolved them with an exact legacy-value predicate and a no-op down migration

Summary by CodeRabbit

  • Data Updates
    • Renamed the default Jellyfin-compatible server name from “StreamApp” to “Silo.”
    • Existing installations using the previous default are updated automatically during migration.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The schema now seeds jellyfin_compat.server_name as Silo. A migration changes existing default StreamApp values to Silo. A database test validates both SQL changes.

Changes

Jellyfin server name migration

Layer / File(s) Summary
Schema seed and migration
migrations/sql/001_schema.sql, migrations/sql/20260806224241_rename_default_jellycompat_server_to_silo.sql
The schema seeds Silo. The up migration conditionally updates StreamApp values. The down migration executes SELECT 1.
Migration validation
internal/database/jellycompat_server_name_migration_test.go
The test reads both SQL files and checks the seed value, update assignment, and conditional predicate.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the change to set the default Jellyfin compatibility server name to Silo.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/jellycompat-default-server-name

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

@Quick104
Quick104 marked this pull request as ready for review August 6, 2026 22:54

@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.

🧹 Nitpick comments (1)
internal/database/jellycompat_server_name_migration_test.go (1)

22-30: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Scope the assertions to the executable Up section.

The test normalizes the entire migration before checking the fragments. A matching fragment in the Down section or a comment could make the test pass even if the Up section no longer contains the guarded update. Split at -- +goose Down and assert the complete UPDATE server_settings ... WHERE ... contract against the Up text.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/database/jellycompat_server_name_migration_test.go` around lines 22
- 30, Update the migration test around the existing normalized text assertions
to isolate the executable Up section by splitting at the “-- +goose Down” marker
before checking fragments. Assert the complete guarded UPDATE server_settings
statement, including its SET and WHERE conditions, against only the Up text so
matches in Down or comments cannot satisfy the test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/database/jellycompat_server_name_migration_test.go`:
- Around line 22-30: Update the migration test around the existing normalized
text assertions to isolate the executable Up section by splitting at the “--
+goose Down” marker before checking fragments. Assert the complete guarded
UPDATE server_settings statement, including its SET and WHERE conditions,
against only the Up text so matches in Down or comments cannot satisfy the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6eb24713-d78f-4ab0-8543-8cb1cbfab698

📥 Commits

Reviewing files that changed from the base of the PR and between fa1d7ba and 053eea6.

📒 Files selected for processing (3)
  • internal/database/jellycompat_server_name_migration_test.go
  • migrations/sql/001_schema.sql
  • migrations/sql/20260806224241_rename_default_jellycompat_server_to_silo.sql

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant