Repository navigation
docs(design): align 10.14 hunk entry state with the code-token rule - #172
Merged
Merged
Conversation
Follow-up to #144, per the non-blocking note on the round-6 review. The "Hunk entry state" paragraph still described the pre-fix mechanism: two consecutive context lines that merely scan clean. The shipped rule from #144 is stricter. Each of those lines must leave no multi-line construct open AND carry a code token, and blank context lines are neutral, neither extending the run nor breaking it. Without the code-token half, two lines of docstring prose establish a normal code position that does not exist, which is the round-5 reproduction. DESIGN.md is this repo's stated spec authority, so the paragraph now matches the _CONTEXT_LINES_TO_ESTABLISH contract in _comment_scan.py, including the residual case that is disclosed in the README rather than claimed impossible. Docs only. No Python, no tests, no behaviour change.
Contributor
Author
|
I appreciate the sharp round-6 note on #144, Leonardo, that made this follow-up easier to write. 📄 Aligning section 10.14 with the shipped code-token rule taught me how much weight DESIGN.md carries as the spec here. Thanks for the quick approval and for merging it through, the six-round review on #144 genuinely made the hunk logic stick for me. Really fun thread to close out! |
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.
What and why
Follow-up to #144, per the non-blocking note on the round-6 review.
docs/DESIGN.md§10.14 "Hunk entry state" still described the pre-fix mechanism: a hunk is established by two consecutive context lines that scan clean. The code shipped in #144 is stricter than that. Each of those lines must both leave no multi-line construct open and carry a code token, and blank context lines are neutral, neither extending the run nor breaking it.Without the code-token half, two lines of docstring prose establish a normal code position that does not exist, which is exactly the round-5 reproduction. DESIGN.md is this repo's stated spec authority, so a reader of the design doc alone would reach for the old, insufficient mental model. The paragraph now matches the
_CONTEXT_LINES_TO_ESTABLISHcontract in_comment_scan.py, including the residual case that is disclosed in the README rather than claimed impossible.Not issue-tracked: this comes from a review note on #144.
Design link
§10.14 Excessive code-comment verbosity (issue #143), "Hunk entry state".
Type of change
Checklist
reviewgate.corepure (no Python changed)..reviewgate.ymlchange.Notes for reviewers
Five lines replaced by fourteen, in one file. No CHANGELOG entry: this corrects a paragraph that shipped with #144 and there is no behaviour change to announce. §12 and
docs/QUICKSTART.mdalready carrypolicy.code_comments, so this was the last gap from that note.