Skip to content

Migration keeps the legacy .teamai/ while the partition config cannot be read #797

Description

@SaulMoro

Parent

#752 (found while implementing #784)

What to build

The data-partition migration leaves a legacy .teamai/ in place while the partition's config cannot be read. Today the migration takes a partition config.yaml that merely exists as "already built". So the first CLI command after the partition file breaks retires the legacy directory, even though that directory held the only config that still loads:

 any CLI command → migration plan
   legacy <workspace>/.teamai/config.yaml exists
-  partition config.yaml exists              → retire-only: legacy .teamai/ → .teamai.bak
+  partition config.yaml exists and parses   → retire-only (as today)
+  partition config.yaml exists, unreadable  → no migration; legacy .teamai/ stays

With the legacy directory left alone, the member fixes the partition file and the next command finishes the migration as usual. Commands that need the project still refuse with the file and the fix, as #784 does, because the unreadable partition comes first in detection.

Acceptance criteria

  • An unreadable partition config.yaml with a legacy .teamai/ present: running a CLI command leaves .teamai/ in place and creates no .teamai.bak.
  • After the partition file is fixed, the next CLI command retires the legacy directory exactly as today.
  • A readable partition with a lingering legacy directory (an interrupted run) still gets its retire-only cleanup.
  • Self-mode migration is unchanged.
  • Verified with the real CLI (Claude, git provider). The data-directory design doc and the CHANGELOG are updated.

Blocked by

None (can start immediately).

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions