Skip to content

feat(core): add guarded lifecycle plans and recovery - #44

Draft
hungv47 wants to merge 1 commit into
anomalyco:devfrom
hungv47:feat/guarded-lifecycle
Draft

hungv47 wants to merge 1 commit into
anomalyco:devfrom
hungv47:feat/guarded-lifecycle

Conversation

@hungv47

@hungv47 hungv47 commented Oct 5, 2026

Copy link
Copy Markdown

Rift cannot safely review and recover a lifecycle change before removing a snapshot. This adds an opt-in guarded command group that binds a plan to exact registry, marker, filesystem and build state, moves selected snapshots to adjacent native trash, and records recoverable lifecycle journals. Existing lifecycle commands remain available.

The change adds preflight, apply, finalize, recover and strict rollback for path reconciliation and trash operations. Fixture-only fault injection is gated from production builds. It includes source documentation, failure-mode coverage and an executable E2E harness.

Validation on macOS/APFS: 59 fixture E2E scenarios, production lifecycle E2E, 80 workspace tests, formatting and Clippy passed. The unchanged production code also completed six real apply/finalize pairs. Linux runtime E2E has not been run. Legacy callers must be quiesced; strict rollback refuses later state drift. Unconfirmed postremove completion blocks finalization.

Draft for upstream review. No merge requested.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant