Repository navigation
fix(jellycompat): default server name to Silo - #553
Conversation
📝 WalkthroughWalkthroughThe schema now seeds ChangesJellyfin server name migration
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/database/jellycompat_server_name_migration_test.go (1)
22-30: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winScope the assertions to the executable
Upsection.The test normalizes the entire migration before checking the fragments. A matching fragment in the
Downsection or a comment could make the test pass even if theUpsection no longer contains the guarded update. Split at-- +goose Downand assert the completeUPDATE server_settings ... WHERE ...contract against theUptext.🤖 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
📒 Files selected for processing (3)
internal/database/jellycompat_server_name_migration_test.gomigrations/sql/001_schema.sqlmigrations/sql/20260806224241_rename_default_jellycompat_server_to_silo.sql
Summary
Silofor fresh databasesStreamAppvalue on existing databasesWhy
The runtime fallback and admin-settings default already use
Silo, but the initial schema still persistedStreamApp. 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_nameis exactlyStreamApp; operator-customized names are preserved. The down migration is intentionally a no-op because a migratedSilovalue cannot be distinguished safely from an operator-selectedSilovalue.Validation
make migrate-validate— passedgo test ./internal/database ./internal/config -run 'TestJellycompatServerNameDefaultsToSilo|Test.*JellyfinCompat|Test.*RestartRequired' -count=1— passedgolangci-lint run --new-from-merge-base=origin/main ./...—0 issues.cd web && pnpm run lint— passed with 0 errors and 157 pre-existing warningscd web && pnpm run format:check— passedmake verify-local-paths— passedgit diff --check— passedmake lint— reports the repository's documented full-tree backlog (303 findings); none are on this diffmake test— package tests for this change passed; the full run hit two unrelated macOS process-identity failures inTestBeginWebOperationRecoversDeadProcessLockandTestBeginWebOperationRejectsLiveProcessLock. 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
Siloback toStreamAppon rollback. The migration now matches only the exact legacy default, and its down section is non-destructive.AI Disclosure
Summary by CodeRabbit