Skip to content

fix: improve concurrency, configurability, and safety#1

Open
IchenDEV wants to merge 1 commit into
mainfrom
fix/concurrent-and-config-issues
Open

fix: improve concurrency, configurability, and safety#1
IchenDEV wants to merge 1 commit into
mainfrom
fix/concurrent-and-config-issues

Conversation

@IchenDEV

Copy link
Copy Markdown
Owner

Summary

P0-1: Round counter concurrency fix

  • Use atomic UPDATE instead of read-then-write to avoid race conditions

P1-1: RRF k parameter configurable

  • Add SearchConfig interface with rrfK, bm25Weight, vecWeight options
  • mergeRRF() now accepts optional config parameter

P1-2: Graph traversal hardening

  • Hard limit max depth to 3 (prevent deep traversal attacks)
  • Hard limit max nodes to 1000 (prevent memory exhaustion)

P2: Retry utility

  • Add withRetry() utility with exponential backoff
  • Supports custom max attempts, backoff delay, and retry callback

Build fixes

  • Add @types/node to dependencies
  • Fix TypeScript compilation errors

- P0-1: Make round counter atomic (use UPDATE instead of read-then-write)
- P1-1: Make RRF k parameter configurable via SearchConfig
- P1-2: Add hard limits to graph traversal (max depth 3, max nodes 1000)
- P2: Add withRetry utility with exponential backoff
- Fix TypeScript compilation errors (@types/node)
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.

1 participant