[PR #24] [MERGED] cursor-review: reformat prior judge output on parse failure, don't re-adjudicate #35

Closed
opened 2026-10-26 22:35:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/github-workflows/pull/24
Author: @mattmillerai
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/7/2026
Merged by: @mattmillerai

Base: main ← Head: matt/cursor-review-judge-reformat-retry


📝 Commits (1)

  • 1afb54a cursor-review: reformat prior judge output on parse failure, don't re-adjudicate

📊 Changes

1 file changed (+12 additions, -7 deletions)

View changed files

📝 .github/workflows/cursor-review.yml (+12 -7)

📄 Description

What

When the consolidate job's judge output can't be parsed as JSON, the retry currently re-runs the full judge prompt with a "please respond in JSON" reminder appended. This change makes the retry instead ask the judge to transcribe its own prior (prose) output into the findings schema — no re-adjudication.

Why

The judge runs at a thinking tier (judge_model, e.g. *-thinking-xhigh). Re-running the full adjudication prompt makes it re-reason from scratch, and on a nuanced case (a mix of keep/drop verdicts across the panel) it narrates its reasoning again instead of emitting a bare array — so the retry fails the same way the first attempt did. When that happens, the run degrades to raw panel findings via post-review.py, even though the judge did produce a correct, complete analysis; it just wasn't JSON.

Reformatting a finished analysis into a fixed schema is a much higher-compliance task than "adjudicate and emit JSON." It's also cheaper (no diff/file re-read, no re-reasoning) and it preserves the exact verdicts the judge already made.

Behavior

  • First judge call: unchanged.
  • On parse_error/non-ok after the first call: the retry now feeds the judge its own prior output and asks only for the JSON transcription, with the element schema inlined (file, line, side, severity, body).
  • The existing raw-panel-findings fallback (post-review.py degradation banner) still applies if the reformat attempt also fails — no review is ever dropped.

Testing

The change is a prompt-construction tweak inside the Run judge shell step (no new script surface), so it's exercised by the reusable workflow's own runs rather than the cursor-review python unit tests. yaml.safe_load passes; the shell block is a single-quoted heredoc-free edit with balanced { … } redirection.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/github-workflows/pull/24 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 7/7/2026 **Status:** ✅ Merged **Merged:** 7/7/2026 **Merged by:** [@mattmillerai](https://github.com/mattmillerai) **Base:** `main` ← **Head:** `matt/cursor-review-judge-reformat-retry` --- ### 📝 Commits (1) - [`1afb54a`](https://github.com/Comfy-Org/github-workflows/commit/1afb54ac14b84f7f9ec71d2f79334783e2e7832a) cursor-review: reformat prior judge output on parse failure, don't re-adjudicate ### 📊 Changes **1 file changed** (+12 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/cursor-review.yml` (+12 -7) </details> ### 📄 Description ## What When the consolidate job's judge output can't be parsed as JSON, the retry currently re-runs the **full judge prompt** with a "please respond in JSON" reminder appended. This change makes the retry instead ask the judge to **transcribe its own prior (prose) output into the findings schema** — no re-adjudication. ## Why The judge runs at a thinking tier (`judge_model`, e.g. `*-thinking-xhigh`). Re-running the full adjudication prompt makes it re-reason from scratch, and on a nuanced case (a mix of keep/drop verdicts across the panel) it narrates its reasoning again instead of emitting a bare array — so the retry fails the same way the first attempt did. When that happens, the run degrades to raw panel findings via `post-review.py`, even though the judge *did* produce a correct, complete analysis; it just wasn't JSON. Reformatting a finished analysis into a fixed schema is a much higher-compliance task than "adjudicate **and** emit JSON." It's also cheaper (no diff/file re-read, no re-reasoning) and it preserves the exact verdicts the judge already made. ## Behavior - First judge call: unchanged. - On `parse_error`/non-`ok` after the first call: the retry now feeds the judge its own prior output and asks only for the JSON transcription, with the element schema inlined (`file`, `line`, `side`, `severity`, `body`). - The existing raw-panel-findings fallback (`post-review.py` degradation banner) still applies if the reformat attempt also fails — no review is ever dropped. ## Testing The change is a prompt-construction tweak inside the `Run judge` shell step (no new script surface), so it's exercised by the reusable workflow's own runs rather than the `cursor-review` python unit tests. `yaml.safe_load` passes; the shell block is a single-quoted heredoc-free edit with balanced `{ … }` redirection. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:35:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/github-workflows#35
No description provided.