Repository navigation
fix(onboarding): lock submitted memory answers and dedupe retries (#20792) - #21309
Merged
Git-on-my-level merged 5 commits intoOct 13, 2026
Conversation
1 task done
Member
|
Thanks for this fix and the clear root-cause write-up — the diagnosis of #20792 checks out against the code, and the change is well scoped. Review notes on both changed files:
Two things for whoever merges:
Nice work — leaving merge sign-off to a human maintainer. This feedback is AI-generated on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Contributor
Author
|
@Git-on-my-level Thank you for the review and thorough breakdown! Confirmed on both points:
Ready for human maintainer merge sign-off! |
…ake log FakeVoiceIO.remember returns before recording when the save fails, so the lock test checks the successful retry text instead of a doubled log. Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Contributor
Author
|
Thanks for reviewing and merging! 🙏 Bounty Payout Details: |
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
Resolves #20792
Fixes an issue during guided voice introduction where unacknowledged memory writes (e.g. transient 5xx or server readback latency) left answers editable and uncheckable in review. If a user subsequently unchecked an answer or edited its wording before tapping Retry, the original committed memory remained undeleted on the server and editing created a second divergent memory.
Root Cause
IntroductionAnswer.lockedpreviously only checkedsaved || submittedGoal != null. For regular memories (!answer.isGoal),submittedGoalwas alwaysnull. Whenio.remember(text)failed or timed out (e.g. readback 503),answer.savedwasfalse, causinganswer.lockedto evaluate tofalse.answer.lockedwasfalse, the review UI enabled text editing and checkbox toggling (flow.edit(...)andflow.setKeep(...))._saveMemoriespassed the mutated text toio.remember(...), creating a new memory identity and leaving a duplicate memory on the backend. If the user unchecked the row, the server write remained without any way for the user to realize it was already stored.Solution
Track
submittedMemoryonIntroductionAnswer(app/lib/pages/onboarding/guided_voice_controller.dart):String? submittedMemorytoIntroductionAnswer.locked => saved || submittedGoal != null || submittedMemory != null;so that once an answer is dispatched to the backend, it is locked against subsequent in-flight or post-attempt edits and unchecking._saveMemories(), recordanswer.submittedMemory ??= answer.text.trim();and passanswer.submittedMemory!toio.remember(...).Automated Regression Coverage (
app/test/providers/guided_voice_controller_test.dart):locked == true).flow.edit(...)andflow.setKeep(..., false)are safely rejected while locked.Failure class
Failure-Class: none
UI-Evidence: none -- memory-answer locking is controller state covered by hermetic tests; no new screen or copy