feat: add GitHub App coder authentication - #64
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
OpenTag's coder previously placed a PAT in the Daytona environment and delegated cloning, pushing, and PR creation to sandbox commands. That could not support GitHub Apps safely, kept credentials inside the sandbox, and split one logical publish across uncoordinated writes.
Live Slack testing also exposed a nested-interrupt edge: LangGraph can replay the coder task while resuming
confirm_write. The audit then found two adjacent risks: the sandbox key preferred a changing AG-UI run ID, and a successful PR publication could be repeated if its tool result replayed.How
/user; App auth validates an RSA PEM at startup, signs short-lived JWTs, serializes installation-token refresh, refreshes within five minutes of expiry, and resolves the bot noreply identityprepare_repositoryverifies explicit targets and open PR heads, creates/configures the local branch, and safely reuses preparation only for the exact same requestpublish_changesbinds approval to the exact publish payload, pushes once, caches successful publication, and safely reconciles a lost create response only when the open draft exactly matches the approved repo, refs, commit, title, and bodyreadOnlyHintValidation
pnpm check-typespnpm test— 231 tests passed(cd agent && uv run pytest)— 180 tests passednode node_modules/railway/dist/iac/bin.jspnpm --dir deployment/aws buildandpnpm --dir deployment/aws test— 11 tests passed@kite-devprepared the requested README change, resumed the approval, pushed ascopilotkit-devops-bot[bot], and opened draft PR CopilotKit/CopilotKit#6541