Skip to content

Support lossless same-id path plugin source rebind #2297

Closed

Description

@pixexid

Problem

A local path plugin cannot move to a new path without a lifecycle gap that can lose events.

On BB 0.39, installing a different path with the same plugin id is refused while the old registration exists. plugin remove is therefore required, but removal deletes plugin settings. Replacement installation hard-codes enabled: true and immediately loads the plugin. Settings APIs require the plugin to be loaded, so settings cannot be staged while the id is absent or disabled.

For an event-handling plugin, this creates two loss windows:

  1. no registration exists during remove/install;
  2. the replacement is live without required settings during install/config.

Quiescing known callers and proving zero pending durable work does not lock server-wide native lifecycle emission. A thread.created, thread.failed, thread.archived, or thread.deleted event can occur in either window. A source migration therefore cannot honestly claim lossless behavior through supported CLI/API operations.

Requested capability

Any one of these would close the gap:

  • atomic same-id source rebind that preserves settings/data and swaps generations;
  • install-disabled with validated settings staged before first load, plus an atomic old/new registration swap;
  • a native plugin maintenance lock that prevents relevant event emission throughout remove/install/config and releases only after successful load.

The operation should retain the current id-scoped data directory, settings, logs, schedules, and secrets unless explicitly changed; load the candidate before disposing the old generation where possible; fail without changing the active generation; and expose rollback evidence.

Positive control

A test should keep an event producer active across the source change and prove every numbered event is handled exactly once by either the old or new generation, while settings and id-scoped storage remain unchanged. An absence-only test with no concurrent event cannot establish the property.

Current workaround

A path registration can keep its original path while that path is atomically replaced by a symlink to reviewed bytes elsewhere, followed by reload. This avoids remove/install and settings deletion, but leaves registration metadata pointing through a legacy indirection. It is a deployment residual, not a source-rebind API.

Activity

  1. added
    plugins
    on Aug 23, 2026
  2. ymichael commented on Oct 8, 2026

    @ymichael
    Collaborator

    Fixed by #2125: bb plugin install path:<new directory> with the same id moves the plugin, keeps its settings and enabled state, and rolls back if the new path fails.

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

    plugins

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions