Skip to content

Comment-residue hash reader ignores escapes inside double-quoted values (false positive) #360

Closed as not planned

Description

@Blind-Striker

Finding

The comment-residue gate's hash-comment reader (tests/OpenCode.Sdk.Tools.Tests/CommentResidue/CommentReader.cs, HashComments) closes a quoted value at the next matching quote character and ignores escapes. A valid YAML line such as

name: "value\" # Q123"

is therefore read as the value "value\" followed by the comment # Q123", and the gate reports Q123 from inside a string. This is a false positive, so it fails loud rather than open. Found by the review of the PR that corrected CR-only analyzer config lines; the bug predates that PR. The review fix in that PR was limited to the reviewed defect (CR-only analyzer config lines), because a lexer rewrite was outside its approved scope.

Disposition

Not fixed in that PR. Candidate for the Tools.Tests oracle sweep: honour backslash escapes inside double-quoted YAML scalars, with the line above as the red case.

Activity

  1. added this to the 1.0 milestone on Oct 16, 2026
  2. added
    bug
    on Oct 16, 2026
  3. modified the milestones: 1.0, 1.1 on Oct 26, 2026
  4. Blind-Striker commented on Oct 26, 2026

    @Blind-Striker
    CollaboratorAuthor

    Moved to milestone 1.1 by the second 1.0 triage (2026-10-26, maintainer-approved): it is internal, additive, tooling or test structure, so it does not block 1.0.0. The issue stays as it is.

  5. Blind-Striker commented on Nov 22, 2026

    @Blind-Striker
    CollaboratorAuthor

    Moved to the roadmap board as a draft item. This is internal backlog rather than a request an outside user or contributor would act on, so it no longer lives in Issues. The history stays here.

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

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions