refactor: rename "coder" role to "code"#1815
Conversation
The agent role was named "coder" but the corresponding stage name is "code". This eliminates the indirection — the role name now matches the stage name (triage, code, review, fix, retro, prioritize, fullsend). Renames in: - Core role definitions (config.go, types.go, mint.go roleAlias) - Mint rolePermissions map and embed - GitHub Actions workflows (reusable-code, reusable-fix, reusable-dispatch) - Scaffold templates (dispatch.yml, pre-code.sh, pre-code-test.sh) - Documentation and ADRs - All test files (~200 lines across 10 files) - Agent icon filename (coder.png → code.png) Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
Site previewPreview: https://18735838-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsHigh
Medium
Low
|
| var rolePermissions = map[string]map[string]string{ | ||
| "triage": {"contents": "read", "issues": "write", "metadata": "read"}, | ||
| "coder": {"contents": "write", "pull_requests": "write", "issues": "write", "checks": "read", "metadata": "read"}, | ||
| "code": {"contents": "write", "pull_requests": "write", "issues": "write", "checks": "read", "metadata": "read"}, |
There was a problem hiding this comment.
[medium] breaking-api
The role rename is a breaking change with no backward compatibility code. The mint rolePermissions map, Secret Manager secret naming, and ROLE_APP_IDS env var keys all change without fallback logic. Any timing mismatch between code deploy and infrastructure updates will cause 403 errors.
rh-hemartin
left a comment
There was a problem hiding this comment.
LGTM remember to coordinate with knows which are the infrastructure changes and how to do them.
Summary
coderagent role tocodeacross the entire codebase (42 files, +365/-365)codestage mapping tocoderrole indirectiontriage,code,review,fix,retro,prioritize,fullsendThis PR changes the role name used in
ROLE_APP_IDS, Secret Manager secret names, and GitHub App slug resolution. When this is released, the following infrastructure changes must be coordinated or token minting will break:fullsend-ai-coderfullsend-ai-codefullsend-ai-coder[bot]fullsend-ai-code[bot]ROLE_APP_IDSkey{org}/coder{org}/codefullsend-{org}--coder-app-pemfullsend-{org}--code-app-pemrolePermissionskey"coder""code"If the GitHub App is not renamed before deploying this change,
fullsend mint enrolland thecode/fixstage workflows will fail because the CLI will look upfullsend-ai-code(which won't exist) and the mint will have norolePermissionsentry forcoder.Recommended deployment sequence
fullsend-ai-coder→fullsend-ai-code(Settings → General → App name)fullsend-{org}--code-app-pemwith the same PEM (or rename)ROLE_APP_IDSenv var: change{org}/coderkeys to{org}/codefullsend mint deployto deploy the updated mint with the newrolePermissionsWhat changed
Core definitions:
internal/config/config.go—ValidRoles(),DefaultAgentRoles(),PerRepoDefaultRoles()internal/forge/github/types.go—DefaultAgentRoles(),AgentAppConfig()switch caseinternal/cli/mint.go—roleAliasmap ("fix": "code"), commentsinternal/mint/main.go—rolePermissionsmap keyWorkflows:
.github/workflows/reusable-code.yml— step name +role: code.github/workflows/reusable-fix.yml— step name +role: code.github/workflows/reusable-dispatch.yml—STAGE_ROLE="code".github/actions/mint-token/action.yml— descriptionScaffold templates:
internal/scaffold/fullsend-repo/.github/workflows/dispatch.ymlinternal/scaffold/fullsend-repo/scripts/pre-code.sh—CODE_BOT_LOGINinternal/scaffold/fullsend-repo/scripts/pre-code-test.sh— test data + test namesDocumentation & ADRs:
docs/guides/infrastructure/infrastructure-reference.md— role permissions table, example requestdocs/guides/user/customizing-agents.md— role/app mapping tabledocs/guides/getting-started/github-setup.md— app links,--agentsdefaultdocs/guides/getting-started/installation.md— app set examplesEmbeds:
internal/dispatch/gcf/mintsrc/main.go.embed— synced frommain.goTests (10 files, ~200 lines):
ROLE_APP_IDSJSON, PEM filenames, app slugs, secret namesTest plan
go test ./...— all unit tests passgo vet ./...— cleangrep -rn '\bcoder\b' internal/ .github/ docs/ e2e/— no remaining references (excludingDecoder/Encoder)fullsend mint deployon a test project after GitHub App renamecodeandfixstage workflows mint tokens successfully🤖 Generated with Claude Code