Skip to content

bug: do not orphan the displaced vendor tree after rollback #352

Description

@codeforester

Related roadmap: #214

Problem

A successful scripts/vendor rollback DESTINATION moves the current tree into a new DESTINATION.failed.XXXXXX/current directory, restores DESTINATION.previous, and returns success without deleting or reporting the displaced tree.

Every rollback can therefore leave a hidden full framework copy beside the destination. The retained tree has no documented roll-forward command or cleanup lifecycle.

Evidence

Reviewed on main at 63753047312cd5c189600ed71597faceae0f5d8e.

A create → update → rollback sequence leaves a directory such as:

vendor.failed.nK4Dzm/current

The success message reports only the restored destination. The successful path at scripts/vendor:146-155 has no cleanup or ownership transfer for the temporary directory, and the vendor workflow documentation mentions only .previous.

Acceptance criteria

  • Define whether the displaced current tree is deleted or retained for an explicit roll-forward/recovery contract.
  • Do not leave an unreported orphan after successful rollback.
  • If retained, use a stable documented path, report it, verify it, and define replacement/cleanup behavior.
  • Preserve failure-safe restoration if either move fails.
  • Add filesystem-state assertions after successful rollback and after injected move failures.
  • Document disk-usage and recovery semantics.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions