Abort settled notebook AI turns - #1172
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesPrompt request cleanup
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The change immediately releases settled notebook AI requests without altering successful request behavior, and no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 48a87b5 | Commit Preview URL Branch Preview URL |
Aug 20 2026, 02:19 PM |
Evidence
The local notebook validation flow can fail while staging or validating a candidate. The assistant catches that failure and rolls the notebook back, but the per-prompt AbortController stayed live. The fetch SSE adapter releases its reader without cancelling the response when iteration exits through an error, so the local Codex request, turn, and validation broker could remain active until the five-minute idle timeout.
No open issue or pull request addresses this cleanup. PR #1123 touches the same component only for the Base UI migration and does not modify the request lifecycle.
Change
Always abort the per-prompt controller in the existing finally block after the prompt settles.
Impact
Failed or completed notebook AI requests now release their fetch, local bridge turn, and validation wait immediately instead of relying on the idle timeout.
Validation
Risk
Low. Abort is idempotent and runs only after success, failure, or user cancellation has already settled. Successful streams are already complete at that point.
Summary by CodeRabbit