Bind persisted review answers to current content - #3
Merged
Merged
Conversation
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.
An import could change a word's meaning while an older question remained visible, allowing that old answer to advance the updated content. Session restoration could also treat a transient database failure as an invalid session and permanently retire the round.
Bind saved questions to their displayed content and frozen choices, then verify the request and current content in the answer transaction. Schema v4 adds a nullable fingerprint: legacy question snapshots are regenerated while earned progress and session positions are retained. Content conflicts trigger preparation of the current question; storage failures retain the existing Retry path. Limit invalid-session retirement to decoding failures.
Regression tests use real SQLite files and close/reopen cycles, schema migration, a held candidate load across import, injected read/write failures and a SQLite abort trigger. Widget tests exercise content refresh and recovery after another preparation failure. Duplicate submissions retain the existing already-handled behavior, including after a later import.
This prepares development version 0.1.3+4. Verification covers host-level transaction and UI behavior; physical-device audio, power-loss durability and store signing remain outside these checks.