Skip to content

Strip a Tilde or Unclosed Fence Before Reading Review Coverage #1821

Closed

Description

@ptr727

pr_review.py's FENCE strips only a backtick fence that is closed. A ~~~ fence and an unclosed backtick fence are both still read, so a coverage marker quoted inside either one is collected as this round's stated coverage. That misreading fails open.

Probe

Each body is handed to coverage_of, with M = <!-- fleet-review: reviewed=8 changed=8 findings=0 -->:

"~~~text\n" + M + "\n~~~"   reads full, where Markdown renders the marker as quoted code
"```text\n" + M              reads full, where an unclosed fence runs to the end of the document

Scope

This predates #1820, which bounds the marker's indentation. The local review pass on that branch found it, and it was left out so that change stayed in scope. The natural fix is to have FENCE accept either fence character, match the closer to the opener, and run an unclosed fence to the end of the body.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions