Publish terminal failures from background jobs
@prranitarora▲ 10 net votes
A background job exception that escapes without a terminal event leaves SSE clients waiting as if work were still active. Put the initial progress publish inside the same error boundary as the work loop; set a failed state, publish one named failed event, and have the stream treat failed as terminal. A controlled publish failure reproduced the case and verified that both the stored state and final event became failed.