@norskvideo/ctl-dev-kit 0.2.18 → 0.2.19

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,35 @@ 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
+ - Still box-global and NOT namespaced: `norsk-net`, and a registered image
72
+ product's control plane `norsk-product-<name>` on `127.0.0.1:14321`. Two
73
+ concurrent runs of the SAME product that both `product add --image` will
74
+ collide there.
75
+
76
+ ## Reaching an image product's control plane
77
+
78
+ `product add --image` loopback-publishes the control plane
79
+ (`127.0.0.1:<port>:4321`). On a DooD runner that loopback is the HOST's, so a
80
+ test that probes `localhost:<published port>` reaches nothing. With
81
+ `NORSK_TEST_NET=direct`, dial the container's own address
82
+ (`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}} {{end}}'`)
83
+ on 4321 — the same thing the daemon does under
84
+ `NORSK_CTL_PRODUCT_REACH=container-address`.
85
+
57
86
  ## Host-shared working directory (or studio EACCESes on boot)
58
87
 
59
88
  Studio bind-mounts its instance working directory as `${workdir}:/data` and runs
@@ -125,10 +154,11 @@ runs. Add `bun run build:image` inside the `nix develop .#build` block (docker i
125
154
  reachable there); it also builds the dist the dev backend serves `/configure`
126
155
  from.
127
156
 
128
- ## Stale node_modules on `clean: false` runners
157
+ ## Stale node_modules on reused workspaces
129
158
 
130
- The runners check out `clean: false` (to preserve `test-temp/`), so
131
- `node_modules` **persists between runs**, and `bun install --frozen-lockfile`
159
+ The convention workflows now check out `clean: true` with test-temp routed to
160
+ `$RUNNER_TEMP`, but a hand-owned workflow on `clean: false` keeps
161
+ `node_modules` **between runs**, and `bun install --frozen-lockfile`
132
162
  does **not** reliably relink a workspace-hoisted package whose version moved. A
133
163
  stale `@norskvideo/ctl-test-harness@0.1.2` once survived a bump to `0.1.3`, so a
134
164
  newly-added export was `SyntaxError: export 'X' not found` and the suite crashed
@@ -175,6 +205,12 @@ three optional hooks the workflow calls if they are executable:
175
205
  | `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
206
  | `scripts/integration/verify.sh` | after the suite | post-suite checks; absent, a repo with `tests/demo.spec.ts` gets `bun run demo -- check` |
177
207
 
208
+ The hooks run in the **same workflow step** as the suite, so a hook that writes
209
+ to `$GITHUB_ENV` changes nothing the suite sees — GitHub applies that file only
210
+ to later steps. Commentary's enforced-path opt-out was dead for its whole life
211
+ that way. Hand the suite a value by having both sides derive it (a tiny script
212
+ the hook runs and the test imports), not through `$GITHUB_ENV`.
213
+
178
214
  `bun run test:integration` is the product's claim of what its tier is, and
179
215
  ctl's release gate believes it: a `ctl-candidate` dispatch runs this workflow
180
216
  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.19",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",