Repository navigation
Recover word prediction from one slow call without needing Retry - #925
Merged
Merged
Conversation
The worker tolerates a slow call and gives up only after three in a row. The main process replaces a worker that misses the reply deadline once, and fails if the replacement stalls before suggesting anything. Closes #924 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review follow-up: a second missed deadline within 60 seconds of a replacement now fails for good, which closes two restart loops. The recovery path no longer flips the keyboard's failed state, and the tests prove the kill, cover an acceptance in flight and use wide timing margins. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review follow-up: a keyboard gets two replacements however far apart, so a machine that stalls on every call reaches Retry. The badge shows loading straight after a replacement, and the test now delivers the replacement's answer before the second miss. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Closes #924
Problem
Word prediction turned itself off after a single slow moment and stayed off until the person selected Retry predictions. One call over 1.5 seconds in the worker, or one reply over two seconds in the main process, was enough.
Change
No protocol interface or persisted schema changes.
Validation
All run locally on Windows and passing:
npm run prediction-modelnpm run lintnpm testnpm run buildcargo fmt --manifest-path src-tauri/Cargo.toml --checkcargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warningscargo test --manifest-path src-tauri/Cargo.toml: 574 passedNew tests use fake models and sleeping subprocesses and inject no input.
Not verified: behaviour in the running app under a real stall.
🤖 Generated with Claude Code