Files
yidaima/RuoYi-Vue/docs/superpowers/plans/2026-07-10-plugin-registry-persistence.md

2.1 KiB

Plugin Registry Persistence Plan

Goal: Add database-backed governance for trusted Feature Plugin releases and persist the complete resolved plugin plan with every generation run.

Task 1: Publication Schema

  • Add factory_plugin definitions with a current published version pointer.
  • Add immutable factory_plugin_version rows with canonical manifest JSON and SHA-256.
  • Add a repeatable migration and synchronize full workbench/database scripts.
  • Add plugin_plan_json to generation runs while preserving historical nullable rows during upgrade.

Task 2: Publication Service

  • Add plugin definition list/detail/create/update operations.
  • Create monotonic immutable draft versions only from installed trusted implementations.
  • Publish drafts by retiring the previous release and atomically moving the current pointer.
  • Roll back only to retired releases.
  • Verify stored row identity, canonical hash, provider, schema, version, and installed implementation before publication.

Task 3: Runtime Catalog

  • Add a database-backed primary release catalog with a disabled-by-default configuration switch.
  • Preserve the installed Spring registry as the compatibility fallback.
  • Resolve only published or retired database versions backed by an identical installed manifest.
  • Reject tampered manifests and published releases whose implementation is absent.

Task 4: Audit And API

  • Persist canonical PluginExecutionPlan JSON with the existing plugin fingerprint.
  • Return the plan snapshot from generation run list/detail responses.
  • Add secured management APIs for definitions, versions, publish, and rollback.
  • Keep arbitrary plugin upload and execution outside this phase.

Task 5: Verification

  • Add catalog, publication service, immutable Mapper, schema, plan persistence, and controller contract tests.
  • Run focused tests, the complete Generator baseline, Admin tests, formatting checks, and frontend health check.
  • Record deployment order and the remaining first built-in plugin migration.