Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bsbodden
Copy link
Collaborator

Normalize key prefixes by removing trailing separators when constructing
Redis keys to prevent double separator issues (e.g., "user::123" becomes
"user:123").

Changes:

  • Fix BaseStorage._key() to strip trailing separators from prefix
  • Update SemanticRouter to use index's key_separator instead of hardcoded ':'
  • Extract route pattern generation into reusable _route_pattern() method
  • Fix scan pattern generation to respect custom separators

  Normalize key prefixes by removing trailing separators when constructing
  Redis keys to prevent double separator issues (e.g., "user::123" becomes
  "user:123").

  Changes:
  - Fix BaseStorage._key() to strip trailing separators from prefix
  - Update SemanticRouter to use index's key_separator instead of hardcoded ':'
  - Extract route pattern generation into reusable _route_pattern() method
  - Fix scan pattern generation to respect custom separators
@bsbodden bsbodden requested a review from rbs333 September 24, 2025 02:39
Copy link
Collaborator

@rbs333 rbs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! For backwards compatibility, would we have an issue if someone updates and index that had a weird prefix before and then it wouldn't reindex the data? I don't think this is a major concern but we might want to include a callout in the release notes and/or commit message to document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants