fix(root): early-exit iyarc-prune cron only for open PRs - #9648
Open
ralph-bitgo[bot] wants to merge 1 commit into
Open
fix(root): early-exit iyarc-prune cron only for open PRs#9648ralph-bitgo[bot] wants to merge 1 commit into
ralph-bitgo[bot] wants to merge 1 commit into
Conversation
The weekly iyarc-prune cron exited early whenever it found a PR on an osv-scanner-prune/* branch, even when that PR was already merged or closed. Once a prune PR merged, every later cron run would stall indefinitely and osv-scanner.toml exclusions would go unpruned. The prompt's early-exit section now states that only an OPEN PR on an osv-scanner-prune/* head branch blocks the run, and replaces the search-based check with a state-filtered JSON + jq command whose empty or non-empty output maps directly to continue/stop. It also forbids inferring an open PR from branch existence (branches from merged prune PRs linger until deleted) and from --state all/merged listings. Ticket: WCN-2575 Session-Id: c19d17dd-71af-4883-b007-1e7d84e7b2a6 Task-Id: b92fbe0d-d3ea-4662-8f6a-6f12627a5251
Contributor
ralph-bitgo
Bot
force-pushed
the
wcn-2575-iyarc-prune-open-pr-exit
branch
from
September 3, 2026 17:53
8093312 to
a51d64f
Compare
zahin-mohammad
marked this pull request as ready for review
September 3, 2026 17:58
zahin-mohammad
approved these changes
Sep 3, 2026
danielpeng1
approved these changes
Sep 3, 2026
s84krish
approved these changes
Sep 3, 2026
davidkaplanbitgo
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
iyarc-pruneagent prompt(
.claude/agents/iyarc-prune.md) so only an open PR on anosv-scanner-prune/*head branch blocks a run.(
gh pr list --state open --search "head:osv-scanner-prune/") with astate-filtered JSON + jq command whose empty / non-empty output maps
directly to "continue" / "stop and report".
--state all/--state mergedlistings — branches from merged prunePRs linger until deleted and must not trigger the early exit.
Why
The cron exited early whenever it found a PR on an
osv-scanner-prune/*branch, even when that PR was already merged or closed. Once a prune PR
merges, every subsequent weekly run would keep exiting early, the cron
stalls indefinitely, and stale
osv-scanner.tomlexclusions go unpruned —defeating the purpose of the weekly prune.
Ticket: WCN-2575
Observed in run 33363611227:
the agent ended the run in 2 turns after matching an existing PR instead of
evaluating exclusions.
Test plan
chore(deps): remove GHSA-v2hh-gcrm-f6hx from osv-scanner.toml #9450 merged and chore(deps): bump fast-uri to 3.1.4, tar to 7.5.22, drop 8 exclusions #9355 closed,
gh pr list --state open --json number,state,headRefName --jq '.[] | select(.headRefName | startswith("osv-scanner-prune/"))'returns empty (exit 0), so the next cron run proceeds with pruning work.
--state allthe same jq filter matches both prior prune PRs,confirming branch-prefix matching is preserved.
pruning work or a "no exclusions prunable" report instead of a
PR-existence early exit.
Ticket: WCN-2575