Files
yidaima/RuoYi-Vue/docs/superpowers/plans/2026-07-11-plugin-transition-preflight-delivery-acceptance.md

3.2 KiB

Plugin Transition Preflight And Delivery Acceptance Implementation Plan

For agentic workers: Implement task-by-task with tests first. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Make Transition routing and approval requirements server-authoritative before execution, and expose one non-secret deployment acceptance report for the mixed SQL/permission/menu delivery chain.

Architecture: PluginTransitionExecutionService reuses its immutable state machine and routing resolver to return an exact preflight. PluginDeliveryAcceptanceService combines installed releases, configured routes, environment binding, approval policy, and the read-only target probe into explicit checks. The Vue workflow consumes these contracts and no longer infers approval from Registry-wide flags.

Tech Stack: Java 8, Spring Boot 2.5, MyBatis, JUnit 4, Vue 2, Element UI.

Task 1: Preflight Contract

Files:

  • Create: PluginTransitionExecutionPreflight.java

  • Create: PluginTransitionRoutePreview.java

  • Modify: PluginTransitionExecutionService.java

  • Reuse the exact requested/effective mode state machine.

  • Return immutable Transition, route, environment, and ordered step identity.

  • Distinguish READY, APPROVAL_REQUIRED, and NO_ACTION.

  • Return only exact, complete, unexpired, separation-valid approval evidence.

  • Repeat every trusted check during actual execution.

Task 2: API And Permission Boundary

Files:

  • Modify: FeaturePluginController.java

  • Modify: Plugin API module

  • Test: controller permission contract

  • Add the Transition preflight endpoint.

  • Permit execute or approve actors to inspect preflight.

  • Keep execute and approval mutation permissions unchanged.

Task 3: Deployment Acceptance

Files:

  • Create: PluginDeliveryAcceptanceCheck.java

  • Create: PluginDeliveryAcceptanceService.java

  • Modify: PluginDeliveryVerificationStatus.java

  • Test: PluginDeliveryAcceptanceServiceTest.java

  • Check baseline Plugins, Registry mode, mixed routes, environment, approval, target configuration, and target ledgers.

  • Require every check to pass before reporting READY.

  • Keep all connection details and raw failures out of the response.

  • Delegate the delivery verification endpoint to the acceptance service.

Task 4: Preflight-Driven UI

Files:

  • Modify: Plugin Registry and delivery verification views

  • Modify: pluginRegistryView.test.mjs

  • Preflight every execute, retry, and compensate command.

  • Build execution identity only from the server response.

  • Show ordered step routes and exact approval state in the approval workspace.

  • Warn explicitly when a real route is configured without approval enforcement.

  • Render seven deployment acceptance checks.

Task 5: Documentation And Regression

  • Add design and implementation records and update the AI Software Factory roadmap.
  • Run 169 focused Plugin tests.
  • Run 812 generator tests: 794 pass and the exact 18 known baseline failures remain.
  • Run 38 admin tests and four frontend contract tests.
  • Run the production frontend build with only the existing warnings.
  • Confirm both development endpoints still respond with HTTP 200.