[PR #6585] [MERGED] fix(ci): keep a refused Claude credential from reddening a pull request #6361

Closed
opened 2026-11-02 04:08:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6585
Author: @BlindMaster24
Created: 9/17/2026
Status: ✅ Merged
Merged: 9/17/2026
Merged by: @BlindMaster24

Base: main ← Head: fix/claude-no-red-on-refused-credential


📝 Commits (2)

  • 88f4c3d fix(ci): keep a refused Claude credential from reddening a PR
  • 0415f1a fix(ci): stop a refused credential reddening the issue analysis

📊 Changes

2 files changed (+33 additions, -2 deletions)

View changed files

📝 .github/workflows/claude-issue-analyst.yml (+17 -1)
📝 .github/workflows/claude-pr-review.yml (+16 -1)

📄 Description

An expired Claude subscription reddens Claude PR Review on every pull request, and nothing about the pull request is wrong. This fixes that, and the same refusal in the issue analyst.

Why it is red

The workflow already knows that an API refusal is not a broken workflow: Report a review the API refused to run recognises an exhausted usage window and an overloaded API, says so, and leaves the job green. Its condition is steps.review.outcome == 'failure', because those refusals make the action exit non-zero.

A refused credential does not. From run 35187380192:

step conclusion
Run anthropics/claude-code-action@v1 success
Report a review the API refused to run success, found no cause
Fail if the review posted nothing failure

The refusal is only in the uploaded transcript: {"error":"oauth_org_not_allowed"} on the assistant entry, and a result entry with "is_error": true, "api_error_status": 403, Your organization has disabled Claude subscription access for Claude Code. Neither existing branch matches, so the last step sees "posted nothing" and goes red. The same shape is behind all five failures in the last day: 35159059540, 35184688775, 35185722358, 35186543654, 35187380192.

The change

claude-pr-review.yml: a new step, Report a review the credential refused, reads the transcript for that 401/403 result (or an oauth_/authentication_/invalid_api_key error), records skipped=true and emits a ::warning::. Fail if the review posted nothing gains steps.refused.outputs.skipped != 'true'. The existing classifier is untouched, so the usage-limit and overload paths behave exactly as before.

claude-issue-analyst.yml: the same step and the same clause on Fail if the analysis posted no reply. It never runs for a pull request -- its trigger excludes them -- but it failed seven times in the last day for the same reason, and each failure is a notification.

Deliberately no comment on the pull request for this cause: the credential is the maintainer's own condition, and a note about it under every contributor's PR is noise. The maintainer sees the yellow annotation on the run instead of a red check.

Verification

  • Both files parse as YAML; the step ids stay unique.
  • The predicate was evaluated against three real transcripts: the refused run (fires), a usage-limited run with 429 + rate_limit_event: rejected (does not fire, still handled by the old step) and a completed review of 629 entries with is_error: false (does not fire). So only the refused credential changes behaviour.
  • No local gate reaches .github/: make verify does not build or test workflows, so this is inspection plus the transcript evidence above, not a test run.
  • pull_request_target executes the workflow from the base branch, so this takes effect after it is merged, not while it is open.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6585 **Author:** [@BlindMaster24](https://github.com/BlindMaster24) **Created:** 9/17/2026 **Status:** ✅ Merged **Merged:** 9/17/2026 **Merged by:** [@BlindMaster24](https://github.com/BlindMaster24) **Base:** `main` ← **Head:** `fix/claude-no-red-on-refused-credential` --- ### 📝 Commits (2) - [`88f4c3d`](https://github.com/MHSanaei/3x-ui/commit/88f4c3df189dcf641498aa3e63c83bec4ab8fa66) fix(ci): keep a refused Claude credential from reddening a PR - [`0415f1a`](https://github.com/MHSanaei/3x-ui/commit/0415f1aff2f9fceaeb9388c47bd7a3e1398a553f) fix(ci): stop a refused credential reddening the issue analysis ### 📊 Changes **2 files changed** (+33 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/claude-issue-analyst.yml` (+17 -1) 📝 `.github/workflows/claude-pr-review.yml` (+16 -1) </details> ### 📄 Description An expired Claude subscription reddens `Claude PR Review` on every pull request, and nothing about the pull request is wrong. This fixes that, and the same refusal in the issue analyst. ## Why it is red The workflow already knows that an API refusal is not a broken workflow: `Report a review the API refused to run` recognises an exhausted usage window and an overloaded API, says so, and leaves the job green. Its condition is `steps.review.outcome == 'failure'`, because those refusals make the action exit non-zero. A refused credential does not. From run [35187380192](https://github.com/MHSanaei/3x-ui/actions/runs/35187380192): | step | conclusion | |---|---| | `Run anthropics/claude-code-action@v1` | **success** | | `Report a review the API refused to run` | success, found no cause | | `Fail if the review posted nothing` | **failure** | The refusal is only in the uploaded transcript: `{"error":"oauth_org_not_allowed"}` on the assistant entry, and a result entry with `"is_error": true, "api_error_status": 403`, `Your organization has disabled Claude subscription access for Claude Code`. Neither existing branch matches, so the last step sees "posted nothing" and goes red. The same shape is behind all five failures in the last day: `35159059540`, `35184688775`, `35185722358`, `35186543654`, `35187380192`. ## The change `claude-pr-review.yml`: a new step, `Report a review the credential refused`, reads the transcript for that 401/403 result (or an `oauth_`/`authentication_`/`invalid_api_key` error), records `skipped=true` and emits a `::warning::`. `Fail if the review posted nothing` gains `steps.refused.outputs.skipped != 'true'`. The existing classifier is untouched, so the usage-limit and overload paths behave exactly as before. `claude-issue-analyst.yml`: the same step and the same clause on `Fail if the analysis posted no reply`. It never runs for a pull request -- its trigger excludes them -- but it failed seven times in the last day for the same reason, and each failure is a notification. Deliberately **no comment on the pull request** for this cause: the credential is the maintainer's own condition, and a note about it under every contributor's PR is noise. The maintainer sees the yellow annotation on the run instead of a red check. ## Verification - Both files parse as YAML; the step ids stay unique. - The predicate was evaluated against three real transcripts: the refused run (fires), a usage-limited run with `429` + `rate_limit_event: rejected` (does not fire, still handled by the old step) and a completed review of 629 entries with `is_error: false` (does not fire). So only the refused credential changes behaviour. - No local gate reaches `.github/`: `make verify` does not build or test workflows, so this is inspection plus the transcript evidence above, not a test run. - `pull_request_target` executes the workflow from the base branch, so this takes effect after it is merged, not while it is open. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:08:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6361
No description provided.