Retire the legacy prefab-instance save migration script #40

Closed
opened 2026-08-23 11:41:17 +00:00 by ImBenji · 1 comment
Owner

tooling/migrate_prefab_instances.dart exists only to carry maps across the change in #39's parent work, where placed instances stopped being their own model and became canvas objects. It reads the old "prefabInstances" array plus the two instance-only hidden/lock sets, folds them into canvasObjects / hiddenImageIds / selectionLockedImageIds, and drops the undo history (its diffs describe the old shape and cant be rebased). Nothing in lib/ knows about the legacy keys - the migration lives entirely in the script, so this is a delete, not an unpicking.

Delete the script and test/prefab_instance_migration_test.dart once every map worth keeping has been through it. Try2.ana is done. Worth a sweep of any other .ana lying around first - the script takes a folder and is idempotent, so re-running over everything is cheap and reports what it skipped.

No rush, but its dead weight the moment the last old file is converted, and the longer it sits the more it reads like something load-bearing.

tooling/migrate_prefab_instances.dart exists only to carry maps across the change in #39's parent work, where placed instances stopped being their own model and became canvas objects. It reads the old "prefabInstances" array plus the two instance-only hidden/lock sets, folds them into canvasObjects / hiddenImageIds / selectionLockedImageIds, and drops the undo history (its diffs describe the old shape and cant be rebased). Nothing in lib/ knows about the legacy keys - the migration lives entirely in the script, so this is a delete, not an unpicking. Delete the script and test/prefab_instance_migration_test.dart once every map worth keeping has been through it. Try2.ana is done. Worth a sweep of any other .ana lying around first - the script takes a folder and is idempotent, so re-running over everything is cheap and reports what it skipped. No rush, but its dead weight the moment the last old file is converted, and the longer it sits the more it reads like something load-bearing.
ImBenji added the enhancement label 2026-08-23 11:41:17 +00:00
ImBenji added this to the Arcs & Angles project 2026-08-23 11:41:17 +00:00
Author
Owner

Obsolete as written. Checked 2026-09-05 during the roadmap audit.

tooling/migrate_prefab_instances.dart no longer exists - tooling/ now holds only migrate_ana.dart and trace_query.dart. The migration did not get deleted though, it got PROMOTED: it now lives at lib/utils/migrations/m001_prefab_instances.dart and runs inside the loader through migration_registry.dart, so an old file is brought up to schema in memory on every load path (file open, web picker, session recovery, shared and live views).

That inverts the ask. Under the save-file carve-out in CLAUDE.md this is permanent infrastructure rather than dead weight waiting on the last file being converted - "a format change must never cost somebody their map" means it stays regardless of whether any known .ana still needs it.

test/prefab_instance_migration_test.dart also survives for the same reason - it now exercises PrefabInstancesMigration through the registry, not the retired script, so it should NOT be deleted either.

Nothing left to do here. If retiring an ancient migration ever becomes worthwhile, that is a fresh issue against the registry (one file plus its line in the ordered list), not this one.

Obsolete as written. Checked 2026-09-05 during the roadmap audit. `tooling/migrate_prefab_instances.dart` no longer exists - `tooling/` now holds only `migrate_ana.dart` and `trace_query.dart`. The migration did not get deleted though, it got PROMOTED: it now lives at `lib/utils/migrations/m001_prefab_instances.dart` and runs inside the loader through `migration_registry.dart`, so an old file is brought up to schema in memory on every load path (file open, web picker, session recovery, shared and live views). That inverts the ask. Under the save-file carve-out in CLAUDE.md this is permanent infrastructure rather than dead weight waiting on the last file being converted - "a format change must never cost somebody their map" means it stays regardless of whether any known `.ana` still needs it. `test/prefab_instance_migration_test.dart` also survives for the same reason - it now exercises `PrefabInstancesMigration` through the registry, not the retired script, so it should NOT be deleted either. Nothing left to do here. If retiring an ancient migration ever becomes worthwhile, that is a fresh issue against the registry (one file plus its line in the ordered list), not this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IMBENJI.NET/Metro-Map-Maker#40