kern-sandbox 0.1.1 → 0.1.2
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/index.js +11 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const crypto = require("crypto");
|
|
|
36
36
|
const zlib = require("zlib");
|
|
37
37
|
const { spawn, spawnSync } = require("child_process");
|
|
38
38
|
|
|
39
|
-
const VERSION = "0.1.
|
|
39
|
+
const VERSION = "0.1.2";
|
|
40
40
|
|
|
41
41
|
const DEFAULT_IMAGE = "python:3.12-slim";
|
|
42
42
|
const WORKSPACE = "/workspace"; // where the persistent workspace is mounted inside every box
|
|
@@ -210,7 +210,16 @@ function toRc(code, signal) {
|
|
|
210
210
|
/** True iff kern (the PARENT, before the box exists) failed to start the box. Anchored on kern's OWN
|
|
211
211
|
* diagnostic prefixes so the workload can't forge them by writing the marker to its own stderr. */
|
|
212
212
|
function looksLikeStartupFailure(stderr) {
|
|
213
|
-
const markers = [
|
|
213
|
+
const markers = [
|
|
214
|
+
"kern:",
|
|
215
|
+
"error: pull:",
|
|
216
|
+
"error: registry:",
|
|
217
|
+
"error: manifest:",
|
|
218
|
+
"error: sandbox:",
|
|
219
|
+
"error: box:",
|
|
220
|
+
"error: oci:",
|
|
221
|
+
"error: image:",
|
|
222
|
+
];
|
|
214
223
|
for (const line of stderr.split("\n")) {
|
|
215
224
|
const s = line.replace(/^\s+/, "");
|
|
216
225
|
if (s.includes("sandbox setup failed") || markers.some((m) => s.startsWith(m))) return true;
|
package/package.json
CHANGED