Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Close job event streams on exit src/comfy_low/transport.py, src/comfy_sdk/jobs.py, tests/test_event_stream_cleanup.py, CHANGELOG.md |
The low-level event methods declare generator return types. The synchronous and asynchronous Job.events methods close their iterators when iteration exits. Tests cover terminal completion, explicit closure, and asynchronous cancellation. The changelog records the cleanup behavior. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: wei-hai, mattmillerai
Merge Risk: 
Minimal · up to 2c75e
-
No actionable issue remains in the supplied evidence; the change is mergeable after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 3 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Exhausting a job event iterator at a terminal frame, or explicitly closing it, does not currently close the low-level SSE generator it owns. That generator holds the HTTP response context across yields, so resource release can depend on generator finalization.
Close each owned stream with
closing/aclosinginside the existing per-connection error handling. Preserve polling fallback and reconnection behavior, and accurately annotate the low-level generator return types. This covers terminal exhaustion and explicit iterator closure; it does not promise automatic cleanup for an arbitrary barebreakwhile the caller retains the iterator.Validation on Python 3.12.11 / macOS arm64:
mypy srcpass. The public-repo hygiene check passes with the new test tracked.No live gateway or GPU was used. The cancellation case is a general control, not proof of cancellation during an active SSE read.
Summary by CodeRabbit