Repository navigation
64 KiB를 넘는 텍스트 파일을 줄 범위로 읽는 read-text-lines 추가 (ADR-0053) - #100
Merged
Merged
Conversation
read-text는 64 KiB를 넘는 파일을 거절해서, 75 KB 소스 파일 하나가 있는 저장소에서
모델이 같은 실패 읽기를 반복하다 턴 예산을 소진했다. ADR-0022가 예정한 후속 range
capability로 xgeny.fs/read-text-lines@1.0.0을 추가했다.
- 입력 {path, startLine, lineCount(1-2000)}, 출력 {content, startLine, endLine,
totalLines, truncated, digest}. 줄 종결자를 보존해 이어지는 범위를 붙이면 원본과 같다.
- 파일은 8 MiB, UTF-8 전체, content는 JSON escape 기준 64 KiB까지. 상한에 닿으면 온전한
줄까지만 주고 truncated를 켠다. 첫 줄 하나가 넘으면 문자 경계에서 자른다.
- 기존 조회 adapter(QueryOperation)에 네 번째 연산으로 넣어 symlink 비추적, 고정 실패
분류 digest, verifier 재검사를 그대로 쓴다. verifier는 줄 번호 관계도 확인한다.
- allow_path는 read-text와 같은 file/directory 범위 규칙으로 승인한다.
- workspace discovery capability 6 -> 7. profile digest가 바뀌어 이전 binary로 멈춘
workspace Run은 재개가 거절된다(ADR에 기록).
실사용: 75 KB 파일 사례는 턴 예산 소진에서 18 Step·51초 완료로 바뀌었고, 설계에 쓰지 않은
113 KB 파일 사례는 6 Step·11초에 줄 번호까지 정확히 답했다.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
문제
xgeny.fs/read-text는 64 KiB를 넘는 파일을 거절한다(ADR-0022). ADR-0052 이후 요청 전체가 거절되지는 않지만, 큰 파일을 읽을 방법이 없어 모델이 같은 실패 읽기를 반복하다 턴 예산을 소진했다.변경
xgeny.fs/read-text-lines@1.0.0{path, startLine, lineCount ≤ 2000}{content, startLine, endLine, totalLines, truncated, digest}QueryOperation으로 넣었다. symlink 비추적, 고정 실패 분류, verifier 재검사를 그대로 쓴다.검증
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace통과xgen run으로 읽는다.xgen):🤖 Generated with Claude Code