refactor(web): rework correction heuristic and thresholding toward multi-tokenization support 🚂#14916
Merged
jahorton merged 5 commits intoepic/autocorrectfrom Jan 21, 2026
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
04094a4 to
d544b55
Compare
This change simplifies the mechanics of each SearchSpace by dropping the complexity of managing an intermediate tier. This does get rid of a mild boost that assistss the correction-search process in prioritizing nearly-completed correction paths, but we should rework that heuristic anyway - especially in light of upcoming changes and potential complications once we start supporting correction from alternate tokenizations. Build-bot: skip build:web Test-bot: skip
We now track maximum individual probability for any one input in the full, source fat-finger distribution. For some tokenizations, the corresponding input will not be considered, but that should not affect thresholding behaviors. Build-bot: skip build:web Test-bot: skip
d544b55 to
1df3a35
Compare
Base automatically changed from
change/web/remove-tracker-analyze-state
to
epic/autocorrect
October 20, 2025 13:37
…c-and-thresholding
mcdurdin
approved these changes
Nov 13, 2025
web/src/engine/predictive-text/worker-thread/src/main/correction/context-token.ts
Outdated
Show resolved
Hide resolved
web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts
Outdated
Show resolved
Hide resolved
mcdurdin
reviewed
Nov 14, 2025
web/src/engine/predictive-text/worker-thread/src/main/correction/context-token.ts
Outdated
Show resolved
Hide resolved
mcdurdin
reviewed
Nov 14, 2025
web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts
Outdated
Show resolved
Hide resolved
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.
This change simplifies the search-queuing mechanisms of the
SearchSpacetype by eliminating its internal two-tieredPriorityQueuepattern in favor of using a single priority queue to select the best available path. To do so, this does get rid of a mild boost that has assisted the correction-search process in prioritizing nearly-completed correction paths, but we should rework that heuristic anyway - especially in light of upcoming changes and potential complications once we start supporting correction from alternate tokenizations.To facilitate our existing path cost-thresholding behaviors, which prune high-cost paths permanently from further consideration, we now track maximum individual probability for any one input in the full, source fat-finger distribution. For some tokenizations, the corresponding input will not be considered, but that should not affect thresholding behaviors.
Build-bot: skip build:web
Test-bot: skip
This PR is comprised as two commits that could be split into separate PRs, but the second commit restores something the first commit temporarily needed to disable, hence the link.