Problem
The test suite has unacceptably low pass rates for certain layout combinations:
| Layout Pair |
Pass Rate |
Status |
| English ↔ Russian |
~95% |
OK |
| English ↔ Hebrew |
~56% |
Failing |
| Hebrew ↔ Russian |
~67% |
Failing |
A 56% pass rate means the correction engine is wrong nearly half the time for Hebrew users. This blocks adoption in Israel entirely.
Root Cause Analysis
The likely issues are:
1. Hebrew keyboard has multiple common layouts
Hebrew has at least two standard layouts (SI-1452 and the older typewriter layout). The mapping tables may only cover one.
Check: RightLayout/Sources/Engine/LayoutMappings/ — verify Hebrew mapping completeness.
2. Right-to-left text handling
Hebrew is RTL. The correction engine may be reversing character order incorrectly when building the replacement string.
Check: RightLayout/Sources/Engine/CorrectionEngine.swift — look for string reversal or character iteration that assumes LTR.
3. Diacritics and Nikud
Some Hebrew characters have diacritical marks (nikud). If the engine strips or mishandles combining characters, corrections will be wrong.
Test Cases to Investigate
File: tests/test_cases.json
Look for Hebrew test cases that fail. Example patterns:
- Characters with final forms (ך ,ם ,ן ,ף ,ץ) — these map to different keys
- Punctuation that differs between Hebrew and QWERTY
- Shift-state characters
Steps to Debug
- Run Hebrew-specific tests:
swift test --filter Hebrew
- Identify which specific character mappings fail
- Cross-reference with physical Hebrew keyboard layout
- Fix mapping table or RTL handling logic
- Add regression tests for each fixed case
Relevant Files
tests/test_cases.json — test case definitions
RightLayout/Tests/ — test implementations
RightLayout/Sources/Engine/LayoutMappings/ — character mapping tables
RightLayout/Sources/Engine/CorrectionEngine.swift — core correction logic
Acceptance Criteria
Problem
The test suite has unacceptably low pass rates for certain layout combinations:
A 56% pass rate means the correction engine is wrong nearly half the time for Hebrew users. This blocks adoption in Israel entirely.
Root Cause Analysis
The likely issues are:
1. Hebrew keyboard has multiple common layouts
Hebrew has at least two standard layouts (SI-1452 and the older typewriter layout). The mapping tables may only cover one.
Check:
RightLayout/Sources/Engine/LayoutMappings/— verify Hebrew mapping completeness.2. Right-to-left text handling
Hebrew is RTL. The correction engine may be reversing character order incorrectly when building the replacement string.
Check:
RightLayout/Sources/Engine/CorrectionEngine.swift— look for string reversal or character iteration that assumes LTR.3. Diacritics and Nikud
Some Hebrew characters have diacritical marks (nikud). If the engine strips or mishandles combining characters, corrections will be wrong.
Test Cases to Investigate
File:
tests/test_cases.jsonLook for Hebrew test cases that fail. Example patterns:
Steps to Debug
swift test --filter HebrewRelevant Files
tests/test_cases.json— test case definitionsRightLayout/Tests/— test implementationsRightLayout/Sources/Engine/LayoutMappings/— character mapping tablesRightLayout/Sources/Engine/CorrectionEngine.swift— core correction logicAcceptance Criteria