@homespunapps/cli 1.6.55 → 1.6.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/work.js +24 -0
- package/package.json +2 -2
package/dist/commands/work.js
CHANGED
|
@@ -273,6 +273,30 @@ function runChild(exec, stdin) {
|
|
|
273
273
|
resolve({ code: 127, stdout, stderr: stderr + String(err) });
|
|
274
274
|
});
|
|
275
275
|
child.on("close", (code) => resolve({ code, stdout, stderr }));
|
|
276
|
+
// The envelope write races the child's exit, and losing that race used to
|
|
277
|
+
// kill the WORKER, not the task.
|
|
278
|
+
//
|
|
279
|
+
// A broken pipe surfaces on the STREAM, and an unhandled stream "error"
|
|
280
|
+
// event is fatal to the process. `child.on("error")` above does not cover
|
|
281
|
+
// it: that fires for a failed SPAWN, which with `shell: true` almost never
|
|
282
|
+
// happens because the shell itself starts fine. So a child that exits
|
|
283
|
+
// before reading stdin (a typo in `--exec`, where the shell prints
|
|
284
|
+
// "not found" and exits 127; or any script that simply does not read)
|
|
285
|
+
// raised an uncaught EPIPE and took down every other task the worker held.
|
|
286
|
+
//
|
|
287
|
+
// Measured 2026-08-09: it is the race, not the payload. A 500-byte write to
|
|
288
|
+
// a child running `exit 0` crashed a Node 24 process every time, and an
|
|
289
|
+
// agent-task envelope is comfortably larger than that. It reached CI as an
|
|
290
|
+
// intermittent "write EPIPE" in this file's own tests (issue #1616) while
|
|
291
|
+
// every assertion passed, which is why it read as flake rather than as the
|
|
292
|
+
// bug it is.
|
|
293
|
+
//
|
|
294
|
+
// Swallowed rather than reported, because it is a SYMPTOM and the real
|
|
295
|
+
// outcome is already on its way: the child's exit code and stderr arrive on
|
|
296
|
+
// "close" and decide ack versus nack. Reporting here as well would nack
|
|
297
|
+
// twice for one failure. This mirrors `report`'s own rule a few lines
|
|
298
|
+
// below, that one task's trouble must never cost the worker the others.
|
|
299
|
+
child.stdin.on("error", () => { });
|
|
276
300
|
child.stdin.write(stdin);
|
|
277
301
|
child.stdin.end();
|
|
278
302
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homespunapps/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.57",
|
|
4
4
|
"description": "Command-line client for the Homespun relay: deploy a real multi-user web app from your agent, then keep reading and writing its data.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test:unit": "vitest run"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@homespunapps/core": "^1.6.
|
|
39
|
+
"@homespunapps/core": "^1.6.57",
|
|
40
40
|
"qrcode-terminal": "^0.12.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|