Conversation
`comment-case` reports a comment line whose sentence opens in lowercase, and a configuration snippet pasted into a comment opens on a lowercase key, so no form of one could pass. The rule and a copy-pasteable snippet were mutually exclusive. A comment body of one key, a colon and one value is now configuration rather than a sentence, and neither that rule nor `comment-wrap` applies to it. It sits beside the lone-key exemption, which already covered the `# packages:` line above the one that failed. Clearing the wrap with it is what a multi-line snippet needs, each snippet line no longer reading as a continuation of the one above it. The guard reads its own terminator set rather than `SENT_END`, whose set carries the colon. A colon ends configuration rather than a sentence here, which is why the lone-key exemption exists, and reading it as a terminator refused `address: fd00::`, `image: ghcr.io/o/n:` and `root: C:`. Two detections are lost and one shape is refused, each stated where the pattern is. A marker comment such as `todo: refactor` is the common loss, since it is the same shape as a config line. A sentence wrapping through such a body loses its wrap. And a value ending in a full stop is refused, an FQDN being the case, which loses no detection but removes none either. `is_comment_prose` deliberately does not carry the exemption, unlike its three siblings, since `comment-added` reads a body of any case and exempting the shape there would free `Owner: alice` from the label as well. Measured over the tree the exemption changes no finding and newly reaches one body, a command to paste.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 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 |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
scripts/README.md contains an ambiguous antecedent ("that set") in the newly added exemption documentation that should be made explicit for accuracy and maintainability.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Promotes the prose-gate exemption that treats single-line key: value comment bodies as configuration (not prose), so copy-pasteable configuration snippets no longer conflict with comment-case and comment-wrap.
Changes:
- Add
SNIPPET+SNIPPET_ENDpatterns to exemptkey: valuecomment bodies (with a guard that keeps sentence-like values judged). - Expand the prose-lint test suite to cover the new exemption, its guard rails, and multiple comment syntaxes.
- Document the new exemption (and its tradeoffs) in
scripts/README.md.
| File | Description |
|---|---|
.github/actions/prose-gate/prose_lint.py |
Adds the SNIPPET exemption and guard so config snippets in comments are not treated as wrapped lowercase prose. |
scripts/tests/test_prose_lint.py |
Adds targeted regression tests for snippet comments, guard behavior, and cross-syntax extraction. |
scripts/README.md |
Documents the new exemption, guard, and known tradeoffs for readers of the lint rules. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Answers the one review thread on the promotion #1704. `scripts/README.md` ended a sentence with "that set cannot drop the full stop without dropping the guard". The nearest prior set in that paragraph is `SENT_END`'s, introduced by the same sentence that contrasts the two, so the claim read as being about the wrong set and is false of it: dropping the full stop from `SENT_END` has no bearing on this guard. It now names `SNIPPET_END`, which the code comment and the test docstring already did. A grep for the sentence confirms all three surfaces state it the same way. ## Two open, recorded rather than fixed A local pass over this commit found two more in the same paragraph. Neither affects behavior and neither is what the promotion thread raised, so they are written down here rather than taken in a further round. - **One clause earlier, the same mis-binding.** "a body ending as a sentence is judged as one, the guard `is_tool_directive` pairs with its own anchor and for the same reason. That guard reads its own terminator set rather than `SENT_END`". The nearest referent for "That guard" is the guard `is_tool_directive` pairs with, and that guard *is* `SENT_END`, so as written the sentence says `SENT_END` reads a set other than itself. The code comment avoids it by naming `SNIPPET_END` at the contrast point; the README names it four sentences later. - **An overstatement on all three surfaces.** "`SNIPPET_END` cannot drop the full stop without dropping the guard" is not true of the pattern. Dropping `.` leaves `[!?]["')\]]?\s*$`, which still refuses `conclusion: wrong!`, one of the bodies the suite pins as judged. The guard would be narrowed rather than dropped. The true claim is narrower: dropping the full stop would re-exempt the wrapped-sentence case the guard exists for, `hand: correctly.`, which is the same shape as the refused `origin: example.com.`. The second is the one worth fixing, and it is a three-surface change rather than a one-line one. Closes on promotion: nothing of its own. This exists to unblock #1704.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The exemption is narrowly implemented, explicitly guarded against prose-like endings, and is backed by comprehensive tests that pin both intended behavior and acknowledged tradeoffs.
Review effort: Lite
Findings: None

Promotes the configuration-snippet exemption from
developtomain. The delta is one squash commit,1fa927a, three files, 141 insertions.What it carries
comment-casereports a comment line whose sentence opens in lowercase, and a configuration snippet pasted into a comment opens on a lowercase key, so no form of one could pass. The rule and a copy-pasteable snippet were mutually exclusive, and the only spellings that passed each changed the line a reader copies.A comment body of one key, a colon and one value is now configuration rather than a sentence, exempt from
comment-caseandcomment-wrap, sitting beside the lone-key exemption that already covered the# packages:line above the one that failed. Clearing the wrap with it is what a multi-line snippet needs.The guard reads its own terminator set rather than
SENT_END, whose set carries the colon. A colon ends configuration rather than a sentence here, which is why the lone-key exemption exists, and reading it as a terminator refusedaddress: fd00::,image: ghcr.io/o/n:androot: C:.What it costs, stated where the pattern is
# todo: refactoris the same shape as a config line.is_comment_prosedeliberately does not carry the exemption, unlike its three siblings, socomment-addedstill prices an added# key: valueline. An earlier round added it for symmetry and that was reverted, sincecomment-addedreads a body of any case and the exemption there would have freedOwner: alicefrom the label as well.Measured over the tree the exemption changes no finding and newly reaches one body, a command to paste.
Review record
Two Copilot rounds on this promotion. The first stated
reviewed=3 changed=3 findings=1, full coverage of the three-file diff. The second, on the current head, states no coverage, which is the nondeterminism recorded on #1692. The file set is the same three files at both heads, so the first round's statement covers exactly the paths being promoted, and only their content moved in between.One thread, answered and resolved. Eight local adversarial passes on the feature branch, finding 9, 7, 7, 3, 2, 2, 1 and 1.
The one item left open when this promotion was opened is now fixed rather than carried. In
scripts/README.mdthe phrase "that set" bound toSENT_END's set under a nearest-antecedent reading, where the code and the test docstring both nameSNIPPET_ENDoutright. #1705 names it explicitly and merged as4f0418b6, which is this promotion's current head.The follow-up that record called for is filed as #1706: a rule's reach is written out on three hand-authored surfaces, and the churn measured here came from that rather than from any difficulty in the two-line fix.
Fixes #1700