@norskvideo/ctl-dev-kit 0.2.18 → 0.2.20

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.
@@ -54,6 +54,42 @@ runner, one of these must hold:
54
54
  A harness reaching a studio port at `${NORSK_TEST_HOST}` while neither holds
55
55
  will see every studio gate time out with connection refused.
56
56
 
57
+ ## The host docker daemon is shared between jobs
58
+
59
+ The x64 runners are sibling containers on ONE host docker daemon, so anything
60
+ named globally is shared by every concurrent job, whichever repo it belongs to.
61
+ On 2026-10-02 a reuters tier and a commentary tier each `compose up`ed
62
+ `norsk-proxy` over the other's, and reuters' teardown removed it mid-test.
63
+
64
+ - `startDaemon` (and so every harness built on it) names the daemon's proxy and
65
+ cpu-monitor sidecar after its port (`norsk-proxy-<port>`,
66
+ `norsk-ctl-cpu-monitor-<port>`). Don't override them back to the defaults.
67
+ - An image your suite builds must carry a **per-run tag** (e.g.
68
+ `<repo>:ci-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT`), not `:dev` — a concurrent run
69
+ can replace a fixed tag between your build and your `product add`. `docker rmi`
70
+ it at teardown, or the host fills up.
71
+ - The names above carry the store dir as well as the port: two repos' slugs can
72
+ hash into the same port band, so a port-only name is not unique.
73
+ - Still box-global and NOT namespaced: `norsk-net`, and a registered image
74
+ product's control-plane container NAME `norsk-product-<name>`. Its host port
75
+ is already docker-assigned (`127.0.0.1::4321`, read back by `docker inspect`);
76
+ older text here and in the reap steps that names a fixed 14321 is stale. Two
77
+ concurrent runs of the SAME product that both `product add --image` still
78
+ collide on the name.
79
+ - Still banded, and still able to collide: the daemon's nginx proxy host port
80
+ (`daemon+3`), which is published on the host. Docker-assigned proxy ports are
81
+ in progress.
82
+
83
+ ## Reaching an image product's control plane
84
+
85
+ `product add --image` loopback-publishes the control plane on a
86
+ docker-assigned host port (`127.0.0.1::4321`). On a DooD runner that loopback is the HOST's, so a
87
+ test that probes `localhost:<published port>` reaches nothing. With
88
+ `NORSK_TEST_NET=direct`, dial the container's own address
89
+ (`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}'`)
90
+ on 4321 — the same thing the daemon does under
91
+ `NORSK_CTL_PRODUCT_REACH=container-address`.
92
+
57
93
  ## Host-shared working directory (or studio EACCESes on boot)
58
94
 
59
95
  Studio bind-mounts its instance working directory as `${workdir}:/data` and runs
@@ -125,10 +161,11 @@ runs. Add `bun run build:image` inside the `nix develop .#build` block (docker i
125
161
  reachable there); it also builds the dist the dev backend serves `/configure`
126
162
  from.
127
163
 
128
- ## Stale node_modules on `clean: false` runners
164
+ ## Stale node_modules on reused workspaces
129
165
 
130
- The runners check out `clean: false` (to preserve `test-temp/`), so
131
- `node_modules` **persists between runs**, and `bun install --frozen-lockfile`
166
+ The convention workflows now check out `clean: true` with test-temp routed to
167
+ `$RUNNER_TEMP`, but a hand-owned workflow on `clean: false` keeps
168
+ `node_modules` **between runs**, and `bun install --frozen-lockfile`
132
169
  does **not** reliably relink a workspace-hoisted package whose version moved. A
133
170
  stale `@norskvideo/ctl-test-harness@0.1.2` once survived a bump to `0.1.3`, so a
134
171
  newly-added export was `SyntaxError: export 'X' not found` and the suite crashed
@@ -175,6 +212,12 @@ three optional hooks the workflow calls if they are executable:
175
212
  | `scripts/integration/prepare.sh` | before `bun run test:integration` | builds the suite needs on disk — a frontend dist the daemon fetches, an image it launches |
176
213
  | `scripts/integration/verify.sh` | after the suite | post-suite checks; absent, a repo with `tests/demo.spec.ts` gets `bun run demo -- check` |
177
214
 
215
+ The hooks run in the **same workflow step** as the suite, so a hook that writes
216
+ to `$GITHUB_ENV` changes nothing the suite sees — GitHub applies that file only
217
+ to later steps. Commentary's enforced-path opt-out was dead for its whole life
218
+ that way. Hand the suite a value by having both sides derive it (a tiny script
219
+ the hook runs and the test imports), not through `$GITHUB_ENV`.
220
+
178
221
  `bun run test:integration` is the product's claim of what its tier is, and
179
222
  ctl's release gate believes it: a `ctl-candidate` dispatch runs this workflow
180
223
  and the reported result decides whether `latest` moves.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",