Repository navigation
fix(migration): preserve legacy data and clarify import results - #2949
Merged
Merged
Conversation
- Limit session discovery to runtime storage paths so deep workspace content cannot cause all sessions to be skipped. - Use generic directory copying without workspace depth or entry limits; retain hash verification and source isolation. - Normalize the retired auto selector only in the legacy importer. - Share model validation and reference recovery between migration and startup, reporting repairs after target conflicts are resolved. - Preserve unusable models and credentials while disabling them, allowing startup without rewriting the original config file. - Treat identical device identities as duplicates without warnings. - Add regression coverage for deep and large trees, config recovery, source preservation, and device identity deduplication.
- Show sessions, workspaces, and assistant directories separately. - Exclude routine auxiliary paths from displayed skip counts. - Derive historical counts from saved manifests without rerunning migration, and explicitly report unavailable breakdowns. - Preserve actual warnings and distinguish staged from imported data. - Add localized labels and regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type and Areas
Type: Bug fix, UI/UX
Areas: Data Migrator, legacy migration adapters, Rust configuration contracts/core, documentation, localization
Motivation / Impact
Deeply nested assistant workspace content could cause session migration to be skipped entirely. Legacy settings such as
ai.agent_model_defaults.mode: autocould also migrate successfully but prevent the main application from starting.The importer now converts retired settings to supported values and reconciles configuration after merging. Application startup can recover invalid values and references while retaining unusable model records disabled with diagnostics, without rewriting the original configuration file on load.
Migration totals now reflect distinct data types. For example, a result previously shown as 175 imported and 173 skipped becomes 143 sessions, 30 workspaces, and 2 assistant directories, without presenting routine auxiliary exclusions as skipped user data.
Verification
Recorded during implementation:
cargo test -p openbitfun-config-contracts --lib— 86 passed.cargo test -p openbitfun-legacy-migration-adapters --lib— 51 passed.cargo test -p openbitfun-core --no-default-features --lib service::config::— 57 passed.cargo test -p openbitfun-legacy-migration --lib directory::tests— 2 passed, including copying 32,769 files across 24 directory levels and rejecting overlapping paths.cargo test -p openbitfun-data-migrator --lib— 7 passed.node --test scripts/data-migrator-report.test.mjs— 3 passed.node --check src/apps/data-migrator/ui/app.js— passed.pnpm run fmt:rs— passed.pnpm run check:core-boundaries— passed.Verified while preparing this PR description:
git diff HEAD~2 HEAD --check— passed.Not exercised: UI interaction, packaged application startup, live AI provider integration, or real remote-workspace, remote-control, peer-device, and detached-dispatch scenarios. SSH mirror coverage uses local fixtures.
Reviewer Notes
autoare normalized only in the migration adapter. Shared configuration and application startup code provide generic validation and recovery rather than legacy alias support.Checklist