@xemahq/xema 0.33.3 → 0.33.5

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.
@@ -59428,9 +59428,6 @@ function assertCanonicalDistributionId(distributionId) {
59428
59428
  return distributionId;
59429
59429
  }
59430
59430
 
59431
- // edition/edition-channel.mjs
59432
- var EditionChannel = Object.freeze({ Develop: "develop", Release: "release" });
59433
-
59434
59431
  // edition/edition-workspace.mjs
59435
59432
  import { existsSync, realpathSync, statSync } from "node:fs";
59436
59433
  import { join, resolve } from "node:path";
@@ -59544,15 +59541,9 @@ var EditionChartSetCheck = Object.freeze({
59544
59541
  MISSING: "missing",
59545
59542
  STALE: "stale"
59546
59543
  });
59547
- var CHART_VERSION_COORDINATE = Object.freeze({
59548
- [EditionChannel.Release]: /-h[0-9a-f]{16}$/,
59549
- [EditionChannel.Develop]: /-dev\.[0-9a-f]{12}$/
59550
- });
59551
- var DEVELOP_CHART_VERSION_PREFIX = "0.0.0-dev.";
59552
- var DEVELOP_CHART_SHA_LENGTH = 12;
59553
- var DEVELOP_CHART_VERSION_PATTERN = new RegExp(
59554
- `^${DEVELOP_CHART_VERSION_PREFIX.replaceAll(".", "\\.")}[0-9a-f]{${DEVELOP_CHART_SHA_LENGTH}}$`
59555
- );
59544
+
59545
+ // edition/edition-channel.mjs
59546
+ var EditionChannel = Object.freeze({ Develop: "develop", Release: "release" });
59556
59547
 
59557
59548
  // edition/edition-contract-parse.mjs
59558
59549
  var EDITION_CONTRACT_SCHEMA = "xema.edition-contract/v2";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "artifactSha256": "sha256:09f40c552224a946fef9f54e2d2c2de6885a76b386daece39862f2e42382235b",
3
+ "artifactSha256": "sha256:4fffbefc61cab2c4844351c1397fd18198f33d58532a4c31b9c333c3627097ba",
4
4
  "esbuild": {
5
5
  "version": "0.28.2"
6
6
  },
@@ -2203,229 +2203,229 @@
2203
2203
  },
2204
2204
  {
2205
2205
  "package": "@xemahq/xema",
2206
- "version": "0.33.3",
2206
+ "version": "0.33.5",
2207
2207
  "path": "edition/adapter-host-versions.mjs",
2208
2208
  "sha256": "sha256:1b7ebd3592f4da1225fba74aaba912e7d85fbceeb1626f7dcdac83491cbb4d69"
2209
2209
  },
2210
2210
  {
2211
2211
  "package": "@xemahq/xema",
2212
- "version": "0.33.3",
2212
+ "version": "0.33.5",
2213
2213
  "path": "edition/authorization-base.mjs",
2214
2214
  "sha256": "sha256:bbeac7ff01376cb89ed2140526d4795d8e559b3f01612b404a701f19aaa24c6a"
2215
2215
  },
2216
2216
  {
2217
2217
  "package": "@xemahq/xema",
2218
- "version": "0.33.3",
2218
+ "version": "0.33.5",
2219
2219
  "path": "edition/build-ledger.mjs",
2220
2220
  "sha256": "sha256:05202cbdd606aee086c8e9c62d28be68c429653a8b1d73a289ed0fe4ff14da85"
2221
2221
  },
2222
2222
  {
2223
2223
  "package": "@xemahq/xema",
2224
- "version": "0.33.3",
2224
+ "version": "0.33.5",
2225
2225
  "path": "edition/connector-source-authority.mjs",
2226
2226
  "sha256": "sha256:ea94475f4324737673accd7de1303c44db1cbc4dac61a865a06cd83abe310164"
2227
2227
  },
2228
2228
  {
2229
2229
  "package": "@xemahq/xema",
2230
- "version": "0.33.3",
2230
+ "version": "0.33.5",
2231
2231
  "path": "edition/distribution-paths.mjs",
2232
2232
  "sha256": "sha256:d78a5c8405bc6c25d36fcec61b0030e1fdacac7d528e698adb96f906f4b70279"
2233
2233
  },
2234
2234
  {
2235
2235
  "package": "@xemahq/xema",
2236
- "version": "0.33.3",
2236
+ "version": "0.33.5",
2237
2237
  "path": "edition/edition-artifact.mjs",
2238
- "sha256": "sha256:161f522eb39e3db705bc709f8512988dd3e6752851d972521354eeccffd8075d"
2238
+ "sha256": "sha256:e8a391938c88398f63f86fdf413582d3a18eb20c219784a01fa84794bbd22e38"
2239
2239
  },
2240
2240
  {
2241
2241
  "package": "@xemahq/xema",
2242
- "version": "0.33.3",
2242
+ "version": "0.33.5",
2243
2243
  "path": "edition/edition-channel.mjs",
2244
2244
  "sha256": "sha256:3c0c1564dc50be133cad500452d953353aa5beb703142c05a17bbce8175ba9f3"
2245
2245
  },
2246
2246
  {
2247
2247
  "package": "@xemahq/xema",
2248
- "version": "0.33.3",
2248
+ "version": "0.33.5",
2249
2249
  "path": "edition/edition-chart-set.mjs",
2250
- "sha256": "sha256:fbda500315d45e35eb974f4701bbf36729c3b642a5d735bc1b07085c91d25b23"
2250
+ "sha256": "sha256:cea98292ffc8bfe2afcc01f327172bc9071a83ef9b62a4e56236f2029d2699a9"
2251
2251
  },
2252
2252
  {
2253
2253
  "package": "@xemahq/xema",
2254
- "version": "0.33.3",
2254
+ "version": "0.33.5",
2255
2255
  "path": "edition/edition-config.mjs",
2256
2256
  "sha256": "sha256:e3997bd9a0082e02d01760868b2a4f41ed3081e904126b30fdf86e7938dc6137"
2257
2257
  },
2258
2258
  {
2259
2259
  "package": "@xemahq/xema",
2260
- "version": "0.33.3",
2260
+ "version": "0.33.5",
2261
2261
  "path": "edition/edition-constants.mjs",
2262
2262
  "sha256": "sha256:71ae51028847ab3430ffec9b229b0516a7705b75a6de1fcfa665f5e1abf8e9bb"
2263
2263
  },
2264
2264
  {
2265
2265
  "package": "@xemahq/xema",
2266
- "version": "0.33.3",
2266
+ "version": "0.33.5",
2267
2267
  "path": "edition/edition-contract-parse.mjs",
2268
2268
  "sha256": "sha256:c575e96b70bda82899931eb0b18567988e2e13e664fa498bcbef96b571dcabb4"
2269
2269
  },
2270
2270
  {
2271
2271
  "package": "@xemahq/xema",
2272
- "version": "0.33.3",
2272
+ "version": "0.33.5",
2273
2273
  "path": "edition/edition-contract.json",
2274
2274
  "sha256": "sha256:aa1a05f1728813a7bdb1e02d9305e9adf641d695e6767305210c67a1d81b38a7"
2275
2275
  },
2276
2276
  {
2277
2277
  "package": "@xemahq/xema",
2278
- "version": "0.33.3",
2278
+ "version": "0.33.5",
2279
2279
  "path": "edition/edition-protocol.mjs",
2280
2280
  "sha256": "sha256:2940a0ee8662970722aa2618a1635f8d5b4f5e54b85f09667f71ccf7c2c81b03"
2281
2281
  },
2282
2282
  {
2283
2283
  "package": "@xemahq/xema",
2284
- "version": "0.33.3",
2284
+ "version": "0.33.5",
2285
2285
  "path": "edition/edition-source-pins.mjs",
2286
2286
  "sha256": "sha256:b2190ace174a29875e2a9bd7209460b0ef6de186aca9b31bcd45dc17af57c1ba"
2287
2287
  },
2288
2288
  {
2289
2289
  "package": "@xemahq/xema",
2290
- "version": "0.33.3",
2290
+ "version": "0.33.5",
2291
2291
  "path": "edition/edition-workspace.mjs",
2292
2292
  "sha256": "sha256:f7267e93fd7dc07cf65fb8cac2c4439d28a72c1e0acbdeca1648c6859440eb32"
2293
2293
  },
2294
2294
  {
2295
2295
  "package": "@xemahq/xema",
2296
- "version": "0.33.3",
2296
+ "version": "0.33.5",
2297
2297
  "path": "edition/evidence-checkout.mjs",
2298
2298
  "sha256": "sha256:31fb669769b31de4c6f2b2501bb96959548172ef166e7568edbbfed7f5079a11"
2299
2299
  },
2300
2300
  {
2301
2301
  "package": "@xemahq/xema",
2302
- "version": "0.33.3",
2302
+ "version": "0.33.5",
2303
2303
  "path": "edition/evidence-grammars.mjs",
2304
2304
  "sha256": "sha256:4dae22b61ade99219a482b971c9780d68a3d37d021e39cdfe860b245364b8b9f"
2305
2305
  },
2306
2306
  {
2307
2307
  "package": "@xemahq/xema",
2308
- "version": "0.33.3",
2308
+ "version": "0.33.5",
2309
2309
  "path": "edition/evidence-trust-pin.mjs",
2310
2310
  "sha256": "sha256:b9dd5c01903394436530783614efb0cd357d982ed2befd844a39328479773cbc"
2311
2311
  },
2312
2312
  {
2313
2313
  "package": "@xemahq/xema",
2314
- "version": "0.33.3",
2314
+ "version": "0.33.5",
2315
2315
  "path": "edition/git-json.mjs",
2316
2316
  "sha256": "sha256:d0d25cda0c19007becabc9a2827c3dcf759b295cd0b41596eb4480c9549a1f21"
2317
2317
  },
2318
2318
  {
2319
2319
  "package": "@xemahq/xema",
2320
- "version": "0.33.3",
2320
+ "version": "0.33.5",
2321
2321
  "path": "edition/image-delivery-entitlement-descriptor.mjs",
2322
2322
  "sha256": "sha256:4726b66116f01bf2523fafe2b7a356591eca8fb5ca6bd8b154dd4821873e921b"
2323
2323
  },
2324
2324
  {
2325
2325
  "package": "@xemahq/xema",
2326
- "version": "0.33.3",
2326
+ "version": "0.33.5",
2327
2327
  "path": "edition/image-evidence-replay-state.mjs",
2328
2328
  "sha256": "sha256:eba0cf1d38af0ab2f00c5099fa8bc2edc543136ce92f895544d4d284b3d6af0f"
2329
2329
  },
2330
2330
  {
2331
2331
  "package": "@xemahq/xema",
2332
- "version": "0.33.3",
2332
+ "version": "0.33.5",
2333
2333
  "path": "edition/image-evidence.mjs",
2334
2334
  "sha256": "sha256:09945712ecc6524d5f52cfd82141ef4cade45be35210777f6e32818792068881"
2335
2335
  },
2336
2336
  {
2337
2337
  "package": "@xemahq/xema",
2338
- "version": "0.33.3",
2338
+ "version": "0.33.5",
2339
2339
  "path": "edition/kernel-capability-domain.mjs",
2340
2340
  "sha256": "sha256:3ecf887dd8d399e91a8285f6f115f6e418fb59bbf3f004539fe65ec667219356"
2341
2341
  },
2342
2342
  {
2343
2343
  "package": "@xemahq/xema",
2344
- "version": "0.33.3",
2344
+ "version": "0.33.5",
2345
2345
  "path": "edition/kernel-contract-authority.mjs",
2346
2346
  "sha256": "sha256:20abdde62a7b037c01ea9bbe1ff1e6094e6b0efd0add2f656f1938a04409bf82"
2347
2347
  },
2348
2348
  {
2349
2349
  "package": "@xemahq/xema",
2350
- "version": "0.33.3",
2350
+ "version": "0.33.5",
2351
2351
  "path": "edition/lib.mjs",
2352
2352
  "sha256": "sha256:0e9045632a14cb1a035bce7aac3ad26e7b2211daa3f9c2cd27a55dfd772e3b6b"
2353
2353
  },
2354
2354
  {
2355
2355
  "package": "@xemahq/xema",
2356
- "version": "0.33.3",
2356
+ "version": "0.33.5",
2357
2357
  "path": "edition/no-follow-file.mjs",
2358
2358
  "sha256": "sha256:c17bdf5e441f3c079aa06d4b48bbed05cad087855b9ad2a5e6dc43d5ee2b17c3"
2359
2359
  },
2360
2360
  {
2361
2361
  "package": "@xemahq/xema",
2362
- "version": "0.33.3",
2362
+ "version": "0.33.5",
2363
2363
  "path": "edition/operation-requirements.mjs",
2364
2364
  "sha256": "sha256:ffe6fdc9da6b2974270fc86c11be0c41d0bc6d85c8e3c137d3c3bc00a72fc4f6"
2365
2365
  },
2366
2366
  {
2367
2367
  "package": "@xemahq/xema",
2368
- "version": "0.33.3",
2368
+ "version": "0.33.5",
2369
2369
  "path": "edition/pin-source.mjs",
2370
2370
  "sha256": "sha256:fbaa6dffbdf4a262a13127bcf37bca791234fae74e327ac250e56ff4b78c1244"
2371
2371
  },
2372
2372
  {
2373
2373
  "package": "@xemahq/xema",
2374
- "version": "0.33.3",
2374
+ "version": "0.33.5",
2375
2375
  "path": "edition/source-authority.mjs",
2376
2376
  "sha256": "sha256:858b607dde94e2abd00a341f569e18cfa567d4bff139c64a2d60abbb7de4c85e"
2377
2377
  },
2378
2378
  {
2379
2379
  "package": "@xemahq/xema",
2380
- "version": "0.33.3",
2380
+ "version": "0.33.5",
2381
2381
  "path": "edition/strict-json.mjs",
2382
2382
  "sha256": "sha256:f95778396df7f38b086f55d2ec4f3b6644a8aeff2b32282a62829145fb544562"
2383
2383
  },
2384
2384
  {
2385
2385
  "package": "@xemahq/xema",
2386
- "version": "0.33.3",
2386
+ "version": "0.33.5",
2387
2387
  "path": "edition/string-order.mjs",
2388
2388
  "sha256": "sha256:b3210cd273e4b2e01fb8b1a91e28734cd211d4010c080d0ce95f5e5ff631cffb"
2389
2389
  },
2390
2390
  {
2391
2391
  "package": "@xemahq/xema",
2392
- "version": "0.33.3",
2392
+ "version": "0.33.5",
2393
2393
  "path": "edition/trusted-executable.mjs",
2394
2394
  "sha256": "sha256:37d46cdbc999ddd55d4ea8aeed4850ddd1efde89ed7b532f5a2ddec87105d796"
2395
2395
  },
2396
2396
  {
2397
2397
  "package": "@xemahq/xema",
2398
- "version": "0.33.3",
2398
+ "version": "0.33.5",
2399
2399
  "path": "edition/verifier-binding.mjs",
2400
2400
  "sha256": "sha256:80732658617f5255258c538eeb2383331ec8553b44b58d552b567845a7b916aa"
2401
2401
  },
2402
2402
  {
2403
2403
  "package": "@xemahq/xema",
2404
- "version": "0.33.3",
2404
+ "version": "0.33.5",
2405
2405
  "path": "edition/verifier-files.mjs",
2406
2406
  "sha256": "sha256:cdd14a20a63f0f194a8abb55680a5a7e3ced1f09f8b210a90d349e655f6de0c0"
2407
2407
  },
2408
2408
  {
2409
2409
  "package": "@xemahq/xema",
2410
- "version": "0.33.3",
2410
+ "version": "0.33.5",
2411
2411
  "path": "edition/verifier-provenance.mjs",
2412
2412
  "sha256": "sha256:3e2fb8e07cf1f66b8ad6c7ac2555fe3af64ec7abeb07cecbaf1939a18c2b3663"
2413
2413
  },
2414
2414
  {
2415
2415
  "package": "@xemahq/xema",
2416
- "version": "0.33.3",
2416
+ "version": "0.33.5",
2417
2417
  "path": "edition/verify-image-evidence.mjs",
2418
2418
  "sha256": "sha256:62f83f8bb835f360535402d12657156d2c9d6e651b426c2b30a04a2dc2f8d3e8"
2419
2419
  },
2420
2420
  {
2421
2421
  "package": "@xemahq/xema",
2422
- "version": "0.33.3",
2422
+ "version": "0.33.5",
2423
2423
  "path": "edition/workspace-sections.mjs",
2424
2424
  "sha256": "sha256:058c849767434e9ba911d9310092bede42e3ef959c75bbd35ff8879dc21ce3ff"
2425
2425
  },
2426
2426
  {
2427
2427
  "package": "@xemahq/xema",
2428
- "version": "0.33.3",
2428
+ "version": "0.33.5",
2429
2429
  "path": "scripts/build-evidence-verifier.mjs",
2430
2430
  "sha256": "sha256:5a688d20c47dc88aff37aa0c6cc02daf2c370a5bc610fef8446ce7be222d4c0b"
2431
2431
  },
@@ -1,9 +1,6 @@
1
1
  export declare const CHART_SET_LOCK_ENV = "XEMA_CHART_SET_LOCK";
2
2
  export declare const CHART_SET_LOCK_FILENAME = "chart-set.lock.json";
3
3
  export declare const CHART_SET_LOCK_SCHEMA_VERSION = 4;
4
- export declare const DEVELOP_CHART_VERSION_PREFIX = "0.0.0-dev.";
5
- export declare const DEVELOP_CHART_SHA_LENGTH = 12;
6
- export declare const DEVELOP_CHART_VERSION_PATTERN: RegExp;
7
4
  export declare const CHART_DIGEST_PATTERN: RegExp;
8
5
  export interface ChartSetMember {
9
6
  readonly version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chart-set-lock.d.ts","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAGxD,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAG7D,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAG/C,eAAO,MAAM,4BAA4B,eAAe,CAAC;AAGzD,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAG3C,eAAO,MAAM,6BAA6B,QAEzC,CAAC;AAGF,eAAO,MAAM,oBAAoB,QAA0B,CAAC;AAG5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAE3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACvD;AAGD,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAQR;AAQD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAuBlE;AAwID,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMrD"}
1
+ {"version":3,"file":"chart-set-lock.d.ts","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAGxD,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAG7D,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAG/C,eAAO,MAAM,oBAAoB,QAA0B,CAAC;AAG5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAE3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACvD;AAGD,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAQR;AAQD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAuBlE;AAuGD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMrD"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHART_DIGEST_PATTERN = exports.DEVELOP_CHART_VERSION_PATTERN = exports.DEVELOP_CHART_SHA_LENGTH = exports.DEVELOP_CHART_VERSION_PREFIX = exports.CHART_SET_LOCK_SCHEMA_VERSION = exports.CHART_SET_LOCK_FILENAME = exports.CHART_SET_LOCK_ENV = void 0;
3
+ exports.CHART_DIGEST_PATTERN = exports.CHART_SET_LOCK_SCHEMA_VERSION = exports.CHART_SET_LOCK_FILENAME = exports.CHART_SET_LOCK_ENV = void 0;
4
4
  exports.defaultChartSetLockPath = defaultChartSetLockPath;
5
5
  exports.loadChartSetLock = loadChartSetLock;
6
6
  exports.isMissingPath = isMissingPath;
@@ -9,9 +9,6 @@ const appliance_context_1 = require("./appliance-context");
9
9
  exports.CHART_SET_LOCK_ENV = 'XEMA_CHART_SET_LOCK';
10
10
  exports.CHART_SET_LOCK_FILENAME = 'chart-set.lock.json';
11
11
  exports.CHART_SET_LOCK_SCHEMA_VERSION = 4;
12
- exports.DEVELOP_CHART_VERSION_PREFIX = '0.0.0-dev.';
13
- exports.DEVELOP_CHART_SHA_LENGTH = 12;
14
- exports.DEVELOP_CHART_VERSION_PATTERN = new RegExp(`^${exports.DEVELOP_CHART_VERSION_PREFIX.replaceAll('.', '\\.')}[0-9a-f]{${exports.DEVELOP_CHART_SHA_LENGTH}}$`);
15
12
  exports.CHART_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;
16
13
  function defaultChartSetLockPath(env = process.env) {
17
14
  const declared = env[exports.CHART_SET_LOCK_ENV];
@@ -83,28 +80,9 @@ function parseChartSetLock(parsed, path) {
83
80
  function assertIndexDigest(publisher, index, path) {
84
81
  const where = `${path}: publisher '${index}'`;
85
82
  if (!Object.hasOwn(publisher, 'indexDigest')) {
86
- throw new Error(`${where} carries no 'indexDigest' key (required: sha256:<64 hex> for a ` +
87
- 'release index, null for a develop snapshot version).');
88
- }
89
- const { version, indexDigest } = publisher;
90
- if (typeof version === 'string' &&
91
- version.startsWith(exports.DEVELOP_CHART_VERSION_PREFIX) &&
92
- !exports.DEVELOP_CHART_VERSION_PATTERN.test(version)) {
93
- throw new Error(`${where} has malformed develop chart version ${JSON.stringify(version)}; ` +
94
- `a develop version is exactly ${exports.DEVELOP_CHART_VERSION_PREFIX}<${exports.DEVELOP_CHART_SHA_LENGTH} lowercase hex>.`);
95
- }
96
- const develop = typeof version === 'string' && exports.DEVELOP_CHART_VERSION_PATTERN.test(version);
97
- if (indexDigest === null) {
98
- if (!develop) {
99
- throw new Error(`${where} has indexDigest null with version ${JSON.stringify(version)}; ` +
100
- `null is only for a develop snapshot version (${exports.DEVELOP_CHART_VERSION_PREFIX}<sha12>).`);
101
- }
102
- return;
103
- }
104
- if (develop) {
105
- throw new Error(`${where} has an indexDigest with develop snapshot version ${String(version)}; ` +
106
- 'a develop snapshot has no index chart, so indexDigest must be null.');
83
+ throw new Error(`${where} carries no 'indexDigest' key (required: sha256:<64 hex>).`);
107
84
  }
85
+ const { indexDigest } = publisher;
108
86
  if (typeof indexDigest !== 'string' || !exports.CHART_DIGEST_PATTERN.test(indexDigest)) {
109
87
  throw new Error(`${where} has a malformed indexDigest (${JSON.stringify(indexDigest)}); ` +
110
88
  'expected sha256:<64 hex>.');
@@ -1 +1 @@
1
- {"version":3,"file":"chart-set-lock.js","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":";;;AA8DA,0DAUC;AAQD,4CAuBC;AAwID,sCAMC;AArPD,qCAAuC;AAEvC,2DAAiE;AAsBpD,QAAA,kBAAkB,GAAG,qBAAqB,CAAC;AAG3C,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAGhD,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAGlC,QAAA,4BAA4B,GAAG,YAAY,CAAC;AAG5C,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAG9B,QAAA,6BAA6B,GAAG,IAAI,MAAM,CACrD,IAAI,oCAA4B,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,YAAY,gCAAwB,IAAI,CAChG,CAAC;AAGW,QAAA,oBAAoB,GAAG,uBAAuB,CAAC;AAkB5D,SAAgB,uBAAuB,CACrC,MAAyB,OAAO,CAAC,GAAG;IAIpC,MAAM,QAAQ,GAAG,GAAG,CAAC,0BAAkB,CAAC,CAAC;IACzC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,IAAA,8CAA0B,EAAC,EAAE,GAAG,EAAE,CAAC,IAAI,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CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAGD,SAAgB,aAAa,CAAC,KAAc;IAC1C,MAAM,IAAI,GACR,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QACzC,CAAC,CAAE,KAA4B,CAAC,IAAI;QACpC,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,CAAC;AACjD,CAAC"}
@@ -3,14 +3,12 @@
3
3
  //
4
4
  // The publisher stamps its index chart with `xema.dev/chart-set-source-sha`
5
5
  // next to `xema.dev/chart-set-charts`. This verb reads that stamp from the index
6
- // chart at the digest the committed fleet `chart-set.lock.json` pins (a develop
7
- // lock has none and is refused), and prints one JSON document. It refuses,
6
+ // chart at the digest the committed fleet `chart-set.lock.json` pins and prints one JSON document. It refuses,
8
7
  // printing nothing, when the stamp is absent or is not a 40-hex commit, when the
9
8
  // registry does not serve the locked digest, or when the index's roster is not
10
9
  // the one the lock records for that publisher: the commit it would name would then be
11
10
  // the commit of a different set than the locked one.
12
11
 
13
- import { EditionChannel } from './edition-channel.mjs';
14
12
  import { assertRosteredChartSetLock } from './edition-chart-set.mjs';
15
13
  import { WorkspaceRoot, configureEditionWorkspaceFromProcess, isEntryModule } from './edition-workspace.mjs';
16
14
  import { COMMIT_PATTERN } from './evidence-grammars.mjs';
@@ -59,9 +57,6 @@ export async function chartSetSourceCommits({ client, lock }) {
59
57
  const publishers = [];
60
58
  for (const { index, repo, version, indexDigest, charts } of lock.publishers) {
61
59
  const label = `${index}@${version}`;
62
- if (indexDigest === null) {
63
- throw new Error(`${label}: a develop chart set names its deploy commit in the snapshot pins, not in an index chart (indexDigest is null)`);
64
- }
65
60
  // The index is read BY the digest the lock pins, so a re-pushed tag cannot answer.
66
61
  const served = await client.getManifestByDigest(registryRepository(index), indexDigest);
67
62
  if (served.digest !== indexDigest) {
@@ -89,7 +84,7 @@ async function main(argv) {
89
84
  if (lock === null) {
90
85
  throw new Error(`${chartSetLockPath()} is missing or is not JSON: run 'xema edition chart-set resolve' first`);
91
86
  }
92
- assertRosteredChartSetLock(lock, CHART_SET_LOCK_FILE, EditionChannel.Release);
87
+ assertRosteredChartSetLock(lock, CHART_SET_LOCK_FILE);
93
88
  const document = await chartSetSourceCommits({ client: chartRegistryClient(), lock });
94
89
  process.stdout.write(serializeJson(document));
95
90
  }
@@ -0,0 +1,61 @@
1
+ // develop-chart-set — the chart-set lock of a develop edition.
2
+ //
3
+ // A develop edition renders with the charts the publisher actually published:
4
+ // the committed release chart-set lock's entries (names, content versions and
5
+ // digests, and each index digest), unchanged. xema-deploy publishes charts per
6
+ // content version (`<n>-h<16 hex>`) for the commit its release set was closed
7
+ // at, so that commit is the only deploy commit whose charts exist in the
8
+ // registry. A develop edition frozen at that commit takes the release lock
9
+ // as it is, and asks the registry nothing about a chart's tag; a develop edition
10
+ // frozen at any other commit is refused, because no chart was published for it
11
+ // (a develop chart lane in xema-deploy is the owner's decision, not built).
12
+
13
+ import { basename } from 'node:path';
14
+
15
+ import { chartSetSourceCommits } from './chart-set-source-commit.mjs';
16
+ import { assertRosteredChartSetLock } from './edition-chart-set.mjs';
17
+ import { COMMIT_PATTERN } from './evidence-grammars.mjs';
18
+ import { deployPinKey } from './pin-source.mjs';
19
+ import { CHART_SET_LOCK_FILE, chartRegistryClient, chartSetLockPath, readLock } from './resolve-chart-set.mjs';
20
+
21
+ /** The source commits of `lock`'s publishers, read from their index charts at the digests the lock pins. */
22
+ const registrySourceCommits = (lock) => chartSetSourceCommits({ client: chartRegistryClient(), lock });
23
+
24
+ /**
25
+ * The develop chart-set lock for the deploy commit `xemaDeploySha`: the committed
26
+ * release lock, when that lock's deploy publisher closed its set at this commit.
27
+ * `readSourceCommits(lock)` defaults to the chart registry's index charts and
28
+ * returns `{publishers: [{repo, sourceCommit}]}`.
29
+ *
30
+ * TEMPORARY BRIDGE (owner: edition, lead D41 10-13): only the release set's
31
+ * source commit is resolvable here. Exit: develop charts resolved by content
32
+ * version (edition T37: the shared developChartVersionFromDigest, published by
33
+ * xema-deploy publish-charts on develop pushes), which replaces this function
34
+ * before t348-i2 lands.
35
+ */
36
+ export async function resolveDevelopChartSet({ xemaDeploySha, releaseLock = readLock(), readSourceCommits = registrySourceCommits }) {
37
+ if (!COMMIT_PATTERN.test(xemaDeploySha ?? '')) {
38
+ throw new Error(`the deploy checkout SHA is not a 40-hex commit: ${JSON.stringify(xemaDeploySha)}`);
39
+ }
40
+ if (releaseLock === null) {
41
+ throw new Error(`${chartSetLockPath()} is missing or is not JSON: run 'xema edition chart-set resolve' first`);
42
+ }
43
+ assertRosteredChartSetLock(releaseLock, CHART_SET_LOCK_FILE);
44
+ const deployRepo = basename(deployPinKey());
45
+ const deployPublishers = releaseLock.publishers.filter((publisher) => basename(publisher.repo) === deployRepo);
46
+ if (deployPublishers.length !== 1) {
47
+ throw new Error(
48
+ `${deployPublishers.length} chart publishers of ${CHART_SET_LOCK_FILE} have repository ${deployRepo} (the deploy pin role); exactly one must, ` +
49
+ 'since its source commit is the one commit whose charts were published',
50
+ );
51
+ }
52
+ const { sourceCommit } = (await readSourceCommits(releaseLock)).publishers.find((publisher) => publisher.index === deployPublishers[0].index) ?? {};
53
+ if (sourceCommit !== xemaDeploySha) {
54
+ throw new Error(
55
+ `the develop deploy commit ${xemaDeploySha} is not the commit ${CHART_SET_LOCK_FILE} was published from (${sourceCommit}): ` +
56
+ 'develop charts are only published for the release set\'s source commit, so no chart exists for this commit. ' +
57
+ 'A develop chart lane in the deploy repository is required to develop at another commit (owner decision, not built)',
58
+ );
59
+ }
60
+ return releaseLock;
61
+ }
@@ -2,26 +2,26 @@
2
2
  //
3
3
  // The whole pipeline, in the order the release runs it, over the snapshot's
4
4
  // injected inputs: distribution lock -> authorization base (composed, never
5
- // written) -> images lock -> develop seal, plus the chart-set lock: the frozen
6
- // xema-deploy charts' registry manifest digests, in the release roster shape. Nothing here writes to the editions
5
+ // written) -> images lock -> develop seal, plus the chart-set lock: the release
6
+ // lock's published charts (develop-chart-set.mjs). Nothing here writes to the editions
7
7
  // trees; the caller writes the artifact (edition-artifact.mjs).
8
8
 
9
9
  import { adapterHostRow, assertAdapterBundlesMatchHost, fetchRegistryManifest } from './adapter-bundled-versions.mjs';
10
10
  import { biomeSourceTreeIds, sealLock } from './biome-content.mjs';
11
11
  import { buildCatalogue } from './catalogue.mjs';
12
+ import { resolveDevelopChartSet } from './develop-chart-set.mjs';
12
13
  import { sealDevelopImages } from './develop-seal.mjs';
13
14
  import { assertFrozenCheckouts, buildSnapshotInputs } from './develop-snapshot-inputs.mjs';
14
15
  import { EditionChannel } from './edition-constants.mjs';
15
- import { deployRoot, kernelPackageDir } from './edition-workspace.mjs';
16
+ import { kernelPackageDir } from './edition-workspace.mjs';
16
17
  import { kernelPackageOfAuthority } from './kernel-package.mjs';
17
18
  import { loadKernelDistributionSchemas } from './lib.mjs';
18
19
  import { deployPinKey } from './pin-source.mjs';
19
- import { resolveDevelopChartSet } from './resolve-chart-set.mjs';
20
20
  import { composeAuthorizationBase, resolveDistributionWithIndex } from './resolve-distribution.mjs';
21
21
  import { externalSourceTrees, resolveImages, sourceTreeLocator } from './resolve-images.mjs';
22
22
  import { createPinnedSourceAuthority } from './source-authority.mjs';
23
23
 
24
- export async function resolveDevelopEdition({ id, pins, env = process.env, sealOptions = {}, chartDigestLookup, fetchKernelTarball, fetchManifest = fetchRegistryManifest }) {
24
+ export async function resolveDevelopEdition({ id, pins, env = process.env, sealOptions = {}, readSourceCommits, fetchKernelTarball, fetchManifest = fetchRegistryManifest }) {
25
25
  const schemas = await loadKernelDistributionSchemas();
26
26
  assertFrozenCheckouts(pins);
27
27
  const inputs = await buildSnapshotInputs({ id, pins, schemas });
@@ -41,9 +41,8 @@ export async function resolveDevelopEdition({ id, pins, env = process.env, sealO
41
41
  vendoredCommit: (repo) => authority.vendoredSourceCommitForRepository(repo),
42
42
  });
43
43
  const chartSetLock = await resolveDevelopChartSet({
44
- xemaDeployDir: deployRoot(),
45
44
  xemaDeploySha: pins[deployPinKey()],
46
- lookup: chartDigestLookup,
45
+ ...(readSourceCommits === undefined ? {} : { readSourceCommits }),
47
46
  });
48
47
  const sourceTreeIds = await biomeSourceTreeIds({
49
48
  schemas,
@@ -37,7 +37,6 @@ import {
37
37
  loadKernelAuthorizationComposer,
38
38
  } from './authorization-base.mjs';
39
39
  import { verifyBiomeContentHashes } from './biome-content.mjs';
40
- import { EditionChannel } from './edition-channel.mjs';
41
40
  import {
42
41
  EDITION_CHART_SET_FILE,
43
42
  EditionChartSetCheck,
@@ -951,7 +950,7 @@ async function main() {
951
950
  let chartSetPinText = null;
952
951
  try {
953
952
  chartSetPinText = readFileSync(fleetChartSetLockPath(), 'utf8');
954
- assertRosteredChartSetLock(JSON.parse(chartSetPinText), EDITION_CHART_SET_FILE, EditionChannel.Release);
953
+ assertRosteredChartSetLock(JSON.parse(chartSetPinText), EDITION_CHART_SET_FILE);
955
954
  } catch (err) {
956
955
  console.error(`[dist:check] chart-set pin: ${err.message}. Run \`${commandFor('resolve-chart-set.mjs')}\`.`);
957
956
  failed = true;
@@ -276,7 +276,7 @@ export function writeEditionArtifact({
276
276
  throw new Error(`edition "${distributionId}" has no ${file}: an edition carries all four locks`);
277
277
  }
278
278
  }
279
- assertRosteredChartSetLock(chartSetLock, EDITION_CHART_SET_FILE, channel);
279
+ assertRosteredChartSetLock(chartSetLock, EDITION_CHART_SET_FILE);
280
280
  const descriptor = editionDescriptor({ distributionId, channel, pins, workflow, evidenceTrustPolicy, engineImage });
281
281
  mkdirSync(outDir, { recursive: true });
282
282
  for (const [file, value] of [[EDITION_DESCRIPTOR_FILE, descriptor], ...byFile]) {
@@ -26,7 +26,6 @@
26
26
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
27
27
  import { join } from 'node:path';
28
28
 
29
- import { EditionChannel } from './edition-channel.mjs';
30
29
  import { dataRoot } from './edition-workspace.mjs';
31
30
 
32
31
  export const EDITION_CHART_SET_FILE = 'chart-set.lock.json';
@@ -39,38 +38,12 @@ export const EditionChartSetCheck = Object.freeze({
39
38
  STALE: 'stale',
40
39
  });
41
40
 
42
- /**
43
- * A published chart's version coordinate, per channel: `-h<16 hex>` (content
44
- * hash) in a release chart set, `-dev.<12 hex>` (the frozen xema-deploy SHA) in a
45
- * develop one. One lock SHAPE serves both; the coordinate is what the producer
46
- * of each channel writes, so each producer validates its own channel's (this is
47
- * a check of what is being written, not a branch of any reader).
48
- */
49
- const CHART_VERSION_COORDINATE = Object.freeze({
50
- [EditionChannel.Release]: /-h[0-9a-f]{16}$/,
51
- [EditionChannel.Develop]: /-dev\.[0-9a-f]{12}$/,
52
- });
41
+ /** A published chart's version coordinate: `-h<16 hex>`, the content hash its publisher mints. A develop chart set takes the release set's charts, so it carries the same coordinate. */
42
+ const CHART_VERSION_COORDINATE = /-h[0-9a-f]{16}$/;
53
43
 
54
44
  /** The chart-set lock schema every reader accepts; a lock of any other schema is re-resolved, never migrated. */
55
45
  export const CHART_SET_LOCK_SCHEMA_VERSION = 4;
56
46
 
57
- /** The version prefix of a develop snapshot chart set (`0.0.0-dev.<sha12>`): xema-deploy's frozen-SHA charts, which have no index chart. */
58
- export const DEVELOP_CHART_VERSION_PREFIX = '0.0.0-dev.';
59
-
60
- /** The length of the lowercase-hex xema-deploy SHA a develop snapshot version carries. */
61
- export const DEVELOP_CHART_SHA_LENGTH = 12;
62
-
63
- /** The full develop snapshot version grammar: `0.0.0-dev.<12 lowercase hex>`, anchored. */
64
- export const DEVELOP_CHART_VERSION_PATTERN = new RegExp(
65
- `^${DEVELOP_CHART_VERSION_PREFIX.replaceAll('.', '\\.')}[0-9a-f]{${DEVELOP_CHART_SHA_LENGTH}}$`,
66
- );
67
-
68
- /** Does `version` start with the develop prefix, whether or not it is the full develop grammar? */
69
- export const hasDevelopChartVersionPrefix = (version) => typeof version === 'string' && version.startsWith(DEVELOP_CHART_VERSION_PREFIX);
70
-
71
- /** Is `version` a develop snapshot version? The one predicate for "this publisher has no index chart". */
72
- export const isDevelopChartVersion = (version) => typeof version === 'string' && DEVELOP_CHART_VERSION_PATTERN.test(version);
73
-
74
47
  /** An OCI manifest digest: `sha256:` and 64 lowercase hex. */
75
48
  export const OCI_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;
76
49
 
@@ -79,15 +52,10 @@ export const RESOLVE_CHART_SET_INSTRUCTION = 're-resolve the chart set with `xem
79
52
 
80
53
  /**
81
54
  * A chart-set lock (schemaVersion 4) that pins every member by version and OCI
82
- * manifest digest, with `channel`'s version coordinate, and pins each publisher's
83
- * index chart by `indexDigest` (null exactly for a develop snapshot version,
84
- * which has no index chart; the release channel refuses null).
55
+ * manifest digest, with the `-h<16 hex>` content coordinate, and pins each
56
+ * publisher's index chart by `indexDigest` (always a sha256 digest).
85
57
  */
86
- export function assertRosteredChartSetLock(lock, label, channel) {
87
- const coordinate = CHART_VERSION_COORDINATE[channel];
88
- if (coordinate === undefined) {
89
- throw new Error(`${label}: cannot validate a chart-set lock for channel ${JSON.stringify(channel)}; expected ${Object.values(EditionChannel).join(' | ')}`);
90
- }
58
+ export function assertRosteredChartSetLock(lock, label) {
91
59
  const fail = (why) => {
92
60
  throw new Error(`${label} is not a rostered chart-set lock: ${why}`);
93
61
  };
@@ -101,30 +69,20 @@ export function assertRosteredChartSetLock(lock, label, channel) {
101
69
  }
102
70
  for (const [name, member] of Object.entries(pin.charts)) {
103
71
  if (!member || typeof member !== 'object' || Array.isArray(member)) {fail(`${pin.index}: ${name} must be {version, digest}`);}
104
- if (!coordinate.test(String(member.version))) {fail(`${pin.index}: ${name} has no ${channel} content coordinate (${member.version}); a ${channel} chart set carries ${coordinate}`);}
72
+ if (!CHART_VERSION_COORDINATE.test(String(member.version))) {fail(`${pin.index}: ${name} has no content coordinate (${member.version}); a chart set carries ${CHART_VERSION_COORDINATE}`);}
105
73
  if (!OCI_DIGEST_PATTERN.test(String(member.digest))) {fail(`${pin.index}: ${name} has no sha256 manifest digest`);}
106
74
  }
107
- assertIndexDigest(pin, position, channel, fail);
75
+ assertIndexDigest(pin, position, fail);
108
76
  }
109
77
  return lock;
110
78
  }
111
79
 
112
- /** The `indexDigest` rule: present, a sha256 digest unless the version is a develop snapshot (then null), and never null in a release lock. */
113
- function assertIndexDigest(pin, position, channel, fail) {
80
+ /** The `indexDigest` rule: the key is present and is a sha256 digest. */
81
+ function assertIndexDigest(pin, position, fail) {
114
82
  const where = `publisher ${position} (${pin?.index ?? '?'})`;
115
83
  if (!pin || typeof pin !== 'object' || !Object.hasOwn(pin, 'indexDigest')) {
116
- fail(`${where} carries no indexDigest key (required: "sha256:<64 hex>" for a release index, null for a develop snapshot version)`);
117
- }
118
- if (hasDevelopChartVersionPrefix(pin.version) && !isDevelopChartVersion(pin.version)) {
119
- fail(`${where} has malformed develop chart version ${JSON.stringify(pin.version)}; a develop version is exactly ${DEVELOP_CHART_VERSION_PREFIX}<${DEVELOP_CHART_SHA_LENGTH} lowercase hex>`);
120
- }
121
- const develop = isDevelopChartVersion(pin.version);
122
- if (pin.indexDigest === null) {
123
- if (!develop) {fail(`${where} has indexDigest null with version ${JSON.stringify(pin.version)}; null is only for a develop snapshot version (${DEVELOP_CHART_VERSION_PREFIX}<sha12>)`);}
124
- if (channel === EditionChannel.Release) {fail(`${where} has indexDigest null, which a release chart set refuses; a release index chart is pinned by digest`);}
125
- return;
84
+ fail(`${where} carries no indexDigest key (required: "sha256:<64 hex>")`);
126
85
  }
127
- if (develop) {fail(`${where} has an indexDigest with develop snapshot version ${pin.version}; a develop snapshot has no index chart, so indexDigest must be null`);}
128
86
  if (!OCI_DIGEST_PATTERN.test(String(pin.indexDigest))) {fail(`${where} has a malformed indexDigest (${JSON.stringify(pin.indexDigest)}); expected "sha256:<64 lowercase hex>"`);}
129
87
  }
130
88
 
@@ -134,7 +92,7 @@ function assertIndexDigest(pin, position, channel, fail) {
134
92
  * coordinates is written.
135
93
  */
136
94
  export function writeEditionChartSet(editionDir, pinText) {
137
- assertRosteredChartSetLock(JSON.parse(pinText), EDITION_CHART_SET_FILE, EditionChannel.Release);
95
+ assertRosteredChartSetLock(JSON.parse(pinText), EDITION_CHART_SET_FILE);
138
96
  writeFileSync(join(editionDir, EDITION_CHART_SET_FILE), pinText);
139
97
  }
140
98
 
@@ -503,6 +503,15 @@ export function lockedSdkVersions({ repoRoot = sourcesRoot(), repo, commit }) {
503
503
  return [...versions].sort();
504
504
  }
505
505
 
506
+ /**
507
+ * Does comment-blanked executable source CALL the tolerant reader? Both the source form `parseDistributionLockForReading(x)`
508
+ * and the compiled CommonJS form `(0, mod.parseDistributionLockForReading)(x)` are calls; a bare reference (an export, a
509
+ * re-export) is not, and a docblock mention is blanked before this runs.
510
+ */
511
+ export function callsReader(executable) {
512
+ return /\bparseDistributionLockForReading\s*(?:\)\s*)?\(/u.test(executable);
513
+ }
514
+
506
515
  /**
507
516
  * Does the PUBLISHED SDK at `version` parse the lock with the kernel READER?
508
517
  * Asked of the tarball's own executable source (comments blanked), so a
@@ -528,7 +537,7 @@ export function sdkReadsWithReader(version) {
528
537
  );
529
538
  }
530
539
  const executable = blankAllComments(readFileSync(module, 'utf8'));
531
- const readsWithReader = /\bparseDistributionLockForReading\s*\(/u.test(executable);
540
+ const readsWithReader = callsReader(executable);
532
541
  sdkModeCache.set(version, readsWithReader);
533
542
  return readsWithReader;
534
543
  }
@@ -17,7 +17,7 @@ import { join, resolve } from 'node:path';
17
17
 
18
18
  import { isDevelopImageRef } from './develop-image-coordinate.mjs';
19
19
  import { EDITION_CHART_SET_FILE, assertRosteredChartSetLock } from './edition-chart-set.mjs';
20
- import { EditionChannel, EditionLockFile } from './edition-constants.mjs';
20
+ import { EditionLockFile } from './edition-constants.mjs';
21
21
  import { isEntryModule } from './edition-workspace.mjs';
22
22
 
23
23
  /** Throws when `value` (a parsed JSON document) names a develop image repository. `where` names it in the refusal. */
@@ -30,10 +30,9 @@ export function assertReleaseContent(value, where) {
30
30
  'a release lock names release repositories only',
31
31
  );
32
32
  }
33
- // A chart-set lock (one with a roster of publishers) carries release chart
34
- // coordinates only: a develop chart set copied into a release is refused.
33
+ // A chart-set lock (one with a roster of publishers) carries content coordinates only.
35
34
  if (Array.isArray(value.publishers)) {
36
- assertRosteredChartSetLock(value, where, EditionChannel.Release);
35
+ assertRosteredChartSetLock(value, where);
37
36
  }
38
37
  }
39
38
 
@@ -123,7 +123,7 @@ export async function readCommittedEdition(id, root = editionsRoot()) {
123
123
  distributionLock,
124
124
  imageLock: read(EditionLockFile.Images),
125
125
  authorizationLock: read(EditionLockFile.Authorization),
126
- chartSetLock: assertRosteredChartSetLock(read(EditionLockFile.ChartSet), join(dir, EditionLockFile.ChartSet), EditionChannel.Release),
126
+ chartSetLock: assertRosteredChartSetLock(read(EditionLockFile.ChartSet), join(dir, EditionLockFile.ChartSet)),
127
127
  };
128
128
  }
129
129
 
@@ -55,27 +55,21 @@
55
55
  // shape this plane has been bitten by: a claim that outlives its evidence.
56
56
 
57
57
  import { existsSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
58
- import { basename, join } from 'node:path';
58
+ import { join } from 'node:path';
59
59
 
60
- import { EditionChannel } from './edition-channel.mjs';
61
60
  import {
62
61
  EDITION_CHART_SET_FILE,
63
62
  CHART_SET_LOCK_SCHEMA_VERSION,
64
- DEVELOP_CHART_VERSION_PREFIX,
65
63
  EditionChartSetCheck,
66
64
  OCI_DIGEST_PATTERN,
67
65
  assertRosteredChartSetLock,
68
66
  checkEditionChartSet,
69
- DEVELOP_CHART_SHA_LENGTH,
70
- hasDevelopChartVersionPrefix,
71
- isDevelopChartVersion,
72
67
  writeEditionChartSet,
73
68
  } from './edition-chart-set.mjs';
74
69
  import { vendorChartSetConfig } from './edition-config.mjs';
75
70
  import { WorkspaceRoot, configureEditionWorkspaceFromProcess, dataRoot, editionsRoot, isEntryModule } from './edition-workspace.mjs';
76
71
  import { serializeJson } from './lib.mjs';
77
72
  import { OrasRegistry } from './oras.mjs';
78
- import { deployPinKey } from './pin-source.mjs';
79
73
  import {
80
74
  loadRegistryCredentialDeclarations,
81
75
  resolveRegistryCredential,
@@ -129,11 +123,8 @@ export function isVersionTag(tag) {
129
123
  * last: guessing an order for a coordinate whose age is unknown is how a stale
130
124
  * set gets pinned as current.
131
125
  */
132
- export function selectNewestIndex(allCandidates) {
133
- if (!Array.isArray(allCandidates)) {return null;}
134
- // Anything with the develop prefix (`0.0.0-dev.`) is a frozen xema-deploy
135
- // snapshot or a malformed develop version, never a release index: it is not a candidate for the release pin.
136
- const candidates = allCandidates.filter((c) => !hasDevelopChartVersionPrefix(c.tag));
126
+ export function selectNewestIndex(candidates) {
127
+ if (!Array.isArray(candidates)) {return null;}
137
128
  if (candidates.length === 0) {return null;}
138
129
  const undated = candidates.filter((c) => !c.createdAt);
139
130
  if (undated.length > 0) {
@@ -155,8 +146,7 @@ export const INDEX_ROSTER_ANNOTATION = 'xema.dev/chart-set-charts';
155
146
 
156
147
  /**
157
148
  * The lock for `publishers`: each publisher's index version, the manifest digest
158
- * the registry served for that index (`indexDigestsByIndex`, null for a develop
159
- * snapshot, which has no index chart), and its sealed roster.
149
+ * the registry served for that index (`indexDigestsByIndex`), and its sealed roster.
160
150
  */
161
151
  export function buildLock(versionsByIndex, rostersByIndex, indexDigestsByIndex, publishers = chartSetPublishers()) {
162
152
  // Every publisher's VERSION first: a pin that resolved nothing for one half is
@@ -193,9 +183,8 @@ export function buildLock(versionsByIndex, rostersByIndex, indexDigestsByIndex,
193
183
  }
194
184
  // The digest the registry served for the index manifest the roster was read from.
195
185
  const indexDigest = indexDigestsByIndex?.[publisher.index];
196
- const wellFormed = isDevelopChartVersion(version) ? indexDigest === null : DIGEST_PATTERN.test(String(indexDigest));
197
- if (!wellFormed) {
198
- throw new Error(`no index manifest digest was read for '${publisher.index}@${version}' (got ${JSON.stringify(indexDigest ?? null)}; a release index needs sha256:<64 hex>, a develop snapshot null)`);
186
+ if (!DIGEST_PATTERN.test(String(indexDigest))) {
187
+ throw new Error(`no index manifest digest was read for '${publisher.index}@${version}' (got ${JSON.stringify(indexDigest ?? null)}; a release index needs sha256:<64 hex>)`);
199
188
  }
200
189
  return { ...publisher, version, indexDigest, charts };
201
190
  }),
@@ -277,63 +266,12 @@ function editionDirs() {
277
266
  .sort();
278
267
  }
279
268
 
280
- const SHA_PATTERN = /^[0-9a-f]{40}$/;
281
-
282
- /** The develop chart version xema-deploy publishes for a frozen SHA: `0.0.0-dev.<sha12>`, also the OCI tag. */
283
- export const developChartVersion = (sha) => `${DEVELOP_CHART_VERSION_PREFIX}${sha.slice(0, DEVELOP_CHART_SHA_LENGTH)}`;
284
-
285
- /** Every chart (a directory with a Chart.yaml, library charts included) of an xema-deploy checkout, sorted. */
286
- function deployChartNames(xemaDeployDir) {
287
- const chartsDir = join(xemaDeployDir, 'charts');
288
- if (!existsSync(chartsDir)) {throw new Error(`${xemaDeployDir} has no charts/ directory`);}
289
- return readdirSync(chartsDir, { withFileTypes: true })
290
- .filter((entry) => entry.isDirectory() && existsSync(join(chartsDir, entry.name, 'Chart.yaml')))
291
- .map((entry) => entry.name)
292
- .sort();
293
- }
294
-
295
269
  /** The registry client for the chart registry, with the data root's declared credential. */
296
270
  export function chartRegistryClient() {
297
271
  const credential = resolveRegistryCredential({ authority: registryAuthority(), declarations: loadRegistryCredentialDeclarations() });
298
272
  return new OrasRegistry({ credential });
299
273
  }
300
274
 
301
- /** The manifest digest the chart registry serves for `<chart>:<version>`. */
302
- const registryManifestDigest = (client) => async (name, version) =>
303
- (await client.getManifestByTag(registryRepository(name), version)).digest;
304
-
305
- /**
306
- * The develop chart-set lock: the SAME rostered lock a release pins, over the
307
- * charts xema-deploy publishes for the frozen SHA. The deploy publisher (the
308
- * workspace publisher whose repository is the deploy pin role's) publishes every
309
- * chart directory of its tree at `0.0.0-dev.<sha12>`; the roster records each
310
- * chart's registry manifest digest, so a consumer pulls by digest exactly as it
311
- * does for a release. A chart the registry does not serve is refused by name.
312
- * `lookup(name, version)` defaults to the chart registry and returns the digest.
313
- */
314
- export async function resolveDevelopChartSet({ xemaDeployDir, xemaDeploySha, lookup }) {
315
- if (!SHA_PATTERN.test(xemaDeploySha ?? '')) {
316
- throw new Error(`the deploy checkout SHA is not a 40-hex commit: ${JSON.stringify(xemaDeploySha)}`);
317
- }
318
- const names = deployChartNames(xemaDeployDir);
319
- if (names.length === 0) {throw new Error(`the deploy checkout at ${xemaDeploySha} has no chart (charts/<name>/Chart.yaml)`);}
320
- const deployRepo = basename(deployPinKey());
321
- const publishers = chartSetPublishers().filter((publisher) => basename(publisher.repo) === deployRepo);
322
- if (publishers.length !== 1) {
323
- throw new Error(
324
- `${publishers.length} chart publishers have repository ${deployRepo} (the deploy pin role); exactly one must, ` +
325
- 'since it is the publisher whose develop charts this lock pins',
326
- );
327
- }
328
- const version = developChartVersion(xemaDeploySha);
329
- const digestOf = lookup ?? registryManifestDigest(chartRegistryClient());
330
- const roster = Object.fromEntries(names.map((name) => [name, { version }]));
331
- const sealed = await sealRoster(roster, digestOf, `${publishers[0].index}@${version}`);
332
- // A develop snapshot has no index chart: its roster is the deploy checkout's chart directories.
333
- const lock = buildLock({ [publishers[0].index]: version }, { [publishers[0].index]: sealed }, { [publishers[0].index]: null }, publishers);
334
- return assertRosteredChartSetLock(lock, EDITION_CHART_SET_FILE, EditionChannel.Develop);
335
- }
336
-
337
275
  export function readLock(path = chartSetLockPath()) {
338
276
  try {
339
277
  return JSON.parse(readFileSync(path, 'utf8'));
@@ -395,7 +333,7 @@ async function main(argv) {
395
333
  const check = argv.includes('--check');
396
334
  const { versionsByIndex, rostersByIndex, indexDigestsByIndex } = await resolveFromRegistry();
397
335
  const next = buildLock(versionsByIndex, rostersByIndex, indexDigestsByIndex);
398
- assertRosteredChartSetLock(next, CHART_SET_LOCK_FILE, EditionChannel.Release);
336
+ assertRosteredChartSetLock(next, CHART_SET_LOCK_FILE);
399
337
  const pinText = serializeJson(next);
400
338
  const current = readLock();
401
339
  // The pin AND every edition's copy of it: one writer, one run, so the N copies
@@ -326,7 +326,7 @@ export async function resolveCustomerEdition(request) {
326
326
  const imageLock = await resolveCustomerImages({ id, catalogue, lock, composed, schemas, inputs, sealOwn: request.sealOwn });
327
327
  // The chart-set is copied whole, so it carries the coordinates of the channel it was published on:
328
328
  // the edition being written states its channel, and a chart-set of the other one is refused here.
329
- const chartSetLock = assertRosteredChartSetLock(catalogue.chartSet, `the catalogue's chart-set of "${catalogue.offeringId}"`, request.channel);
329
+ const chartSetLock = assertRosteredChartSetLock(catalogue.chartSet, `the catalogue's chart-set of "${catalogue.offeringId}"`);
330
330
  return { id, distributionLock: lock, imageLock, authorizationLock, chartSetLock };
331
331
  }
332
332
 
@@ -470,22 +470,17 @@ function replaceLocksTogether(documents) {
470
470
  }
471
471
 
472
472
  /**
473
- * The seal of one edition's two locks, as ONE write.
474
- *
475
- * `digests` (`kind:id` -> registry digest) are the image digests this run seals
476
- * into the images lock. Each biome's `biomeContentHash` is then RECOMPUTED from
477
- * its sources over that sealed images lock, and the unsealed distribution lock
478
- * the resolver wrote is turned into the v5 lock by the kernel's
479
- * `sealDistributionLock`. A distribution lock that is already sealed is VERIFIED
480
- * instead: every hash is recomputed and a mismatch is refused, naming the biome.
481
- *
482
- * Nothing is written until both documents exist in memory, and the distribution
483
- * lock is renamed LAST: a seal that fails for any reason before that leaves the
484
- * committed pair as it was, and the one state a crash between the two renames
485
- * can leave (images sealed, distribution unsealed) is refused by every reader of
486
- * a sealed edition.
473
+ * The lock the images of an edition will actually READ, built IN MEMORY: the committed lock sealed against the image lock
474
+ * carrying `digests`. Nothing is written. The readability grader asks its question of THIS, never of the committed
475
+ * unsealed form, which every contracts reader refuses for want of a `schemaVersion` whatever the repositories do.
487
476
  */
488
- export async function sealEditionLocks({ distributionId, root, digests = new Map(), check = false, label = 'dist:seal-digests', vendoredCommit, catalogue, catalogueDigest, fetchManifest = fetchRegistryManifest }) {
477
+ export async function buildSealedEditionLock(options) {
478
+ const { prepared } = await prepareEditionSeal({ ...options, checkAdapters: false, check: false });
479
+ return prepared.result.lock;
480
+ }
481
+
482
+ /** The shared in-memory half of the seal: reads both locks, applies `digests`, seals or verifies. Writes nothing. */
483
+ async function prepareEditionSeal({ distributionId, root, digests = new Map(), check = false, vendoredCommit, catalogue, catalogueDigest, fetchManifest = fetchRegistryManifest, checkAdapters = true }) {
489
484
  const schemas = await loadKernelDistributionSchemas();
490
485
  const lockPath = join(root, distributionId, 'distribution.lock.json');
491
486
  const imagesPath = join(root, distributionId, 'images.lock.json');
@@ -514,7 +509,7 @@ export async function sealEditionLocks({ distributionId, root, digests = new Map
514
509
  const editionInputs = catalogue === undefined && vendoredCommit === undefined ? await editionPinnedInputs(distributionId, { schemas }) : undefined;
515
510
  const pinned = vendoredCommit ?? ((repo) => createPinnedSourceAuthority({ pins: editionInputs?.repositoryPins ?? committedRepositoryPins() }).vendoredSourceCommitForRepository(repo));
516
511
  const lockDocument = raw !== null && typeof raw === 'object' && 'unsealedSchema' in raw ? schemas.parseUnsealedDistributionLock(raw) : schemas.parseDistributionLock(raw);
517
- if (lockMountsAdapters(lockDocument)) {
512
+ if (checkAdapters && lockMountsAdapters(lockDocument)) {
518
513
  // The adapter host's row: the verified catalogue's for a customer, the data root's biome index for the vendor.
519
514
  const rows = catalogue !== undefined ? catalogue.biomes : (editionInputs?.biomeIndex ?? JSON.parse(readFileSync(biomeIndexPath(), 'utf8')));
520
515
  await assertAdapterBundlesMatchHost({ lock: lockDocument, hostRow: adapterHostRow(rows), fetchManifest });
@@ -530,6 +525,28 @@ export async function sealEditionLocks({ distributionId, root, digests = new Map
530
525
  check,
531
526
  lockPath,
532
527
  });
528
+ return { prepared: { result, rawImages, applied, lockPath, imagesPath } };
529
+ }
530
+
531
+ /**
532
+ * The seal of one edition's two locks, as ONE write.
533
+ *
534
+ * `digests` (`kind:id` -> registry digest) are the image digests this run seals
535
+ * into the images lock. Each biome's `biomeContentHash` is then RECOMPUTED from
536
+ * its sources over that sealed images lock, and the unsealed distribution lock
537
+ * the resolver wrote is turned into the v5 lock by the kernel's
538
+ * `sealDistributionLock`. A distribution lock that is already sealed is VERIFIED
539
+ * instead: every hash is recomputed and a mismatch is refused, naming the biome.
540
+ *
541
+ * Nothing is written until both documents exist in memory, and the distribution
542
+ * lock is renamed LAST: a seal that fails for any reason before that leaves the
543
+ * committed pair as it was, and the one state a crash between the two renames
544
+ * can leave (images sealed, distribution unsealed) is refused by every reader of
545
+ * a sealed edition.
546
+ */
547
+ export async function sealEditionLocks({ distributionId, root, digests = new Map(), check = false, label = 'dist:seal-digests', vendoredCommit, catalogue, catalogueDigest, fetchManifest = fetchRegistryManifest }) {
548
+ const { prepared } = await prepareEditionSeal({ distributionId, root, digests, check, vendoredCommit, catalogue, catalogueDigest, fetchManifest });
549
+ const { result, rawImages, applied, lockPath, imagesPath } = prepared;
533
550
  replaceLocksTogether([
534
551
  ...(applied > 0 ? [{ path: imagesPath, text: `${JSON.stringify(rawImages, null, 2)}\n` }] : []),
535
552
  ...(result.sealed ? [{ path: lockPath, text: serializeJson(result.lock) }] : []),
@@ -760,10 +777,22 @@ async function main() {
760
777
  //
761
778
  // The practical rule for anything added below: the distribution lock may be
762
779
  // regenerated to answer a question; the image lock may not.
780
+ const { writes, unchanged } = planDigestSeal({
781
+ subjects: imageLock.subjects,
782
+ verified: report.subjects,
783
+ });
784
+
785
+ const planned = new Map();
786
+ for (const w of writes) {planned.set(w.key, w.digest);}
763
787
  await assertPlatformCanParseLock({
764
- lock: JSON.parse(
765
- readFileSync(join(root, distributionId, 'distribution.lock.json'), 'utf8'),
766
- ),
788
+ // The lock the images will READ: sealed in memory with this run's digests, never the committed unsealed form.
789
+ lock: await buildSealedEditionLock({
790
+ distributionId,
791
+ root,
792
+ digests: planned,
793
+ catalogue,
794
+ catalogueDigest,
795
+ }),
767
796
  imageLock,
768
797
  distributionId,
769
798
  // A vendor edition grades the pins it RESOLVES at (a held repository is graded at the held commit);
@@ -774,11 +803,6 @@ async function main() {
774
803
  : JSON.parse(readFileSync(runtimeImageSourceIndexPath(), 'utf8')),
775
804
  });
776
805
 
777
- const { writes, unchanged } = planDigestSeal({
778
- subjects: imageLock.subjects,
779
- verified: report.subjects,
780
- });
781
-
782
806
  const label = check ? 'dist:seal-digests --check' : 'dist:seal-digests';
783
807
  console.log(
784
808
  `[${label}] "${distributionId}": ${report.subjectCount} subjects verified against ` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/xema",
3
- "version": "0.33.3",
3
+ "version": "0.33.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/xema-dev/xema-cli.git",
@@ -92,6 +92,6 @@
92
92
  "typecheck": "tsc --noEmit"
93
93
  },
94
94
  "xemaRelease": {
95
- "sourceDigest": "sha256:fddbe95c5e82a8ecc251e4d62f65718c96630117ec28d6fb9c8f0f05174432bc"
95
+ "sourceDigest": "sha256:2454817b84225bef480391ca4e8b54c1f2114fb6e3ea60daa96eaa6b810584f2"
96
96
  }
97
97
  }