Skip to content

fix: restore legacy workspace data fallback#974

Merged
web3dev1337 merged 2 commits intomainfrom
fix/workspace-backward-compat
Mar 21, 2026
Merged

fix: restore legacy workspace data fallback#974
web3dev1337 merged 2 commits intomainfrom
fix/workspace-backward-compat

Conversation

@web3dev1337
Copy link
Copy Markdown
Owner

Summary

  • restore backward compatibility for workspace data by preferring ~/.orchestrator when it clearly contains more user state than ~/.agent-workspace
  • keep the rename migration for clean installs, but avoid hiding old workspaces when a sparse new directory already exists
  • add path-utils coverage for the split-data scenario and log when the server chooses the legacy directory

Root cause

On this machine the renamed data directory existed but was sparse:

  • ~/.agent-workspace/workspaces: 2 entries
  • ~/.orchestrator/workspaces: 14 entries

The old migration only renamed ~/.orchestrator to ~/.agent-workspace when the new directory did not exist at all. Once ~/.agent-workspace existed, startup stopped migrating and the app loaded the sparse directory instead of the real legacy workspace set.

Test plan

  • node --check server/utils/pathUtils.js
  • node --check server/index.js
  • npx jest tests/unit/pathUtils.test.js --runInBand
  • npx jest tests/unit/workspaceManager.test.js --runInBand
  • node - <<'EOF'
    const { getAgentWorkspaceDir, getLegacyCompatibilityState } = require('./server/utils/pathUtils');
    console.log({ resolved: getAgentWorkspaceDir(), compatibility: getLegacyCompatibilityState() });
    EOF

@web3dev1337 web3dev1337 merged commit b90a86b into main Mar 21, 2026
4 of 6 checks passed
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.

1 participant