fix(ci): repair invalid LLM JSON escapes in issue translation - #510
Conversation
gpt-4o-mini emits JS-style \' inside JSON strings; that made Parse AI response fail closed and skip Apply on long non-English issues.
|
Warning Review limit reached
Next review available in: 26 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR adds malformed-JSON escape recovery, comment-specific translation decisions and rendering, and a workflow job for translating eligible issue comments. It also adds parser, helper, workflow, and end-to-end regression tests. ChangesTranslation and comment workflow
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant IssueCommentEvent
participant TranslateCommentJob
participant parseAiResponse
participant CommentAPI
participant ControlState
IssueCommentEvent->>TranslateCommentJob: start for created or edited comment
TranslateCommentJob->>TranslateCommentJob: evaluate comment eligibility
TranslateCommentJob->>parseAiResponse: parse AI translation response
TranslateCommentJob->>CommentAPI: verify prepared source and update comment
TranslateCommentJob->>ControlState: persist translation control state
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Edit comments in place with the same details block as issues, reuse the escape-repairing parser, and lock issue+comment apply gates with regression tests.
Only drop JS-style \'; keep paths/regex/code escapes; cover fenced+invalid-escape parse path.
Only mark sourceHash complete after valid no-translation or successful apply; keep invalid/empty/update failures retryable after cooldown. Gate comment min length on body alone.
Store completed hashes per issue/comment source key, share the per-issue concurrency queue, validate \\u escapes, and harden comment-path contract tests.
Only boolean false completes no-translation; invalid requires_translation stays retryable. Require translated title/body when source fields are nonempty before mutating issues or comments.
…valid-json-escapes fix(ci): repair invalid LLM JSON escapes in issue translation
Summary
\') that made issue translation skip Apply (run 30208536337).issue_commentcreated/edited, translate non-English user comments in place with the same<details>Translated Message</details>block.requires_translation=false.Test plan
node --test .github/scripts/issue-translation.test.cjsnode --test .github/scripts/parse-issue-translation-response.test.cjsbun test ./tests/ci-workflows.test.tsmain(default branch for issue workflows): re-run / comment on [Bug][Kiro] 429 throttling이 Retry-After 없이 전달되어 Codex turn이 즉시 사망 (Claude Code는 재시도로 흡수) #507 and confirm title/body + Korean comment get translation blocksSummary by CodeRabbit
\') without corrupting other backslashes.