mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #129] [MERGED] fix(groom): stop build_pr full-cloning the target repo to file a bail issue #140
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#140
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/129
Author: @mattmillerai
Created: 8/4/2026
Status: ✅ Merged
Merged: 8/4/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-groom-build-pr-checkout📝 Commits (1)
891e660fix(groom): stop build_pr full-cloning the target repo to file a bail issue📊 Changes
1 file changed (+64 additions, -2 deletions)
View changed files
📝
.github/workflows/groom.yml(+64 -2)📄 Description
ELI-5
When groom's robot writes a code change, a second job pushes it and opens the PR. That job always downloaded the entire history of the target repo first — even when there was no code change to push and its only job was to write a GitHub issue. On a huge repo that download can randomly hang. It did: the download sat there for 15 minutes producing nothing, the job's timer ran out, and the finding it was supposed to record was silently lost. Now it only downloads when there's actually a patch to apply, downloads far less, and retries once if the download stalls.
What happened
A
build_prmatrix cell on a large downstream caller was cancelled at its 15-minute job timeout, sitting in this fetch the whole time with zero output:Not one
* [new branch]line, so it hung in server-side pack negotiation before any ref landed. The sibling cell ran the identical fetch 70 seconds earlier and finished it in 50s — the 15-minute budget was already ~13x the observed need. This is a stall, not slowness, which is why a bigger budget is not the fix.Cost: that cell had already decided to file a bail issue, so the finding never got filed, never entered the dedup ledger, and the next sweep re-derives it from scratch and pays the finder + verifier for it again.
Changes
planstep readsresult.jsonand the target-repo checkout is nowif: needs_worktree == 'true'. The bail branch (result.get("status") != "patched") callsfile_issue()andsys.exit(0)s before any git call, so it never needed a worktree — it was full-cloning a multi-GB monorepo in order to rungh issue create. Defaults closed: an unreadable or absentresult.jsonyieldsbail, which is exactly the path that needs no worktree, so skipping it cannot strand a patch.fetch-depth: 0→1. Nothing downstream reads history — the apply step doescheckout -b,git apply --index,git push origin <branch>. Pushing a new branch from a shallow clone is fine because the base commit is already on the remote.timeout-minuteson its own would not have recovered this: exceeding it fails the step and the job, and checkout's internal retry only covers git commands that exit non-zero inside a step that is still alive — never a step the runner killed. So attempt 1 iscontinue-on-error: true+timeout-minutes: 6, and a second attempt re-runs it on a fresh connection. The second has nocontinue-on-error, so a genuine two-strike failure is loud rather than falling through to an apply step with no worktree.timeout-minutes: 15 → 20.** Headroom only, explicitly commented as the last line of defence rather than the fix. It also stopsbuild_prbeing tighter thanbuild` (30 min), which does strictly more work over the same checkout.Verification
python3 -c "yaml.safe_load(...)"parses;build_prstep order confirmed programmatically:plan→ checkout(if, continue-on-error, t=6) → retry checkout(if, t=6) → labels → apply.actionlintreports 9 findings, all pre-existing onmainand all on lines this PR does not touch (github.job_workflow_sha/job.workflow_shaare real contexts its schema lacks). Zero new findings.if result.get("status") != "patched": file_issue(...); sys.exit(0)— no git invocation upstream of that exit, and the_groom_assetscheckout thatfile_issueimports the ledger from is deliberately not gated.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
external(BE-6715) #150