1 text asset migration journals and atomic rollback
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

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

  1. Build a migration plan in dry-run mode.
  2. Review the preview journal, affected files, validation-before hooks, and planned commands.
  3. Apply only when the plan still matches current file fingerprints.
  4. Run validation-after hooks.
  5. 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.