potiuk opened a new pull request, #257: URL: https://github.com/apache/airflow-steward/pull/257
## Summary Three correctness fixes + a canonical reference implementation for `pr-management-stats`. ## What was broken While running `/pr-management-stats` on `apache/airflow` after a 277-mutation triage session, the dashboard reported: - 225 untriaged non-draft PRs (real: ~2) - 53 over 4 weeks (real: 0) - Health: 🔥 Action needed (real: ⚠️ Needs attention) Root cause: `fetch.md` instructed agents NOT to fetch \`reviewThreads\` (and by omission, \`latestReviews\` + \`timelineItems\`). The \`is_engaged\` predicate in \`classify.md\` counts ALL of those as maintainer engagement. The mismatch meant a maintainer who only left a line-level review comment looked like \"no engagement\" → PR classified as untriaged → 10× over-count. Additionally, the agent was caught skipping the line-chart panels, CODEOWNERS panel, and triager-activity panel — the SKILL.md golden rules didn't explicitly forbid partial rendering. ## What this PR changes 1. **\`fetch.md\`** — corrects the OPEN_PRS_QUERY template to include \`latestReviews\`, \`reviewThreads\`, and \`timelineItems\` (with \`LABELED_EVENT\`/\`READY_FOR_REVIEW_EVENT\`/\`CONVERT_TO_DRAFT_EVENT\`). Bumps \`comments(last:N)\` from 10 → 25 so the QC-marker scan finds the marker on chatty PRs. Rewrites the \"Why no...\" section to explain WHICH fields are required vs. genuinely not needed. Drops default batch size from 50 → 30 to absorb the complexity increase. 2. **\`SKILL.md\`** — new Golden rule 8 (\"render ALL sections, never silently skip\") + Golden rule 9 (FULL engagement schema is required, not optional). 3. **\`tools/pr-management-stats/reference.py\`** — canonical reference implementation of the fetch + classify contract. The script encodes the full engagement schema, runs \`gh api graphql\` paginated, classifies per \`classify.md\`, and emits a JSON intermediate summary. Adopters who want CI-rendered dashboards extend this script per their own panels. 4. **\`tools/pr-management-stats/README.md\`** — describes the anti-skip contract and cross-references the existing skill docs. ## Verified Re-running the dashboard after the fixes on the same \`apache/airflow\` queue: - Untriaged: 225 → **24** (just adding \`is_engaged\` predicate fix) → **2** (with full engagement schema) - Untriaged 4w+: 53 → **1** → **0** - Health: 🔥 → ⚠️ Both remaining \"untriaged\" PRs are correctly identified — one was opened today (~5 min before the snapshot), one was a documentation PR that the maintainer's triage genuinely missed. ## Test plan - [x] Reference script runs without errors against \`apache/airflow\` (530 open PRs) - [x] Output JSON sidecar has expected counts - [x] Skill markdown lints (no broken links to new paths) - [ ] Reviewer: re-read SKILL.md and fetch.md changes — does anything need to flow into \`aggregate.md\` or \`render.md\`? --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.7) Generated-by: Claude Code (Opus 4.7) 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]
