Description
pipeline.stop waits on pollerWG without consulting its shutdown context. A push or poll source that ignores cancellation can therefore hang SIGTERM indefinitely even though the stop contract promises a bounded timeout error; the current regression uses a fake that returns on cancellation and never tests the stated failure mode.
Acceptance Criteria
- #1 A source that ignores cancellation cannot keep pipeline stop blocked past its context deadline
- #2 Timeout returns and logs an attributable source-shutdown error without closing delivery resources still owned by a live producer
- #3 A regression deliberately holds a source past cancellation and releases it for test cleanup
Definition of Done
- #1 just check
- #2 just gen (if any generated artifact changed) and the diff committed
Implementation Plan
Replace the unconditional poller wait with a context-aware completion channel. On deadline return an attributable source-shutdown error and leave shared delivery resources open while ownership is unresolved; add a cancellation-ignoring fake source regression that is released for cleanup.
Implementation Notes
Implemented at 2389ac3b. A cancellation-ignoring source regression failed before the fix and passes after it; final just check passed.
Final Summary
Fixed at 2389ac3b. Source shutdown now respects its context deadline, returns and logs an attributable error, and leaves delivery resources owned by a live producer open for a later safe stop. Focused race tests and final just check passed.