Skip to content

fix: recover streaming responses after network interruption#388

Merged
imDarshanGK merged 5 commits into
imDarshanGK:mainfrom
Praneeth2711:fix/streaming-recovery-243
Jun 14, 2026
Merged

fix: recover streaming responses after network interruption#388
imDarshanGK merged 5 commits into
imDarshanGK:mainfrom
Praneeth2711:fix/streaming-recovery-243

Conversation

@Praneeth2711

Copy link
Copy Markdown
Contributor

Summary

Fixes Issue #243 by making streaming responses resilient to temporary network interruptions.

Changes

  • Added support for resume_offset in chat requests.
  • Implemented background stream buffering to allow reconnecting clients to continue receiving the same response.
  • Added automatic frontend retry logic (up to 3 attempts).
  • Preserved partial assistant responses instead of replacing them with connection errors.
  • Added TTL cleanup for completed and abandoned stream buffers.
  • Added protection against duplicate user messages during reconnects.
  • Added SQLite fallback for completed streams.

Testing

  • Added regression tests covering:

    • Normal stream completion
    • Client disconnect during generation
    • Reconnect during active generation
    • Reconnect after generation completion
    • TTL cleanup behavior

Verification

  • Backend tests passed.
  • Frontend tests passed.
  • Frontend production build completed successfully.

Closes #243.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

@Praneeth2711 is attempting to deploy a commit to the Darshan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@imDarshanGK

Copy link
Copy Markdown
Owner

@Praneeth2711 resolve conflicts

@Praneeth2711

Copy link
Copy Markdown
Contributor Author

Resolved merge conflicts with upstream/main, fixed all Ruff lint issues, and pushed the updates.

Verification:

  • Backend tests passing
  • Frontend build passing
  • Frontend CI passing
  • Security scan passing
  • Streaming recovery functionality preserved
  • Benchmark reporting preserved

The branch is ready for review and merge.

@imDarshanGK imDarshanGK added SSoC26 Part of Social Summer of Code 2026 Hard Larger or more advanced changes labels Jun 14, 2026
@imDarshanGK imDarshanGK merged commit 752c6f6 into imDarshanGK:main Jun 14, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hard Larger or more advanced changes SSoC26 Part of Social Summer of Code 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: streaming response should recover after network interruption

2 participants