Skip to content

comment_wrap_findings duplicates comment_bodies' Python dispatch with a different fallback #2806

Closed

Description

@ptr727

comment_wrap_findings in .github/actions/prose-gate/prose_lint.py chooses between python_comments and extracted_comments itself, while comment_bodies in the same file already makes that choice for comment-added. The two differ where a .py file does not tokenize: comment_wrap_findings falls back to the hash-anchored scan, and comment_bodies returns None, its docstring stating that the scan reads a # inside a triple-quoted string as a comment.

Constructed case: a .py file holding an unterminated bracket and, inside a triple-quoted string, the line # two sentences here. Another one follows. draws comment-wrap and comment-case for text that is not a comment.

Routing comment_wrap_findings through comment_bodies removes the duplicate dispatch, at the cost that a .py file that does not tokenize then draws no comment-wrap or comment-case finding at all. Which of the two is wanted is the choice to make before consolidating.

Found by a local review pass on the branch fixing #1659, which made the .py comparison in comment_wrap_findings case-insensitive and left the dispatch alone.

Activity

  1. added
    gate
    pre-existing
    on Oct 11, 2026
  2. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gatepre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions