mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #379] [MERGED] feat(cursor-review): end a panel cell's agent once findings.json reports status=ok #379
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#379
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/379
Author: @mattmillerai
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @mattmillerai
Base:
main← Head:be-19660-cursor-review-early-stop📝 Commits (2)
7630b11feat(cursor-review): end a panel cell's agent once findings.json reports status=ok593cef2fix(cursor-review): forward the step's signals to stop-on-submit and reap the agent group on every exit📊 Changes
4 files changed (+624 additions, -8 deletions)
View changed files
📝
.github/cursor-review/README.md(+1 -0)➕
.github/cursor-review/stop-on-submit.py(+216 -0)➕
.github/cursor-review/tests/test_stop_on_submit.py(+362 -0)📝
.github/workflows/cursor-review.yml(+45 -8)📄 Description
Summary
Some panel cells keep running after their agent has already finished the review.
cursor_review_finishwritesstatus: oktofindings.json, butcursor-agentsometimes doesn't exit, so the cell sits idle until the 15-minuteRun cursor reviewstep cap kills it.stop-on-submit.pyis a new stdlib-only wrapper around the reviewer'scursor-agentinRun cursor review. It works like this:/tmp/findings-out/findings.jsonevery 5s.statusequal to the exact string"ok". When that happens, the agent gets 15s to exit on its own. The wrapper then reads the file again. If it still saysok, the wrapper sends SIGTERM to the whole group, then SIGKILL to the group 10s later. Children such as the MCP server or a spawned shell can't outlive the step.findings.json. The uploaded artifact, the leg check and the judge all get exactly the bytes the MCP tool wrote. The leg check andAggregate panel findingsreadstatus, so an early stop counts as a submitted cell, not an error.ok, the wrapper never stops the agent. A cell that never submits runs to the cap and fails its leg as it does today.findings.jsonafter the upload.submitted()reads only a regular file (O_NONBLOCK|O_NOFOLLOWplusfstat), capped at 8 MiB. A FIFO, symlink, device or oversized file counts as not submitted.--poll/--linger/--gracereject nan, inf and values ≤ 0.Test evidence
tests/test_stop_on_submit.py(25 tests):submitted(): ok, never written, error status, every possible truncation of anokrecord, non-object or non-string status,"OK", invalid UTF-8, very deep nesting, a directory at the path, a FIFO (does not block), a symlink, an oversized file.okcell is stopped early, and its findings bytes are identical to what the agent wrote, odd formatting included.okduring the wait does not trigger a stop.Run cursor reviewroutescursor-agentthrough the wrapper, backgrounds it, and traps INT/TERM/HUP before the launch.timeout 75stood in for the 15-minute cap. Its SIGTERM was passed on, and no stub process was left over.Provenance
test_stop_on_submit.py). Each new review-round test fails or hangs against the previous wrapper.check_workflow_pins.pyOK,check_agents_md.pypassed (2 warnings, none in a file this PR touches), org-repo-literal lint OK, shellcheck clean on the extractedRun cursor reviewscript.Run cursor reviewscript with stub agents. Anokcell records exit 0 and an exiting cell records 3. On SIGTERM to the step shell, a cell that ignores signals exits 143 in about 5s, with no agent or grandchild left.cursor-agent, and actionlint, which is not installed locally.Residual
stop-on-submit:lines in the=== Stderr ===section of a cell that submitted, and that cell'sRun cursor reviewstep should finish well under 15 minutes. Check whether the sol-lane model cells that used to hit the cap after writingstatus: ok(the effort tier changes in #378) now finish early.Run judgestep (30-minute cap, samecursor-agentpattern) can idle aftercursor_review_submit_finalin the same way. The ticket covers only panel cells, so it is not wrapped. The same wrapper would work there with--findings /tmp/judge-findings.json, but that step has its own fallback logic to check first.status: okand then rewrites the file to non-ok. That case is handled (no stop), but such a cell runs to the cap exactly as it does today.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.