@norskvideo/ctl-test-harness 0.1.67 → 0.1.69

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.d.ts CHANGED
@@ -61,9 +61,10 @@ export declare function seedDaemonConfig(storeDir: string): void;
61
61
  * The daemon's singleton containers default to box-global names, and on a
62
62
  * docker-outside-of-docker runner the "box" is a host daemon shared by every
63
63
  * runner on it: concurrent jobs replaced and removed each other's `norsk-proxy`
64
- * (and each daemon start `rm -f`s the cpu-monitor sidecar by name). Naming them
65
- * after the daemon's port, which is already unique per live daemon on a box,
66
- * keeps each job to its own. A ctl that predates an override ignores it. */
64
+ * (and each daemon start `rm -f`s the cpu-monitor sidecar by name). The port
65
+ * alone is not unique there -- two repos' slugs can hash into the same band --
66
+ * so the names carry the store dir too, which is per run and per job. A ctl
67
+ * that predates an override ignores it. */
67
68
  export declare function daemonSpawnEnv(o: {
68
69
  storeDir: string;
69
70
  port: number;
package/daemon.js CHANGED
@@ -8,6 +8,7 @@
8
8
  // works under bun AND under Playwright's Node workers — so the doc-guide tier
9
9
  // consumes these same bodies instead of keeping a third fork.
10
10
  import { spawn, spawnSync } from "node:child_process";
11
+ import { createHash } from "node:crypto";
11
12
  import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs";
12
13
  import { createServer } from "node:net";
13
14
  import { join } from "node:path";
@@ -150,18 +151,20 @@ export function seedDaemonConfig(storeDir) {
150
151
  * The daemon's singleton containers default to box-global names, and on a
151
152
  * docker-outside-of-docker runner the "box" is a host daemon shared by every
152
153
  * runner on it: concurrent jobs replaced and removed each other's `norsk-proxy`
153
- * (and each daemon start `rm -f`s the cpu-monitor sidecar by name). Naming them
154
- * after the daemon's port, which is already unique per live daemon on a box,
155
- * keeps each job to its own. A ctl that predates an override ignores it. */
154
+ * (and each daemon start `rm -f`s the cpu-monitor sidecar by name). The port
155
+ * alone is not unique there -- two repos' slugs can hash into the same band --
156
+ * so the names carry the store dir too, which is per run and per job. A ctl
157
+ * that predates an override ignores it. */
156
158
  export function daemonSpawnEnv(o) {
157
159
  // A spawned daemon must boot GUARDED: exercising the real ingress secret is
158
160
  // the point of the tiers that spawn one. The unit tier's marker would
159
161
  // otherwise be inherited straight through this env spread and quietly open
160
162
  // it (RFC 0003 D10b).
161
163
  const { NORSK_CTL_UNGUARDED_TEST_DAEMON: _unguarded, ...inherited } = o.inherited;
164
+ const id = `${o.port}-${createHash("sha256").update(o.storeDir).digest("hex").slice(0, 8)}`;
162
165
  return {
163
- NORSK_CTL_PROXY_CONTAINER: `norsk-proxy-${o.port}`,
164
- NORSK_CTL_CPU_MONITOR_CONTAINER: `norsk-ctl-cpu-monitor-${o.port}`,
166
+ NORSK_CTL_PROXY_CONTAINER: `norsk-proxy-${id}`,
167
+ NORSK_CTL_CPU_MONITOR_CONTAINER: `norsk-ctl-cpu-monitor-${id}`,
165
168
  ...inherited,
166
169
  NORSK_CTL_STORE_DIR: o.storeDir,
167
170
  NORSK_CTL_PORT: String(o.port),
package/demo/run.d.ts CHANGED
@@ -246,7 +246,7 @@ export declare function demoUrlHost(opts: {
246
246
  *
247
247
  * The daemon is a process in this very process' container, so `localhost`
248
248
  * reaches it. Its proxy is NOT: every `nginx proxy starting on port N` is
249
- * followed by `docker: Container norsk-proxy[-<port>] Created/Started`, for a
249
+ * followed by `docker: Container norsk-proxy[-<id>] Created/Started`, for a
250
250
  * private daemon exactly as for a reused one. On a docker-outside-of-docker runner
251
251
  * that container is created by the HOST's daemon and publishes there
252
252
  * (`0.0.0.0:22263->22263/tcp`, HostIp "" — measured on test2, 2026-10-01), so
package/demo/run.js CHANGED
@@ -348,7 +348,7 @@ export function demoUrlHost(opts) {
348
348
  *
349
349
  * The daemon is a process in this very process' container, so `localhost`
350
350
  * reaches it. Its proxy is NOT: every `nginx proxy starting on port N` is
351
- * followed by `docker: Container norsk-proxy[-<port>] Created/Started`, for a
351
+ * followed by `docker: Container norsk-proxy[-<id>] Created/Started`, for a
352
352
  * private daemon exactly as for a reused one. On a docker-outside-of-docker runner
353
353
  * that container is created by the HOST's daemon and publishes there
354
354
  * (`0.0.0.0:22263->22263/tcp`, HostIp "" — measured on test2, 2026-10-01), so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-test-harness",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -87,7 +87,7 @@
87
87
  "@types/node": "^22.10.0",
88
88
  "@norskvideo/norsk-studio": "1.30.0-2026-09-28-b92e8139",
89
89
  "@norskvideo/norsk-studio-built-ins": "1.30.0-2026-09-28-b92e8139",
90
- "@norskvideo/norsk-sdk": "1.3.1-2026-09-30-acca6a9d"
90
+ "@norskvideo/norsk-sdk": "1.3.1-2026-10-01-e9467b05"
91
91
  },
92
92
  "peerDependenciesMeta": {
93
93
  "@norskvideo/norsk-studio": {