Skip to content

fix(router): pass GITHUB_REVIEWER_TOKEN to worker containers#158

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/pass-reviewer-token-to-workers
Feb 12, 2026
Merged

fix(router): pass GITHUB_REVIEWER_TOKEN to worker containers#158
zbigniewsobiecki merged 1 commit intodevfrom
fix/pass-reviewer-token-to-workers

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Add githubReviewerToken to router secrets config so the env var is read on startup
  • Pass GITHUB_REVIEWER_TOKEN to Docker worker containers in buildWorkerEnv()
  • Pass GITHUB_REVIEWER_TOKEN in local Docker runs (tools/run-local.ts)

Root cause: The reviewer identity added in #154 requires GITHUB_REVIEWER_TOKEN in the worker environment. Without it, the review agent falls back to GITHUB_TOKEN, authenticates as the PR author, and GitHub rejects REQUEST_CHANGES with 422 ("can not request changes on your own pull request").

Test plan

  • npm run typecheck — no type errors
  • npm run lint — no new warnings
  • npm test — all 461 tests pass
  • CI passes on this PR
  • Deploy and trigger a review to confirm REQUEST_CHANGES works

🤖 Generated with Claude Code

The review agent's separate reviewer identity (added in #154) requires
GITHUB_REVIEWER_TOKEN in the worker environment. Without it, the agent
falls back to the main GITHUB_TOKEN, authenticates as the PR author,
and GitHub rejects REQUEST_CHANGES with 422 ("can not request changes
on your own pull request").

Add the token to router secrets, worker container env, and local Docker
runs so the reviewer identity works end-to-end.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 1b3cc7e into dev Feb 12, 2026
3 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/pass-reviewer-token-to-workers branch February 12, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant