Skip to content

fix(safe-delete): auto-upgrade outdated blocks on init#75

Merged
dean0x merged 1 commit intomainfrom
fix/safe-delete-auto-upgrade
Mar 4, 2026
Merged

fix(safe-delete): auto-upgrade outdated blocks on init#75
dean0x merged 1 commit intomainfrom
fix/safe-delete-auto-upgrade

Conversation

@dean0x
Copy link
Owner

@dean0x dean0x commented Mar 4, 2026

Summary

  • Version-stamp safe-delete blocks (# v2) so init can detect outdated installs
  • Three-way init flow: up-to-date → skip, outdated → auto-upgrade, not installed → prompt
  • Add getInstalledVersion() + SAFE_DELETE_BLOCK_VERSION constant
  • Existing users with v1.0.0 blocks get silently upgraded on next devflow init

Test plan

  • getInstalledVersion returns 0 for missing file, 0 for no markers, 1 for legacy, 2 for versioned
  • All 5 shell variants include # v{VERSION} in generated output
  • Full suite passes (174 tests)

Version-stamp safe-delete blocks (# v2) so init can detect outdated
installs and silently upgrade them. Previously, isAlreadyInstalled()
returned true for any block, forcing users to uninstall/reinstall
manually when the block changed.

Three-way init flow: up-to-date → skip, outdated → auto-upgrade,
not installed → prompt.
@dean0x dean0x merged commit 739cd93 into main Mar 4, 2026
4 checks passed
@dean0x dean0x deleted the fix/safe-delete-auto-upgrade branch March 4, 2026 14:38
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