potiuk opened a new pull request, #116:
URL: https://github.com/apache/airflow-steward/pull/116

   ## Summary
   
   Two unrelated-but-small classifier-accuracy improvements, both prompted by 
misclassifications hit during the same `apache/airflow` triage sweep:
   
   1. **Add `spellcheck`, `spelling`, `build documentation`, `build docs`, 
`build-docs` to the `static_check` substring list.** A docs-build / spellcheck 
failure is symmetric with the other static checks — the contributor introduced 
text the checker doesn't accept (a misspelled word, a missing sphinx reference, 
a broken include) and the fix is a code change. Without these patterns, row 13 
(`rerun`) fires on a single docs-build failure and the bot sends a useless 
rerun request that fails identically.
   
   2. **Apply the Golden Rule 1b optimistic-lock pattern to `approve-workflow` 
too.** Currently only `mark-ready` and `mark-ready-with-ping` re-verify state 
immediately before mutating. `approve-workflow` builds its run-ID list at fetch 
time, then mutates at action time — but maintainers spend minutes inspecting 
the diff between fetch and action, and another maintainer (or auto-approval) 
can land an approval in that window. The mutation then has nothing to approve 
and silently exits with empty output, leaving no signal about whether the 
desired state is in place. Re-listing pending runs at action time and exiting 
cleanly with a one-line note when the list is empty matches what `mark-ready` 
already does.
   
   ## Empirical evidence
   
   - **#66509** (@IamJasonBian): single failing check `CI image checks / Build 
documentation (--spellcheck-only)`. Classifier picked `rerun` (row 13). The 
author added a word not in the wordlist; rerunning will fail identically. 
Manual override required to send a static-check-style comment with remediation.
   - **#66065** (@petercheon, page 11) and **#66686** (@kimjune01, page 12): 
both classified `approve-workflow` from a fetch-time `action_required` cache 
hit, but at action time the pending-runs list was empty (#66065 — runs already 
approved by someone else between fetch and act) or non-empty (#66686 — clean 
approval, the more common case). The empty case in #66065 surfaced as `exit=0, 
out=` with no guidance — the optimistic-lock check now produces an explicit 
no-op message.
   
   ## Changes
   
   `classify-and-act.md`:
   
   - **`static_check` precondition glossary entry**: append `spellcheck`, 
`spelling`, `build documentation`, `build docs`, `build-docs` to the substring 
list. Add a short paragraph explaining the symmetry with the other static 
checks (a docs-build failure is a code-fix problem, not a flakiness problem).
   
   `actions.md`:
   
   - **`approve-workflow` recipe**: re-list pending runs at action time using 
the same `select(.conclusion == "action_required")` post-filter. If the list is 
empty, exit cleanly with a one-line note ("already approved by someone else") 
so the maintainer sees the no-op explicitly. Cross-references the Golden Rule 
1b pattern in `SKILL.md` for symmetry with `mark-ready`.
   
   ## Test plan
   
   - [x] Re-classified #66509 with the new `static_check` entry — now correctly 
routes to row 12 (`comment`) instead of row 13 (`rerun`).
   - [x] Walked through the recipe by hand against #66065's situation: empty 
`ids` → clean exit with the no-op note, vs. previous behavior of empty stdin to 
the while loop with no status message.
   - [x] `prek run --files` passes (markdownlint, skill-validate, typos, etc.).
   - [x] No new GraphQL fields or REST endpoints required.
   
   ---
   
   ##### 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]

Reply via email to