fix(compliance): skip re-checking PRs that already have a successful status - #67
Merged
Conversation
…status Posting a commit status bumps the PR's updated_at, which puts it right back into the sweeper's 24h lookback window. An already-resolved PR (e.g. "Member Bypass", "CLA Signed") then gets re-confirmed and re-stamped every 5-minute sweep cycle forever, since each repaint resets the very timestamp the sweeper uses to decide what's "recent". Confirmed live: open-vm-tools#802 repainted 30x over ~2 days, ansible-vsphere-gos-validation#931 repainted 7x. process_single_pr() now checks the commit's existing "Check CLA/DCO" status before doing anything else, and returns immediately if it's already "success" - before the bot/member checks, before fetching the shared config, before re-posting. A genuinely new commit has a fresh SHA with no prior status, so this only ever skips true no-op repeats. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
TEMPORARY: for live-testing the skip-already-resolved-PRs fix via a real workflow_dispatch run before merge. Revert to ref: main before merging, same as the PR #66 test process. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Was pointed at this branch to live-test the skip-already-resolved-PRs fix via a real workflow_dispatch run before merge - confirmed working (12 already-resolved PRs correctly skipped, 1 genuinely non-compliant PR correctly still repainted, zero updated_at bumps). Restoring ref: main now that testing is done. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
updated_at, which puts it right back into the sweeper's 24h lookback window — an already-resolved PR (e.g. "Member Bypass", "CLA Signed") then gets re-confirmed and re-stamped every 5-minute sweep cycle forever. Confirmed live:open-vm-tools#802 repainted 30x over ~2 days,ansible-vsphere-gos-validation#931 repainted 7x.process_single_pr()now checks the commit's existingCheck CLA/DCOstatus first and returns immediately if it's alreadysuccess— before the bot/member checks, before fetching shared config, before re-posting anything. A genuinely new commit gets a fresh SHA with no prior status, so this only ever skips true no-op repeats;pending/failurePRs are still reprocessed every sweep as before.Test plan
get_existing_status_state()and the short-circuit branch (already-success skips entirely; no-status/pending/failure still proceed through bot/member checks) — all passingworkflow_dispatchrun against all 73 gated repos withcla_sweeper.ymltemporarily pointed at this branch (reverted after, see commit history): 12 previously-repainting PRs (including the ones already identified as stuck:terraform-provider-nsxt#2118/#2301,open-vm-tools#728,vcf-services#25,pinniped#3270,ansible-vsphere-gos-validation#904/#931) were correctly skipped with zero re-posted statuses; 1 genuinely non-compliant PR was still correctly re-checked and repainted (failure, missing DCO sign-off)updated_atand status timestamp are unchanged before/after the test run🤖 Generated with Claude Code