@vzn/vx 0.0.340 → 0.0.341
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.341",
|
|
4
4
|
"description": "A fast, correct task runner and build cache for JavaScript monorepos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@vzn/vx-linux-x64": "0.0.
|
|
25
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
26
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
27
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
24
|
+
"@vzn/vx-linux-x64": "0.0.341",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.341",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.341",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.341"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/exec/executor.ts
CHANGED
|
@@ -143,10 +143,10 @@ export interface ExecuteRequest {
|
|
|
143
143
|
* Aborted when the run stops (Ctrl-C, SIGTERM, SIGHUP or an embedder's
|
|
144
144
|
* `RunOptions.signal`) or when `timeoutMs` elapses. An executor ends its
|
|
145
145
|
* work and returns: a child an executor spawned is not one core can
|
|
146
|
-
* reach (H-10, H-12).
|
|
147
|
-
*
|
|
148
|
-
* 2 s) after the abort, then
|
|
149
|
-
* abandons it (H-14).
|
|
146
|
+
* reach (H-10, H-12). One already aborted is work not to start (B-55).
|
|
147
|
+
* A non-zero exit after the timeout's abort is recorded `timedOut`. Core
|
|
148
|
+
* waits the kill grace (`VX_KILL_GRACE_MS`, 2 s) after the abort, then
|
|
149
|
+
* settles the attempt without `execute` and abandons it (H-14).
|
|
150
150
|
*/
|
|
151
151
|
readonly signal?: AbortSignal
|
|
152
152
|
/** See `RunOptions.liveChildren`: the run's SIGINT/SIGTERM registry. */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// plugin claims the task, so it sits at the TAIL of every executor list
|
|
5
5
|
// (owner, 2026-09-05). An executor plugin places work ELSEWHERE; its
|
|
6
6
|
// absence is "here".
|
|
7
|
-
import { runCommand } from './runner.js'
|
|
7
|
+
import { runCommand, signalExitCode } from './runner.js'
|
|
8
8
|
import { runSandboxed } from './sandbox-runtime.js'
|
|
9
9
|
import type { TaskExecutor } from './executor.js'
|
|
10
10
|
|
|
@@ -24,6 +24,16 @@ export function localExecutor(): TaskExecutor {
|
|
|
24
24
|
const executor: TaskExecutor = {
|
|
25
25
|
name: 'local',
|
|
26
26
|
async execute(req) {
|
|
27
|
+
// A stop that landed before the spawn (during the output clean, the
|
|
28
|
+
// request's build) leaves nothing to kill yet: a command spawned now
|
|
29
|
+
// runs after the teardown swept the run's children, and held the run
|
|
30
|
+
// to the signal's bound.
|
|
31
|
+
if (req.signal?.aborted === true) {
|
|
32
|
+
const reason: unknown = req.signal.reason
|
|
33
|
+
const signal = reason === 'SIGINT' || reason === 'SIGHUP' ? reason : 'SIGTERM'
|
|
34
|
+
const exitCode = signalExitCode(signal)
|
|
35
|
+
return { exitCode, durationMs: 0, stdout: '', stderr: '', signal, violations: [] }
|
|
36
|
+
}
|
|
27
37
|
const common = {
|
|
28
38
|
command: req.command,
|
|
29
39
|
cwd: req.cwd,
|
package/src/orchestrator/run.ts
CHANGED
|
@@ -908,7 +908,7 @@ async function runOnBus(
|
|
|
908
908
|
// change the run's exit code — the run already happened.
|
|
909
909
|
// Written again after the keep-alive wait: a kept server's crash or a
|
|
910
910
|
// Ctrl-C there is the process's exit, and the first write said ok.
|
|
911
|
-
const summarize = async (runOk: boolean): Promise<void> => {
|
|
911
|
+
const summarize = async (runOk: boolean, final = list): Promise<void> => {
|
|
912
912
|
if (options.summarize === undefined) return
|
|
913
913
|
try {
|
|
914
914
|
const wrote = await writeRunSummary({
|
|
@@ -921,7 +921,7 @@ async function runOnBus(
|
|
|
921
921
|
totalMs,
|
|
922
922
|
ok: runOk,
|
|
923
923
|
...(stoppedBy !== undefined && { exitCode: signalExitCode(stoppedBy) }),
|
|
924
|
-
outcomes:
|
|
924
|
+
outcomes: final,
|
|
925
925
|
flaky,
|
|
926
926
|
})
|
|
927
927
|
log.status(`vx: summary written to ${wrote}`)
|
|
@@ -1113,8 +1113,13 @@ async function runOnBus(
|
|
|
1113
1113
|
)
|
|
1114
1114
|
}
|
|
1115
1115
|
await terminateChildren(() => keepAlive.children)
|
|
1116
|
-
|
|
1117
|
-
|
|
1116
|
+
// The server that ended the session on its own, not cleanly, failed:
|
|
1117
|
+
// the rewritten summary said `ok: false` over every task `success`
|
|
1118
|
+
// and `failed: 0`, and so did the outcomes `--report` renders (C-53).
|
|
1119
|
+
if (!stopRun.signal.aborted && first.code !== 0) failServer(node.id, first.code)
|
|
1120
|
+
const final = [...outcomes.values()]
|
|
1121
|
+
await summarize(ok && first.code === 0, final)
|
|
1122
|
+
return { ok: ok && first.code === 0, outcomes: final }
|
|
1118
1123
|
}
|
|
1119
1124
|
|
|
1120
1125
|
return { ok, outcomes: list }
|