fix(cli): surface commit-message generation errors - #13108
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (6 files)
Incremental review since Fix these issues in Kilo Cloud Previous Review Summaries (2 snapshots, latest commit 1ecee38)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1ecee38)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (7 files)
Incremental review since Fix these issues in Kilo Cloud Previous review (commit 11f43cd)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (6 files)
The change is small, well-scoped, and follows the existing Reviewed by kimi-k3 · Input: 89K · Output: 3.1K · Cached: 224.3K Review guidance: REVIEW.md from base branch |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11f43cd60b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
35629cf to
1ecee38
Compare
Map generation failures to a typed 422 so the SCM toast shows the real timeout or provider error instead of a generic check-server-logs 500.
1ecee38 to
a57045c
Compare
… cookie sync (#13608)
Map generation failures to a typed 422 so the SCM toast shows the real timeout or provider error instead of a generic check-server-logs 500.
Issue
N/A — surfaces real commit-message generation errors instead of masking them behind generic 500s.
Context
The SCM generate-commit-message button often fails with
Unexpected server error. Check server logs for details.Timeouts, provider errors, and auth failures all die as untyped defects and get masked as HTTP 500. The backend already knows the real reason; the toast does not.This change maps those generation
Errors to a typed 422 so the existing VS Code client shows the real message. It does not raise the 30s timeout or make slow small models finish.Implementation
Follows the same pattern as the no-changes 422 from #12033.
POST /commit-messagenow declaresCommitMessageFailedErrorand the handler translates any remainingErrordefect (afterNoChangesError) into that typed failure.The extension already displays
getErrorMessage(error), so no VS Code package change is required. JetBrains and TUI do not call this endpoint.Screenshots / Video
N/A — toast copy only, no visual layout change.
How to Test
Manual/local verification
bun run test commit-message-no-changes.test.tsfrompackages/opencode(2 pass)bun turbo typecheck(30 packages passed)./script/generate.tsexecuted cleanly from repository rootPOST /commit-message:UnknownError/Check server logs for details{ "message": "Commit message generation timed out after 30 seconds" }or{ "message": "Failed to generate commit message: provider rate limited" }Reviewer test steps
Check server logs for details.No changes found to generate a commit message for.Blocked checks and substitute verification
Checklist
Get in Touch