kern-sandbox 0.2.43 → 0.2.44

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.
Binary file
Binary file
package/index.d.ts CHANGED
@@ -101,8 +101,8 @@ export interface SandboxOptions {
101
101
  name?: string | null;
102
102
  /** Keep ONE resident box and run every call in it with `kern exec`, 2 ms against 6 ms for a fresh
103
103
  * box. Requires `name` and `workspace`. Survives close(); destroy() stops it. A resident box is not
104
- * a fresh one: /tmp accumulates, the PID namespace is shared, and an OOM comes back `killed` rather
105
- * than `oom`. A box built under another posture with the same name is refused. Default false. */
104
+ * a fresh one: /tmp accumulates and the PID namespace is shared. A box built under another posture
105
+ * with the same name is refused. Default false. */
106
106
  persist?: boolean;
107
107
  /** How long the resident box lives, in seconds. It is kern's own `--timeout` on that box, so it ends
108
108
  * by itself if the owning process dies. Default 3600. */
package/index.js CHANGED
@@ -42,7 +42,7 @@ const crypto = require("crypto");
42
42
  const zlib = require("zlib");
43
43
  const { spawn, spawnSync } = require("child_process");
44
44
 
45
- const VERSION = "0.2.43";
45
+ const VERSION = "0.2.44";
46
46
 
47
47
  const DEFAULT_IMAGE = "python:3.12-slim";
48
48
  // WHAT THE DEFAULT IMAGE CONTAINS, as a fact ABOUT THE IMAGE and not about its name. It drives the
@@ -2192,11 +2192,12 @@ class Sandbox {
2192
2192
  // left running - `kern exec` reaps its descendants when it returns, including one detached with
2193
2193
  // setsid, which is why the resident box runs `--init`.
2194
2194
  //
2195
- // ⛔ AND THE VERDICT IS COARSER. `oom` is read from the teardown bytes kern writes for the box IT
2196
- // started; `kern exec` does not carry them and the registry keeps only exitCode 137, which an
2197
- // external kill produces too. So an OOM comes back `killed` on this path where the one-shot path
2198
- // says `oom`. Not papered over: claiming `oom` from "137 and a cap was set" would be an inference
2199
- // presented as a measurement.
2195
+ // ⛔ THE VERDICT NEEDS kern 0.30.1 OR NEWER. `oom` is read from the bytes kern writes where the
2196
+ // workload cannot reach them, and `kern exec` writes them since 0.30.1: the command ran, whether
2197
+ // the OOM killer took it with its box, and the signal that ended it. Measured with 0.30.1: an OOM
2198
+ // comes back `oom` and the cell's own `exit(137)` an exit with no fault. Against an older kern on
2199
+ // PATH only the 137 arrives and both read `killed`, never guessed into `oom`. The npm package
2200
+ // carries 0.30.1.
2200
2201
  //
2201
2202
  // 📌 WHAT ADOPTION KEYS ON, AND THE TWO THINGS IT DELIBERATELY DOES NOT. A box is adopted when
2202
2203
  // its fingerprint matches: the argv, the `KERN_*` environment kern builds the box from, and what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kern-sandbox",
3
- "version": "0.2.43",
3
+ "version": "0.2.44",
4
4
  "description": "Your model writes the code. This runs it where it can't touch your machine: a rootless Linux container, no daemon, no VM, no cloud, no account. A kernel boundary, not a microVM: for deliberately hostile code, use one.",
5
5
  "keywords": [
6
6
  "sandbox",