Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(http): SSE 无 Last-Event-ID/重放——lagged 静默丢弃 + 1h 硬超时强制重连,断线窗口事件永久丢失

Closed
#97 9 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
api, backend

Research direction

Read src/http/handlers.rs around lines 1155, 1301, 1308-1328, and 1338 to trace the per-session broadcast channel, lag handling, and one-hour timeout. Check how SSE requests are parsed and how GET /sessions/:id is exposed before defining the event sequence and bounded replay behavior. Done means SSE events have monotonic IDs, reconnects honor Last-Event-ID, and the since endpoint can replay missed events.

Written by the indexing model from the issue text.

Description

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:depends-on: #117(未终态时 keeper 自动 hold)

基线 HEAD = 9165b9a0。

Summary

  • 每会话 broadcast::channel(64)(src/http/handlers.rs:1155,1301);消费慢于 64 条时 BroadcastStream 的 Lagged 错误被 Err(_) => None 静默丢弃(handlers.rs:1308-1328)——不报错、不重放,直接缺段。
  • 全程无 Last-Event-ID 读取、无事件序号/重放缓冲;连接有 1h 硬超时强制重连(handlers.rs:1338),重连即从订阅时刻开始。
  • C 端弱网/移动端网络切换/代理超时重连是常态:断连窗口内的 PartialMessage/ToolCall/ToolResult/Done 全部丢失,客户端流式状态机无法恢复;最终兜底只有 GET /sessions/:id 的 committed 消息(partial 与工具进度无补偿)。

建议

每会话保留有界事件环形缓冲 + 单调 seq,SSE 事件带 id,支持 Last-Event-ID 头与 GET /sessions/:id/events?since=<seq> 重放。

Dominant language
Rust
Stars
4
Forks
0
Avg merge
5h 32m
Merged PRs (30d)
7

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jeffkit/recursive

All issues in jeffkit/recursive

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.