Repository navigation
fix(chat): count split Unicode bytes exactly - #5845
Conversation
|
@lidge-jun @Wibias Please review the runtime-independent split-surrogate byte differential. This fixes Bun 1.3 undercount while preserving Bun 1.4 exact accounting. @codex review |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Chat collector now calculates the UTF-8 byte adjustment for a surrogate pair split across streamed fragments from the runtime-measured sizes of the joined pair and isolated code units. The test and documentation describe this accounting rule. ChangesChat collector UTF-8 accounting
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The buffered Chat fields measure the split-pair byte cost and release retained charges after an upstream failure. No concrete user-impacting regression is evident. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 |
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62c3464fbc
ℹ️ 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".
리뷰 · 우선순위 47 / 80채팅 답변이 조각으로 들어올 때, 이모지 하나가 두 조각으로 갈라지면 바이트를 실제 글자와 같게 세는 PR이에요. 모을 때마다 앞에서 모은 글자를 통째로 다시 재지 않아요. 새 조각 길이만 더해요. 앞 조각 끝이 이모지 앞쪽이고 새 조각이 뒤쪽이면, 예전에는 무조건 2바이트를 뺐어요. 그 2는 반쪽을 3바이트로 세는 런타임에서만 맞아요. 작성자가 Bun 1.3.14에서 확인했어요. 그 고정 값은 실제보다 적게 세요. 적게 세면 번역 예산이 그만큼 느슨해져요. 이제는 붙은 글자 하나와, 떨어진 반쪽 둘의 길이를 그 자리에서 재요. 그 차이를 더하면, 반쪽을 몇 바이트로 치든 다 모은 글자와 같아져요. 본문, 생각, 거절이 이 함수를 같이 써요. 도중에 실패하면 잡아 둔 바이트는 0으로 돌아와요. 테스트는 이모지 세 칸이 그 런타임의 완성 글자 크기 세 배인지 봐요. 기준 브랜치는 dev예요. 같은 수정으로 열린 다른 PR은 없어요. Go로 된 같은 함수는 검색에서 안 나왔어요. src/claude/outbound.ts:117 - 갈라진 이모지에서 아직 무조건 2를 빼요. 이 PR은 이 줄을 안 고쳐요. 메인테이너의 판단이 필요한 지점 채팅만 고치고 위 세 파일은 나중으로 둘지 정해 주세요. 세 파일도 번역 예산을 같은 방식으로 적게 세요. 작성자가 물은 Go 코드는 이 저장소에서 찾지 못했어요. 없다고 보고 넘어가도 돼요. CI의 test 2/4는 너의 추천 채팅 계산은 맞아요. 합치기 전에 세 파일의 2 빼기를 채팅과 같은 측정으로 바꾸세요. 각 파일의 그 줄만 바꾸면 됩니다. 중복으로 닫을 PR은 없어요. 이 댓글은 grok-bot이 작성했습니다 |
Summary
Verification
CPUQuotaat 75% or lower,MemoryMaxat 1536 MiB or lower, no swap, low I/O weight, and bounded task countsCompatibility
Checklist
Summary by CodeRabbit