@serene-pub/conformance 0.6.0-pr-8 β 0.6.0-pr-9
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/dist/index.d.ts +6 -0
- package/dist/index.js +51 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ import { type ComponentView } from './components.js';
|
|
|
35
35
|
import { type NodeHandler, type SwapEvidence } from './packages.js';
|
|
36
36
|
import type { Descriptor } from '@serene-pub/sdk';
|
|
37
37
|
import { type RulesetDecl, type RulesetTemplate } from '@serene-pub/sdk';
|
|
38
|
+
import { type StoredTurnOrderOption } from '@serene-pub/sdk';
|
|
38
39
|
export * from './components.js';
|
|
39
40
|
export * from './packages.js';
|
|
40
41
|
/**
|
|
@@ -226,6 +227,11 @@ export interface ShippedCatalogue {
|
|
|
226
227
|
rulesets?: readonly RulesetDecl[];
|
|
227
228
|
/** π§ The ruleset templates it ships (`rulesetTemplates()`), for C38. */
|
|
228
229
|
rulesetTemplates?: readonly RulesetTemplate[];
|
|
230
|
+
/**
|
|
231
|
+
* π§ The turn order options the catalogue adds to genres it names (genre as
|
|
232
|
+
* id), for C42.
|
|
233
|
+
*/
|
|
234
|
+
turnOrderOptions?: readonly StoredTurnOrderOption[];
|
|
229
235
|
}
|
|
230
236
|
/** @experimental C29's evidence: one genre's event map and the termination policy of each node that has one. */
|
|
231
237
|
export interface EventMapEvidence extends EventGraph {
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import { probeSampleFor } from './packages.js';
|
|
|
36
36
|
import { swapFitFinding } from '@serene-pub/sdk';
|
|
37
37
|
import { declaredNodeParams } from '@serene-pub/sdk';
|
|
38
38
|
import { rulesetCatalogueFindings } from '@serene-pub/sdk';
|
|
39
|
+
import { turnOrderOptionFindings } from '@serene-pub/sdk';
|
|
39
40
|
import { probeBinding, probeCtxFor } from '@serene-pub/sdk/testing';
|
|
40
41
|
export * from './components.js';
|
|
41
42
|
export * from './packages.js';
|
|
@@ -1275,7 +1276,7 @@ export const REQUIREMENTS = [
|
|
|
1275
1276
|
}
|
|
1276
1277
|
const pinned = await host.pinnedDefinition(s.spec, s.node);
|
|
1277
1278
|
if (!pinned) {
|
|
1278
|
-
failed.push(`${at}: this host seats nothing at '${s.node}' of '${s.spec}' β name
|
|
1279
|
+
failed.push(`${at}: this host seats nothing at '${s.node}' of '${s.spec}' β name a node that offers swaps (its expose.swaps), never assume a key`);
|
|
1279
1280
|
continue;
|
|
1280
1281
|
}
|
|
1281
1282
|
const misfit = swapFitFinding(s.node, pinned, s.definition);
|
|
@@ -1442,6 +1443,38 @@ export const REQUIREMENTS = [
|
|
|
1442
1443
|
must(!failures.length, failures.join('\n'));
|
|
1443
1444
|
},
|
|
1444
1445
|
},
|
|
1446
|
+
{
|
|
1447
|
+
id: 'C41',
|
|
1448
|
+
law: 'programme 2.3, TC2 (owner 2026-11-18)',
|
|
1449
|
+
title: 'on an event where one registration runs, every shipped genreβs defaults and every preset mark at most one registration default',
|
|
1450
|
+
consequence: 'Two defaults leave which turn order a new session runs to the order the rows were read in, and nobody can tell from the session which one plays.',
|
|
1451
|
+
async check(host, fx, report) {
|
|
1452
|
+
const shipped = await host.shipped?.();
|
|
1453
|
+
if (!shipped)
|
|
1454
|
+
return report.skip('the host declares no catalogue β supply `shipped()` for its defaults to be judged');
|
|
1455
|
+
const failures = new Set();
|
|
1456
|
+
for (const { layer, decls } of shippedDefaultMarks(shipped))
|
|
1457
|
+
for (const m of doorFindings(shipped, decls, layer, 'registration default'))
|
|
1458
|
+
failures.add(m);
|
|
1459
|
+
must(!failures.size, [...failures].join('\n'));
|
|
1460
|
+
},
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
id: 'C42',
|
|
1464
|
+
law: 'TQ1, TQ2, TQ4 (owner 2026-11-19)',
|
|
1465
|
+
title: 'every turn order option a catalogue adds to a genre it names registers on Turn order asked, is labelled, marks no default and runs a pipeline the catalogue ships',
|
|
1466
|
+
consequence: 'An option that marks a default changes a genre it does not own, one without a label is offered to a person as an id, and one that runs a pipeline nobody ships fails on the first turn it is picked.',
|
|
1467
|
+
async check(host, fx, report) {
|
|
1468
|
+
const shipped = await host.shipped?.();
|
|
1469
|
+
if (!shipped?.turnOrderOptions)
|
|
1470
|
+
return report.skip('the catalogue adds no turn order options β supply `shipped().turnOrderOptions` for them to be judged');
|
|
1471
|
+
const { errors } = turnOrderOptionFindings(shipped.turnOrderOptions, {
|
|
1472
|
+
pipelines: new Map((shipped.pipelines ?? []).map((d) => [d.id, d])),
|
|
1473
|
+
genres: new Set(shipped.genres.map((g) => g.id)),
|
|
1474
|
+
});
|
|
1475
|
+
must(!errors.length, errors.join('\n'));
|
|
1476
|
+
},
|
|
1477
|
+
},
|
|
1445
1478
|
];
|
|
1446
1479
|
// ββ C39: lore writes ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
1447
1480
|
const LORE_CREATE = 'core:outlet/create-lore-entry';
|
|
@@ -1507,6 +1540,23 @@ function shippedRegistrations(shipped) {
|
|
|
1507
1540
|
}
|
|
1508
1541
|
return out;
|
|
1509
1542
|
}
|
|
1543
|
+
/** C41's read: each genre's defaults, and each preset's effective registrations over them. */
|
|
1544
|
+
function shippedDefaultMarks(shipped) {
|
|
1545
|
+
const out = [];
|
|
1546
|
+
for (const g of shipped.genres) {
|
|
1547
|
+
const decls = genreDefaultsOf(g)?.registrations;
|
|
1548
|
+
if (decls?.length)
|
|
1549
|
+
out.push({ layer: `the defaults of '${g.id}'`, decls });
|
|
1550
|
+
}
|
|
1551
|
+
for (const p of shipped.presets) {
|
|
1552
|
+
const g = shipped.genres.find((x) => x.id === p.genre);
|
|
1553
|
+
const defaults = genreDefaultsOf(g)?.registrations;
|
|
1554
|
+
const decls = effectiveRegistrations(defaults, presetChangesOf(p, defaults));
|
|
1555
|
+
if (decls.length)
|
|
1556
|
+
out.push({ layer: `preset '${p.slug}'`, decls });
|
|
1557
|
+
}
|
|
1558
|
+
return out;
|
|
1559
|
+
}
|
|
1510
1560
|
/**
|
|
1511
1561
|
* One law's findings from the registration door (`registrationFindings`) β
|
|
1512
1562
|
* the same verdict a package build and a host's install give, quoted (01 Β§13).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serene-pub/conformance",
|
|
3
|
-
"version": "0.6.0-pr-
|
|
3
|
+
"version": "0.6.0-pr-9",
|
|
4
4
|
"description": "The host conformance kit: thirty-three executable requirements a Serene Pub executor must satisfy. Run by Serene Pub and by any alternate host; its package cases (C28βC33) by plugin authors over a built package.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/SerenePub/serene-pub-sdk/tree/main/conformance#readme",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@serene-pub/sdk": "^0.6.0-pr-
|
|
36
|
+
"@serene-pub/sdk": "^0.6.0-pr-9"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsc -p tsconfig.build.json"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@serene-pub/sdk": "0.6.0-pr-
|
|
42
|
+
"@serene-pub/sdk": "0.6.0-pr-9"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public",
|