Skip to content

codewhale doctor: detect orphaned legacy .deepseek state that hasn't been migrated #3727

Description

@Hmbown

Problem

codewhale doctor doesn't report whether legacy ~/.deepseek/ state directories exist but haven't been migrated to ~/.codewhale/. Users who upgraded and see empty sessions have no built-in way to diagnose that their data is still sitting in the old location.

Desired behavior

codewhale doctor should check each state subdirectory and report:

  • If ~/.deepseek/<subdir> exists AND ~/.codewhale/<subdir> does NOT exist → warn that legacy data is unmigrated
  • If both exist → note that some data may still be in the legacy location
  • If only ~/.codewhale/<subdir> exists → all clear

Subdirectories to check: sessions, tasks, skills, slop_ledger, trophies, catalog, config.toml, settings.toml, mcp.json.

Example output:

⚠ Legacy state found but not migrated:
  ~/.deepseek/sessions/ → not yet in ~/.codewhale/sessions/
  Run CodeWhale once to auto-migrate, or manually:
    cp -r ~/.deepseek/sessions/* ~/.codewhale/sessions/

Context

  • The migration logic exists in crates/config/src/lib.rs (migrate_legacy_state_dir(), resolve_state_dir(), ensure_state_dir())
  • doctor already reports active state root and legacy root status (from P0 v0.8.44: migrate app state to ~/.codewhale with ~/.deepseek compatibility bridge #2011), but doesn't compare per-subdirectory
  • This would also serve as a self-healing hint: running codewhale once triggers ensure_state_dir() which calls migrate_legacy_state_dir()

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmigrationProject rename and compatibility migration work

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions