potiuk opened a new pull request, #433: URL: https://github.com/apache/airflow-steward/pull/433
## What `pr-management-triage` Sweep 4 (stale `ready for maintainer review` label) splits its disposition into **4a — branch healthy → strip label** and **4b — branch rotted → close**, keyed on `mergeable` / `mergeStateStatus`. This PR makes that split read mergeability **live, per candidate**, instead of trusting the batched value. ## Why Same root cause as #432 (the quick-merge skill): GitHub computes `mergeable` lazily, so a batched search over the `ready` queue returns `UNKNOWN` for many PRs and `BLOCKED` for *most* of them — branch protection withholding the merge pending the required approval they don't have yet. Gating the 4a/4b split on that batch value mis-routes **clean-but-unapproved** stale PRs into 4b (close) when their branch is actually fine. Observed on a real `apache/airflow` sweep: 3 stale ready-label candidates all came back batch-`BLOCKED`; a live re-poll showed every one was `mergeable: true` / `clean` (just awaiting an approval) → correctly 4a (strip), not 4b (close). ## Change A new **"Branch-health resolution — re-poll mergeability live"** step before the 4a/4b split: - `gh api repos/<upstream>/pulls/<N> --jq '[.mergeable,.mergeable_state]'` per stale candidate (small set). - `blocked` → **healthy** (clean branch withheld only on the missing approval; route to 4a), `dirty`/`false` → **conflicted** (4b), `unknown` → defer this run. - `statusCheckRollup.state == FAILURE` still independently routes to 4b. - 4a/4b "Extra trigger" lines and the Budget note updated accordingly. Mirrors #432 for the triage stale-sweep path. Single file (`stale-sweeps.md`); validates clean. Suggested labels: `area:pr-management`, `capability:triage`, `kind:policy`. --- Generated-by: Claude Code (Opus 4.8) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
