Skip to content

Automated migration notification on workflow state load #380

@nikblanchet

Description

@nikblanchet

Description

When workflow-state.json is loaded in any command and auto-migration occurs (e.g., from legacy format to v1.0), notify the user once with a friendly message.

Current Behavior

Migration happens silently in the background via applyMigrations() call in WorkflowStateManager.loadWorkflowState(). Users have no visibility that their workflow state file was upgraded.

Proposed Behavior

Add a notification when auto-migration occurs:

Notice: Migrated workflow-state.json from legacy format to v1.0
  (This migration happens automatically. No action required.)

Analyzing ./src...

Implementation Approach

  1. Add a flag to WorkflowStateManager to track if migration occurred
  2. Return migration status from loadWorkflowState() (e.g., { state, migrated: boolean, from?: string, to?: string })
  3. Display one-time notification in commands when migration detected
  4. Migration info includes: source version, target version, timestamp

Benefits

  • Users see transparency about schema upgrades
  • No need to understand manual migration commands
  • Builds trust in automated processes

Files to Modify

  • cli/src/utils/workflow-state-manager.ts - Return migration metadata
  • analyzer/src/utils/workflow_state_manager.py - Python equivalent
  • All command files that call loadWorkflowState() - Check and display notification

Related Issues

Estimated Effort

2-3 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort-smallSmall effort: <2 hoursenhancementNew feature or requestimpact-lowLow impact on users or systemuser-experienceUser experience improvementsworkflowWorkflow state and validation features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions