Skip to content

fix(cursor-approve): keep a red panel cell from skipping the axes - #389

Merged
mattmillerai merged 2 commits into
mainfrom
matt/cursor-approve-axes-skip-on-red-panel
Oct 9, 2026
Merged

mattmillerai merged 2 commits into
mainfrom
matt/cursor-approve-axes-skip-on-red-panel

Conversation

@mattmillerai

@mattmillerai mattmillerai commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

What this fixes

cursor-review's called job goes red whenever a panel cell errors — the leg fails by design ("Fail the leg when the cell did not submit") and Panel integrity fails alongside it. approve_max_failed_reviewers does not change that: it governs the approve_gate verdict, not the job's conclusion.

The caller pattern this repo publishes chained approve-start and every axis off that job with a bare needs:. So GitHub's default rule skipped them on the red job, the axes never ran, and cursor-approve's decide — which runs on always() — rendered every axis as ⚠️ no result and withheld the approval.

A caller that sets approve_max_failed_reviewers: 1 precisely to tolerate one dead cell therefore never got the tolerance it configured. One errored cell out of six withheld every round, and nothing on the card said why.

Observed

A consumer repo's PR (a private caller, so not linked here):

cursor-review / edge-case (kimi-k3-high)   failure   ← RetriableError: [resource_exhausted]
cursor-review / Panel integrity            failure   ← 3 of 4 reviewer cells submitted
approve-start                              skipped
axis-correctness                           skipped
axis-conformance                           skipped
cursor-approve (decide)                    success   ← always(), so it ran with nothing to read

The cell died on Cursor-side capacity after three reconnects. It had already written two medium findings to findings.json, but never reached the MCP submit tool, so status stayed error and the leg went red.

approve_gate was pass the whole time — decide's own if: requires it, and decide ran — so the gate had already tolerated the cell exactly as the caller asked. Only the needs: propagation one job earlier threw that away.

Across the 81 preceding completed panel runs on that consumer, approve-start had never once run.

The change

  • docs/callers/cursor-approve.md — !cancelled() on the start phase and all five axes. !cancelled() rather than always() so a superseded run never goes on to decide.
  • The axes also restate needs.approve-start.result == 'success', which !cancelled() would otherwise drop. The documented invariant is unchanged: a start phase that failed to withdraw cursor-review's standing approval still skips them, and decide reads that as "no result".
  • A new ### A red panel cell must not skip the axes section explains why the guard is load-bearing rather than stylistic.
  • docs/callers/cursor-review.md's next: approve_gate example gets the same !cancelled() guard.
  • .github/cursor-approve/tests/test_caller_doc_pattern.py pins the guards as exact top-level conjuncts, including the exact approve_gate == 'pass'/'capped' comparison. A top-level ||, a != 'pass', a bare truthy gate, and a stale second copy of a job all fail. It covers every occurrence of each job across all yaml blocks, and cursor-review.md's next: example too.
  • Both caller docs join test-cursor-review-scripts.yml's path filter, so a docs-only revert runs the test.
  • Two comments corrected: Panel integrity described itself as "advisory — red here fails no other job", which is true of check-runs and of this workflow but not of a caller's needs:; and approve_max_failed_reviewers promised a round "decided normally" without saying what the caller must do for that to hold (now including that !cancelled() drops the implicit success requirement on other needs:, which must be restated). Step 1 of cursor-approve.md's "What it does" no longer says a failed run skips the start phase.

What this does and does not change about approval

approve_gate remains the only authority on whether a round may be decided, and it already fails closed to untrusted on a degraded judge, more errored cells than the caller tolerates, an undelivered review, a moved head, or any upstream decision job that did not succeed. That covers every Panel integrity failure that is not simply a short panel. Reading the gate off a red cursor-review job cannot approve a round the gate itself rejected.

It does give up one incidental backstop, and the doc now says so. The gate trusts each cell's self-reported status. Artifact names are run-global, so a prompt-injected cell could upload a forged clean record under another cell's name: that cell's leg goes red while consolidate reads the forgery. A bare needs: used to skip the axes on that red leg. Now the axes still review the change independently, and decide still withholds on any red axis. Closing the gap at the source (consolidate cross-checking each leg's conclusion) is a runtime change to cursor-review, so it is deferred to a follow-up.

Dropping Panel integrity instead would not have helped: a red matrix leg fails the caller's job on its own.

Scope

No runtime behaviour in this repo changes — the workflow edits are comments. The fix each caller needs is the if: guards.

Follow-up, not in this PR: the one consumer running the axes today needs the same guards applied to its approve-start / axis-correctness / axis-conformance jobs (this repo's own ci-cursor-review.yml does not run them).

Separately worth noting: kimi-k3-high resource_exhausted is recurring, not a one-off — four other recent consumer panels went red on kimi cells, twice with both legs.

Tests

python3 -m unittest discover -s .github/cursor-review/tests -p 'test_*.py'    # 1172 OK
python3 -m unittest discover -s .github/cursor-approve/tests -p 'test_*.py'   #  174 OK
python3 -m unittest discover -s .github/workflow-pins/tests -p 'test_*.py'    #  551 OK
python3 .github/workflow-pins/check_workflow_pins.py                          #  OK
python3 .github/agents-md-integrity/check_agents_md.py --root .               #  passed
bash .github/lint/check-org-repo-literals.sh                                  #  OK

Provenance

Authored by: agent-work loop
Verified:

  • cursor-review / cursor-approve / workflow-pins unittest suites pass locally at b3db43e (counts above). Pin lint, AGENTS.md integrity and the org-repo-literal lint pass.
  • test_caller_doc_pattern.py was mutation-checked on b3db43e. Each of these fails the suite: || for &&, != 'pass', the start phase's parentheses dropped, and a stale bare if: on a second copy of a job.
  • PR CI on b3db43e: every GitHub Actions and Socket check passed, and CodeRabbit completed with no actionable comments. The cursor-review panel last ran on 5e12cae, and all six of its findings are answered on b3db43e. Every review thread is resolved.
  • A local merge of b3db43e with main c37492c is conflict-free, and the cursor-review (1210) and cursor-approve (174) suites, the pin lint and the AGENTS.md integrity check pass on that merged tree.
    Deviations:
  • Body redacted to drop a private consumer repo's name, PR and workflow path (public repo). The first commit message (5e12cae) still names it, and this repo's squash message is built from the commit messages, so whoever merges should delete that reference from the squash message (it is not rewritten here to avoid force-pushing the branch).
  • A review finding (a forged cell artifact behind a red leg) is answered with a doc caveat here plus a deferred follow-up, not a runtime fix.

🤖 Generated with Claude Code

cursor-review's called job goes red whenever a panel cell errors — the leg
fails by design and `Panel integrity` fails alongside it — and
`approve_max_failed_reviewers` does not change that: it governs the
`approve_gate` verdict, not the job's conclusion.

The published caller pattern chained `approve-start` and every axis off that
job with a bare `needs:`, so GitHub's default rule skipped them on the red job,
and decide — which runs on `always()` — reported every axis as "no result" and
withheld. A caller that set `approve_max_failed_reviewers: 1` precisely to
tolerate one dead cell therefore never got the tolerance: one errored cell out
of six withheld every round, and nothing on the card said why.

Observed on Comfy-Org/cloud#12668: the `edge-case (kimi-k3-high)` cell died on
Cursor-side `resource_exhausted` after three reconnects, `Panel integrity`
reported 3 of 4 cells, and `approve-start` plus both axes skipped while decide
rendered two `no result` rows. `approve_gate` was `pass` throughout — decide's
own `if:` requires it — so the gate had already tolerated the cell exactly as
configured. Across the 81 preceding panel runs on that repo the axes had never
once run.

Guard the start phase and every axis with `!cancelled()` (not `always()`, so a
superseded run never decides), and restate `needs.approve-start.result ==
'success'` on the axes, which `!cancelled()` would otherwise drop — a start
phase that failed to withdraw cursor-review's standing approval must still skip
them. `approve_gate` stays the only authority on whether a round may be
decided, and it already fails closed to `untrusted` on a degraded judge, more
errored cells than the caller tolerates, an undelivered review, a moved head,
or any upstream decision job that did not succeed.

`test_caller_doc_pattern.py` pins the guards: a bare `if:` in the snippet
parses, lints and silently withholds, so it cannot be a style question. The
page joins this suite's path filter so a docs-only revert runs it.

Also corrects two comments that made the trap invisible: `Panel integrity`
called itself "advisory — red here fails no other job", true of check-runs and
of this workflow but not of a caller's `needs:`, and
`approve_max_failed_reviewers` promised a round "decided normally" without
saying what the caller must do for that to hold.

No runtime behaviour in this repo changes; the fix each caller needs is the
`if:` guards above.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: b8268ee5-e6f4-4530-a56d-58a981484b3b

📥 Commits

Reviewing files that changed from the base of the PR and between 7de68e5 and b3db43e.


📒 Files selected for processing (5)
  • .github/cursor-approve/tests/test_caller_doc_pattern.py
  • .github/workflows/cursor-review.yml
  • .github/workflows/test-cursor-review-scripts.yml
  • docs/callers/cursor-approve.md
  • docs/callers/cursor-review.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.



📝 Walkthrough

Walkthrough

Caller examples now use explicit !cancelled() and approve_gate checks. The approval guide requires successful approve-start completion before axes run. A new test checks the documented job guards, and workflow path filters include both caller guides.

Changes

Caller guard handling

Layer / File(s) Summary
Guard behavior and conditions
.github/workflows/cursor-review.yml, docs/callers/cursor-approve.md, docs/callers/cursor-review.md
The guides explain how panel errors and approve_gate affect dependent jobs. The approval start job accepts pass or capped when not cancelled. Each axis also requires a successful start and a pass gate. The next job checks !cancelled() and requires a pass gate.
Guard tests and workflow triggers
.github/cursor-approve/tests/test_caller_doc_pattern.py, .github/workflows/test-cursor-review-scripts.yml
The new tests parse YAML code blocks and check the exact documented guards across all matching jobs. Workflow path filters include both caller guides.

Priority: ⬇️ Low

Merge Risk: 🟡 Moderate · up to b3db4

A compromised reviewer could cause an approval round to proceed on forged findings when failed reviewers are tolerated. Resolve that integrity gap before merging, or explicitly accept the risk.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

✨ Simplify code
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added the cursor-review Multi-model cursor review label Oct 9, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

Found 6 finding(s).

Severity Count
🟡 Medium 1
🟢 Low 3
⚪ Nit 2

Panel: 6/6 reviewers contributed findings.

Comment thread docs/callers/cursor-approve.md Resolved
Comment thread .github/workflows/cursor-review.yml Resolved
Comment thread .github/workflows/cursor-review.yml Resolved
Comment thread docs/callers/cursor-approve.md Resolved
…y what `!cancelled()` gives up

Review round on the red-panel-cell fix:

- test_caller_doc_pattern.py now splits each `if:` on top-level `&&` and
  asserts the exact conjuncts, rejecting a top-level `||`, `!= 'pass'`, a
  bare truthy approve_gate, and a stray `#` line inside the block scalar.
  Every occurrence of a job across all yaml blocks is checked, not just the
  last one parsed.
- docs/callers/cursor-review.md's `next:` approve_gate example gets the same
  `!cancelled()` guard and is pinned by the same suite (so it joins the
  test workflow's path filter).
- cursor-approve.md no longer claims the guard widens nothing: it names the
  incidental backstop a red leg used to give against a cell forging another
  cell's findings artifact. Step 1 of "What it does" no longer says a failed
  run skips the start phase.
- approve_max_failed_reviewers' description says `!cancelled()` drops the
  implicit success requirement on other needs, which must be restated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmillerai

Copy link
Copy Markdown
Member Author

🤖 The reviews loop filed Linear follow-up ticket(s) for review thread(s) deferred as out of scope for this PR:

  • BE-19879 — Make cursor-review consolidate treat a cell whose matrix leg failed but whose artifact reports ok as errored — filed as agent-spike (premise unverified)

The following carry agent-spike instead of agent-ok because their reachability claim was not backed by evidence (BE-5378) — the claim is investigated before any code is written, and "the premise does not hold" is a valid, successful outcome:

  • Make cursor-review consolidate treat a cell whose matrix leg failed but whose artifact reports ok as errored — no reachability block in the proposal

@mattmillerai
mattmillerai merged commit 67dcd0b into main Oct 9, 2026
8 checks passed
@mattmillerai
mattmillerai deleted the matt/cursor-approve-axes-skip-on-red-panel branch October 9, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor-review Multi-model cursor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants