Found by the store==memory invariant work in #127 (out of scope there).
Deleting the default source changes default_source_id in the in-memory font, but the store's font_info.default_source_id is not updated by the SourceDeleted change handler — so the draft store and memory diverge until the next full replace_font_state. Shows up on crash-recovery: the recovered font points at a deleted source as default.
The undo_and_verify/redo_and_verify invariant helpers added in #127 will catch this automatically once a test deletes the default source — add that test as part of the fix.
🤖 Generated with Claude Code
Found by the store==memory invariant work in #127 (out of scope there).
Deleting the default source changes
default_source_idin the in-memory font, but the store'sfont_info.default_source_idis not updated by theSourceDeletedchange handler — so the draft store and memory diverge until the next fullreplace_font_state. Shows up on crash-recovery: the recovered font points at a deleted source as default.The
undo_and_verify/redo_and_verifyinvariant helpers added in #127 will catch this automatically once a test deletes the default source — add that test as part of the fix.🤖 Generated with Claude Code