feat: version-aware .tla loading with migrations#550
Merged
Conversation
Collaborator
|
is this meant to merge into dev instead of main? |
Collaborator
Author
Yes. I wonder if we are doing the main vs. dev thing in a unconventional way, Claude always seems to get it wrong. |
Collaborator
I suppose there is also main vs stable... |
azfoo
requested changes
Jun 30, 2026
azfoo
force-pushed
the
claude/brave-vaughan-5b4f3a
branch
from
July 23, 2026 10:15
100f8e0 to
bcab2d0
Compare
- open_tla now warns and asks for confirmation before opening a file written by a newer TiLiA version, since data that version understands may be silently dropped on save. - Add tilia/file/migration.py: an ordered list of dict->dict migrations applied to the raw file data on load. A migration runs only when file_version < target <= app_version, so a migration written for an unreleased version stays dormant until that version ships. - Move the inline display_position->ordinal shim out of deserialize_timelines into the registry (target 0.1.1) and relocate its test, giving version upgrades a single source of truth. - Register the upcoming 0.7 timeline-kind rename (MARKER_TIMELINE -> Marker) as a dormant migration (target 0.7.0).
Adds the possibility of ignoring tl types not known to the current version. Older versions can now open newer files (or files with beta tl types). These unknown tls are either ignored or discarded. If ignored, the ids are kept but the ordinals of the entire file shuffled to move the unknown ones to the bottom of the tl stack.
azfoo
force-pushed
the
claude/brave-vaughan-5b4f3a
branch
from
July 23, 2026 12:27
bcab2d0 to
3623dd5
Compare
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
Adds version handling when opening
.tlafiles. Until nowopen_tlastored thefile
versionbut never read it: opening a file written by a newer TiLiA silentlypartial-loaded and could drop unknown data on save, and older-format upgrades were
done with ad-hoc shims scattered inside
deserialize_timelines.This PR:
(
open_tla→Get.FROM_USER_YES_OR_NO). Declining aborts the load.tilia/file/migration.py: an ordered list of small, composabledict -> dictmigrations applied to the raw file data on load.display_position -> ordinalshim out ofdeserialize_timelinesinto the registry (target0.1.1), giving versionupgrades a single source of truth.
(
MARKER_TIMELINE -> Marker) as a dormant migration (target0.7.0)Follow-up
When syncing onto the
v0.7.0branch, delete the inline_get_timeline_class_stringshim there — the dormant
0.7.0migration replaces it.