Skip to content

fix(plugins): turn off the community catalog nobody chose - #2228

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/plugin-community-catalog-off
Oct 10, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/plugin-community-catalog-off

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1223
Validation tasks: unblocks #1224 C2; unblocks #1225 C2

The approved community catalog should stay off until an admin turns it on (#1223 AC3). Migration 20260709191109 turned it on for every server that had run before, so upgraded servers have community plugins enabled without anyone choosing them. Because an admin turning it on later stores the same value, the two cases can't be told apart.

This migration turns the community catalog off on servers where no plugin from it is installed. Servers already running a community plugin keep it on, so that plugin keeps getting updates.

Approach

A new Goose migration sets plugins.include_approved_community_plugins to false and disables the managed approved-community repository unless an installation belongs to that repository. Installations are not touched. Fresh servers were already off. The down migration is a no-op: which servers it turned off is not recorded, and turning the catalog back on is an admin choice. docs/admin-plugin-catalog-api.md records the default.

Validation

  • A Go test checks the migration's conditions and that it never removes or rewrites installations, in the style of the existing community-migration test.
  • Run against real databases: an upgraded server with no community plugin goes from on to off; one with silo.requests.arr installed stays on; a fresh database stays off. The server applies it at startup.
  • make verify-migration-ledger passes. make lint-changed and the generated-contract checks pass. make test-go fails only in hardware-transcode probes and TestAdminResourceCapabilitiesAndScope, which fail the same way on main on macOS, plus timing tests that pass when rerun alone.

Evidence

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

Surface and build: web admin, Plugins > Catalog, "Include approved community plugins", desktop and mobile web, on an upgraded server with no community plugin. Before: main (9d37930c6); after: 75ef964ff.

Risks

Admins on upgraded servers who turned community plugins on deliberately, but have none installed, need to turn it on again. Nothing they installed is affected. The user manual already describes the catalog as off until an admin turns it on.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code, GitHub CLI, Playwright
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: Two independent Claude Code review passes (claude-opus-5-5) read the combined diff of this PR and the three other [v1] Plugin management / marketplace #1223 fixes for correctness. Neither found a bug. One design point was raised: unreachable catalog or download hosts returned 422, which clients treat as final. They now return 503 with Retry-After.

An earlier migration turned the approved community catalog on for every
server that had run before. Turn it off again unless a plugin from it
is installed, so it stays off until an administrator enables it.
@silo-kody

silo-kody Bot commented Oct 10, 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 ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T17:20:13.446643Z 75ef964 PR opened
ℹ️ 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.

@Quick104 Quick104 added the priority: P2 Limited scope, workaround exists, or polish label Oct 10, 2026 — with Cursor
@Quick104 Quick104 added the impact: security Auth, privacy, or permission boundary label Oct 10, 2026 — with Cursor
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e6003858-174c-4601-86ff-74a46935bda3


📥 Commits

Reviewing files that changed from the base of the PR and between 9d37930 and 75ef964.



📒 Files selected for processing (3)
  • docs/admin-plugin-catalog-api.md
  • internal/plugins/catalog_community_migration_test.go
  • migrations/sql/20261010162953_disable_unused_approved_community_catalog.sql


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




📝 Walkthrough
📝 Walkthrough

Walkthrough

The upgrade migration disables the approved community catalog when no plugin installation uses an approved community repository. A test checks the migration SQL, and the API documentation describes the default setting and upgrade behavior.

Changes

Approved Community Catalog

Layer / File(s) Summary
Disable unused approved community catalog on upgrade
migrations/sql/20261010162953_disable_unused_approved_community_catalog.sql, internal/plugins/catalog_community_migration_test.go, docs/admin-plugin-catalog-api.md
The migration disables the setting when no installation uses an approved community repository, then disables the repository when a matching server setting is false. Its Down section does not restore state. The test checks the migration SQL, and the documentation describes the default and upgrade behavior.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: quick104



Merge Risk: ⚪ Minimal · up to 75ef9

The migration appears mergeable after normal checks. It turns off the catalog on upgrades without an installed community plugin; administrators who want it enabled can turn it back on.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check Passed The title clearly and concisely describes the main migration change: disabling the unused approved community catalog.
Description check Passed The description directly explains the problem, migration behavior, validation, user impact, and risks covered by the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 75ef964ff2

ℹ️ 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 on lines +13 to +17
AND NOT EXISTS (
SELECT 1
FROM public.plugin_installations i
JOIN public.plugin_repositories r ON r.id = i.repository_id
WHERE r.managed_key = 'approved-community'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Serialize the migration with catalog installation writes

During a rolling deployment where an older API node is installing from this repository, CatalogService.ResolveInstall checks repository.Enabled before its network fetch and InstallationStore.Create inserts the row only afterward, without locking this setting. This NOT EXISTS can therefore observe no installation, set the setting false, and let the following update disable the repository just before the late insert commits; the newly installed community plugin is then left with updates paused, defeating the stated keep-on behavior. Lock or otherwise serialize against installation membership changes before committing the disable.

AGENTS.md reference: AGENTS.md:L38-L41

Useful? React with 👍 / 👎.

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. The window needs an older node to start a community install on a server with no community plugin, and the new node to run this migration between that install's repository check and its insert, which takes a few seconds while the binary downloads. If it happens, the plugin still installs and runs; its page shows "Updates paused" with a link to turn community plugins on (#2227), which restores updates. Locking plugin_installations wouldn't close the window either, because the older node checked repository.Enabled before the migration started.

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

Labels

impact: security Auth, privacy, or permission boundary priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Upgraded servers have the community plugin catalog on without an admin choosing it

2 participants