mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #398] [MERGED] fix(cursor-approve): clamp an over-long axis headline instead of failing the axis #399
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#399
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/398
Author: @mattmillerai
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mattmillerai
Base:
main← Head:matt/cursor-axis-clamp-headline📝 Commits (2)
727cc12fix(cursor-approve): clamp an over-long axis headline instead of failing the axisfc94283fix(cursor-approve): fail closed on a separator-only clamp, keep the reason on an early space📊 Changes
4 files changed (+102 additions, -19 deletions)
View changed files
📝
.github/cursor-approve/README.md(+7 -3)📝
.github/cursor-approve/aggregate.py(+30 -8)📝
.github/cursor-approve/tests/test_aggregate.py(+61 -5)📝
docs/callers/cursor-approve.md(+4 -3)📄 Description
ELI-5
Each cursor-approve reviewer writes a one-line "headline" explaining its verdict, capped at 100 characters. When a reviewer wrote a slightly longer line (106 or 113 characters), the whole check went red, even though the verdict was fine. The model can't reliably count characters, so this PR shortens an over-long headline to fit, cutting at a word and adding "…", instead of failing.
What changed
aggregate.py:validate_outputnow clamps the whitespace-folded headline toHEADLINE_MAX(100) with a newclamp_headline. It cuts at the last space that fits and appends…, and trims trailing,;:-. It falls back to a hard cut when that space is in the first half, for example one long token orFix: <long path>. If nothing but separators survives, it raises, so the axis stays untrusted instead of showing a bare…. It used to raiseheadline is N characters, over the 100 limit.cmd_extractwrites the clamped headline into the uploaded artifact, so the artifact is always within the cap.docs/callers/cursor-approve.md: the rule now reads clamp, not reject.Why
extractruns in each axis job's Extract the verdict step. When a headline was over the cap, it exited 1 there and the axis job (axis: conformanceandaxis: correctness) failed on length alone. A prompt instruction or a retry can't guarantee a length limit on model output. Only enforcing it in code makes it deterministic.Testing
python3 -m unittest discover -s .github/cursor-approve/tests: 205 tests, OK.test_an_overlong_headline_is_rejected_not_truncatedwith tests that cover:decidedecideextractCLI artifactCallers that pin a SHA, like cloud, pick this up through the bump-callers flow once it merges.
Provenance
python3 -m unittest discover -s .github/cursor-approve/tests: 205 tests, OKpython3 -m unittest discover -s .github/cursor-review/tests: OKcheck_workflow_pins.py,check_agents_md.py --root .andcheck-org-repo-literals.sh: passfc94283: separator-only fail-closed, early-space fallback, the off-by-one boundary, and the caller-guide docs.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.