mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #387] [MERGED] feat(cursor-review): gate on the direct-OpenAI cells when they replace the Cursor OpenAI lane #390
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/387
Author: @mattmillerai
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-19850-direct-openai-gating📝 Commits (3)
106fc0efeat(cursor-review): gate on the direct-OpenAI cells when they replace the Cursor OpenAI lanec30c68btest(cursor-review): pin the direct-cell gating wiring36ae64cdocs(cursor-review): move the aggregate-panel.py row away from the stop-on-submit.py row📊 Changes
7 files changed (+844 additions, -133 deletions)
View changed files
📝
.github/cursor-review/README.md(+4 -3)➕
.github/cursor-review/aggregate-panel.py(+132 -0)📝
.github/cursor-review/post-review.py(+5 -1)➕
.github/cursor-review/tests/test_aggregate_panel.py(+239 -0)📝
.github/cursor-review/tests/test_workflow_panel_integrity.py(+331 -24)📝
.github/workflows/cursor-review.yml(+131 -103)📝
docs/callers/cursor-review.md(+2 -2)📄 Description
ELI-5
When a repo sends its OpenAI review straight to OpenAI instead of through Cursor, that direct reviewer used to be a "guest": its notes reached the judge, but it was never counted when deciding whether the panel was complete enough to auto-approve. It also only did one of the two passes. So turning it on quietly shrank the voting panel from three labs to two. Now the direct reviewer does both passes and, when it replaces the Cursor OpenAI reviewer, it votes like the one it replaced.
What changes
review-openai-directis a 2-entry matrix (adversarial,edge-case). Each leg builds its prompt from the sameprompt-<review_type>.mdthe Cursor cells use. Artifacts arefindings-direct-<review_type>-<model>. Check names are<review_type> direct (<model>), so the adversarial leg keeps its existing context name.openai_direct_counts, set when the direct cell is in effect andopenai_direct_replaces_cursor_openaiis true. When it is set:continue-on-errorevaluates tofalse;Fail the leg when the cell did not submitstep runs after the upload (same contract as the Cursor step of that name), so a failed direct cell is red in the rollup;Aggregate panel findingsputs both direct cells inexpected,present,ok_countandtotal. A missing artifact is filled in asstatus=error, just as it is for a Cursor cell. The panel line reads e.g.6/6.false) is unchanged. The direct cells stay advisory: they are never counted, never red, and kept out of the panel metadata auto-approve reads..github/cursor-review/aggregate-panel.pyso it can be unit-tested. Both markers (direct_api,advisory) are popped from every cell's own record and set only by the script, so a cell still cannot excuse itself from the count.panelmetadata taggeddirect.post-review.pynames a failed one in the "Reviewers that did not contribute" line asgpt-5.6-sol:edge-case (direct, error). The judge input carries each direct cell's ownreview_type.openai_direct_model,openai_direct_replaces_cursor_openai),.github/cursor-review/README.mdanddocs/callers/cursor-review.mddescribe the new gating.Judgment call: "replace is true" is read as "
openai_directis in effect AND the replace input is true". That includes the edge case where the panel list had nogpt-*id to drop. In that case the direct cells are still the run's only OpenAI lane, so they count.Self-review notes
continue-on-error: ${{ needs.preflight.outputs.openai_direct_counts != 'true' }}. GitHub allowsneedsandmatrixin that expression, and actionlint reports nothing new on this file versusmain(only the existingjob.workflow_sha/ SC2018-19 notices). If the output is ever empty, the expression evaluates totrue, which is today's advisory behaviour. So the failure direction is "does not gate", never "spuriously red".consolidatestill gates on!cancelled()and reads the direct job only for ordering. A failed or absent direct cell is counted from its artifact, or from the missing artifact.Provenance
test_aggregate_panel.py, which covers replace=true with both direct cells ok (6/6), one direct error (5/6), a missing direct artifact (synthesised as an error), replace=false (advisory, 4/4), marker forgery, the(direct, error)summary line, andpanel_gatecounting a direct failure.test_workflow_panel_integrity.py's aggregate-step pin to follow the counting into the script.check_workflow_pins.py,check_agents_md.py, org-repo-literal lint: passcursor-review.yml: no new findings vsmainResidual
continue-on-error, and the red leg on a failed direct cell. The first consumer run after the SHA bump will show it. Check that the review postsPanel: 6/6and shows twodirect (gpt-…)legs. Also check that a direct error turns its leg red and appears as(direct, error).Panel: 2/4alongsideDirect-API cell (advisory, not counted): status=ok) was not re-read. I have no access to those run logs, so the fix is checked against the aggregation code path and unit tests, not those runs.OPENAI_API_KEYspend limit may need to raise it.approve_max_failed_reviewers, and moving another lab to a direct-API path.Review follow-ups
approve_max_failed_reviewers; before this PR it was free. Callers with a 1-failure allowance therefore gate on the full panel again: a failed direct cell uses up that allowance, just as a failed Cursor cell does. A whole-lab outage is two failed cells, so it withholds approval under that allowance both before and after this change.ci-cursor-review.yml) does not setopenai_direct_model, and it runs the reusable workflow pinned to a main SHA.DirectCellsGateWhenTheyReplaceTestintest_workflow_panel_integrity.py). They execute the real step scripts, from preflight'sDefine panel modelsthroughAggregate panel findingsto the direct leg check. Four one-line edits used to pass every suite while making the cells advisory again: deleting preflight'sopenai_direct_counts=true, hard-coding--direct-counts "false", blankingDIRECT_MODEL, and changing the leg check'sexit 1toexit 0. Each was applied to a scratch copy, and each now fails these tests.aggregate-panel.pyin the README file table. Verified: the cursor-review suite (1194 tests), the cursor-approve suite, the workflow-pins suite withcheck_workflow_pins.py, and the org-repo-literal lint all pass; actionlint shows no new findings.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.