Skip to content

fix(compliance): skip re-checking PRs that already have a successful status - #67

Merged
aabusair merged 3 commits into
mainfrom
fix/skip-already-resolved-prs
Aug 28, 2026
Merged

fix(compliance): skip re-checking PRs that already have a successful status#67
aabusair merged 3 commits into
mainfrom
fix/skip-already-resolved-prs

Conversation

@aabusair

Copy link
Copy Markdown
Contributor

Summary

  • 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. 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 first and returns immediately if it's already success — 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/failure PRs are still reprocessed every sweep as before.

Test plan

  • 8 new unit tests covering get_existing_status_state() and the short-circuit branch (already-success skips entirely; no-status/pending/failure still proceed through bot/member checks) — all passing
  • Live workflow_dispatch run against all 73 gated repos with cla_sweeper.yml temporarily 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)
  • Verified PR #931's updated_at and status timestamp are unchanged before/after the test run

🤖 Generated with Claude Code

Amr AbuSair and others added 3 commits August 28, 2026 08:39
…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>
@aabusair
aabusair merged commit 121da8d into main Aug 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant