Fix 4-digit length restriction bug in numb command - #975
Open
amirf147 wants to merge 1 commit into
Open
Conversation
Migrates the wnKK extra from ShortIntegerRef to NumberRef in the Caster numeric rule. This resolves digit sequence length constraints and allows arbitrary strings of digits to be dictated. Note: This change does not resolve the leading zero truncation issue.
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.
Fix 4-digit length restriction bug in numb command
PR description written with Agent in Antigravity IDE
Description
Migrates the
wnKKextra incastervoice/rules/core/numbers_rules/numeric.pyfromShortIntegerReftoNumberRef("wnKK", zero=True). This resolves digit sequence length constraints and allows arbitrary strings of digits to be dictated up to Dragonfly's maximum series length (7 digits).Note: This change alone does not resolve the leading zero truncation issue (e.g. dictating
"numb zero one one"will still print"11"because the leading zero is mathematically dropped by unmodified Dragonfly).Related Issue
numbcommand #938Motivation and Context
ShortIntegerRefis designed for shorthand magnitudes, which restricts the engine from cleanly parsing arbitrary sequential digit dictations longer than 4 characters (e.g.,"one two three four five").NumberRef, the parsing is delegated to Dragonfly's native loop-basedRepetitiongrammar, extending the length limit to 7 digits."011"), this PR should be paired with the proposed Dragonfly fix (see Fix number series sequence matching, length limits, and zero formatting dragonfly#409) that implements a customStringIntreturn type. However, even without the Dragonfly patch, this PR stands alone as a valuable upgrade by immediately resolving the digit length limit (Unable to dictate 5 consecutive numbers #857).How Has This Been Tested
"numb one two three four five six seven"successfully parsed and typed out the full sequence.Types of changes
Checklist
Video Demo
In the demo, I'm using baseline Dragonfly, not the other fix I proposed in dragonfly PR 409. This shows this number fix works independently for length limit but not leading zeroes getting chopped off.
2026-07-18.04-34-42.mp4