flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[test] Cover SSE backpressure and slow clients

Open K1NGD4VID opened this issue 1 month ago • 11 comments

Labels: testing, backend, points: 150 File/location: backend/src/services/sse.service.ts

Description: Slow consumers, queue limits, and dropped-client cleanup lack service tests.

Acceptance Criteria:

  • [ ] Add deterministic tests for the documented success and failure paths, including boundary inputs and dependency failures.
  • [ ] Run the new tests in the corresponding CI suite and assert the public behavior and error contract.

Notes: This is a focused regression gap for the cited module; it was not covered by the existing test files reviewed during the sweep.

K1NGD4VID avatar Oct 22 '26 04:10 K1NGD4VID

Hey @LabsCrypt team,

I reviewed the issue for Cover SSE backpressure and slow clients. We need to resolve 'cover sse backpressure and slow clients' cleanly across the target modules.

Proposed Implementation:

  1. Trace the current code execution path to isolate the behavior boundary.
  2. Implement a focused, modular fix for 'Cover SSE backpressure and slow clients' adhering strictly to repository architecture.
  3. Ensure defensive guards and backward compatibility are maintained.

Testing & Verification: I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.

Happy to handle this cleanly. Please assign it over and I'll put together the PR.

maxx-GENIUS avatar Nov 03 '26 13:11 maxx-GENIUS

@Onuello has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hi maintainer, I can get this issue fixed quickly. Please assign it to me, thank you.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Onuello to this issue.

Onuello avatar Nov 21 '26 12:11 Onuello

@Sajjadd-dev has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hi Maintainer, I'm excited to contribute to this task and can deliver a clean, maintainable implementation within a reasonable timeframe.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Sajjadd-dev to this issue.

Sajjadd-dev avatar Nov 21 '26 12:11 Sajjadd-dev

@nobodieair has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

I can fix this

ℹ️ Repo Maintainers: To accept this application, review their application or assign @nobodieair to this issue.

nobodieair avatar Nov 21 '26 12:11 nobodieair

@Peaostrel has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

i can handle this quickly

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Peaostrel to this issue.

Peaostrel avatar Nov 21 '26 12:11 Peaostrel

@mallison031 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hi maintainer, I can get this issue fixed quickly. Please assign it to me

ℹ️ Repo Maintainers: To accept this application, review their application or assign @mallison031 to this issue.

mallison031 avatar Nov 21 '26 12:11 mallison031

@phatloi0010 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

I am ready to implement the comprehensive test suite covering SSE backpressure, queue limits, and dropped-client cleanup in backend/src/services/sse.service.ts immediately.

Technical approach:

  1. Deterministic SSE Test Harness: Instantiate mock SSE response streams with controlled backpressure flags, slow socket drain events, and simulated network pauses.
  2. Queue Limits & Slow Consumer Eviction: Test bounded buffer thresholds; assert that slow or unresponsive consumers trigger graceful disconnection and buffer flushing without memory leaks.
  3. Cleanup & Resource Lifecycle: Validate that unsubscription, client abort signals, and socket error events trigger complete cleanup of heartbeat timers and event listeners.
  4. CI Test Suite: Run the test suite under Jest/Vitest, ensuring 100% deterministic assertion of public contracts and error handling without flaky timeouts.

I can begin implementation right now and submit a clean, well-tested PR promptly.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @phatloi0010 to this issue.

phatloi0010 avatar Nov 21 '26 12:11 phatloi0010

@worldlightonline1 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

I would love to take this, trust me with this, i will take on this

ℹ️ Repo Maintainers: To accept this application, review their application or assign @worldlightonline1 to this issue.

worldlightonline1 avatar Nov 21 '26 12:11 worldlightonline1

@thatslinx has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hello maintainer i have reviewed this issue and i would love to work on it, thank you

ℹ️ Repo Maintainers: To accept this application, review their application or assign @thatslinx to this issue.

thatslinx avatar Nov 21 '26 12:11 thatslinx

Congratulations, @mallison031! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @mallison031: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Nov 21 '26 12:11 drips-wave[bot]

This issue has been completed by @mallison031 as part of the Stellar Wave Program's 11th Wave 🥳

😎 @mallison031: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Nov 21 '26 16:11 drips-wave[bot]