Daemon leaves a /rpc connection unanswered when the JSON body root is null
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
Start with src/daemon/server/http-rpc-envelope-validation.ts and the /rpc request body handling described in the issue. Add a test that posts each non-object JSON root, including null, and checks for the 400 JSON-RPC -32600 response with id: null; then confirm unexpected throws still receive a response. Done means no /rpc body leaves its connection waiting unanswered.
由索引模型根据 Issue 内容生成。
描述
Purpose
A POST /rpc body whose JSON root is null is never answered: the connection stays open until the client's own timeout. Any other non-object root is answered correctly, so only this one literal hangs.
Findings
JSON.parse('null') succeeds and yields null, so the envelope check dereferences null.jsonrpc and throws. On main the throw happens inside req.on('end'); inside handleRpcRequest on #3452, which the body reader calls as void handleRpcRequest(...). Neither caller awaits it, so the rejection is dropped and nothing writes a response.
Measured against a live server with a 400 ms client budget, on main @ 5f84627d8 and on #3452's head — identical on both:
| body | result |
|---|---|
null |
no answer within budget, connection held open |
true, 7, "str", {}, [] |
400 -32600 Invalid Request |
Reported from the #3424 review thread on src/daemon/server/http-rpc-envelope-validation.ts. Deliberately not fixed in #3424: that issue's contract is that observable behavior is preserved exactly, and this path has no test of its own.
Required behavior
A null root is refused the way every other non-object root already is: 400, JSON-RPC -32600 Invalid Request, id: null. No connection is left waiting on a request the daemon will not answer.
Completion
- A test posts each non-object JSON root, including
null, and asserts the answer for every one. - No
/rpcbody leaves the connection unanswered: an unexpected throw on any path still gets a response.
- 主要语言
- TypeScript
- 星标
- 4.9k
- 派生
- 328
- 平均合并
- 11 小时 49 分钟
- 30 天内合并 PR
- 585
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
callstack/agent-device#3407 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
callstack/agent-device#3353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
Client stop paths treat EPERM as a confirmed exit and drop state for a live companion可能已有人在做 @thymikee 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 52/100
callstack/agent-device#3540 ·
维护者通常 1 天内回复
-
enhancement needs-triage
难度 5/5 一周以上 新手友好度 35/100
callstack/agent-device#3531 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
affected/v17 affected/v18 area/frontend type/bug
难度 2/5 1-3 小时 新手友好度 82/100
umbraco/Umbraco-CMS#24186 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
better-auth/better-auth#11723 · 1 个 reaction ·
维护者通常 1 天内回复
-
area: docs difficulty: easy documentation good first issue
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden ab可能已有人在做 @KajoVanBuyten 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 69/100
AgentSystemLabs/agent-office#367 ·
维护者通常 1 天内回复