Skip to content

PR-verdict gate: verdict_is() treats the marker emoji as decorative, not authoritative #205

Description

@zaridan

The PR-verdict gate (.github/workflows/pr-verdict.yml) validates the opening line of a PR body with:

grep -qE "^#{0,6}[[:space:]]*[^[:alnum:]]*[[:space:]]*SAFE TO MERGE([[:space:]]|$)"

[^[:alnum:]]* means "zero or more non-alphanumeric characters" — it does not require the specific 🟢 emoji, or any emoji at all. All three of these match as a valid safe verdict:

## SAFE TO MERGE
## 🔴 SAFE TO MERGE
## !!! SAFE TO MERGE

The color/marker is decorative to the regex; only the words govern.

Not a regression

Verified this is pre-existing, not introduced by #202: running the same three bare-marker lines through the pre-#202 version of the regex (...SAFE TO MERGE[[:space:]]*$, no trailing-clause allowance) matches all three identically. The looseness has been present since the gate's original version (#110).

Open question

Is text-governs the intended design (the emoji is a human-readable affordance, the words are the contract), or should the specific marker codepoint be part of what the regex requires? Both are defensible; this issue is to make the choice deliberate rather than leaving it as an accident of the character class chosen in #110.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions