@serene-pub/conformance 0.6.0-pr-7 → 0.6.0-pr-8
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.js +36 -14
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ import { hookCtxGrants, hookCtxKeysFor, HOOK_CTX_KINDS } from '@serene-pub/sdk/t
|
|
|
34
34
|
import { COMPONENT_PROTOCOL_FIXTURE, componentMountCase, componentParityCase, componentParitySections, componentProtocolCase, judgeComponentModule, } from './components.js';
|
|
35
35
|
import { probeSampleFor } from './packages.js';
|
|
36
36
|
import { swapFitFinding } from '@serene-pub/sdk';
|
|
37
|
+
import { declaredNodeParams } from '@serene-pub/sdk';
|
|
37
38
|
import { rulesetCatalogueFindings } from '@serene-pub/sdk';
|
|
38
39
|
import { probeBinding, probeCtxFor } from '@serene-pub/sdk/testing';
|
|
39
40
|
export * from './components.js';
|
|
@@ -1426,6 +1427,21 @@ export const REQUIREMENTS = [
|
|
|
1426
1427
|
must(!failures.length, failures.join('\n'));
|
|
1427
1428
|
},
|
|
1428
1429
|
},
|
|
1430
|
+
{
|
|
1431
|
+
id: 'C40',
|
|
1432
|
+
law: 'scenes first (owner ruling 2026-11-10)',
|
|
1433
|
+
title: 'no pipeline a catalogue ships writes a history entry directly — history is compiled from scenes',
|
|
1434
|
+
consequence: 'A pipeline that files history itself goes around scenes and Compile: its entries land beside the day’s one entry, and a person never reviews them as a scene.',
|
|
1435
|
+
async check(host, fx, report) {
|
|
1436
|
+
const shipped = await host.shipped?.();
|
|
1437
|
+
if (!shipped)
|
|
1438
|
+
return report.skip('the host declares no catalogue — supply `shipped()` for its history writes to be judged');
|
|
1439
|
+
if (!shipped.pipelines?.length)
|
|
1440
|
+
return report.skip('the catalogue ships no pipelines — supply `shipped().pipelines` for its history writes to be judged');
|
|
1441
|
+
const failures = shipped.pipelines.flatMap((d) => historyWriteFindings(d));
|
|
1442
|
+
must(!failures.length, failures.join('\n'));
|
|
1443
|
+
},
|
|
1444
|
+
},
|
|
1429
1445
|
];
|
|
1430
1446
|
// ── C39: lore writes ────────────────────────────────────────────────────────
|
|
1431
1447
|
const LORE_CREATE = 'core:outlet/create-lore-entry';
|
|
@@ -1436,26 +1452,13 @@ const LORE_WRITES = [
|
|
|
1436
1452
|
'core:outlet/graph-proposal',
|
|
1437
1453
|
];
|
|
1438
1454
|
const SPAN_READS = ['core:query/summarize-source', 'core:query/graph-scenes'];
|
|
1439
|
-
/** The param values a document declares for `nodeKey` — its default presets' `params` rows, over the node's own. */
|
|
1440
|
-
function declaredParams(d, nodeKey) {
|
|
1441
|
-
const out = {};
|
|
1442
|
-
const own = d.nodes.find((n) => n.key === nodeKey)?.config?.params;
|
|
1443
|
-
if (own && typeof own === 'object')
|
|
1444
|
-
Object.assign(out, own);
|
|
1445
|
-
for (const p of d.presets ?? [])
|
|
1446
|
-
if (p.default)
|
|
1447
|
-
for (const v of p.values)
|
|
1448
|
-
if (v.nodeKey === nodeKey && v.slot === 'params' && v.value && typeof v.value === 'object')
|
|
1449
|
-
Object.assign(out, v.value);
|
|
1450
|
-
return out;
|
|
1451
|
-
}
|
|
1452
1455
|
/** C39's judgement of one shipped document. */
|
|
1453
1456
|
function loreWriteFindings(d) {
|
|
1454
1457
|
const out = [];
|
|
1455
1458
|
const reads = d.nodes.some((n) => SPAN_READS.includes(n.definitionId));
|
|
1456
1459
|
for (const n of d.nodes) {
|
|
1457
1460
|
if (n.definitionId === LORE_CREATE) {
|
|
1458
|
-
const t =
|
|
1461
|
+
const t = declaredNodeParams(d, n.key).entryType;
|
|
1459
1462
|
if (t === undefined || t === null || t === '')
|
|
1460
1463
|
out.push(`${d.id} ${n.key}: files lore without naming its entry type.`);
|
|
1461
1464
|
}
|
|
@@ -1468,6 +1471,25 @@ function loreWriteFindings(d) {
|
|
|
1468
1471
|
}
|
|
1469
1472
|
return out;
|
|
1470
1473
|
}
|
|
1474
|
+
// ── C40: history writes ─────────────────────────────────────────────────────
|
|
1475
|
+
/**
|
|
1476
|
+
* C40's judgement of one shipped document: a `create-lore-entry` whose entry type is
|
|
1477
|
+
* `core:entry/history` (the packager's `W_WRITES_HISTORY` predicate). A pipeline with a
|
|
1478
|
+
* `summarize-request` inlet is exempt: its save is previewed.
|
|
1479
|
+
*/
|
|
1480
|
+
function historyWriteFindings(d) {
|
|
1481
|
+
if (d.nodes.some((n) => n.definitionId === 'core:inlet/summarize-request'))
|
|
1482
|
+
return [];
|
|
1483
|
+
const out = [];
|
|
1484
|
+
for (const n of d.nodes) {
|
|
1485
|
+
if (n.definitionId !== 'core:outlet/create-lore-entry')
|
|
1486
|
+
continue;
|
|
1487
|
+
const t = declaredNodeParams(d, n.key).entryType;
|
|
1488
|
+
if (typeof t === 'string' && t.replace(/@\d+$/, '') === 'core:entry/history')
|
|
1489
|
+
out.push(`${d.id} ${n.key}: writes a history entry directly — put the event in a scene (note-scene@1 or a story line); Compile files it under the day's entry.`);
|
|
1490
|
+
}
|
|
1491
|
+
return out;
|
|
1492
|
+
}
|
|
1471
1493
|
// ── C35 · C36: the registrations a catalogue ships, at the one door ─────────
|
|
1472
1494
|
/** The genres' defaults and each preset's own registrations, with the layer each was declared in. */
|
|
1473
1495
|
function shippedRegistrations(shipped) {
|
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-8",
|
|
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-8"
|
|
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-8"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public",
|