Files
yidaima/RuoYi-Vue/docs/superpowers/plans/2026-07-10-plugin-contribution-preflight-plan.md

1.7 KiB

Plugin Contribution Preflight Plan

Goal: Convert Feature Plugin database migration, permission, and menu declarations into a deterministic, conflict-checked execution plan that is fingerprinted and persisted with every Generation Run before any Adapter is allowed to execute those contributions.

Task 1: Contribution Contract

  • Add a versioned contribution plan and ordered contribution step model.
  • Record contribution type, stable key, owning plugin release, executor contract, sequence, and preflight status.
  • Define versioned executor identities for database migration, permission, and menu contributions.

Task 2: Deterministic Preflight

  • Preserve dependency-first plugin order from the resolved plugin graph.
  • Order each plugin's declarations by contribution type and stable key.
  • Reject duplicate ownership of the same typed contribution key across resolved plugin releases.
  • Produce a canonical SHA-256 fingerprint for empty and non-empty contribution plans.

Task 3: Generation Traceability

  • Copy migration, permission, and menu declarations into each resolved plugin release snapshot.
  • Embed the validated contribution plan in PluginExecutionPlan.
  • Include the contribution plan fingerprint in the resolved plugin fingerprint.
  • Persist the canonical plan through the existing immutable Generation Run plugin_plan_json field.

Task 4: Verification

  • Cover stable ordering, executor mapping, fingerprint stability, and ownership conflicts.
  • Cover Plugin Resolver integration and Generation Environment JSON persistence.
  • Run the full generator baseline and admin critical-path regression.