Conversation
…sonl Co-Authored-By: Epinephrine <luvs01@hanmail.net>
|
✅ Deterministic PR hygiene checks passed. |
|
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: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe Grok preflight 429 path now binds usage reported on the error event before returning the refusal. Tests cover streaming and buffered requests, including final usage entries in ChangesPreflight Usage Capture
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Reported preflight usage is retained for logging and spend settlement. No unresolved issue identified here prevents merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change records metered usage that was previously lost when a provider refused a request before output. Review found no new public access path or verified security regression. Accounting behavior during retries and in configurations outside the tested path remains less certain. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)
✨ 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 |
리뷰 · 우선순위 34 / 80Grok가 Devin에게 답을 받기 전에 429(요청이 너무 많음)가 나면, 그 에러 안에 이미 쓴 토큰 수가 들어 있을 수 있다. 지금은 거절 응답을 만들면서 그 숫자를 버린다. 사용량 기록에 안 남는다. 이 PR은 거절을 돌려주기 직전에 그 숫자를 기록장에 붙인다. 붙이는 함수는 tests/responses/responses-grok-devin-preflight.test.ts - dev와 이 브랜치가 같은 자리(기존 "pre-output 429 reaches Grok as HTTP 429" 다음)에 서로 다른 테스트를 넣었다. GitHub 머지 상태는 dirty다. tests/responses/responses-grok-devin-preflight.test.ts:117 - 테스트 이름은 "usage.jsonl에 오래 가는 지출을 정산한다"이다. 하는 일은 src/server/responses/run-turn-execution.ts:522 - 토큰이 없는 429에도 메인테이너의 판단이 필요한 지점 dev 위로 다시 얹은 뒤 테스트 충돌만 손으로 풀면 된다. 쿨다운 테스트와 사용량 테스트를 둘 다 남길지 정하면 된다. 두 번째 테스트를 이름대로 지출( 너의 추천 리베이스해서 두 테스트 묶음을 같이 둬라. 본 수정 한 줄은 맞다. 토큰이 있을 때만 이 댓글은 grok-bot이 작성했습니다 |
|
Hold on exact head 3f9ebcf: the one-line usage-binding fix is sound on static review, but the branch is currently merge-conflicted, 35 commits behind, and has no executable exact-head validation. During rebase, preserve both the base cooldown/account-rotation regressions and this PR's usage cases. Also either narrow the test and body claim that durable spend is settled or exercise a real send-budget reservation and assert the durable ledger or settled total; current mocks prove usage-log binding, not ledger settlement. Note: the test does receive a spendTracker indirectly through handleResponses to createInferenceSendBudget to attachRequestSpendTracker; absence of a tracker is not the issue. |
|
Author follow-up |
|
Landed on |
Carried from lidge-jun#6035 into merge train round 3. Co-authored-by: Epinephrine <luvs01@hanmail.net>
Summary
064170078c749519645a617309ea1a8942b7e040integrates observed dev99d0a9400ebd8dedbefee9882698ecfb1f7bbaa7. Resolve the preflight test-file conflicts by retaining both this PR's usage assertions and dev's heartbeat/timeout/account-change tests. Runtime changes merged without conflict. Existing commit history is preserved.Verification
Exact integration-head native Bun 1.4.0 Linux validation:
https://github.com/luvs01/opencodex/actions/runs/36295622182/job/108553981795
Passed
tests/responses/responses-grok-devin-preflight.test.ts, project typecheck, privacy scan, structure check, file-size checks, test-layout checks and clean-tree validation. Both parents were verified as ancestors. The resulting diff against the incoming base remains limited to the one runtime binding statement, the owning spend contract and the focused preflight tests.The test description/comment now explicitly limits the durable evidence to the usage journal rather than claiming API-key budget settlement. No full-repository or cross-platform acceptance is claimed. The helper workflow is outside this PR's tree and ancestry. Required latest-head PR CI and independent maintainer review remain separate. No merge into dev, force push or review dismissal was performed.
Checklist
Summary by CodeRabbit