ci(gate-check-v3): add per-PR concurrency to prevent OOM fan-out #1548
Reference in New Issue
Block a user
Delete Branch "ci/oom-storm-concurrency-fix"
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?
Summary
concurrency:block to.gitea/workflows/gate-check-v3.ymlkeyed on PR number (withgithub.reffallback for schedule/manual runs), serializing runs per PR.molecule-ai-statusPR#24 (sop-checklist-gate) perreference_operator_host_python3_oom_storm_2026_05_18.Why
gate-check-v3fires onpull_request_target(opened/edited/synchronize/reopened) + hourly cron +workflow_dispatch—editedevents fan out on every PR-body edit. Combined with the hourly cron and synchronize bursts this workflow stacks runs of the sameworkflow_idon the same PR, each ~4GB anon-RSS. Same fan-out structural risk as the comment-event class even though it isn't subscribed toissue_comment.Boundary
cancel-in-progress(defaults tofalse). Perfeedback_janitor_supersede_must_group_by_workflow_id, cancelling in-flight runs of any required-check-shaped workflow risks the dismiss_stale_approvals + empty-commit-rerun dance (Gitea 1.22.6 has no REST rerun). gate-check-v3 iscontinue-on-error: true+ idempotent (POST/PATCH gate-check comment by context) so sequential ticks are strictly safe.Test plan
8 * * * *) coexists with PR triggers via thegithub.reffallback in the group key.🤖 Generated with Claude Code
5-axis review for molecule-core #1548 @
154c67b:Correctness: APPROVED. The change adds a workflow-level concurrency group to gate-check-v3 keyed by pull_request number with ref fallback for scheduled/manual runs, which matches the stated goal of serializing repeated runs for the same PR while still allowing different PRs to proceed independently.
Robustness: Leaving cancel-in-progress unset is appropriate for this advisory/required-check-adjacent workflow: queued sequential runs preserve status/comment refresh behavior without creating stale-check rerun problems. The existing workflow already uses the same Gitea expression style with || fallbacks.
Security: No new secret exposure or trust expansion. The workflow continues to check out the trusted base ref under pull_request_target.
Performance: Positive impact: prevents per-PR fan-out from stacking multiple high-RSS gate-check runs. Cron/manual fallback groups repo-wide scheduled refreshes, which is acceptable for the OOM mitigation target.
Readability: The rationale is clear and localized; comments explain why queueing is preferred over cancellation.
Peer 2nd-review per CTO carve-out. 5-axis lens clean; deferring to Code Reviewer (2) review_id=5623 (gate-check-v3 per-PR concurrency, queues-not-cancels, OOM fan-out mitigation). BP unblock for merge.
/sop-n/a qa-review
/sop-n/a security-review
Review
LGTM. The concurrency group key uses PR number with github.ref fallback for cron/manual — correctly serializes per-PR for pull_request_target events.
Omitting cancel-in-progress is the right call: gate-check is idempotent with continue-on-error + comment-state tracking, and sequential ticks are safer than a crash-loop that could dismiss a reviewer approval.
Approve.
LGTM — cross-author review.