Skip to content

feat: add legacy V1 setup detection for self-update compatibility (US-036)#52

Merged
sven1103 merged 1 commit intomainfrom
us-036-self-update-legacy
Mar 24, 2026
Merged

feat: add legacy V1 setup detection for self-update compatibility (US-036)#52
sven1103 merged 1 commit intomainfrom
us-036-self-update-legacy

Conversation

@sven1103-agent
Copy link
Owner

Summary

Implements US-036 - Self-update preserves legacy V1 setups.

Changes

  • detect_legacy_setup(): New function to identify V1 bundled-preset projects by checking for manifest presence and helper_version < 2.0.0
  • show_migration_guidance(): New function that outputs actionable migration steps to stderr
  • cmd_validate: Modified to warn about legacy setup but not fail (exits 0)
  • cmd_preset_current: Modified to show legacy indicator in output

Acceptance Criteria Met

  • ✅ Given an existing V1 helper installation, when I run opencode-helper self-update and the latest available version is V2+-capable, then the CLI upgrades successfully using the existing self-update workflow.
  • ✅ Given a project that uses a legacy bundled-preset setup, when I run the upgraded V2+ CLI, then the project remains usable without immediate migration.
  • ✅ Given the upgraded V2+ CLI detects a legacy bundled-preset setup, when I run a relevant setup or status command, then the CLI reports that the project is using legacy setup state and provides actionable migration guidance.

Technical Notes

  • Legacy detection checks: manifest presence, config-sources.json (V2 indicator), helper_version field
  • Migration guidance is non-blocking per REQ-F-030
  • No project files are modified during self-update

Implements US-036 - Self-update preserves legacy V1 setups.

- Add detect_legacy_setup() function to identify V1 bundled-preset projects
- Add show_migration_guidance() to output actionable migration steps to stderr
- Integrate legacy detection into cmd_validate (warns but doesn't fail)
- Integrate legacy detection into cmd_preset_current (shows legacy indicator)

Legacy projects remain fully usable after CLI upgrade. Migration guidance is non-blocking per REQ-F-030.
@sven1103 sven1103 merged commit 4ded0ea into main Mar 24, 2026
2 of 4 checks passed
@sven1103 sven1103 deleted the us-036-self-update-legacy branch March 24, 2026 07:47
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.

2 participants