Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef8d031427
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (defun agentic--signal-forge-auth-error (err) | ||
| "Raise a user-facing Forge authentication error from ERR." | ||
| (let ((msg (error-message-string err))) | ||
| (if (string-match-p "[Bb]ad credentials\\|401\\|403" msg) |
There was a problem hiding this comment.
Restrict auth classification to credential-specific failures
Matching on bare 403 causes non-auth GitHub failures (for example rate limiting or repository authorization errors) to be rewritten as credential setup problems, which hides the real cause and sends users toward the wrong fix. This regression is introduced in the new auth helper, where any message containing 403 is treated as bad credentials.
Useful? React with 👍 / 👎.
Motivation
ghub/Forge.Description
agentic--forge-credentials-helpwhich returns concise setup instructions for storing a GitHub Personal Access Token inauth-source(example~/.authinfo.gpg) and notesM-x ghub-create-tokenas an option.agentic--signal-forge-auth-errorwhich matches common auth error patterns (bad credentials,401,403) and raises a user-facing error that includes the credential setup help.forge-create-pullreqcall insideagentic/forge-open-prwithcondition-caseto route credential failures through the new helper and update the function docstring to mention the credential dependency.Testing
rg -n "agentic--forge-credentials-help|agentic--signal-forge-auth-error|forge-open-pr|forge-create-pullreq" agentic.eland verified hits succeeded.agentic.elto verify the messaging, error matching, andcondition-casewrapping were implemented as intended.emacs --batchruntime check but it could not be executed in the current environment becauseemacsis not installed, so runtime validation was not performed.Codex Task