Make learning sessions durable, retryable, and safe across memory resets - #1
Merged
Merged
Conversation
Jo2234
marked this pull request as ready for review
September 7, 2026 02:41
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.
Learning progress can be lost when multiple clients save concurrently, duplicated when a quiz is retried, or restored by delayed callbacks after memory deletion. Use process-safe, reentrant locks with atomic file replacement, short reload/apply transactions, stable session IDs and reset epochs. Commit completion receipts with progress so repeated submissions return the committed result. Preserve each Gradio practice session's actual language when applying its transaction.
Voice calls now share an awaited, retryable finalizer across navigation, language changes and window close. Captured call identity prevents the selected language from changing where progress is saved; failed persistence retains the transcript/checkpoint. Delete All Memory clears managed checkpoints, speech cache and recovery files and invalidates pending work. Camera analysis skips unchanged samples before inference, with explicit-capture and maximum-age refresh. Include curriculum JSON in Python distributions and run renderer regressions in CI.
Validation: 133 Python tests passed across the full suite and the four separately rerun local-loopback cases; 11 actual-renderer VM scenarios and existing JavaScript checks, Ruff, and diff whitespace checks pass. Two new Gradio regressions failed before the language fix and pass afterward. The original implementation also validated built wheel/sdist and installed Spanish/French/Hindi curriculum loading; no heavy build was repeated for the callback fix. No real provider calls were used. Physical camera behavior and packaged native window lifecycle remain manual acceptance checks; locking targets POSIX macOS/Linux.
CI follow-up: declare the directly imported certifi dependency explicitly. A fresh isolated wheel install with OpenAI 3.8.0 resolves certifi and passes dependency checks, source/wheel imports, SSL context creation and all 133 tests.