Persisted records (project:{id}, draft:{sourceProjectId}) have no version field. Today a format change makes old records fail type-guard validation and get skipped (projects) or reset to empty (drafts) — a silent data-loss path.
- Add
modelVersion: number to InterlinearProject and DraftProject in src/types/interlinearizer.d.ts; document that consumers must treat unknown higher versions as read-only/unsupported.
- Stamp the current version (start at
1) in projectStorage.ts on every write; treat a missing field as version 0 on read.
- No migration framework yet — just the field and a single
CURRENT_MODEL_VERSION constant. Migration logic can be added the first time the shape actually changes.
Size: XS–S
Priority: P1 — cheap now, expensive after #128
Persisted records (
project:{id},draft:{sourceProjectId}) have no version field. Today a format change makes old records fail type-guard validation and get skipped (projects) or reset to empty (drafts) — a silent data-loss path.modelVersion: numbertoInterlinearProjectandDraftProjectinsrc/types/interlinearizer.d.ts; document that consumers must treat unknown higher versions as read-only/unsupported.1) inprojectStorage.tson every write; treat a missing field as version0on read.CURRENT_MODEL_VERSIONconstant. Migration logic can be added the first time the shape actually changes.Size: XS–S
Priority: P1 — cheap now, expensive after #128