fix(read_file): honor configured fileReadLineLimit - #637
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe read-file schema no longer assigns a default length. A new integration test verifies that omitted lengths use ChangesRead file line limit
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change makes omitted file length use the configured line limit while preserving explicit per-call limits. No actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Overlap note for maintainers: #551 predates this PR and already contains the same removal of the schema-level |
Summary
read_filehandler applyconfig.fileReadLineLimitwhen callers omitlengthlengthvalues as the higher-priority per-call overridelengthRoot cause
ReadFileArgsSchemaassignedlengtha hardcoded Zod default of1000. BecausehandleReadFileparses arguments before applying its configured fallback, an omittedlengtharrived at the handler as1000, soparsed.length ?? config.fileReadLineLimitcould never use the configured value.The lower-level file reader already honors
fileReadLineLimitwhen no length is supplied, so the fix is to leave the schema field optional instead of injecting a second default.Testing
mainwithfileReadLineLimit: 7: omittedlengthread 1000 lines while the lower-level reader read 7npm test: 48 passed, 0 failedgit diff --checkAddresses the
fileReadLineLimitreport in #147.Summary by CodeRabbit
Bug Fixes
Tests