Skip to content

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

Open

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. It predates TST-E0b-2, and the TST-E0b-2 review (Sol, run tst-e0b2-review) found it. 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 TST-E0b-2. 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. modified the milestones: 1.0, 1.1 on Oct 26, 2026
  3. 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.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions