Skip to content

Add transactional prebuilt plugin generations with exact resident rollback #2690

Description

@pixexid

Problem

A path-registered plugin generation built on an older SDK cannot be safely used as a reloadable rollback artifact under a newer BB host: reload may rebuild before source-mtime handling. A first baseline transition therefore needs BB core—not a plugin script—to retain the actual resident legacy generation while a closed, prebuilt successor is loaded and proved.

Consumer: pixexid/bb-collab#775 and inactive prerequisite PR pixexid/bb-collab#778.

Required core boundary

Add a transaction over loaded plugin generations, not package installation or raw registration rows:

  1. Begin: CAS-bind exact current generation IDs and buildPolicy=forbid; current generations remain authoritative.
  2. Prepare: core hashes immutable candidate roots and loads detached non-authoritative generations without any build.
  3. Switch: quiesce prior services, switch contributions/assets/services in an exact ordered target set, and retain the actual prior loaded generation.
  4. Revert: remove candidate authority and reinstate the same retained prior objects/routing/services without path reload, import, install, or rebuild.
  5. Finalize: only after caller durable receipt; dispose prior handles and persist the new prebuilt generation for restart.
  6. Inspect/recover: expose host-derived transaction/generation attestations and distinguish prepared, switched, reverted, finalized, and unresolved states.

BB core must own generation routing for CLI/RPC/providers/routes/app assets/host artifacts/schedules/services, transaction tokens, current-generation CAS, and retained LoadedPlugin lifetime. Caller-supplied status cannot select recovery.

Acceptance

  • Prepare an exact multi-plugin set while every prior remains authoritative and no candidate contribution is visible.
  • Switch with one target last; prove exact candidate server/app/service generations.
  • Inject failure after a partial switch and after health/receipt proof; restore the same prior generation IDs with zero build/reload/install.
  • Refuse writable/symlinked/digest-mismatched candidates and any candidate requiring build before authority movement.
  • Preserve visible rollback_failed/finalize_failed state when exact recovery cannot be proved.
  • Finalize idempotently, restart, and prove the exact finalized prebuilt generation persists.

Prohibited shortcuts

No raw DB/settings edits, package/path install as activation, ambient or deployment-time build, metadata relabeling, source-manifest conversion, caller-asserted changed state, or reconstruction described as the exact old generation.

This issue authorizes no live consumer transition or deployment.

Activity

  1. added
    plugins
    on Aug 29, 2026
  2. bb-slop-cop commented on Aug 29, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Type: Feature; Priority: Medium; Effort: High; labels: plugins.

    I did not create a report or pull request because the final Type is not Bug.

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