fix(config): [ingest.chunking] budget floor 검증 #211
Reference in New Issue
Block a user
Delete Branch "fix/config-chunking-floor-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
요약
Config::from_file에validate_chunking()을 추가해 청킹 budget 의 명백히 깨진 조합을 load 시점에 reject 한다(validate_sources와 동일 패턴,ConfigInvalid). 동기: md-heading-v2(PR #209)의max_chunk_tokens는 검증이 없어0같은 오설정이 청커 내부budget.max(1)클램프에 흡수돼 3-byte 청크 폭주(인덱스 bloat, 무에러)를 냈다 — reviewer 지적. 기존target_tokens/overlap_tokens도 미검증이었어서 세 필드를 한 번에 막는다.변경
validate_chunking():target_tokens ≥ 16(MIN_CHUNK_TOKENS),overlap_tokens < target_tokens,max_chunk_tokens ≥ target_tokens. 각각 명확한 cause 메시지.from_file에서validate_sources직후 호출.비범위
검증
defaults_pass_chunking_validation,rejects_{target_below_floor,zero_target,overlap_ge_target,max_chunk_below_target},from_file_rejects_invalid_chunkinge2e). clippy-D warnings0.[ingest.chunking]budget floor 검증 (validate_chunking) 727648d21d