Skip to content

[bug] Plugin updates stop the running plugin before checking the new package #2249

Closed

Description

@Quick104

What happened

Updating or replacing an installed plugin stops its running process before Silo has downloaded or checked the new package. When the package is then refused (a download that fails, a checksum mismatch, a wrong platform or API version), Silo relaunches the old version, but the stop has already dropped the plugin's in-flight calls and resident connections. Auto-update stops the plugin even before it resolves the catalog entry, so an unreachable catalog also takes the plugin down for the length of the attempt.

Steps to reproduce

Not reproduced live; found in source review.

  1. Install a catalog plugin and leave it enabled and running.
  2. Update it to a catalog version whose download fails or whose checksum doesn't match, through Admin > Plugins or an automatic update.
  3. The running plugin is stopped, the update is refused, and the plugin is relaunched.

Expected behavior

Silo downloads and validates the new package first and stops the running plugin only when it has a package it will install. A refused update leaves the running plugin untouched.

Silo version / commit

Source review of main at 9cc40bb4.

Deployment

Not applicable (source review).

Clients affected

  • Other/not client-specific

Relevant logs

No logs available.

Technical notes

  • internal/plugins/service.go, replaceStopped: calls stopInstallationIfRunning(existing) before running replace(), which downloads and validates. On failure it calls OnLifecycleChange to relaunch.
  • internal/plugins/auto_update.go, autoUpdatePlugin: calls s.host.Stop(existing.ID) before s.catalog.ResolveInstall(...).
  • A fix would download and validate into memory or a staging path before the stop, then replace from the verified bytes. It touches the install paths that fix(plugins): explain refused plugin installs and verify catalog identity #2225 changes, so it should follow that PR.

AI harness

Claude Code (in T3 Code)

AI tool(s)

GitHub CLI, git, shell

AI model(s)

claude-opus-5-5

AI involvement

Found and drafted by Claude Code (claude-opus-5-5) while reviewing #2225; confirmed by source reading on main. No human reproduced it.

Independent or adversarial review

Raised independently by a Codex (gpt-6.1-sol) review pass on #2225.

Source: found in review of #2225

Activity

  1. added
    bug
    on Oct 10, 2026
  2. Rhainland commented on Nov 15, 2026

    @Rhainland
    Contributor

    Reproduced on origin/main at c11b0a968: with a resident test plugin at 1.0.0 running from a local catalog, and a 2.0.0 catalog entry whose checksum is wrong, both a manual update (POST /api/v2/admin/plugins/installations) and Check Plugin Updates killed the running plugin process while the new package downloaded. Each update was then refused with the checksum message and the old version started again under a new process.

    Cause: both update paths stopped the plugin first and only then downloaded and checked the new package. Some package checks (the stored archive, install path and capability records) also ran after the stop for uploads and local archives.

    Fix in #4330: a plugin update now downloads and checks the new package while the installed plugin keeps running, and stops the plugin only when the package passed. Checked on a local build of the fix: the same two refused updates leave the 1.0.0 process running throughout, with the same refusal message, and an update to a 2.0.0 entry with the correct checksum still installs and starts 2.0.0. Tests cover both update paths and an upload: a refused package never stops the plugin, and an accepted one is stopped only after its checks.

    AI disclosure: reproduced and fixed by Claude Code (claude-opus-5-5) at the maintainer's direction.

  3. added a commit that references this issue on Nov 15, 2026
    12d93b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions