Daemon leaves a /rpc connection unanswered when the JSON body root is null
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- backend-api-design, testing-qa
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4.9k
- Forks
- 328
- Merge medio
- 12 h 18 min
- PR fusionados (30 d)
- 561
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstack/agent-device
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
callstack/agent-device#3407 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
callstack/agent-device#3353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
callstack/agent-device#1869 ·
Los mantenedores suelen responder en 1 día
-
CRAP: newly scored platform-apple simulator boot retry and macOS helper file listingPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
callstack/agent-device#3451 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 55/100
callstack/agent-device#3449 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstack/agent-device
Issues similares
-
area:tui enhancement platform:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
anthropics/claude-code#101490 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
netlify/netlify-mcp#75 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
atlassian-labs/compiled#1960 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
pnp/cli-microsoft365#7639 ·
Los mantenedores suelen responder en 2 días
-
nextjs-tracking
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
cloudflare/vinext#3887 ·
Los mantenedores suelen responder en 1 día