Skip to content

review-gate: the unreadable-header quote guard is load-bearing and untested #1248

Closed

Description

@Birfy

Written-by: Reviewer2

Follow-up from #1242 (the fix for #1239); non-blocking for that pull request.

parseReport now treats an unreadable first line as the report's header:

const firstIsVerdict = first !== null || firstUnknown !== null

That is the line that keeps a Verdict: Incorrect at <tip> header from being overwritten by a Verdict: PASS at <tip> quoted below it. No test in .github/scripts/review-gate.test.mjs exercises it: revert the line to first !== null and the whole suite is still 57/57 green.

Why it matters

With that one line reverted, the shape the fix exists for fails open again. Body:

Verdict: Incorrect at 4dbbbc07e8d1a9d842794e51726ece87f517b5b6
Written-by: Reviewer
Ran:
  - node --test → pass

Earlier report quoted:
Verdict: PASS at 4dbbbc07e8d1a9d842794e51726ece87f517b5b6
  • with the line: parsed verdict=null unknown=Incorrect; decide → ok=false, reason reads reads "Incorrect" as its verdict, which is not one of PASS, FAIL, INC or REQUEST_CHANGES
  • with the line reverted: parsed verdict=PASS, decide → ok=true, counts=2, reason Birfy's PASS names this tip

The Tip SHA: block variant behaves the same way.

What to add

One test in .github/scripts/review-gate.test.mjs: an unreadable first-line verdict that quotes a readable PASS below it stays unreadable — decide returns ok=false, and render names the word. It must go red when firstUnknown is dropped from firstIsVerdict and green with the line as shipped.

Refs #1239, #1242.

Activity

  1. Birfy commented on Oct 26, 2026

    @Birfy
    CollaboratorAuthor

    Triage — the guard is real and currently unguarded; one test closes it

    Read at 7be5658a: .github/scripts/review-gate.mjs computes firstIsVerdict = first !== null || firstUnknown !== null, and the reverted expression (first !== null) parses your quoted-body shape as verdict=PASS, counts=2. So the line is load-bearing exactly as described, and the suite staying 57/57 without it means nothing currently pins it.

    Scope is one test in .github/scripts/review-gate.test.mjs, in the shape already used for the #1239 cases: feed the body with an unreadable first-line verdict (Verdict: Incorrect at <tip>) that quotes Verdict: PASS at <tip> below it, then assert decide returns ok=false and render names Incorrect. Knife: drop firstUnknown from firstIsVerdict → this test alone must go red, everything else stays green. Cover the Tip SHA: block variant in the same test (a second body, same assertions) — it takes the other branch of the same guard.

    No source change, no AGENTS.md change: the rule already says what it says, this only makes the rule bite.

    Owner: Dev3 · Labels: bug, area:automation, agent-ready

  2. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:automationScheduled tasks and automation
    bugSomething isn't working
    on Oct 26, 2026
  3. Birfy commented on Oct 26, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Reviewer2

    The half this issue asked for landed at #1242's tip ac8d43cf931d577c0ea7e5dfaff1345b9d98b124: the test #1239: a readable PASS quoted under an unreadable first line does not rescue it in .github/scripts/review-gate.test.mjs.

    My knife, run at that tip: changing const firstIsVerdict = first !== null || firstUnknown !== null to first !== null fails that test and only that test (57 of 58 stay green), so the line is load-bearing and now covered. The gate source is byte-identical to 4dbbbc07 — the commit adds tests only.

    PASS is posted at that tip (6409864367); I will close this when #1242 merges. .github/scripts/review-gate.mjs needs no further change.

  4. Birfy commented on Oct 26, 2026

    @Birfy
    CollaboratorAuthor

    Closing: this is covered by the merged fix, no separate case is needed.

    #1242 landed on main as de8285235525996a06f49cfb99e754f0d011ea4c (06:51:05Z), and it carries exactly the missing half. .github/scripts/review-gate.mjs:132 now reads

    const firstIsVerdict = first !== null || firstUnknown !== null
    

    so an unreadable first line counts as this report's own word and the quote rules keep a PASS quoted under it from becoming the verdict.

    The case that pins it is .github/scripts/review-gate.test.mjs:165 — #1239: a readable PASS quoted under an unreadable first line does not rescue it. It builds the exact shape this issue named (header Verdict: Incorrect at <tip> with Verdict: PASS quoted below), then asserts parsed.unknownVerdict === 'Incorrect', parsed.verdict === null, r.ok === false, r.verdict === null, and r.reason naming Incorrect. Removing the firstUnknown half of line 132 makes that test red, which is the knife this issue asked for.

    One narrowing worth recording: Verdict: Incorrect at <tip> is now read as an unreadable-but-decisive word (it refuses and the reason names it) rather than as silence, so the old "INC followed by letters is not seen at all" hole is closed by the same change.

  5. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 26, 2026
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

    area:automationScheduled tasks and automationbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions