[codex] Fix missed component release recovery#2095
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR refactors the release-scope script to support dependency-injected Git execution, adds new exported tag/range query helpers, updates internal Git helpers to accept an optional injected runner parameter, and extends tests to validate tag selection and release-scope logic. Workflow concurrency grouping is updated to use commit SHA for reusable workflow invocations. ChangesRelease Infrastructure Refactoring with Dependency Injection
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/release-scope.ts`:
- Around line 82-88: The current blanket catch around the git describe call
swallows all errors; instead catch only the "no matching tag" case and rethrow
everything else. Change the try/catch around the run(['describe', '--tags',
'--match', getComponentTagPattern(component), '--abbrev=0', after]) call so that
in the catch you inspect the error (e.g. error.message or error.stdout/stderr)
for the git "no matching tag" / "No names found" / "fatal: no tag" indicator and
return null only for that specific condition; for any other error rethrow it so
callers (e.g. getReleaseRangeBase) see real failures. Ensure you reference the
same run(...) invocation and getComponentTagPattern(component) when locating the
code to modify.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8dfad7d7-aa0c-45b7-96c0-290a6b76b304
📒 Files selected for processing (3)
.github/workflows/tests.ymlscripts/release-scope.tstests/release-scope.test.ts
|



Summary (AI generated)
main.Motivation (AI generated)
A cancelled CLI release test run could lose the CLI release forever because the next successful main push only inspected its own push range. The Capgo release could still ship and include CLI changes in the generated changelog, but no
cli-*tag or npm publish would happen.Business Impact (AI generated)
This keeps Capgo and CLI releases aligned when both products changed, so CLI fixes do not silently miss npm publication after CI cancellation or later main pushes. It reduces manual release recovery and avoids users waiting for already-merged CLI fixes.
Test Plan (AI generated)
bunx vitest run tests/release-scope.test.tsbunx eslint --no-ignore scripts/release-scope.ts tests/release-scope.test.tsgit diff --checkbun run cli:build && vue-tsc --noEmitSummary by CodeRabbit