You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(plugins): show a refused automatic plugin update in web admin - #3357
Closes#3237
Related issue: #1223
Validation tasks: changes #1225 C1
When an automatic plugin update is refused, for example because the download doesn't match its catalog checksum, web admin never says so. Check for updates reports only that the check started, and the plugin's tile and page show nothing; the reason reaches only the server log and a failed Check Plugin Updates run. This change records the refused update on the plugin and shows it on the Plugins page and the plugin's page, with the version and the reason.
Approach
The update check stores the refused version, the reason and the time on the plugin's plugin_installations row (three new nullable columns, added by an additive migration). The reason is the administrator-facing PackageError message that a manual Update to already shows, which names no URL or checksum; any other failure gets a generic line pointing at the server log. Because the record is in Postgres, every node returns it.
The record clears when the installed version changes (any install, replace or manual update) or when a later check handles the plugin without failing, including when the catalog no longer offers a newer version or the plugin no longer has a repository (its repository was deleted). A check that can't reach the plugin's repository leaves it in place. A plugin uninstalled while a check runs doesn't count as a failed operation.
/api/v2 installation responses gain an optional update_failure object (version, reason, failed_at). The frozen /api/v1 view does not carry it. docs/admin-api.md describes the field.
Web admin shows "Update to failed" on the plugin's tile and a warning with the reason on its page. When a plugin update check finishes, and after the events connection reconnects, the installations list refreshes, so the result appears without reloading the page.
An update check writes a refusal only while the version it tried to update from is still installed, so a manual update that wins the race isn't marked as refused. A successful manual replacement returns the installation without the old refusal.
A refused update also counts toward the Plugins page's Needs attention filter. The plugin's status label stays as it was.
A backup restore carries the record with the live server's release of each plugin, so a restored plugin doesn't show a refusal from backup time for a version it no longer runs.
jellycompat has no plugin administration, so it needs no change. silo-apple and silo-android have no plugin admin screens and don't read the installation API, so no client follow-up is needed.
Validation
Reproduced on origin/main against a local server with a local test catalog listing a newer release of an installed plugin under a wrong SHA-256: no feedback on the tile or page after Check for updates. On the fix branch, the same steps show the notice on the tile (without a reload) and the plugin page, at desktop and phone widths. Correcting the checksum and checking again installed the new version and removed the notice. The /api/v1 installation list is unchanged.
Go: go build ./..., gofmt, go vet, make lint-changed (0 issues) and make lint-router-recovery pass. make test-go passes except two internal/jellycompat Dolby Vision strip tests, which fail the same way on the unmodified base on this machine.
New tests: the update check records, keeps and clears the refused update and picks the reason text; a Postgres contract test (added to scripts/ci/db-contracts.txt) stores, clears and version-clears the record. Both ran against a migrated database.
After merging current main: the restore round-trip test (TestBackupRestoreRoundTripDB) now also checks that a restored plugin takes the live server's refused-update record. It fails on the merged branch without the restore fix and passes with it.
Web: pnpm run lint (no new findings), format:check, build, budget:check and make test-web pass.
Contracts and hygiene: verify-apiv2-openapi, verify-apiv2-contract (additive changes only), verify-apiv2-fixtures, verify-apiv2-web-types, TestCommittedArtifactMatchesRouter, verify-migrations, verify-migration-ledger, verify-v1-route-freeze, verify-route-inventory, verify-local-paths, verify-size-ratchet, verify-case-collisions and verify-bidi pass. Not run: verify-actionlint, verify-shellcheck, verify-prometheus-rules, verify-settings-bindings-all, verify-playback-fixtures, verify-scenario-catalogs and verify-offline-routes, since nothing they check changed.
Surface and build: web admin Plugins page and plugin page, desktop (1440 px) and phone (390 px), before on origin/main and after on this branch, same local data.
Risks
The migration adds three nullable columns to plugin_installations and needs no maintenance window. Each update check writes one extra row update for a plugin whose stored record it sets or clears. Older web builds ignore the new field. #1225 C1 asks the validator to observe update and failure feedback; a refused automatic update now shows on the Plugins page as well as in Logs and Scheduled Tasks, which is what the issue asks for, so C1 should be re-run on a build with this change.
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: Claude Code (via T3 Code); Codex CLI for code review
Tool(s): Claude Code, Codex CLI, GitHub CLI, git, Go toolchain, pnpm, Docker, Playwright (headless Chromium)
Adversarial review: independent reviews of the full diff by claude-opus-5-5 and gpt-6.1-sol on correctness, repository standards and the issue's requirements. GPT found that a check finishing while the events connection was down left the page stale until the next refresh; fixed by refreshing installations on reconnect. Opus found the new web type had separated a doc comment from its interface; fixed. No other findings. Bot review on the PR then found the stale refusal in replacement responses and the race with a manual update (both fixed and tested), and asked for the Needs attention filter (added); a second dual review of that follow-up found only an over-broad doc comment, now narrowed. The two earlier review fixes were then re-read against the rebased branch, with the focused Go tests, the Postgres contract test and verify-apiv2-contract re-run. A later review (Claude Code, claude-opus-5-5, with a gpt-6.1-sol cross-check) found that a refusal on a plugin whose repository was deleted never cleared, and that removing a plugin during a check failed the run; both are fixed in 5c35b22 with table-test rows that fail on c25255f. A review after merging current main (Claude Code, claude-opus-5-5) found that a backup restore kept a refusal from backup time on a plugin running a newer version; fixed in b326330, with a test check that fails without it.
Note
Record and display refused automatic plugin updates in web admin
The automatic update pass now persists a refused update (target version, sanitized reason capped at 500 runes, UTC time) via AutoUpdateService.recordUpdateFailure in auto_update.go, and clears the record when the update succeeds or the installed version changes.
New nullable columns update_failed_version, update_failure_reason, update_failed_at are added to plugin_installations in 20261101154758_plugin_update_failures.sql, with a down migration.
The v2 admin API (AdminPluginUpdateFailure), the web frontend types, the plugin tile alert, and the plugin detail page warning banner all surface the failure. pluginStatus marks such installations as needing attention at rank 2.
Backup transfers now carry the refused-update columns with plugin releases, and restoring a live release clears them.
Behavioral Change: the frozen v1 admin API view does not include update_failure; v1 consumers see no change. The frontend invalidates the plugin-installation query when check_plugin_updates becomes idle or on reconnect.
The update check now records the version and the admin-facing reason on
the installation when an automatic update fails, and clears it once the
installed version changes or a later check no longer fails. The v2
installation view returns it as update_failure, and the Plugins page and
the plugin's page show it.
The published evidence link and description cover before-and-after captures of the Plugins page and plugin detail page at desktop and phone widths. The remaining visible behavior is the post-check refresh: please include a short recording showing the failed update check finish and the warning appear without reloading the page.
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.
No actionable comments were generated in the recent review.
Walkthrough
The pull request records refused automatic plugin updates with the attempted version, reason, and timestamp. The admin API exposes this information, and the web admin displays it on plugin tiles and detail pages. The installation record clears after a version change or a non-failing check.
Changes: Plugin update failure reporting
Layer / File(s)
Summary
Persist update failure state internal/plugins/installation.go, migrations/sql/20261101154758_plugin_update_failures.sql, internal/plugins/builtin_guard_test.go, scripts/ci/db-contracts.txt
Installation records and database columns store the failed version, reason, and time. Updates can set or clear the record. The database test checks retrieval, clearing, and version-guard behavior.
Record automatic update outcomes internal/plugins/auto_update.go, internal/plugins/auto_update_replace_test.go, internal/plugins/installer.go, internal/plugins/installer_replace_test.go
The automatic update check records failed updates and clears prior failures after non-failing handling. Failure reasons use a sanitized package error message or a generic fallback, capped at 500 runes. Replacements clear the failure record.
Expose failure details in the admin API internal/api/handlers/plugins.go, internal/apiv2/admin_plugin_installations.go, contracts/api/v2/openapi.json, web/src/api/types.ts, web/src/api/v2/schema.ts, docs/admin-api.md
The API returns an optional update_failure field with the attempted version, reason, and timestamp. The schemas and documentation describe the field. The frozen v1 view does not include it.
Refresh and display update failures web/src/components/RealtimeEventsProvider.tsx, web/src/lib/pluginStatus.ts, web/src/lib/pluginHelpers.test.ts, web/src/components/admin/plugins/PluginTile.tsx, web/src/pages/AdminPluginDetail.tsx
The web admin refreshes plugin installations after update checks. Plugin tiles and detail pages display recorded failure information, and plugin status marks the installation for attention.
Breaking-change approval metadata
Layer / File(s)
Summary
Update approval list contracts/api/v2/breaking-approvals.json
The approvals for two diagnostic-report response-enum changes were removed.
sequenceDiagram
participant AutoUpdateService
participant InstallationStore
participant AdminPluginInstallationOf
participant AdminAPI
participant PluginAdmin
AutoUpdateService->>InstallationStore: Store failed version, reason, and timestamp
InstallationStore->>AdminPluginInstallationOf: Provide installation failure details
AdminPluginInstallationOf->>AdminAPI: Map details to the optional response field
AdminAPI->>PluginAdmin: Return installation data for display
Loading
Possibly related issues
Silo-Server/silo-server#3237: This change records and displays refused automatic plugin updates with their attempted version and reason.
The change is mergeable with owner awareness: overlapping checks can temporarily remove a valid update-failure notice from the admin view, although the plugin remains operational.
Security architecture risk: Low · up to 5c35b
The change preserves package verification and keeps failure details within the existing administrator interface. The main concern is that overlapping checks can erase a newer failure warning. This affects visibility of rejected updates, not whether an unverified package can be installed.
Retained concerns
Low · reliability · inferred: A stale, non-failing check can erase a newer refusal warning. If check A observed an existing failure, check B records another refusal for the same installed version, and A then clears its snapshot's failure, the clear updates by installation ID without checking which failure is current. Startup and task entrypoints can overlap, and the task-worker mutex is local. This can hide a checksum-refusal warning across administrator views, although package rejection, logs, and failed-task reporting are not bypassed. This is a consistency defect in the newly introduced diagnostic state, not evidence that pre-existing package security was weakened.
Security review details
Security Blast Radius
inferred — The identified consistency defect affects an installation's shared failure record and administrator warning wherever that row is read. It does not grant package-installation authority, and existing failed-task reporting remains a separate visibility channel.
Security Findings and Attack Paths
inferred — No package-verification bypass was established in the inspected change. Automatic installation still follows the existing resolver and replacement path, including checksum verification before binary replacement; recording is a downstream diagnostic action after an update outcome. Loss of a refusal warning must therefore be distinguished from execution of a rejected package.
Trust Boundaries and Controls
observed — The new response field uses the existing installation operation declared ClassActingAdmin, not a new public endpoint. That class specifies authenticated administrator access. The v1 bridge omits the field, and the recorder does not persist the wrapped operational error.
Resilience and Maintainability Implications
inferred — Failure recording is best-effort rather than an atomic part of the failed update. It uses the caller's context, and persistence errors are added to the summary. Cancellation can therefore prevent a new durable warning; no independently retried recovery write was established. This limits durability guarantees without weakening package verification.
Hardening Proposals
proposed — Make clearing conditional on the installed version and the failure identity observed by the check, so an older successful pass cannot delete a newer refusal. This would strengthen the diagnostic-state lifecycle without expanding updater authority.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the primary change: showing refused automatic plugin updates in the web admin.
Linked Issues check
[#3237] requires web admin to show a refused automatic plugin update, with the attempted version and reason, on the Plugins page or the plugin page. Head 5c35b22 implements this. The migration adds …
Out of Scope Changes check
Each changed area supports #3237. Persistence (migration, Installation/UpdateInstallationInput fields, InstallationStore.Update) stores and clears the refusal. The auto-update service writes it. The i…
Description check
The description is directly related to the changeset. It explains the problem (refused automatic plugin updates are not shown in web admin), the approach (three nullable columns on plugin_installation…
Full details: Linked Issues check
Explanation
[#3237] requires web admin to show a refused automatic plugin update, with the attempted version and reason, on the Plugins page or the plugin page. Head 5c35b22 implements this. The migration adds three nullable columns to plugin_installations. AutoUpdateService.Check stores the refused version, a sanitized PackageError reason (max 500 runes) or a generic reason, and a UTC time. The v2 API adds optional update_failure (AdminPluginUpdateFailure). PluginTile.tsx shows a failure warning with the reason. AdminPluginDetail.tsx shows a warning banner with the version, reason and time. RealtimeEventsProvider refreshes installations after a check finishes and after reconnect, so the notice appears without a reload. The Needs attention filter also counts the refusal. The reported scenario (checksum mismatch on a newer catalog release) is covered by the recording path, and tests in auto_update_replace_test.go, builtin_guard_test.go and installer_replace_test.go cover recording, clearing and version guards. The later fixes (clearing for a plugin with no repository, ignoring a missing installation on clear) support the same requirement. #1223 and #1225 are contextual validation references and add no active coding requirement. Limitation not covered by #3237: a plugin missing from the catalog keeps its refusal record (auto_update summary: missing catalog entries leave records unchanged). The issue does not require clearing in that case.
Full details: Out of Scope Changes check
Explanation
Each changed area supports #3237. Persistence (migration, Installation/UpdateInstallationInput fields, InstallationStore.Update) stores and clears the refusal. The auto-update service writes it. The installer clears it after a successful replacement, so stale refusals do not show. The v2 API schema, openapi.json, admin-api.md, the generated web types and the web components display it. The Needs attention filter (pluginStatus.ts and its test) extends the Plugins page display of the same refusal. The v1 bridge is unchanged: internal/api/handlers/plugins.go adds UpdateFailure with json:"-" and a comment that the frozen v1 bridge does not carry it, so /api/v1 output does not change. contracts/api/v2/breaking-approvals.json drops two approvals, which the PR describes as contract-gate maintenance for already merged changes. It does not alter runtime behavior. scripts/ci/db-contracts.txt registers the new Postgres test. No unrelated functional change is established. Note: the repository diff tool could not read the changed blobs, so this verdict uses the supplied summary plus a file read of internal/api/handlers/plugins.go at head.
Full details: Description check
Explanation
The description is directly related to the changeset. It explains the problem (refused automatic plugin updates are not shown in web admin), the approach (three nullable columns on plugin_installations, a v2-only update_failure field, and web tile and page warnings), validation steps, and risks. The level of detail is not a factor for this check, and the description is clearly on topic.
Full details: Docstring Coverage
Explanation
Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 11 functions across 14 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent 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: bd05ad5e-cf1f-4be7-b36a-d011d2dedecd
Commits
Reviewing files that changed from the base of the PR and between c25255f and 5c35b22.
Files selected for processing: 2
internal/plugins/auto_update.go
internal/plugins/auto_update_replace_test.go
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Stale UpdateFailure values appear in successful replacement responses through the new projection in internal/api/handlers/plugins.go because installer.replaceBinary and installer.replaceArchive return shallow copies of the old installation without clearing that field, although their database Version updates clear it. Reload the committed installation or clear UpdateFailure on both returned replacement objects so successful install/upload responses do not report the completed update as still refused.
Prompt for LLM
File internal/api/handlers/plugins.go:
Line 1496:
Stale UpdateFailure values appear in successful replacement responses through the new projection in internal/api/handlers/plugins.go because installer.replaceBinary and installer.replaceArchive return shallow copies of the old installation without clearing that field, although their database Version updates clear it. Reload the committed installation or clear UpdateFailure on both returned replacement objects so successful install/upload responses do not report the completed update as still refused.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in c25255f. Both replacement paths now drop the record from the installation they return, matching the row the version change just cleared. TestInstallerReplaceBinaryPreservesInstallationID covers it, and on a local build re-uploading the plugin after a recorded refusal returns no update_failure.
The reason will be displayed to describe this comment to others. Learn more.
Thanks—based on your description, clearing UpdateFailure in both returned replacement objects addresses the original finding and keeps successful responses consistent with the database. The regression test and local re-upload check cover the reported stale-response behavior.
The reason will be displayed to describe this comment to others. Learn more.
Race condition identified in internal/plugins/auto_update.go: the failure write matches only existing.ID, allowing a failed automatic download to restore an obsolete refusal after a concurrent manual replacement succeeds and clears it. Condition the write atomically on the original installed version to prevent the stale update attempt from overwriting the replacement result.
Prompt for LLM
File internal/plugins/auto_update.go:
Line 545 to 546:
Race condition identified in internal/plugins/auto_update.go: the failure write matches only existing.ID, allowing a failed automatic download to restore an obsolete refusal after a concurrent manual replacement succeeds and clears it. Condition the write atomically on the original installed version to prevent the stale update attempt from overwriting the replacement result.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in c25255f. The refusal write now carries IfVersion with the version the check tried to update from, and the store adds AND version = $n. If a manual update has changed the version in the meantime, the write does nothing. TestInstallationStoreUpdateFailureDB covers the stale write against Postgres, and the update-check test asserts the guard value.
The reason will be displayed to describe this comment to others. Learn more.
That addresses the reported race: the atomic AND version = $n guard prevents a stale refusal from being written after a manual update changes the installed version.
The Postgres stale-write test and the update-check assertion cover both enforcement of the condition and propagation of IfVersion. Based on your description, this finding is addressed.
#1225 C1 passed on build 1669 · 5ec82048 and explicitly asks the validator to observe update/failure feedback. This PR adds persisted refused-update data and displays it on plugin tiles and detail pages, changing the result that step observes. Please explain why this validated behavior is changing and re-validate C1 after merge. The current Validation tasks: changes #1225 C1 line matches this impact.
Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
A manual replacement returned its installation with the refusal the version
change had just cleared, and an update check that lost a race to a manual
update could record its refusal against the newer version. The replacement
result now drops the record, and the check writes it only while the version
it tried to update from is still installed. A refused update also counts
toward the Plugins page's Needs attention filter.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
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: d2c76330-6f7c-44d3-af02-c15a2edd42ff
Commits
Reviewing files that changed from the base of the PR and between 6d6c9b8 and c25255f.
Files selected for processing: 8
internal/plugins/auto_update.go
internal/plugins/auto_update_replace_test.go
internal/plugins/builtin_guard_test.go
internal/plugins/installation.go
internal/plugins/installer.go
internal/plugins/installer_replace_test.go
web/src/lib/pluginHelpers.test.ts
web/src/lib/pluginStatus.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Condition the clear on the failure that this check observed.
If two checks overlap, a check using an older installation snapshot can clear a refusal recorded by the later check. The clear sets no IfVersion condition, and a version condition alone would not protect a newer refusal for the same installed version. Make the clear conditional on the observed failure record in the row update. Otherwise, the admin view can lose the later refusal. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
Leaving this as is. Overlapping checks are possible: each replica runs a startup pass and its own scheduled task. But a clear only removes a newer refusal when two overlapping checks disagree about the same plugin, one failing and one succeeding or finding nothing newer. That only happens when the catalog or the download changed between them, so the later outcome isn't clearly the right one to keep. When it does happen, the next check re-records the refusal, because the catalog still lists the version and the download still fails. Nothing wrong stays stored; the notice is missing until then. A compare-and-clear on the stored failure would add a second conditional write path to the store for that window, which I don't think it justifies.
The reason will be displayed to describe this comment to others. Learn more.
@Rhainland Understood. The race can temporarily remove the refusal notice, but a later check can restore it if the update still fails. You have accepted that limitation to avoid a second conditional write path. I won’t press for compare-and-clear here.
The Server task #1224 C1 passed on build 1669 · 5ec82048 and exercised a catalog auto-update with a wrong checksum. Its validation notes that the refusal left the old version running but recorded no failure. This PR now persists that refusal on the installation and exposes it through the v2 admin API, so the validated result changes even though checksum rejection remains intact.
The PR must explain why this validated behavior is changing, and C1 needs re-validation after merge. The current Validation tasks: line omits this affected server case. Suggested correction:
The reason will be displayed to describe this comment to others. Learn more.
Review of c25255f. Two findings, both in the update check's record and clear logic. I'm fixing both in a commit on this branch, so there's no need to change anything yourself.
The rest held up: the admin list reads plugin_installations directly, so every node returns the same record and no per-node cache serves it. The /api/v2 field is additive and stays out of /api/v1. Every version change goes through Update(Version), so it clears the record.
A refused automatic update stayed on a plugin whose repository was
deleted (repository_id goes NULL), because the update check skips such
plugins before recording or clearing. The notice and Needs attention
flag then never cleared. The check now clears the record for a plugin
without a repository, which has no automatic update left to fail.
A clear that finds the plugin already uninstalled no longer counts as a
failed operation, so removing a plugin during a check doesn't fail the
Check Plugin Updates run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewed head: b326330. It merges main at 4018816 into the PR's 5c35b22 and adds one fix commit. Main has moved since; the new commits don't touch plugin or backup code, and the branch still merges cleanly.
Addressed findings
From this review:
Main's backup restore kept a refusal from backup time (low). A restore copies the live server's release onto each plugin installation both servers have, but it left the backup's update_failed_* columns behind. A plugin restored after it had since installed the refused version showed "Update to X failed" and counted toward Needs attention until the next update check. Fixed in b326330: pluginReleaseColumns now carries the record with the release. The extra check in TestBackupRestoreRoundTripDB fails on the merged branch without the fix and passes with it.
Merge conflicts with main. Two small conflicts resolved in 70e3cfd: the installation column list next to main's new WithTx, and scripts/ci/db-contracts.txt. The branch no longer changes contracts/api/v2/breaking-approvals.json because main already dropped those approvals, so I removed that line from the PR body.
PackageError messages that can include text from a plugin's manifest: this predates the PR, since a manual Update to already shows the same text. It belongs in its own change.
These are unchanged from the last review, and I agree with leaving each one:
Overlapping checks. One check can clear a refusal a concurrent check just recorded. The next failing check records it again.
Temporary download failures are recorded as failed updates until the next check. Recording the most recent attempt seems right.
A plugin delisted from a catalog that is still reachable keeps its record, because the check can't tell that apart from an unreachable repository.
Verification
Merged tree: go build ./..., go vet on the touched packages, go test ./internal/plugins ./internal/apiv2, make lint-changed (0 issues), verify-apiv2-openapi, verify-apiv2-contract, verify-apiv2-fixtures, verify-apiv2-web-types, the web type check and pluginHelpers.test.ts pass.
Against a freshly migrated Postgres database: TestInstallationStoreUpdateFailureDB, TestPluginListsKeepWorkingWith* and TestBackupRestoreRoundTripDB pass.
The PR's own new Go tests don't build on the base, since they use the new types. The tests that fail without a fix are the two table rows added in 5c35b22 and the restore check added in b326330.
Not run: a live before-and-after on a server. The PR's evidence page shows the notice on the tile and page; nothing since changes what it shows.
Validation tasks: changes #1225 C1 matches the PR body. #1224 C1 is unaffected (above).
User manual
running-a-server/plugins.md covers Check for updates but not what web admin shows when an automatic update fails. I recommend a siloserver.org issue for a sentence about the notice on the tile and page and the Needs attention filter. None is open yet.
Apple and Android
No change needed. Only web admin reads plugin installations, and jellycompat has no plugin administration.
Verdict
Fit: 8/10 · Readiness: 9/10 — conditional (assuming CI is green)
Fit: this fills a gap 1.0 validation found, and the record lives in Postgres, so every node reports the same thing. It stays at 8 because it adds an /api/v2 field and a migration for a non-blocking polish issue.
Readiness: every verified defect is fixed, each with a test that fails without its fix, and the PR's evidence shows the notice live.
The affected files are unchanged between that base and CI's merge commit. I retried the failed Go test job once. Attempt 2 failed again on #3361 alone; the subtitle panic did not recur. The CI result check only propagated that Go test failure. No further identical rerun was started. Required CI remains red.
…ease
A restore copies the live server's release columns onto each plugin
installation both servers have, but left the backup's refused-update
record in place. A restored plugin could then show "Update to X failed"
for an update from a version it no longer runs, until the next update
check cleared it. Carry the record with the release it belongs to.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Review of the branch with current main merged in. Main had moved on since 5c35b22 and the branch no longer merged cleanly, so I merged main into it (two small conflicts: the installation column list next to main's new WithTx, and scripts/ci/db-contracts.txt). Merging brought in one interaction with main's backup restore. I'm fixing it in a commit on this branch, so there's no need to change anything yourself.
A restored plugin can show a refusal for an update it no longer needs (low). CarryPluginReleases in internal/backup/plugin_releases.go, added on main by #3398, copies the live server's release columns onto each restored installation that both servers have. It doesn't copy the three new update_failed_* columns, so the row keeps the refusal from backup time while taking the live version. For example: the backup refused 2.0.0 while 1.0.0 ran, and the live server has since installed 2.0.0. After a restore the plugin runs 2.0.0 but still shows "Update to 2.0.0 failed" and counts toward Needs attention until the next update check clears it. The file isn't part of this PR's diff, so this finding has no line comment. The fix adds the three columns to pluginReleaseColumns, so the record travels with the release it describes, and extends the restore round-trip test to cover it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bugSomething isn't workingpriority: P2Limited scope, workaround exists, or polishsize/L200–499 added + deleted lines (all files); change volume, not priority.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Closes #3237
Related issue: #1223
Validation tasks: changes #1225 C1
When an automatic plugin update is refused, for example because the download doesn't match its catalog checksum, web admin never says so. Check for updates reports only that the check started, and the plugin's tile and page show nothing; the reason reaches only the server log and a failed Check Plugin Updates run. This change records the refused update on the plugin and shows it on the Plugins page and the plugin's page, with the version and the reason.
Approach
plugin_installationsrow (three new nullable columns, added by an additive migration). The reason is the administrator-facingPackageErrormessage that a manual Update to already shows, which names no URL or checksum; any other failure gets a generic line pointing at the server log. Because the record is in Postgres, every node returns it./api/v2installation responses gain an optionalupdate_failureobject (version,reason,failed_at). The frozen/api/v1view does not carry it.docs/admin-api.mddescribes the field.jellycompat has no plugin administration, so it needs no change. silo-apple and silo-android have no plugin admin screens and don't read the installation API, so no client follow-up is needed.
Validation
origin/mainagainst a local server with a local test catalog listing a newer release of an installed plugin under a wrong SHA-256: no feedback on the tile or page after Check for updates. On the fix branch, the same steps show the notice on the tile (without a reload) and the plugin page, at desktop and phone widths. Correcting the checksum and checking again installed the new version and removed the notice. The/api/v1installation list is unchanged.go build ./...,gofmt,go vet,make lint-changed(0 issues) andmake lint-router-recoverypass.make test-gopasses except twointernal/jellycompatDolby Vision strip tests, which fail the same way on the unmodified base on this machine.scripts/ci/db-contracts.txt) stores, clears and version-clears the record. Both ran against a migrated database.TestBackupRestoreRoundTripDB) now also checks that a restored plugin takes the live server's refused-update record. It fails on the merged branch without the restore fix and passes with it.pnpm run lint(no new findings),format:check,build,budget:checkandmake test-webpass.verify-apiv2-openapi,verify-apiv2-contract(additive changes only),verify-apiv2-fixtures,verify-apiv2-web-types,TestCommittedArtifactMatchesRouter,verify-migrations,verify-migration-ledger,verify-v1-route-freeze,verify-route-inventory,verify-local-paths,verify-size-ratchet,verify-case-collisionsandverify-bidipass. Not run:verify-actionlint,verify-shellcheck,verify-prometheus-rules,verify-settings-bindings-all,verify-playback-fixtures,verify-scenario-catalogsandverify-offline-routes, since nothing they check changed.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3357/
Surface and build: web admin Plugins page and plugin page, desktop (1440 px) and phone (390 px), before on
origin/mainand after on this branch, same local data.Risks
The migration adds three nullable columns to
plugin_installationsand needs no maintenance window. Each update check writes one extra row update for a plugin whose stored record it sets or clears. Older web builds ignore the new field. #1225 C1 asks the validator to observe update and failure feedback; a refused automatic update now shows on the Plugins page as well as in Logs and Scheduled Tasks, which is what the issue asks for, so C1 should be re-run on a build with this change.Checklist
AI Disclosure
verify-apiv2-contractre-run. A later review (Claude Code, claude-opus-5-5, with a gpt-6.1-sol cross-check) found that a refusal on a plugin whose repository was deleted never cleared, and that removing a plugin during a check failed the run; both are fixed in 5c35b22 with table-test rows that fail on c25255f. A review after merging current main (Claude Code, claude-opus-5-5) found that a backup restore kept a refusal from backup time on a plugin running a newer version; fixed in b326330, with a test check that fails without it.Note
Record and display refused automatic plugin updates in web admin
AutoUpdateService.recordUpdateFailurein auto_update.go, and clears the record when the update succeeds or the installed version changes.update_failed_version,update_failure_reason,update_failed_atare added toplugin_installationsin 20261101154758_plugin_update_failures.sql, with a down migration.AdminPluginUpdateFailure), the web frontend types, the plugin tile alert, and the plugin detail page warning banner all surface the failure.pluginStatusmarks such installations as needing attention at rank 2.update_failure; v1 consumers see no change. The frontend invalidates the plugin-installation query whencheck_plugin_updatesbecomes idle or on reconnect.Macroscope summarized b326330.