Repository navigation
Improve recovery UX for blocked mdbase v0.2 migration rollback - #2693
Merged
Merged
Conversation
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
Improves recovery when an interrupted mdbase v0.2 -> v0.3 metadata migration leaves
.tasknotes/migrations/mdbase-v0.2-pending.jsonbehind and automatic rollback is blocked by a concurrent change to_types/task.md(or another managed metadata file).Changes
src/services/MdbaseSpecService.ts)PendingV02MigrationRecovery) with the blocked metadata path(s), verified backup folder, reason (concurrent-change,backup-mismatch,invalid-journal,error), and whether backup restore is safe to offer (canRestoreBackup).Error:notice wall on startup/settings saves with a calm, deduplicated notice pointing to Settings → TaskNotes → TaskNotes App.keepCurrentFilesAndResumeV02Migration(): removes only.tasknotes/migrations/mdbase-v0.2-pending.json, keeps current files and backups intact, and resumes canonical metadata sync ifmdbase.yamlis valid v0.3.restoreV02MigrationBackup(): re-verifies the pending journal and backup copies, restores the v0.2 metadata snapshots atomically, keeps the backup folder intact, and clears.tasknotes/migrations/mdbase-v0.2-pending.json.src/settings/native/tasknotesApp.ts,styles/settings-view.css)src/i18n/locales/*/messages.po,docs/releases/unreleased.md)en,de,es,fr,it,ja,ko,pt,ru,zh).docs/releases/unreleased.md.tests/unit/services/MdbaseSpecService.test.ts,tests/unit/settings/NativeSettings.tasknotesApp.test.ts)Verification
npx jest tests/unit/services/MdbaseSpecService.test.ts tests/unit/services/mdbaseSafeWrites.test.ts tests/unit/services/mdbaseRound3Robustness.test.ts tests/unit/bootstrap/mdbaseBootstrapRecognition.test.ts tests/unit/settings/NativeSettings.tasknotesApp.test.ts tests/unit/settings/NativeSettings.test.ts(6 suites, 218 tests passed)npm run lint(test:lint-config,lint:ts,lint:review-types,lint:css,lint:architecture)npm run typechecknpm run i18n:check,npm run test:translation-contracts,npm run test:i18n-sourcenpm run check:obsidian-tokens,npm run build,npm run check:bundle-size