Skip to content

Fix legacy session migration and add confirmed data reset - #3326

Merged
wsp1911 merged 4 commits into
GCWing:mainfrom
wsp1911:dev-omen
Oct 9, 2026
Merged

wsp1911 merged 4 commits into
GCWing:mainfrom
wsp1911:dev-omen

Conversation

@wsp1911

@wsp1911 wsp1911 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remap session workspace IDs in metadata and state to the migrated workspace registry.
  • Convert native legacy auto model selectors to primary during migration and historical session loading.
  • Add confirmed OpenBitFun data reset for users who need to retry migration.
  • Bump Data Migrator to 0.1.2 and update download links.

Type and Areas

Type: Bug fix, feature, docs

Areas: Data Migrator, session persistence, Rust core, desktop/Tauri

Motivation / Impact

Migrated assistant sessions could retain obsolete workspace IDs and fail when continuing a conversation with “Workspace ID is unavailable on this host.” Session workspace references now migrate together with their paths.

Native sessions using the retired auto selector could display an unavailable model. Both persisted model fields are converted during migration, and existing historical sessions receive read compatibility without rewriting files on display. External-provider selectors and other model IDs remain unchanged.

Users can now review destination directories and type RESET to permanently clear OpenBitFun data before migrating again.

Verification

Recorded during implementation on Windows:

  • cargo test -p openbitfun-data-migrator -p openbitfun-legacy-migration-adapters -p openbitfun-legacy-migration --lib: 88 tests passed.
  • cargo test -p openbitfun-legacy-migration --test migration_engine_contracts: 10 tests passed.
  • node --test scripts/data-migrator-tauri-build.test.mjs scripts/data-migrator-report.test.mjs: 9 tests passed.
  • node --check src/apps/data-migrator/ui/app.js: passed.
  • pnpm run fmt:rs and pnpm run theme:color-audit:all: passed.

Confirmed for the final four-commit range:

  • node scripts/data-migrator-release.mjs --check-version: 0.1.2.
  • git diff HEAD~4 HEAD --check: passed.

Reviewer Notes

  • Workspace-reference repair applies to new migrations. Previously migrated data can be reset and imported again after preserving needed content.
  • Reset permanently removes all contents of the displayed directories, including migration logs and backups; it does not create a backup.
  • Reset checks known writers, revalidates destinations, rejects unsafe overlaps and linked paths, and protects BitFun source data and migrator directories.
  • Partial deletion failures are reported, and in-memory migration plans are invalidated.
  • Reset operates on the local data-owning computer; it does not reset remote hosts.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

- Convert workspace references in imported session metadata and state to the destination registry IDs.
- Resolve path-only assistant references uniquely while preserving unknown IDs and source data.
Convert legacy native Auto selectors to primary during migration and history reads so migrated sessions can resolve their model immediately.

Preserve external agent selectors and read-only history behavior. Add migration, metadata, and session restore regression coverage.
Allow users to clear OpenBitFun destination data before retrying migration.

Require directory review and explicit confirmation, protect source and
migrator directories, check active writers, and report partial failures.
Reload migration state after reset and document the recovery workflow.
@wsp1911
wsp1911 marked this pull request as ready for review October 9, 2026 13:14
@wsp1911
wsp1911 merged commit 2321151 into GCWing:main Oct 9, 2026
14 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