Use PAT_FOR_PR for dragon-ai execution workflow#3701
Conversation
The Claude Code review workflow currently rejects PRs opened by the ai4c GitHub App because the bot allowlist only includes claude and github-actions. Add ai4c-agent so app-authored PRs can still be reviewed. @dragon-ai-agent
Keep the worker workflow on PAT_FOR_PR so execution remains attributable to dragon-ai-agent while ai4c-agent remains reserved for review.\n\nSigned-off-by: @dragon-ai-agent
|
Claude finished @cmungall's task in 1m 50s —— View job PR Review Complete ✅Review checklist:
SummaryThis is a clean, intentional role-separation change. The execution workflow (
Changes reviewed
The The header comment now accurately documents
No concerns
APPROVED — safe to merge. |
There was a problem hiding this comment.
PR Review: Use PAT_FOR_PR for dragon-ai execution workflow
Review checklist:
- Hierarchy and parents are consistent — N/A (no ontology changes)
- Definitions and supporting references look adequate — N/A
- Obsolete or replacement handling is safe — N/A
- OBO and ODK conventions appear preserved — N/A
- No obvious CI, auth, or workflow regression ✅
Summary
This is a clean, intentional role-separation change. The logic is sound: the execution workflow (ai-agent.yml) was using the ai4c-agent GitHub App token (same identity as the reviewer), which conflated two distinct bot roles in the GitHub UI. Switching back to PAT_FOR_PR correctly restores the intended separation:
- Worker (
dragon-ai-agent) →PAT_FOR_PR - Reviewer (
ai4c-agent) → GitHub App token (unchanged inclaude-code-review.yml)
Changes reviewed
.github/workflows/ai-agent.yml — All five token references consistently replaced with PAT_FOR_PR:
actions/checkouttoken:incheck-mentionjob ✅actions/github-scriptgithub-token:✅actions/checkouttoken:inrespond-to-mentionjob ✅GH_TOKENenv export ✅claude-code-actiongithub_token:✅
The id-token: write permission is correctly dropped from respond-to-mention — it was only needed to generate the GitHub App token via OIDC, and is no longer required with a PAT.
The header comment updated to document PAT_FOR_PR instead of AI4C_AGENT_APP_ID/AI4C_AGENT_PRIVATE_KEY is accurate and helpful.
.github/workflows/claude-code-review.yml — The only change is adding ai4c-agent to allowed_bots. This is a correct side-fix: since the execution workflow used to open PRs as ai4c-agent, the review gate would have blocked them. Now that execution uses PAT_FOR_PR (and commits as dragon-ai-agent), this entry is harmless forward-compatibility — no regression.
No concerns
- No other workflow files were touched.
- The
check-mentionjob retainscontents: read— appropriate for a PAT checkout. - The
respond-to-mentionjob retainscontents: write,issues: write,pull-requests: write— still required for the agent to push branches and open PRs. allowed_bots: "claude,github-actions"inai-agent.ymlis unchanged and correct (the agent should not be self-triggering via the GitHub App identity).
✅ Safe to merge.
Summary
Switch the
AI Agent GitHub Mentionsworker path back toPAT_FOR_PR.Why
The current Uberon setup uses the
ai4c-agentGitHub App token for both:ai-agent.yml)claude-code-review.yml)That makes work execution and review both appear under the same bot identity in GitHub UI. This is confusing when
ai4c-agentis meant to be reserved for review anddragon-ai-agentis meant to be the worker.dismechseparates these roles by keeping the worker onPAT_FOR_PRand the reviewer on the GitHub App token. This PR brings Uberon back to that model.Changes
create-github-app-tokenusage from.github/workflows/ai-agent.ymlPAT_FOR_PRfor checkout,github-script,gh, andclaude-code-actionclaude-code-review.ymlunchanged so review continues to run asai4c-agent🤖 Generated by @dragon-ai-agent
claude-opus-4-7