-
Notifications
You must be signed in to change notification settings - Fork 3
fix: Add API key fallback for Claude Code review workflow #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add support for ANTHROPIC_API_KEY as fallback authentication method in Claude Code review workflow to handle OAuth token expiration/revocation. This fixes the CI failure where CLAUDE_CODE_OAUTH_TOKEN was missing or expired: - OAuth token preferred (for Pro/Max users) - API key as fallback (for API key users) - Action will use whichever is available Related: PR #452 CI failure Issue: OAuth tokens expired in October 2025 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🚀 Development Environment OptionsThis repository supports Dev Containers for a consistent development environment. Option 1: GitHub Codespaces (Recommended)Create a cloud-based development environment:
Option 2: VS Code Dev Containers (Local)Use Dev Containers on your local machine:
Option 3: Traditional Local SetupSet up the development environment manually: # Clone the repository
git clone https://github.com/manavgup/rag_modulo.git
cd rag_modulo
git checkout claude/review-pr-452-011CUNhu6zJeqqJWY8sRP9ZJ
# Initialize development environment
make dev-init
make dev-build
make dev-up
make dev-validateAvailable CommandsOnce in your development environment: make help # Show all available commands
make dev-validate # Validate environment setup
make test-atomic # Run atomic tests
make test-unit # Run unit tests
make lint # Run lintingServices AvailableWhen running
This automated message helps reviewers quickly set up the development environment. |
Pull Request Review: Add API Key Fallback for Claude Code Review WorkflowOverviewThis PR adds ✅ Positive Aspects1. Resilience & Availability
2. Minimal & Focused Change
3. Documentation
|
| Aspect | Rating | Notes |
|---|---|---|
| Code Quality | ✅ Excellent | Clean, minimal change |
| Best Practices | Missing documentation updates | |
| Security | ✅ Good | Existing secret scanning covers new secret type |
| Testing | No evidence of fallback testing | |
| Consistency | claude.yml should have same pattern |
|
| Documentation | Missing doc updates |
🎯 Summary & Action Items
Required Before Merge ✋
- Test the fallback behavior (see Testing & Validation section)
- Update
claude.ymlwith same API key fallback for consistency - Update documentation (at minimum:
docs/development/ai-assisted-workflow.md)
Recommended (Can be separate PR) 💡
- Add troubleshooting guide for Claude Code authentication
- Consider adding workflow dispatch for manual testing
- Add example
.env.exampleentry:ANTHROPIC_API_KEY=sk-ant-api...placeholder
Low Priority 🔖
- Monitor OAuth token expiration patterns to determine renewal cadence
- Consider adding workflow status badge to README showing Claude review status
📊 Risk Assessment
| Risk | Severity | Mitigation |
|---|---|---|
| Secret exposure | Low | ✅ Covered by existing secret scanning |
| Authentication failure | Medium | |
| Inconsistent behavior | Low | claude.yml |
| Documentation gap | Low |
🚀 Verdict
Conditional Approval
The core implementation is sound and addresses the immediate OAuth token expiration issue. However, testing validation and documentation updates are needed before merging to ensure reliability and maintainability.
Estimated effort to address: ~20-30 minutes (testing + doc updates)
Generated by Claude Code Review
Following repository guidelines from CLAUDE.md
Add support for ANTHROPIC_API_KEY as fallback authentication method in Claude Code review workflow to handle OAuth token expiration/revocation.
This fixes the CI failure where CLAUDE_CODE_OAUTH_TOKEN was missing or expired:
Related: PR #452 CI failure
Issue: OAuth tokens expired in October 2025
🤖 Generated with Claude Code