Description
Plugin staging and marketplace repair can destroy the last known-good source or registration before the replacement is validated.
Root Cause
Stable staging is removed before a complete replacement is prepared, and stale marketplace repair removes existing state before proving the new source can be registered.
Acceptance Criteria
- Build and validate staged payloads in a temporary location before atomic replacement.
- Preserve or restore the last known-good source on failure.
- Recover stale or malformed Claude and Codex marketplace registrations.
- Do not remove verified legacy content until both required provider preparations succeed.
- Failure-path tests prove rollback behavior.
Affected Files
src/commands/init/phases/plugin-install-handler.ts
- Claude/Codex plugin installer modules
- staging and migration tests
Description
Plugin staging and marketplace repair can destroy the last known-good source or registration before the replacement is validated.
Root Cause
Stable staging is removed before a complete replacement is prepared, and stale marketplace repair removes existing state before proving the new source can be registered.
Acceptance Criteria
Affected Files
src/commands/init/phases/plugin-install-handler.ts