@botbuddy/cli 1.123.5 → 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.
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.123.5",
3
- "source_commit": "d7e0fbf3a5bb19574ec32f1f6051b0db396e9fd2",
4
- "source_sha256": "c9b00d299977d1d17ed6da59b3dac32229da0e2014ee84bca6c4cdb6705574de",
2
+ "release_version": "1.123.6",
3
+ "source_commit": "0b4e26d0ce2022d38293837de14eb87c9eb2fd00",
4
+ "source_sha256": "a2a72b297050fa38e7c73cb0c56cd8524424c29c5747818b232a557ab57e1af0",
5
5
  "target": "darwin-arm64",
6
- "sha256": "97d7b621f9970f17c07a9b02d42110fc7b0dc74f3410eebc5be4fe4cc64bce76"
6
+ "sha256": "e0782a425a5a05cee216604d17b081f6c67e2ad241d2bccc7aa7625ff95eafb7"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.123.5",
3
- "source_commit": "d7e0fbf3a5bb19574ec32f1f6051b0db396e9fd2",
4
- "source_sha256": "c9b00d299977d1d17ed6da59b3dac32229da0e2014ee84bca6c4cdb6705574de",
2
+ "release_version": "1.123.6",
3
+ "source_commit": "0b4e26d0ce2022d38293837de14eb87c9eb2fd00",
4
+ "source_sha256": "a2a72b297050fa38e7c73cb0c56cd8524424c29c5747818b232a557ab57e1af0",
5
5
  "target": "linux-x64",
6
- "sha256": "cd22194965d32299b1887c880944fd44596d5bdb42fe2889fae7f09ce7bb6166"
6
+ "sha256": "1d959eda3d1c3900400c9dec1744c9df3dfb1b99b9b466438476e4d96a69be4f"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.123.5",
4
- "source_commit": "d7e0fbf3a5bb19574ec32f1f6051b0db396e9fd2",
5
- "source_sha256": "c9b00d299977d1d17ed6da59b3dac32229da0e2014ee84bca6c4cdb6705574de",
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": "97d7b621f9970f17c07a9b02d42110fc7b0dc74f3410eebc5be4fe4cc64bce76",
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": "cd22194965d32299b1887c880944fd44596d5bdb42fe2889fae7f09ce7bb6166",
18
+ "sha256": "1d959eda3d1c3900400c9dec1744c9df3dfb1b99b9b466438476e4d96a69be4f",
19
19
  "mode": "0755"
20
20
  }
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbuddy/cli",
3
- "version": "1.123.5",
3
+ "version": "1.123.6",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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
@@ -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]}`;