@norskvideo/ctl-dev-kit 0.1.72 → 0.1.73

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.
@@ -78,16 +78,27 @@ jobs:
78
78
  bun run docs:check
79
79
  '
80
80
 
81
- # Does this repo's licence template still describe this repo? A template
82
- # naming the wrong product, or an imageRef the build never produces, mints
83
- # a licence that entitles nothing -- and the first sign of that is a
84
- # 60-second readiness timeout at launch, indistinguishable from a product
85
- # that failed to start. Cheap, no secrets, every PR.
81
+ # The two halves of one licence guarantee, run together because they only
82
+ # work as a pair: check-template asserts this repo RECORDS the entitlement
83
+ # it needs, and check-product-name asserts it ASKS for the one it records.
84
+ #
85
+ # Either alone leaves them free to drift. funke-pegasus recorded
86
+ # funke-pegasus and asked for "norsk-studio" -- Studio's baked default,
87
+ # used whenever NORSK_PRODUCT_NAME is unset -- for its entire life. The
88
+ # template check was green throughout, because the template was never the
89
+ # wrong half. What that cost: the handshake was refused, so every media
90
+ # node was refused, so no SRT listener bound, while the instance reported
91
+ # healthy and Studio served its API. It reads as a broken workflow, and it
92
+ # took most of a day to find.
93
+ #
94
+ # PRODUCT_NAME is read ONCE and handed to both: two readings could
95
+ # disagree, and a lint that passes while naming the wrong product is worse
96
+ # than no lint. Cheap, no secrets, every PR.
86
97
  #
87
98
  # The image name is CI's own rule: PUBLISH_IMAGE when set, else the build
88
99
  # script's IMAGE_TAG default, tag stripped -- a licence matches the repo
89
100
  # part alone, never the tag.
90
- - name: Check the licence template matches this repo
101
+ - name: Check this repo records, and asks for, its own licence
91
102
  run: |
92
103
  set -euo pipefail
93
104
  product="$(sed -nE 's/.*PRODUCT_NAME[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' shared/src/version.ts | head -1)"
@@ -102,6 +113,13 @@ jobs:
102
113
  nix develop .#build --command bun \
103
114
  node_modules/@norskvideo/ctl-dev-kit/licence/check-template.ts \
104
115
  licenseTemplate.json "$product" "$image"
116
+ # The compose the product renders is where the declaration has to be;
117
+ # the check exits 1 on an unreadable file rather than passing quietly,
118
+ # so a repo that moves this module fails here instead of silently
119
+ # dropping the gate.
120
+ nix develop .#build --command bun \
121
+ node_modules/@norskvideo/ctl-dev-kit/licence/check-product-name.ts \
122
+ shared/src/product-template.ts "$product"
105
123
 
106
124
  # Report this pipeline's result to the aggregated product CI dashboard
107
125
  # (id3as/ci-workflows) instead of posting its own pony — the dashboard renders
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",