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

feat(http): 会话流契约升级——领域游标 + 快照+gap-free follow + 有界上行(#97 的机制补全,借 DSH gateway)

Open
#132 0 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
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by reading #97, which this issue depends on, then compare the cited DSH references: gateway/README.md, gateway/src/stream-server.ts, gateway/src/client/remote-stream.ts, and session-controller/src/history.ts. The issue does not name Recursive entry points or tests, so first locate its session-stream and workspace-file APIs. Done means reconnect restores state with snapshot plus gap-free events, slow consumers get an explicit error, and oversized or out-of-workspace file reads fail.

Written by the indexing model from the issue text.

Description

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:depends-on: #97 · 来源:DSH api/gateway 包借鉴(jeffkit 拍板跟进)

基线 HEAD = 4e1aee98。

Summary

与 #97 互补:#97 修的是"lagged 静默丢弃 + 1h 硬超时断裂"的既成缺陷;本单是把会话流契约层升到 DSH gateway 的水准(#97 落地后本单的游标/快照语义才是完整形态,故 depends-on)。

参照 DSH packages/api/:

  • 单 WS 多路复用 + 每流有界上行:所有逻辑流走一个 mux;每流自带 Client→Host uplink,Host 侧上行按字节封顶(默认 256KiB),超限以 gateway/uplink-overflow 失败该逻辑流而不关 socket(gateway/README.md:35,88;gateway/src/stream-server.ts:303-396);心跳即 Pong 期限。
  • 重连层不推断重放、领域自带游标:连接层只做物理重连(jitter 指数退避),换 generation 后由领域校验打开基线(gateway/src/client/remote-stream.ts:39-140);journal-stream 帧型 opened(cursor,page)/entry/replace/prepend(client/journal-stream.ts:16-45)。
  • 历史回溯 = 快照 + 无缝隙增量:page 按消息对齐翻页(beforeSeq/throughSeq);follow 先给调用方游标处的完整快照,再给 gap-free 持久事件(session-controller/src/history.ts:38,77-140)——recursive 现状是全无此语义(#97)。
  • 只读工作区文件服务:行页/字节窗读取,页携带文件 version(可判过期)、超大文件报错而非截断、拒绝末端符号链接、目录列举强制工作区包含、零变更操作(api/workspace-files/README.md)。

建议

  1. 事件流引入持久序号/游标;重连语义 = 快照@游标 + gap-free 增量(替代重连即丢);
  2. 慢消费者有界缓冲 + 明确错误(不再静默丢段);
  3. 有界上行(为未来双向流/多路复用铺路,先定契约不必立刻做 mux);
  4. 只读工作区文件 API(version 判过期、超大报错、符号链接防护、零变更)。

验收

  • 断网重连后客户端状态无损恢复(快照+增量无缝隙,对照测试);
  • 慢消费者触发明确错误而非缺段;缓冲上限可配;
  • 只读文件服务读不出工作区外路径;过大文件返回错误而非截断。
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.