Repository navigation
fix(opencode-go): bound replayed tool promotion - #5235
Conversation
|
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; 8 remain after this review. 📝 WalkthroughWalkthroughThe request path now passes replay-prefix length to additional-tool normalization. Historical ChangesReplay-aware additional-tool normalization
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant buildRequest
participant PassthroughAdapter
participant ToolNormalizer
buildRequest->>PassthroughAdapter: Pass _replayPrefixLen
PassthroughAdapter->>ToolNormalizer: Pass replayPrefixLength
ToolNormalizer-->>PassthroughAdapter: Remove history wrappers
ToolNormalizer-->>PassthroughAdapter: Promote current-turn tools
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
리뷰 · 우선순위 68 / 80이 PR은 OpenCode Go로 Responses를 보낼 때, 이어하기(continuation) 히스토리에 남아 있던 베이스는 라인 - tests/providers/opencode-go-grok46-responses.test.ts:206 - 회귀는 “히스토리 포장만 있고, 이번 턴 포장은 없음”만 봅니다. 앞쪽(히스토리) 포장은 버리고, 뒤쪽(이번 턴) 포장은 올려야 하는 섞인 입력은 테스트가 없습니다. 함수 경계( 라인 - src/adapters/opencode-go-additional-tools.ts:36 - 히스토리 포장은 목록을 올리지 않고 삭제만 합니다. 이어하기가 필요한 도구를 이미 맨 위 메인테이너의 판단이 필요한 지점 히스토리에만 있던 너의 추천 방향은 맞습니다. 범위가 작고, 이 댓글은 grok-bot이 작성했습니다 |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Ingwannu
left a comment
There was a problem hiding this comment.
Approved on exact head 609aef3f72428fcb0a2def11105fb7539866b96c. The replay-prefix boundary removes historical additional_tools wrappers without treating history as current tool authority, while wrappers appended in the current turn remain eligible for promotion. Current dev is the PR base, there are no unresolved review threads, and exact-head Cross-platform CI plus the latest React Doctor run are green. A mixed historical/current-wrapper regression would still be useful follow-up coverage, but the current implementation is bounded and mergeable.
Summary
additional_toolspromotion in the OpenCode Go Responses path.normalizeOpenCodeGoAdditionalToolspromoted everyadditional_toolsinput wrapper, including wrappers replayed from continuation history, so stale catalogs were re-declared as if user-supplied for the current turn. The function now takes the replayed-input prefix length and removes historical wrappers without promoting their catalogs;passthrough.tspasses the already-parsed_replayPrefixLenthrough.Verification
bun test tests/providers/opencode-go-grok46-responses.test.ts— 39 pass, 0 fail (includes a new regression test covering a replayed wrapper before the current-turn boundary).bun x tsc --noEmit— clean.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit