[WRONG BRANCH] fix(cursor): catch EOF terminal budget overflow - #317
[WRONG BRANCH] fix(cursor): catch EOF terminal budget overflow#317luvs01 wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
✅ 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 includes up to 3 reviews per rolling hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe live transport now catches asynchronous frame-drain failures through ChangesLive transport hardening
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change routes EOF terminal-synthesis budget errors into the existing failure path and adds focused regression coverage; no actionable merge-blocking risk remains at the current head. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
push()outside the existing guarded frame-processing path, andpush()can synchronously throwTranslatorBudgetExceededError, which previously produced an unhandled rejection and left the turn unsettled.Description
.then(..., onRejected)tail with a.then(...).catch(...)that callsfailAndClearinsrc/adapters/cursor/live-transport.ts.tests/cursor-hardening.test.tsthat constrains the translator budget, simulates many small assistant text frames followed by a clean EOF, and asserts a typedTranslatorBudgetExceededErroris observed and that budget ownership is released.finalizeTurnEvents()unchanged while ensuring any transport-budget overflows during synthesis settle the turn consistently.Testing
bun run typecheckwhich succeeded.bun test tests/cursor-hardening.test.ts(Bun 1.3.14) and observed the new and existing Cursor tests pass (34 passed, 0 failed).bun run privacy:scanwhich completed successfully, and attempted a fullbun run testbut the repository-wide suite hit unrelated integration timeouts/failures outside the changed area.Codex Task
Summary by CodeRabbit
Bug Fixes
Tests