andreahlert opened a new pull request, #66125:
URL: https://github.com/apache/airflow/pull/66125

   ## Summary
   
   Adds a small Python simulator that validates the `pr-triage` skill's 
classification + action-selection logic against a live sample of open PRs on a 
target repo. Companion to the consolidation work in #PLACEHOLDER (the 
decision-table refactor of `classify.md` + `suggested-actions.md` into 
`classify-and-act.md`).
   
   The simulator implements the spec's rules as pure Python functions and diffs 
the output across a 30-PR sample. Used as a regression check after editing row 
preconditions, glossary entries, or the Real-CI guard. A clean zero-divergence 
run is evidence that a spec edit did not change behaviour on the production 
queue.
   
   ```bash
   python3 dev/pr_triage_simulator.py --repo apache/airflow --first 30
   python3 dev/pr_triage_simulator.py --repo apache/airflow --first 30 --sort 
updated-desc
   ```
   
   ## Files
   
   - `dev/pr_triage_simulator.py` — Python simulator. Stdlib only. Read-only 
(no mutations). Uses `gh` CLI for GraphQL + REST.
   - `dev/pr-triage-validation.md` — validation log: structural audit (every 
old rule mapped to a covering new row), six fixture walk-throughs, empirical 
run results, and the documented intentional behaviour changes.
   
   ## What it does
   
   1. Fetches a page of open PRs via the same GraphQL shape the skill uses, 
plus the per-page `action_required` REST index, plus a one-shot 
`recent_main_failures` query (failing checks across the last 10 merged PRs on 
the base branch), plus per-PR `commits_behind` via REST `compare`.
   2. Derives the same intermediate state the skill uses (rollup state, real-CI 
presence, unresolved threads, last-failed-check `startedAt`, 
viewer-triage-marker timestamp, follow-up-ping presence, etc).
   3. Runs both classifiers (the historical two-file spec and the consolidated 
decision table) and diffs the resulting `(classification, action)` tuple per PR.
   4. Reports divergences with PR URL and old/new tuples for inspection.
   
   ## Why this is separate from the consolidation PR
   
   Keeps the consolidation diff focused on the spec change. The simulator is a 
maintenance tool — useful but not normative — and lives under `dev/` for that 
reason. It is not loaded by Claude Code, does not affect the skill's runtime 
behaviour, and has no production consumers.
   
   ## Test plan
   
   - [x] Run against `apache/airflow` open queue (oldest-updated, 30 PRs) — 
zero divergences
   - [x] Run against `apache/airflow` open queue (newest-updated, 30 PRs) — 
zero divergences
   - [x] Code-review pass complete (LGTM, zero blocking + zero high findings)
   - [x] No mutations performed during any run (read-only by design)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [ ] Yes


-- 
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]

Reply via email to