Repository navigation
fix: resolve case sensitivity bug in autocomplete - #334
Merged
Merged
Conversation
- Fix case-sensitive search logic in autocomplete.rs - When case_sensitive=true, preserve original case in FST building - Fix original_term field in metadata to use correct case - Remove --target native from maturin builds (use platform defaults) This fixes failing tests: - test_search_case_sensitive - test_build_case_sensitive_index - test_integration workflows Resolves remaining Python bindings CI failures.
AlexMikhalev
added a commit
that referenced
this pull request
Apr 25, 2026
fix: resolve case sensitivity bug in autocomplete
AlexMikhalev
added a commit
that referenced
this pull request
May 1, 2026
fix: resolve case sensitivity bug in autocomplete
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.
Summary
Fixes critical case sensitivity bug in autocomplete functionality that was causing Python test failures.
🐛 Issues Fixed
Case-Sensitive Search Logic Error
case_sensitive=true, code was incorrectly usingkey.to_string()in FST building butkey.as_str().to_lowercase()in metadata insertiontest_search_case_sensitiveexpected 0 results for "MACHINE" but found results for "machine learning"Metadata Field Inconsistency
original_termfield was unconditionally usingkey.to_string()regardless of case sensitivity setting🔧 Technical Changes
File:
crates/terraphim_automata/src/autocomplete.rsFix 1 - FST Building Logic (Line 101-105):
Fix 2 - Metadata Field Logic (Line 119):
Fix 3 - Build Configuration:
--target nativefrom maturin builds (use platform defaults)🎯 Impact
These changes fix the root cause of Python test failures:
🧪 Validation
The fix addresses these specific failing tests:
test_search_case_sensitive- Should now pass (0 results for "MACHINE")test_build_case_sensitive_index- Should now pass with correct case handlingtest_integrationworkflows - Should now pass with proper case sensitivityThis resolves the core autocomplete functionality issues that were blocking Python bindings CI/CD.