@botbuddy/cli 1.63.21 → 1.63.23
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/daemon/handover.mjs +8 -1
- package/src/stack.mjs +9 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.63.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.63.23",
|
|
3
|
+
"source_commit": "d51ef61947fbda05da967f8f6a6d30affb2ff2bf",
|
|
4
|
+
"source_sha256": "f3a066d0c0a41b186a8edc7602b00bd8ae522725aa5a8d678740235be11816b1",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "91dc67a61e2ec59657aab6a7c932bcc27d57c713a82e51747201576d570eeae6"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.63.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.63.23",
|
|
3
|
+
"source_commit": "d51ef61947fbda05da967f8f6a6d30affb2ff2bf",
|
|
4
|
+
"source_sha256": "f3a066d0c0a41b186a8edc7602b00bd8ae522725aa5a8d678740235be11816b1",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "bffecca81f03de0213a8800db20f787fd87538eb2ecb1e217028fcbf0aad19d5"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.63.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.63.23",
|
|
4
|
+
"source_commit": "d51ef61947fbda05da967f8f6a6d30affb2ff2bf",
|
|
5
|
+
"source_sha256": "f3a066d0c0a41b186a8edc7602b00bd8ae522725aa5a8d678740235be11816b1",
|
|
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": "91dc67a61e2ec59657aab6a7c932bcc27d57c713a82e51747201576d570eeae6",
|
|
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": "bffecca81f03de0213a8800db20f787fd87538eb2ecb1e217028fcbf0aad19d5",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/daemon/handover.mjs
CHANGED
|
@@ -195,7 +195,14 @@ export async function upgradeDaemonHost(spec, {
|
|
|
195
195
|
}
|
|
196
196
|
const begun = await transition({ action: "begin", plan }, { auth });
|
|
197
197
|
if (!begun?.ok || begun.data?.success !== true || !begun.data.authority_key) {
|
|
198
|
-
|
|
198
|
+
// Name the refusing server gate (e.g. HANDOVER_HOST_FENCE) so the operator
|
|
199
|
+
// can act on it; only a plain refusal token is ever echoed (BOT-2810).
|
|
200
|
+
const code = begun?.data?.code;
|
|
201
|
+
fail(
|
|
202
|
+
typeof code === "string" && /^[A-Z_]{1,64}$/.test(code)
|
|
203
|
+
? `daemon_handover_begin_refused: ${code}`
|
|
204
|
+
: "daemon_handover_begin_refused",
|
|
205
|
+
);
|
|
199
206
|
}
|
|
200
207
|
if (begun.data.result) {
|
|
201
208
|
return {
|
package/src/stack.mjs
CHANGED
|
@@ -83,6 +83,7 @@ const ADMISSION_REPLAYABLE = new Set(["ADMISSION_UNCERTAIN", "RETRY_SAME_REQUEST
|
|
|
83
83
|
// The key already has a ledger row (or had one): never replay it blindly or treat it as unallocated.
|
|
84
84
|
const ADMISSION_COMMITTED_UNCERTAIN = new Set(["REQUEST_IDENTITY_MISMATCH", "REQUEST_CLOSED", "ORIGINAL_LEASE_UNAVAILABLE"]);
|
|
85
85
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
86
|
+
const SQLSTATE_RE = /^[0-9A-Z]{5}$/;
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* Codex #1077 P1 / BOT-2184: an sshd with `GatewayPorts yes` binds a `-R` forward on every
|
|
@@ -1364,6 +1365,11 @@ export function leaseRefusalError(data) {
|
|
|
1364
1365
|
`Inspect with \`bb stack status ${data.lease_id}\`; after the owning batch ends, release with \`bb stack done ${data.lease_id} --reap\`, ` +
|
|
1365
1366
|
`then wait with \`bb wait 'lease:id=${data.lease_id},state=reaped' --heartbeat\`.`;
|
|
1366
1367
|
}
|
|
1368
|
+
// BOT-2812: a server fault, not the caller's: the database rolled the admission back.
|
|
1369
|
+
if (data?.code === "ADMISSION_FAILED") {
|
|
1370
|
+
return `the server's identified admission failed in the database${data.sqlstate ? ` (SQLSTATE ${data.sqlstate})` : ""} and rolled back, ` +
|
|
1371
|
+
"so no lease was created and this stack's port claim is released. This is a BotBuddy server fault: report it with this run's admission request id.";
|
|
1372
|
+
}
|
|
1367
1373
|
return data?.message || REMOTE_REFUSAL_GUIDANCE[data?.code] || data?.code || "lease request refused";
|
|
1368
1374
|
}
|
|
1369
1375
|
|
|
@@ -4207,6 +4213,8 @@ async function runStackLifecycleOnce(opts, childArgv, adapters, incidentBox) {
|
|
|
4207
4213
|
// for its reap and send this same request again; it is never adopted or released.
|
|
4208
4214
|
else return { ...res, data: { success: false, code, ...(res.data?.message ? { message: res.data.message } : {}),
|
|
4209
4215
|
...(res.data?.phase ? { phase: res.data.phase } : {}), ...(res.data?.wait ? { wait: res.data.wait } : {}),
|
|
4216
|
+
// BOT-2812: the database ran the call and rolled it back; its SQLSTATE names the class.
|
|
4217
|
+
...(code === "ADMISSION_FAILED" && SQLSTATE_RE.test(res.data?.sqlstate ?? "") ? { sqlstate: res.data.sqlstate } : {}),
|
|
4210
4218
|
...(code === HOST_CAPACITY_SOURCE_STALE_CODE ? capacityStaleReceiptFields(res.data) : {}) } };
|
|
4211
4219
|
} else {
|
|
4212
4220
|
const ack = identifiedAdmissionAck(res.data, leaseArgs.request_id);
|
|
@@ -4450,6 +4458,7 @@ async function runStackLifecycleOnce(opts, childArgv, adapters, incidentBox) {
|
|
|
4450
4458
|
return {
|
|
4451
4459
|
exitCode: leaseRefusalExit(request.data?.code), outcome: "error", code: request.data?.code,
|
|
4452
4460
|
...capacityStaleReceiptFields(request.data), error: leaseRefusalError(request.data),
|
|
4461
|
+
...(request.data?.sqlstate ? { sqlstate: request.data.sqlstate } : {}),
|
|
4453
4462
|
...(request.data.lease_id ? { leaseId: request.data.lease_id, state: request.data.state ?? null } : {}),
|
|
4454
4463
|
};
|
|
4455
4464
|
}
|