Skip to content

SourceDeleted replay doesn't update font_info.default_source_id in the store #128

Description

@kostyafarber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions