feat(pr-management-triage): add docs/spellcheck to static_check + optimistic-lock approve-workflow#116
Merged
potiuk merged 1 commit intoMay 11, 2026
Conversation
…imistic-lock approve-workflow Two unrelated-but-small classifier-accuracy improvements, both prompted by misclassifications hit during a triage sweep on apache/airflow: 1. classify-and-act.md: append `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 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. actions.md: apply the Golden Rule 1b optimistic-lock pattern to `approve-workflow`. Re-list pending runs at action time; exit cleanly with a one-line note if empty (already approved between fetch and act). Matches what `mark-ready` and `mark-ready-with-ping` already do.
choo121600
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two unrelated-but-small classifier-accuracy improvements, both prompted by misclassifications hit during the same
apache/airflowtriage sweep:Add
spellcheck,spelling,build documentation,build docs,build-docsto thestatic_checksubstring 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.Apply the Golden Rule 1b optimistic-lock pattern to
approve-workflowtoo. Currently onlymark-readyandmark-ready-with-pingre-verify state immediately before mutating.approve-workflowbuilds 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 whatmark-readyalready does.Empirical evidence
CI image checks / Build documentation (--spellcheck-only). Classifier pickedrerun(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.approve-workflowfrom a fetch-timeaction_requiredcache 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 asexit=0, out=with no guidance — the optimistic-lock check now produces an explicit no-op message.Changes
classify-and-act.md:static_checkprecondition glossary entry: appendspellcheck,spelling,build documentation,build docs,build-docsto 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-workflowrecipe: re-list pending runs at action time using the sameselect(.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 inSKILL.mdfor symmetry withmark-ready.Test plan
static_checkentry — now correctly routes to row 12 (comment) instead of row 13 (rerun).ids→ clean exit with the no-op note, vs. previous behavior of empty stdin to the while loop with no status message.prek run --filespasses (markdownlint, skill-validate, typos, etc.).Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines