Project
vgrep
Description
The configuration allows setting chunk_overlap to any value, including values larger than chunk_size. This can cause unexpected behavior where chunks overlap more than the actual content, or the overlap calculation results in negative indices (handled by saturating_sub but still semantically wrong).
Error Message
No error - unexpected chunking behavior.
Debug Logs
System Information
- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+
Screenshots
No response
Steps to Reproduce
# Set chunk_overlap larger than chunk_size
vgrep config set chunk_size 100
vgrep config set chunk_overlap 200
# Index a file
vgrep index
# Chunks will have unexpected overlap behavior
Expected Behavior
- Validate
chunk_overlap < chunk_size
- Validate
chunk_size > 0
- Return error if constraints violated
Actual Behavior
- Any values accepted without validation
chunk_size = 0 could cause infinite loop
chunk_overlap > chunk_size causes semantic errors
Additional Context
No response
Project
vgrep
Description
The configuration allows setting
chunk_overlapto any value, including values larger thanchunk_size. This can cause unexpected behavior where chunks overlap more than the actual content, or the overlap calculation results in negative indices (handled bysaturating_subbut still semantically wrong).Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
Expected Behavior
chunk_overlap < chunk_sizechunk_size > 0Actual Behavior
chunk_size = 0could cause infinite loopchunk_overlap > chunk_sizecauses semantic errorsAdditional Context
No response