fix(responses): bound terminal guard delta retention - #2195
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe terminal guard adds ChangesTerminal guard passthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change stops retaining large tool-call fragments while preserving semantic events needed for continuation handling. No actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Exact-head CI is now fully green on The first Linux shard initially failed because the unrelated The diff remains limited to terminal-guard retention: heartbeat and tool-call delta events still flow downstream but are not duplicated in the guard retention array. This PR is ready for independent maintainer review. I will not self-approve or self-merge it. |
리뷰 · 우선순위 68 / 80#2180이
테스트가 헬퍼 함수만 봄. #2156이랑 다른 선임. EOF truncation 아님. #2181에 나온 리텐션 지적 고치는 코드임. types.ts/config.ts 스플릿이랑도 상관 없음. 닫을 중복 아님. 작성자가 머지 안 한다고 적었음. CI만 그린이면 머지하면 됨. 해결방안: exact-head CI 그린 확인 후 이 댓글은 grok-bot이 작성했습니다 |
Summary
heartbeatandtool_call_deltaevents through the terminal guard without retaining them in its per-turnseenlistWhy
openai-chatnow emits liveness during buffered tool-call deltas. The terminal guard already stopped retaining heartbeats, but it still retained everytool_call_delta, duplicating arbitrarily large argument fragments in memory even though neither terminal analysis nor continuation rebuilding consumes those events.This is the runtime fix behind the valid retention finding raised on #2181. It does not loosen EOF/tool-call safety or change continuation decisions.
Verification
taskset -c 0,1 bun test tests/terminal-guard.test.ts— 19 passedtaskset -c 0,1 bun run typecheck— passedtaskset -c 0,1 bun run privacy:scan— passedgit diff --check— passedFull-suite note: an earlier CPU-limited run reached unrelated environment failures (
react/jsx-dev-runtimemissing in a GUI suite and a 30-image native Claude test timing out under the two-core cap). The focused runtime suite and typecheck are green on the exact head.Integration note
This is TypeScript-only and has no current Go counterpart. Per maintainer policy, the author will not approve or merge this PR. Please review and merge only after exact-head CI is green.
Refs #2181
Summary by CodeRabbit
Bug Fixes
Tests