fix(ci): let the verdict line carry a trailing clause (HT-100) - #202
Conversation
The first-line check required the line to be exactly the verdict, which rejects an ordinary and honest opener: ## 🔴 DO NOT MERGE — review and CI pending That is PR #193's actual body, and it would have gone red the moment that branch touched a gated path. A gate that fails honest bodies teaches people to paste ceremony to get green, which is the habit this exists to break. The line must still OPEN with the verdict, so nothing may precede it and "Status: SAFE TO MERGE pending review" is still rejected — there the verdict is buried and qualified rather than stated and then explained. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe PR verdict workflow now accepts recognized verdict phrases at the start of the first non-empty line with optional Markdown headings, marker characters, and trailing explanatory text. It continues to reuse the parsed verdict for later checks. ChangesVerdict validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-verdict.yml:
- Line 124: Update the verdict validation flow around verdict_is and the
existing INFERRED enforcement so that when VERDICT is safe, FIRST_LINE is also
checked for an explicit INFERRED token; if present, fail validation or change
the verdict to needs. Keep the existing Decision provenance row checks intact.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bf87a60c-80d1-4d07-bd8c-954729a3edba
📒 Files selected for processing (1)
.github/workflows/pr-verdict.yml
…ERRED
The trailing-clause widening in this PR let a body like
"## 🟢 SAFE TO MERGE — INFERRED" pass: check 3 only reads INFERRED out
of provenance-table rows, never the verdict line, and the protocol
already forbids a green verdict carrying an inferred item.
Guard matches the literal caps token INFERRED, case-sensitively, so an
honest trailing clause using the plain word ("no inferred items")
still passes — a case-insensitive match would refail the exact class
of honest body this PR exists to stop failing.
Found by CodeRabbit's review on this PR.
|
@coderabbitai full review |
|
🟢 SAFE TO MERGE
Decision provenance
What changed
The first-line check merged in #110 required the opening line to be exactly the verdict. That rejected an ordinary opener that states the verdict and then says why (
## 🔴 DO NOT MERGE — review and CI pending), training people to paste ceremony to go green.The line still must open with the verdict — nothing may precede it — but a trailing clause is now allowed.
Follow-up commit (
4d1a0e83): the trailing-clause widening let a body read## 🟢 SAFE TO MERGE — INFERREDand pass, because the pre-existing check that looks forINFERREDonly scans rows inside the Decision provenance table, never the verdict line itself. Added a guard: when the verdict is green, the first line may not itself contain the literal tokenINFERRED(matched case-sensitively — a case-insensitive match would fail an honest clause like "no inferred items" for using the plain word, reintroducing the exact failure this PR exists to fix).Review history — two reviewers, two commits
CodeRabbit reviewed
368c4d3f(the initial trailing-clause widening) and found one Major: theINFERRED-on-the-verdict-line bypass above. Fixed in4d1a0e83.CodeRabbit: 1 finding, 1 real and fixed.
CodeRabbit's next review request on
4d1a0e83(the guard fix itself) came back rate-limited. Ran an adversarial pass with Codex instead, pointed specifically at the new guard.Codex (adversarial, in place of CodeRabbit — rate limited on
4d1a0e83): 6 findings, 2 verified pre-existing and filed as follow-up issues, 4 not applicable.INFERREDbypass the guard — real, but the same literal-match weakness already exists in two other checks in this file (provenance-row scan, attribution scan), so it isn't specific to this guard or this PR. Filed as PR-verdict gate: Unicode evasion (zero-width, homoglyphs) bypasses literal token matching #204, with the fix belonging at a body-normalization layer rather than three separate patches.verdict_is()accepts## SAFE TO MERGE(no emoji) and## 🔴 SAFE TO MERGE(wrong emoji) as a valid green verdict — verified pre-existing, not a regression: running the same bare-marker lines through the pre-fix(ci): let the verdict line carry a trailing clause (HT-100) #202 regex (...SAFE TO MERGE[[:space:]]*$, no trailing-clause allowance) matches them identically. That reproduction is what makes this a follow-up rather than something this PR needs to fix. Filed as PR-verdict gate: verdict_is() treats the marker emoji as decorative, not authoritative #205, which carries the reproduction.inferredbypasses the new guard — not a bug, the deliberate case-sensitive design choice above.Verification
All checks re-run against the guarded version (
bash+ GNU grep 3.11 under Ubuntu 24.04, matchingubuntu-latest, not just macOS): the original nine crafted bodies from #202, plus## 🟢 SAFE TO MERGE — INFERRED(now rejected),## 🟡 NEEDS YOUR DECISION — 2 INFERRED items(still accepted — the guard only applies to a green verdict), and a green body withINFERREDin a provenance row but not the first line (still rejected, via the pre-existing check, unmodified).