potiuk opened a new pull request, #71716: URL: https://github.com/apache/airflow/pull/71716
Adds a duplicate-PR detection and closure phase to the magpie `pr-management-triage` skill, as an adopter override under `.apache-magpie-overrides/`. The framework skill has no duplicate-PR handling — every occurrence of "duplicate" in its decision table refers to duplicate *proposals* (not re-suggesting the same action on the same PR), never to two PRs fixing the same bug. Duplicates are nevertheless the largest maintainer-authored closure category in this repo. The sweep is specified as a separate pass rather than a decision-table row: that table is a pure function of per-PR state from one batched GraphQL query, with no network calls and no cross-PR comparison, and duplicate detection needs both. It sits in the same position as the existing stale sweeps. Five steps: - **D1** — cluster on changed-file overlap *and* title-token similarity, after dropping churn paths (newsfragments, `uv.lock`, `provider.yaml`, changelogs, `generated/known_airflow_exceptions.txt`, `validate_operators_init_exemptions.txt`). That last one is touched by every operator-`__init__` PR and, left in, pairs unrelated provider changes together. - **D2** — fetch and compare both diffs. Mandatory and explicitly not skippable. - **D3** — complementary-not-duplicate guard: declare a duplicate only when one diff's production change is a superset of the other's. Two PRs can touch the same function and fix different halves of a bug. - **D4** — earliest-opened wins by default (the "check for an existing PR first" convention in `contributing-docs/04_how_to_contribute.rst`); four listed tie-breakers can override it, and a split decision goes to a human rather than being auto-resolved. - **D5** — one-at-a-time human approval, re-check both PRs are still open immediately before closing, and a comment template carrying the AI-disclaimer and `Drafted-by:` footers required by `AGENTS.md`. Calibrated against a real 238-PR queue: file-overlap clustering alone proposed 88 close candidates, and reading the diffs reduced that to 5 genuine duplicates. The file records that ratio so future runs budget for D2 rather than trusting the heuristic, and states that closing without per-pair diff reading is a defect in the sweep rather than a time saving. No newsfragment: this is agent tooling with no user-facing behaviour change. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5) Generated-by: Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
