fix: fall back to ccr code when claude CLI is unavailable #12027
fix: fall back to ccr code when claude CLI is unavailable #120270xApotheosis wants to merge 1 commit intodevelopfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/release.ts`:
- Line 242: The spawn invocation in generateReleaseSummary passes an invalid
Claude CLI flag '--no-conversation' which causes the Claude process to fail;
remove '--no-conversation' from the arguments (or replace it with the supported
'--no-session-persistence' if the goal is to avoid saving the session) in the
spawn call that creates the child process (the line using spawn('claude', ['-p',
'--model', 'opus', '--max-turns', '1', ...])) so the Claude CLI runs with only
valid flags.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
scripts/release.ts
132b4af to
c6f263b
Compare
f940848 to
d087d89
Compare
When the claude CLI isn't authenticated (e.g. user has no Claude subscription and uses an API key via claude-code-router), the release script now falls back to `ccr code` for summary generation. - Refactor spawn logic into shared `spawnClaude` helper - Check if `ccr` is on PATH and prefer it when available - Improve error output to capture both stdout and stderr Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d087d89 to
407c115
Compare
Description
tl;dr: for people like me who use Claude Code via Claude Code Router
When the
claudeCLI isn't authenticated (e.g. user has no Claude subscription and uses an API key viaclaude-code-router), the release script's summary generation fails silently and falls back to the raw commit list.This PR adds
ccr codeas a fallback for summary generation:spawnClaudehelperccris on PATH and prefers it when availableclaudeCLI ifccris unavailable or failsIssue (if applicable)
N/A
Risk
Zero risk. This only affects how Claude is invoked during release summary generation - no on-chain transactions, wallets, or protocol interactions are affected.
Testing
Engineering
Run the release script with and without a Claude subscription:
ccrinstalled: should useccr codefor summary generationccr: should useclaudeCLI directly as beforeOperations
Not user-facing - internal tooling change only.
Screenshots (if applicable)
N/A