mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #169] [MERGED] feat(cursor-review): announce the over-cap skip instead of a silent green run (BE-7646) #176
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#176
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/169
Author: @mattmillerai
Created: 8/14/2026
Status: ✅ Merged
Merged: 8/14/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-7646-over-cap-comment📝 Commits (3)
de92954feat(cursor-review): announce the over-cap skip instead of a silent green run (BE-7646)bf779f5fix(cursor-review): address panel findings on the over-cap notice (BE-7646)1b886c5fix(cursor-review): fail closed when the live-head lookup fails (BE-7646)📊 Changes
3 files changed (+358 additions, -3 deletions)
View changed files
📝
.github/cursor-review/README.md(+25 -1)📝
.github/workflows/cursor-review.yml(+330 -1)📝
docs/callers/cursor-review.md(+3 -1)📄 Description
ELI-5
If your PR is too big, the Cursor review panel quietly doesn't run — and the check still turns green, so it looks exactly like "eight models reviewed this and found nothing." This PR makes that skip say so out loud: a warning annotation, a step-summary block, and a sticky PR comment that names how many lines you counted and what the cap is. Shrink the PR and the same comment flips to a ✅ on the next run, when the panel actually runs. Nothing becomes blocking — the run is still green either way.
What changed
.github/workflows/cursor-review.yml:diff-sizeexposescountedas a job output alongsidewithin_cap. The sharedcheck-pr-sizetool already writescounted=<n>toGITHUB_OUTPUT(scripts/check-pr-size/main.go:733); the degraded raw-count fallback now appendscounted=${RAW}too, with the same last-value-wins mechanism it already uses forover_cap, so the number quoted to the author always agrees with whichever count actually decided the gate.Announce over-cap skip— a new step indiff-sizeon theover_cap == 'true'path: a::warning::annotation plus a step-summary block. This half needs no credentials, so it reaches fork and Dependabot PRs and consumers that never configured a bot app.over-cap-commentjob, modelled line-for-line onpr-size.yml'scommentjob (same action SHA pin, samecontinue-on-errormint + upsert, same author-gatedstartswithsticky-comment lookup). It upserts one comment behind the marker<!-- cursor-review-over-cap -->, POSTing only on the over-cap path and PATCHing an existing one either way — so a stale "skipped" comment flips to ✅ once the PR is trimmed, and a PR that was always under the cap never gets a comment at all.Docs: the
diff_size_capinput description,docs/callers/cursor-review.md(a new gotcha + the inputs-table note), and.github/cursor-review/README.md(a new "Over the diff-size cap" section + a pointer under the flow diagram).Deliberately not touched: the
notify-*jobs (Slack-on-skip would change notification traffic fleet-wide and wants its own opt-in input), and no job was changed to fail on over-cap.Why non-blocking
cursor-reviewis advisory — it posts a review, it does not gate. Verified live rather than assumed:repos/Comfy-Org/cloud/rules/branches/mainlists eleven required status checks and no cursor-review job is among them, so failing the job would block nothing while breaking the reusable's contract for every caller. The fix is visibility, not enforcement — hencecontinue-on-erroron both the mint and the upsert, and thediff-sizeannotation as the credential-free fallback signal.Judgment calls
needs.diff-size.result == 'success', not onwithin_cap != 'true'. A git-leveldiff-sizecrash leaves the job's outputs empty, and an emptywithin_capsatisfies!= 'true'— which would post a confident "over cap" comment about a job that never counted anything. Gating on the result also lets the job run on within-cap runs, which is the only way a stale over-cap comment ever gets flipped.<!-- cursor-review-over-cap -->is distinct fromgate-unresolved.py'sCONSOLIDATED_MARKER, and the two live in different spaces entirely:build-ledger.pyreadspulls/{n}/reviewsandpulls/{n}/comments, and nothing incursor-reviewreadsissues/{n}/commentsat all.unknown/an unknown number ofwhen the output is empty, rather than printing an empty string as if it were a fact.Verification
actionlint .github/workflows/cursor-review.yml— one finding, and it is the pre-existinggithub.job_workflow_shaschema complaint that is identical onorigin/main(confirmed by linting the base version). Zero new findings, including shellcheck over the newrun:blocks.python3 -m unittest discover -s .github/cursor-review/tests(187 tests) — OK..github/workflow-pinscheck + tests, and.github/groomtests — OK.run:script out of the YAML and exercised it against a stubbedghacross eight scenarios: over-cap with no existing comment (POST), over-cap with an existing one (PATCH), within-cap with an existing one (PATCH to ✅), within-cap with none (no write at all), emptycounted(falls back to the "unknown" wording), two duplicate stickies (both PATCHed), every write 403 (step exits 1, socontinue-on-errorkeeps the job green and the degraded note fires), and a POST 403. The author-gating held: a comment carrying the marker but posted by a User, and a bot comment merely quoting the marker mid-body, were both correctly ignored. TheAnnounce over-cap skipstep was run the same way for both the populated and emptycountedcases.preflight,review,consolidate,notify-startandnotify-completeare each gated onwithin_cap == 'true', and the only other conditions referencingover_capare!= 'true'guards. There is no cap-bypass path onmain— thecursor-review-xllabel lives in an unmerged draft, and is deliberately not referenced in the comment text.Unexercised artifacts
cursor-review-labeled PR with a >5000-line counted diff on a consumer that has the bot app configured, which is only possible after this merges andbump-cursor-review-callers.ymlfans the SHA bump out. Everything above is static analysis plus a stubbed-API simulation of the shell, not a real Actions run.extra_generated_globsdefault) and #168 (diff fencing) both touch.github/workflows/cursor-review.ymland.github/cursor-review/README.md. My hunks are in different regions, but whichever lands second should rebase.Refs BE-7646 —
Refs, notCloses: nothing has yet observed the annotation, the summary or the sticky comment on a real over-cap run, so the ticket stays open to carry that post-bump behavioural check.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.