Text Asset Migration Journals And Atomic Rollback
Purpose
Text asset migration journals make multi-file refactors previewable, stale-plan checked, and rollback-capable. Use them for catalog, scene, dialogue, and other text asset migrations where a partial edit would leave content inconsistent.
Steps
- Build a migration plan in dry-run mode.
- Review the preview journal, affected files, validation-before hooks, and planned commands.
- Apply only when the plan still matches current file fingerprints.
- Run validation-after hooks.
- If an apply step fails, use the rollback journal and diagnostics to restore files that were already written.
Expected Outputs
Dry run should produce a journal without changing files. Apply should write every planned asset, report validation output, and either finish cleanly or report rollback status for each attempted write.
Common Mistakes
Common mistakes include applying an old preview after files changed, ignoring validation-before errors, hand-editing one file from a multi-file plan, or assuming rollback succeeded without reading rollback diagnostics.
Recovery Paths
When a stale plan is rejected, regenerate the migration from current files. When rollback partially fails, inspect the journal and restore the named file from version control or the migration backup data before re-running validation.