From 6c771bcc11872074d71300b598fd1e98b663925a Mon Sep 17 00:00:00 2001 From: Markus Neusinger <2921697+MarkusNeusinger@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:04:15 +0200 Subject: [PATCH] fix(impl-merge): add --admin to bypass missing required CI checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Branch ruleset on `main` requires three status checks (`Run Linting`, `Run Tests`, `Run Frontend Tests`). impl-PRs created by `impl-generate.yml` do not have these checks because GitHub's anti-recursion guarantee suppresses workflow_run / pull_request triggers for pushes made with GITHUB_TOKEN. Reviewed today across all 5 stuck PRs: - 4 of 5 branches (altair, letsplot, plotnine, plotly) never had any of the required checks run, on any commit. - 1 branch (seaborn) had them once (on a manual-style impl-repair commit from 2026-04-27) but newer score commits invalidated those statuses. Net effect: AI-approved PRs hit "the base branch policy prohibits the merge" and `gh pr merge` retries 5× before failing. Adding `--admin` to the merge call lets the pipeline complete autonomously without weakening protection on `main` for human PRs. The merge is still gated by the AI quality threshold (cascading 90/80/70/60/50 across review + 4 repair attempts) and by `impl-merge.yml`'s own pre-merge validation, so this is not a free pass — only the missing-CI-checks artifact is being bypassed. Long-term alternative would be to push impl-generate / impl-repair / impl-review commits via a PAT instead of GITHUB_TOKEN so CI triggers naturally, but that requires a maintained secret and broader audit; the admin bypass is the smaller change. --- .github/workflows/impl-merge.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/impl-merge.yml b/.github/workflows/impl-merge.yml index ab252f5fcd..5fdd92d802 100644 --- a/.github/workflows/impl-merge.yml +++ b/.github/workflows/impl-merge.yml @@ -191,9 +191,16 @@ jobs: gh pr update-branch "$PR_NUM" --repo "$REPOSITORY" 2>/dev/null || true sleep 2 + # --admin bypasses the branch ruleset's required-status-check + # gate. Required because impl-generate.yml pushes via GITHUB_TOKEN, + # which by GitHub's anti-recursion design does not trigger + # downstream CI workflows (Run Linting / Run Tests / Run Frontend + # Tests), so impl PRs never get those checks. The pipeline already + # gates merge behind the AI quality review threshold. if gh pr merge "$PR_NUM" \ --repo "$REPOSITORY" \ --squash \ + --admin \ --delete-branch; then echo "::notice::Merge successful on attempt $attempt" exit 0