Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Migrate work directory from .claude/work to .closedloop-ai/work - #46

Merged
shafty023 merged 2 commits into
mainfrom
FEAT-169
Mar 26, 2026
Merged

Migrate work directory from .claude/work to .closedloop-ai/work#46
shafty023 merged 2 commits into
mainfrom
FEAT-169

Conversation

@shafty023

Copy link
Copy Markdown
Contributor
  • Update all 16 operation files with legacy-aware dual-path resolution
  • Add shared helpers: checkAndMigrateLegacyWorkDir, migrateWorkDirIfNeeded, findFirstExisting in symphony-utils.ts
  • Refactor saveWorktreeState/restoreWorktreeState with recursive cpSync, destination-precedence merge, and backup preservation on failure
  • Write-handler preflight checks symphony PIDs before migrating
  • Kill legacy processes with SIGTERM/SIGKILL + individual fallback
  • Per-file resolution for status, logs, attachments, sessions
  • Chat/comment-chat read/write path separation (legacy reads, new writes)
  • DELETE handlers clean both roots to prevent resurrection
  • Deploy route writes PID file and uses repoPath for package manager detection
  • Remove duplicate preflight blocks, extract killLegacyAndMigrate helper
  • TOCTOU resilience: renameSync and readFileSync wrapped in try-catch
  • 4 new test files with 117 migration-specific tests

Testing: npx tsx --test (all tests passing)

Risks: Coordinated deploy with symphony-alpha required; dual-path kill route provides safety window during transition

- Update all 16 operation files with legacy-aware dual-path resolution
- Add shared helpers: checkAndMigrateLegacyWorkDir, migrateWorkDirIfNeeded,
  findFirstExisting in symphony-utils.ts
- Refactor saveWorktreeState/restoreWorktreeState with recursive cpSync,
  destination-precedence merge, and backup preservation on failure
- Write-handler preflight checks symphony PIDs before migrating
- Kill legacy processes with SIGTERM/SIGKILL + individual fallback
- Per-file resolution for status, logs, attachments, sessions
- Chat/comment-chat read/write path separation (legacy reads, new writes)
- DELETE handlers clean both roots to prevent resurrection
- Deploy route writes PID file and uses repoPath for package manager detection
- Remove duplicate preflight blocks, extract killLegacyAndMigrate helper
- TOCTOU resilience: renameSync and readFileSync wrapped in try-catch
- 4 new test files with 117 migration-specific tests

Testing: npx tsx --test (all tests passing)

Risks: Coordinated deploy with symphony-alpha required; dual-path
kill route provides safety window during transition
@shafty023
shafty023 requested review from a team, thadeusb and wongk March 26, 2026 16:39
@shafty023
shafty023 merged commit 592ac71 into main Mar 26, 2026
2 checks passed
@shafty023
shafty023 deleted the FEAT-169 branch March 26, 2026 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant