docs(grep): describe the real output cap#32
Open
T0mSIlver wants to merge 1 commit into
Open
Conversation
grep.md claimed results are capped at 'several thousand output lines' and report 'at least' counts on truncation. The actual cap is 100 lines (adjustable via head_limit) and truncation appends a 'Results truncated to first N lines' note. Describe what the tool actually does, and add a test cross-checking the doc against the runtime truncation note.
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.
Problem
grep.mdtold the model:Neither part is true. The actual cap is 100 lines (
limit = 100ingrep.py), adjustable viahead_limit, and truncation simply appendsResults truncated to first N lines— there are no "at least" counts.Fix
Rewrite the line to describe the real 100-line default cap, the
head_limitoverride, and the actual truncation note. Addstests/test_grep_doc_cap.pywhich asserts the description no longer makes the false claims and that its documented truncation wording matches what the tool emits at runtime.Paper reference — judgment call
The paper's schema does not mention any output cap (no "several thousand", no 100-line limit, no "at least" counts). This change only makes the description honest about the existing 100-line implementation; the wording and the cap itself are repo-local, not specified by the paper.