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

1.8 KiB

Plugin Contribution Artifact Execution Plan

Goal: Execute preflighted Feature Plugin database migration, permission, and menu contributions as deterministic generated artifact files, while preserving exact output identity in the Generation Run plugin plan.

Task 1: Trusted Structured Payload

  • Add a typed contribution payload with type, stable key, target, relative output path, and content.
  • Allow only the installed trusted plugin implementation matching the resolved release fingerprint to supply payloads.
  • Require payload identity to match the preflight plan exactly and reject undeclared extra payloads.

Task 2: Adapter Execution

  • Carry the exact resolved Plugin Execution Plan from the Kernel into the Adapter request.
  • Merge contribution payloads into selected Adapter target ZIP archives.
  • Reject unselected targets, unsafe paths, duplicate archive paths, missing content, and oversized entries.
  • Preserve original archive bytes when the contribution plan has no steps.

Task 3: Execution Trace

  • Mark completed steps as EXECUTED with target, output path, and file SHA-256.
  • Produce a canonical contribution execution fingerprint.
  • Return the executed plan from the Adapter through the Kernel.
  • Persist the executed plan in Generation Run plugin_plan_json and include contributed files in target and aggregate artifact manifests.

Task 4: Verification

  • Verify real SQL, backend permission, and admin menu files are written to separate ZIP targets.
  • Verify empty plans preserve Adapter archive bytes.
  • Verify Kernel rejects Adapters that silently skip non-empty contribution plans.
  • Verify Legacy Adapter invokes the executor and returns the same executed plan.
  • Run the full generator baseline and admin critical-path regression.