Files
yidaima/RuoYi-Vue/docs/superpowers/plans/2026-07-11-plugin-delivery-rehearsal-run.md

48 lines
2.5 KiB
Markdown

# Plugin Delivery Rehearsal Run Implementation Plan
> **For agentic workers:** Implement task-by-task with tests first. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Persist repeatable, integrity-verifiable deployment rehearsal plans without claiming or initiating real target execution.
**Architecture:** `PluginDeliveryRehearsalService` snapshots `PluginDeliveryAcceptanceService`, creates six ordered scenario contracts, and persists both through an append-only MyBatis Mapper. Canonical acceptance and scenario projections receive independent SHA-256 fingerprints. The delivery page lists summaries and loads verified details.
**Tech Stack:** Java 8, Spring Boot 2.5, MyBatis, MySQL 5.7-compatible DDL, JUnit 4, Vue 2, Element UI.
### Task 1: Persistent Contract
- [x] Add Run and Scenario domain models with explicit `PLAN_ONLY`, `READY`/`BLOCKED`, and `PLANNED`/`BLOCKED` states.
- [x] Add both tables to the Registry upgrade script and two full schema scripts.
- [x] Keep the Mapper append-only with inserts and reads only.
- [x] Add unique Run, scenario code, and scenario sequence identities.
### Task 2: Snapshot And Integrity Service
- [x] Freeze the canonical non-secret acceptance response.
- [x] Build six ordered deployment scenario evidence contracts.
- [x] Hash acceptance JSON and the ID-independent scenario projection separately.
- [x] Verify fingerprints, metadata, counts, mode, and status on detail reads.
- [x] Reject invalid operators and missing or corrupted Runs.
### Task 3: API And Permission Boundary
- [x] Add create, recent-list, and detail endpoints.
- [x] Reuse `generator:delivery:verify` for all three operations.
- [x] Keep raw snapshot JSON out of the REST response.
- [x] Do not add an execution endpoint in this phase.
### Task 4: Delivery Workspace
- [x] Add snapshot creation and recent Run history.
- [x] Render Run status, mode, environment, counts, creator, and creation time.
- [x] Render verified acceptance and scenario fingerprints in the report.
- [x] Render frozen acceptance checks and ordered scenario evidence.
- [x] Keep the report responsive on desktop and mobile widths.
### Task 5: Regression
- [x] Add service, schema, controller, API, and view contract tests.
- [x] Run the focused Plugin suite: 175 tests passed.
- [x] Run the complete generator and admin suites and compare the known baseline.
- [x] Run the frontend contract suite and production build.
- [x] Confirm both existing development endpoints still return HTTP 200.