@botbuddy/cli 1.123.4 → 1.123.6
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/daemon/bin/darwin-arm64/botbuddy-daemon +0 -0
- package/daemon/bin/linux-x64/botbuddy-daemon +0 -0
- package/daemon-release/darwin-arm64.json +4 -4
- package/daemon-release/linux-x64.json +4 -4
- package/daemon-release/manifest.json +5 -5
- package/package.json +1 -1
- package/src/report.mjs +1 -1
- package/src/run-markers.mjs +7 -0
- package/src/run-ownership.mjs +9 -3
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.123.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.123.6",
|
|
3
|
+
"source_commit": "0b4e26d0ce2022d38293837de14eb87c9eb2fd00",
|
|
4
|
+
"source_sha256": "a2a72b297050fa38e7c73cb0c56cd8524424c29c5747818b232a557ab57e1af0",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "e0782a425a5a05cee216604d17b081f6c67e2ad241d2bccc7aa7625ff95eafb7"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.123.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.123.6",
|
|
3
|
+
"source_commit": "0b4e26d0ce2022d38293837de14eb87c9eb2fd00",
|
|
4
|
+
"source_sha256": "a2a72b297050fa38e7c73cb0c56cd8524424c29c5747818b232a557ab57e1af0",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "1d959eda3d1c3900400c9dec1744c9df3dfb1b99b9b466438476e4d96a69be4f"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.123.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.123.6",
|
|
4
|
+
"source_commit": "0b4e26d0ce2022d38293837de14eb87c9eb2fd00",
|
|
5
|
+
"source_sha256": "a2a72b297050fa38e7c73cb0c56cd8524424c29c5747818b232a557ab57e1af0",
|
|
6
6
|
"targets": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"goos": "darwin",
|
|
9
9
|
"goarch": "arm64",
|
|
10
10
|
"binary": "daemon/bin/darwin-arm64/botbuddy-daemon",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "e0782a425a5a05cee216604d17b081f6c67e2ad241d2bccc7aa7625ff95eafb7",
|
|
12
12
|
"mode": "0755"
|
|
13
13
|
},
|
|
14
14
|
"linux-x64": {
|
|
15
15
|
"goos": "linux",
|
|
16
16
|
"goarch": "amd64",
|
|
17
17
|
"binary": "daemon/bin/linux-x64/botbuddy-daemon",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "1d959eda3d1c3900400c9dec1744c9df3dfb1b99b9b466438476e4d96a69be4f",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/report.mjs
CHANGED
|
@@ -49,7 +49,7 @@ Example:
|
|
|
49
49
|
Refusals (exit 1, nothing stored): report_not_html, report_too_large,
|
|
50
50
|
report_type_unknown, report_digest_mismatch, scope_missing (the key needs the
|
|
51
51
|
write scope, or a tenant owner). MCP_TENANT_PIN_REQUIRED (exit 3): your login
|
|
52
|
-
reaches several workspaces; retry with --tenant <slug>. Uploading needs an
|
|
52
|
+
reaches several workspaces; retry with --tenant <slug>. Uploading needs an MCP key with the write
|
|
53
53
|
scope (bb login --tenant, then bb mcp setup). Guide: docs/stored-reports.md.`;
|
|
54
54
|
|
|
55
55
|
const BEGIN = "begin_report_upload";
|
package/src/run-markers.mjs
CHANGED
|
@@ -14,6 +14,13 @@ export const RUN_REGISTRY_ENV = "BOTBUDDY_RUN_REGISTRY";
|
|
|
14
14
|
*/
|
|
15
15
|
export const LEGACY_RUN_MARKERS = Object.freeze(["BOTBUDDY_STACK_LEASE_ID", "BOTBUDDY_TEST_RUN_ID"]);
|
|
16
16
|
export const ALL_RUN_MARKERS = Object.freeze([RUN_ID_ENV, RUN_REGISTRY_ENV, ...LEGACY_RUN_MARKERS]);
|
|
17
|
+
/**
|
|
18
|
+
* BOT-3655: set by the host daemon on every process of a host test child (a transient
|
|
19
|
+
* systemd unit, daemon/test_child_systemd.go). That unit owns its processes
|
|
20
|
+
* (KillMode=control-group), so the orphan reaper never judges them, though the unit also
|
|
21
|
+
* exports the legacy lease marker and its main process's parent is PID 1.
|
|
22
|
+
*/
|
|
23
|
+
export const HOST_CHILD_RUN_ENV = "BOTBUDDY_HOST_CHILD_RUN_ID";
|
|
17
24
|
|
|
18
25
|
/**
|
|
19
26
|
* The environment for a long-lived bb helper (the run delivery process, the orphan
|
package/src/run-ownership.mjs
CHANGED
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
// outbox until sensor-ingest accepts it.
|
|
24
24
|
//
|
|
25
25
|
// Host test children are not handled here: they run as transient systemd units with
|
|
26
|
-
// KillMode=control-group, which the host daemon stops (daemon/test_child_systemd.go).
|
|
26
|
+
// KillMode=control-group, which the host daemon stops (daemon/test_child_systemd.go). A
|
|
27
|
+
// reaper started inside one (by a test's spawned bb) never takes the unit's own processes
|
|
28
|
+
// for a pre-fix orphan: they carry BOTBUDDY_HOST_CHILD_RUN_ID (BOT-3655).
|
|
27
29
|
|
|
28
30
|
import { execFile, spawn } from "node:child_process";
|
|
29
31
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -32,7 +34,7 @@ import { homedir, hostname } from "node:os";
|
|
|
32
34
|
import { basename, dirname, join } from "node:path";
|
|
33
35
|
import { fileURLToPath } from "node:url";
|
|
34
36
|
|
|
35
|
-
import { LEGACY_RUN_MARKERS, RUN_ID_ENV, RUN_REGISTRY_ENV, withoutRunMarkers } from "./run-markers.mjs";
|
|
37
|
+
import { HOST_CHILD_RUN_ENV, LEGACY_RUN_MARKERS, RUN_ID_ENV, RUN_REGISTRY_ENV, withoutRunMarkers } from "./run-markers.mjs";
|
|
36
38
|
import { acquireDeliveryLock, pidAlive } from "./run-delivery.mjs";
|
|
37
39
|
import { VERSION } from "./version.mjs";
|
|
38
40
|
|
|
@@ -88,7 +90,7 @@ export function parseElapsed(text) {
|
|
|
88
90
|
/** The marker values in an environment block (`NAME=value` tokens, last one wins). */
|
|
89
91
|
export function markersFromEnvText(text) {
|
|
90
92
|
const markers = {};
|
|
91
|
-
for (const name of [RUN_ID_ENV, RUN_REGISTRY_ENV, ...LEGACY_RUN_MARKERS]) {
|
|
93
|
+
for (const name of [RUN_ID_ENV, RUN_REGISTRY_ENV, ...LEGACY_RUN_MARKERS, HOST_CHILD_RUN_ENV]) {
|
|
92
94
|
const re = new RegExp(`(?:^|[\\s\\0])${name}=([^\\s\\0]*)`, "g");
|
|
93
95
|
let value = null;
|
|
94
96
|
for (const match of String(text).matchAll(re)) value = match[1];
|
|
@@ -293,6 +295,10 @@ export function findRunsToReap(processes, {
|
|
|
293
295
|
continue;
|
|
294
296
|
}
|
|
295
297
|
if (!legacy || onlyRunId) continue;
|
|
298
|
+
// BOT-3655: a host test child's processes belong to its systemd unit, which stops them
|
|
299
|
+
// (KillMode=control-group); its lease marker is not a pre-fix run's, and the unit's main
|
|
300
|
+
// process sits under PID 1 by design, so it would always look orphaned.
|
|
301
|
+
if (proc.markers[HOST_CHILD_RUN_ENV]) continue;
|
|
296
302
|
const name = LEGACY_RUN_MARKERS.find((marker) => proc.markers[marker]);
|
|
297
303
|
if (!name) continue;
|
|
298
304
|
const key = `${name}=${proc.markers[name]}`;
|