@serene-pub/conformance 0.6.0-pr-5 → 0.6.0-pr-6

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `@serene-pub/conformance`
2
2
 
3
- Thirty-three executable requirements a Serene Pub executor must satisfy. Run by SP Core against
3
+ Thirty-seven executable requirements a Serene Pub executor must satisfy. Run by SP Core against
4
4
  its own implementation, and by any alternate host.
5
5
 
6
6
  **Plugin authors need one part of it:** the six package cases (C28–C33, `conformPackage`) over
@@ -69,9 +69,9 @@ page an author reads, which is the failure this kit exists to prevent.
69
69
  | Id | Law | Holds that | What breaks when it fails |
70
70
  | --- | --- | ---------- | ------------------------- |
71
71
  | C21 | F7, 01 §4 | **One live row per run, never inside a repeat, and no second message on its channel** (restated W1, 2026-09-23). (a) `validate()` refuses `fx.twoWrites()` — two reply rows — under F7 with a fix naming the alternatives: update the one row through its target, write anything else beside it, or put a second message on another channel. (b) `fx.writeInClause()` — the live row inside an `each` — is refused under 01 §4, with the spine named as where it goes instead. Other writes, in clauses or not, are unlimited. | One turn leaves two reply rows behind, or N of them from inside a repeat, and nothing can say which row to stream into or finalise. |
72
- | C22 | F8, F32 | **No pipeline triggers another.** Four halves, because there are four doors: no published definition is a trigger outlet (the host's own registry is the evidence); `assertHookSurface` refuses `trigger`, `run` and `call` on a hook surface; any definition that names the event it causes from its config (`causesEventFrom`, as `record-event` does for a package's own events) is a write outlet; and `validate()` refuses a node declaring `emits` under F8, naming the one path — a write causes the event its outlet declares, and a preset binds a pipeline to that event. | Runs start runs. A model call nobody asked for appears on no receipt as anything's consequence, and a loop between two specs has no budget and no place to break it. |
72
+ | C22 | F8, F32 | **No pipeline triggers another.** Four halves, because there are four doors: no published definition is a trigger outlet (the host's own registry is the evidence); `assertHookSurface` refuses `trigger`, `run` and `call` on a hook surface; any definition that names the event it causes from its config (`causesEventFrom`, as `record-event` does for a package's own events) is a write outlet; and `validate()` refuses a node declaring `emits` under F8, naming the one path — a write causes the event its outlet declares, and a genre's defaults or a preset registers a pipeline on that event. | Runs start runs. A model call nobody asked for appears on no receipt as anything's consequence, and a loop between two specs has no budget and no place to break it. |
73
73
  | C23 | F41 | **The effects line at a block.** (a) At publish: `form` is the one venue a block reaches, so a `world` action declaring it is refused by `validate()` under F41. (b) At the write: `worldBlockFunctions(blocks, doc)` names any `world` action a `choices` block carries, and the host refuses the write. (b) is a runtime law **because no document carries a block tree** — a spec's blocks are a node's output — with a negative control, since a gate that refused every block would break every message that offers a choice. | A block a node wrote puts an out-of-fiction button in front of a character, and permission stops being the owner's to give. |
74
- | C24 | R-15 | **Every genre can be addressed by a form, and every shipped preset binds the pipeline that answers one** (ruled 2026-09-17). Read off `HostUnderTest.shipped()`: each genre declares `core:event/form-addressed@1` and does not make it required, and each preset binds a spec to it. | A pipeline writes a form, the reader fills it in, the press reaches no run, and no error says why. |
74
+ | C24 | R-15 | **Every genre can be addressed by a form, and every shipped preset registers the pipeline that answers one** (ruled 2026-09-17). Read off `HostUnderTest.shipped()`: each genre declares `core:event/form-addressed@1` and does not make it required, and each preset's effective registrations (its genre's defaults ⊕ its changes, or ⏳ its `bindings`) put a pipeline on it. | A pipeline writes a form, the reader fills it in, the press reaches no run, and no error says why. |
75
75
  | C25 | plans/29 R-3, F11, F32 | **The plugin grant table.** The table itself is pinned against `hookCtxGrants` — task and chain-link get neither grant, query/outlet/event/lifecycle get `storage`, the oracle gets `storage` and `fetch` — and then the host's own endowment is judged per kind through `hookCtxKeys(kind)`: the keys equal `hookCtxKeysFor(kind)`, and `read`, `call` and `commit` reach no plugin handler. The absent `commit` is also why **a plugin write-class outlet is not available**: it emits the event it declares and core's outlet does the writing (the packager refuses the declaration up front, `E_PLUGIN_WRITE_OUTLET`). | A package reaches through a door nobody granted, and the permissions an administrator reads stop describing what it can do. |
76
76
  | C26 | 20 §12, F32 | **A frame has no ambient authority.** From `HostUnderTest.frameMount()`: the sandbox is `allow-scripts` and nothing else (no `allow-same-origin`, so an opaque origin; no `allow-forms`, so a submit does not leave), and the CSP names a `default-src` floor, `script-src 'self'` — no inline script, no script from anywhere else — `form-action 'none'`, no `'unsafe-eval'` and no `'unsafe-inline'` outside `style-src`, and no off-origin source outside `connect-src` (which carries only the hosts the package declared) and the reporting directives. Supplied `accepts`, the port answers an action-firing message and nothing that commits. | A package's UI reads the session's cookies, calls the app's API as the signed-in user, or posts to an origin nobody granted. |
77
77
 
@@ -121,6 +121,22 @@ in for the source, the cast, the model calls and the save; the host's own bindin
121
121
  | --- | --- | ---------- | ------------------------- |
122
122
  | C34 | live scenes §13.5 | **A genre's summarize-scene spec accepts `summarize-request@1`, ends in `save` (with `synth` and `naming` beside it), survives an empty span and an aside on an undeclared channel, and renders transcript units that each carry a message id of the span — every row in some unit.** | A scene of that genre cannot be summarized, or its summary cannot be traced to its rows. |
123
123
 
124
+ ## Registrations (C35–C37) 🚧
125
+
126
+ Added 2026-10-21 with the layering restructure (a pipeline is **registered** on an event, an
127
+ action or a routine's cadence; the genre carries its defaults; a preset is one set of changes on
128
+ them). All three read the host's catalogue, `HostUnderTest.shipped()`, and quote the SDK's own
129
+ verdicts rather than restating them (01 §13): C35 and C36 run the registration door
130
+ (`registrationFindings`) and keep one law each, C37 runs `presetLevelFindings`.
131
+ Supply `shipped().pipelines` (the published documents) for C35 and the pipeline half of C36 to be
132
+ judged; without them each says what went unjudged.
133
+
134
+ | Case | Law | What is checked | What breaks when it fails |
135
+ | --- | --- | --- | --- |
136
+ | C35 | R4, A11, A17 | **Every registration fits its pipeline.** Each registration of each genre's defaults, and each one a preset adds, is judged by `registrationFindings`' `registration fit` law: everything the pipeline's steps read is carried by its trigger. A pipeline the catalogue does not ship is another package's, judged where it is installed. | A pipeline runs on a trigger that does not carry what it reads, and the first turn fails in a session instead of the registration being refused in words. |
137
+ | C36 | R1, A10 (10-12) | **Model plumbing never reaches a member.** No genre field (`exposureFindings`) and no registered pipeline's settings (`exposed plumbing`) declare a connection, sampling, loadout, prompt or template with `reach: 'owner'`. | A session owner who is not an administrator is offered the model plumbing members were ruled never to touch. |
138
+ | C37 | R2, R3, R22 | **One level.** Every shipped preset names a genre the catalogue ships, names no parent (`extends`, `base`, …), and drops or changes only what its genre's defaults (or its own `register`) hold; no genre has two default presets. | A preset reads differently on every pub depending on another preset, and which preset a new session starts from is left to chance. |
139
+
124
140
  ## A package's own artifact (C30–C33)
125
141
 
126
142
  C30 added 2026-09-24 (PLAN-sdk-1.0 §3.5); C31–C33 added 2026-09-26, from the gaps the Twenty
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ import { type HookCtxKind } from '@serene-pub/sdk/testing';
34
34
  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
+ import { type RulesetDecl, type RulesetTemplate } from '@serene-pub/sdk';
37
38
  export * from './components.js';
38
39
  export * from './packages.js';
39
40
  /**
@@ -99,8 +100,8 @@ export interface HostUnderTest {
99
100
  * What this host **ships**: the genres it offers in the picker and the
100
101
  * presets that fill their event slots. C24's law is about a catalogue
101
102
  * rather than a document — a genre that declares no `form-addressed` event
102
- * has nowhere to route an answer, and a preset that binds no pipeline to it
103
- * leaves every form it writes unanswerable — so it is read off what the
103
+ * has nowhere to route an answer, and a preset that registers no pipeline on
104
+ * it leaves every form it writes unanswerable — so it is read off what the
104
105
  * host ships and nowhere else. Optional: a host that ships no catalogue of
105
106
  * its own (a validator, a test harness) is not judged on it.
106
107
  */
@@ -209,6 +210,22 @@ export interface HostUnderTest {
209
210
  export interface ShippedCatalogue {
210
211
  genres: readonly GenreDecl[];
211
212
  presets: readonly PresetDecl[];
213
+ /**
214
+ * 🚧 The pipelines the catalogue ships — their published documents — so
215
+ * C35 and C36 can hold every registration of the genres' defaults and the
216
+ * presets to what its pipeline reads and exposes. Optional: without them
217
+ * those two say what went unjudged. A registration naming a pipeline not
218
+ * here is another package's, judged where that package is installed.
219
+ */
220
+ pipelines?: readonly SpecDocument[];
221
+ /**
222
+ * 🚧 The rulesets the catalogue ships — their declarations — so C38 can
223
+ * hold each to the ruleset laws (`rulesetCatalogueFindings`). Optional:
224
+ * without them C38 says what went unjudged.
225
+ */
226
+ rulesets?: readonly RulesetDecl[];
227
+ /** 🚧 The ruleset templates it ships (`rulesetTemplates()`), for C38. */
228
+ rulesetTemplates?: readonly RulesetTemplate[];
212
229
  }
213
230
  /** @experimental C29's evidence: one genre's event map and the termination policy of each node that has one. */
214
231
  export interface EventMapEvidence extends EventGraph {
package/dist/index.js CHANGED
@@ -18,6 +18,8 @@
18
18
  import { actionsOf, DEFAULT_CHANNEL, ok, parseChannel, slashFindings, slashNameOf } from '@serene-pub/sdk';
19
19
  import { allDefinitions, assertHookSurface, effectsOf, sessionEvents, worldBlockFunctions } from '@serene-pub/sdk';
20
20
  import { uncausedGenreEvents, unterminatedCycles } from '@serene-pub/sdk';
21
+ import { effectiveRegistrations, genreDefaultsOf, presetChangesOf } from '@serene-pub/sdk';
22
+ import { exposureFindings, presetLevelFindings, registrationFindings } from '@serene-pub/sdk';
21
23
  // One verdict per law (01 §13): C27 enumerates what is registered and holds
22
24
  // the host's doors to each verdict's own sentence.
23
25
  import { i18nText, verdicts } from '@serene-pub/sdk';
@@ -32,6 +34,7 @@ import { hookCtxGrants, hookCtxKeysFor, HOOK_CTX_KINDS } from '@serene-pub/sdk/t
32
34
  import { COMPONENT_PROTOCOL_FIXTURE, componentMountCase, componentParityCase, componentParitySections, componentProtocolCase, judgeComponentModule, } from './components.js';
33
35
  import { probeSampleFor } from './packages.js';
34
36
  import { swapFitFinding } from '@serene-pub/sdk';
37
+ import { rulesetCatalogueFindings } from '@serene-pub/sdk';
35
38
  import { probeBinding, probeCtxFor } from '@serene-pub/sdk/testing';
36
39
  export * from './components.js';
37
40
  export * from './packages.js';
@@ -822,7 +825,7 @@ export const REQUIREMENTS = [
822
825
  must(errs.some((e) => e.law === 'F8'), `${because} — but validate() raised no F8 error ` +
823
826
  `(${errs.map((e) => e.law).join(', ') || 'no errors at all'})`);
824
827
  must(errs.filter((e) => e.law === 'F8').every((e) => !!e.fix && e.fix.length > 10), `${because} — refused without naming the one path: a write causes the event its outlet ` +
825
- `declares, and a preset binds a pipeline to that event (15 §1.3)`);
828
+ `declares, and a genre's defaults or a preset registers a pipeline on that event (15 §1.3)`);
826
829
  }
827
830
  },
828
831
  },
@@ -902,7 +905,7 @@ export const REQUIREMENTS = [
902
905
  {
903
906
  id: 'C24',
904
907
  law: 'R-15',
905
- title: 'every genre can be addressed by a form, and every shipped preset binds the pipeline that answers one',
908
+ title: 'every genre can be addressed by a form, and every shipped preset registers the pipeline that answers one',
906
909
  consequence: 'A pipeline writes a form into the session and nothing answers it: the block renders, the reader fills it in, the press reaches no run, and no error says why. The feature works in the genre it was built in and is dead in every other.',
907
910
  async check(host, fx, report) {
908
911
  const shipped = await host.shipped?.();
@@ -917,11 +920,17 @@ export const REQUIREMENTS = [
917
920
  must(!!decl, `genre '${g.id}' does not declare ${EVENT} — a genre that cannot be addressed by a form has ` +
918
921
  `nowhere to route an answer, so a pipeline that writes one into it has written a dead control`);
919
922
  must(decl.required !== true, `genre '${g.id}' makes ${EVENT} required — the slot is offered, never demanded: a genre whose ` +
920
- `forms are all owner-addressed still declares it, and a preset that binds nothing is still a preset`);
923
+ `forms are all owner-addressed still declares it, and a preset that registers nothing there is still a preset`);
921
924
  }
925
+ // 🚧 By registration (PLAN-layering D4): what a preset answers is its
926
+ // genre's defaults ⊕ its changes; a preset still on ⏳ bindings is
927
+ // read through `presetChangesOf`, so either form is judged.
922
928
  for (const p of shipped.presets) {
923
- const bound = p.bindings?.[EVENT];
924
- must(!!bound?.spec, `preset '${p.slug}' binds no pipeline to ${EVENT} — a shipped preset answers the forms its ` +
929
+ const g = shipped.genres.find((x) => x.id === p.genre);
930
+ const defaults = genreDefaultsOf(g)?.registrations;
931
+ const answered = !!p.bindings?.[EVENT]?.spec ||
932
+ effectiveRegistrations(defaults, presetChangesOf(p, defaults)).some((r) => r.trigger.family === 'event' && r.trigger.event === EVENT);
933
+ must(answered, `preset '${p.slug}' registers no pipeline on ${EVENT} — a shipped preset answers the forms its ` +
925
934
  `genre can be addressed by, or the answer button does nothing in every session started from it`);
926
935
  }
927
936
  },
@@ -1122,7 +1131,7 @@ export const REQUIREMENTS = [
1122
1131
  id: 'C28',
1123
1132
  law: 'PLAN-turn-order §B3, R33',
1124
1133
  title: 'every event a genre lists is caused by a write or is a declared root',
1125
- consequence: 'A preset binds a pipeline to an event nothing ever fires: the slot looks filled, the pipeline is published, and it never runs. Nobody is told, because nothing failed.',
1134
+ consequence: 'A preset registers a pipeline on an event nothing ever fires: the registration looks filled, the pipeline is published, and it never runs. Nobody is told, because nothing failed.',
1126
1135
  async check(host, fx, report) {
1127
1136
  const shipped = await host.shipped?.();
1128
1137
  if (!shipped)
@@ -1308,7 +1317,174 @@ export const REQUIREMENTS = [
1308
1317
  await judgeSummarizeScene(host, fx, doc);
1309
1318
  },
1310
1319
  },
1320
+ {
1321
+ id: 'C35',
1322
+ law: 'R4, A11, A17',
1323
+ title: 'every registration a host ships fits its pipeline: what the pipeline reads, its trigger carries',
1324
+ consequence: 'A pipeline mounted on a trigger that does not carry what it reads runs and finds nothing where it looks — a reply with no speaker, a routine with no message — so the first turn fails in a session, where the registration should have been refused in words before anyone started one.',
1325
+ async check(host, fx, report) {
1326
+ const shipped = await host.shipped?.();
1327
+ if (!shipped)
1328
+ return report.skip('the host declares no catalogue — supply `shipped()` for its registrations to be judged');
1329
+ if (!shipped.pipelines?.length)
1330
+ return report.skip('the catalogue ships no pipelines — supply `shipped().pipelines` (the published documents) for fit to be judged');
1331
+ const failures = shippedRegistrations(shipped).flatMap(({ layer, decls }) => doorFindings(shipped, decls, layer, 'registration fit'));
1332
+ must(!failures.length, failures.join('\n'));
1333
+ },
1334
+ },
1335
+ {
1336
+ id: 'C36',
1337
+ law: 'R1, A10 (ruled 2026-10-12)',
1338
+ title: 'model plumbing never reaches a member: no shipped setting exposes a connection, sampling, loadout, prompt or template to the owner',
1339
+ consequence: 'A session owner who is not an administrator is offered the model a step runs on, its sampling or its prompts — the plumbing members were ruled never to touch — and a change there reaches every turn of that session with nobody who manages the models knowing.',
1340
+ async check(host, fx, report) {
1341
+ const shipped = await host.shipped?.();
1342
+ if (!shipped)
1343
+ return report.skip('the host declares no catalogue — supply `shipped()` for its settings to be judged');
1344
+ const failures = [];
1345
+ for (const g of shipped.genres)
1346
+ failures.push(...exposureFindings(g.shape?.fields, `genre '${g.id}' shape.fields`));
1347
+ if (!shipped.pipelines?.length)
1348
+ report.skip('the catalogue ships no pipelines — supply `shipped().pipelines` for the registered pipelines\' settings to be judged');
1349
+ else
1350
+ for (const { layer, decls } of shippedRegistrations(shipped))
1351
+ failures.push(...doorFindings(shipped, decls, layer, 'exposed plumbing'));
1352
+ must(!failures.length, failures.join('\n'));
1353
+ },
1354
+ },
1355
+ {
1356
+ id: 'C37',
1357
+ law: 'R2, R3, R22',
1358
+ title: 'every shipped preset is one set of changes on one genre’s defaults, and a genre has at most one default preset',
1359
+ consequence: 'A preset built on another preset — or one that drops or changes what its genre never registered — reads differently on every pub depending on what the other preset holds that day, and a person who picks it cannot tell what the session will run; two defaults for one genre leave which preset a new session starts from to chance.',
1360
+ async check(host, fx, report) {
1361
+ const shipped = await host.shipped?.();
1362
+ if (!shipped)
1363
+ return report.skip('the host declares no catalogue — supply `shipped()` for its presets to be judged');
1364
+ const failures = [];
1365
+ const defaults = new Map();
1366
+ for (const p of shipped.presets) {
1367
+ const g = shipped.genres.find((x) => x.id === p.genre);
1368
+ if (!g)
1369
+ failures.push(`preset '${p.slug}' names genre '${String(p.genre)}', which the catalogue does not ship`);
1370
+ failures.push(...presetLevelFindings(p, genreDefaultsOf(g)?.registrations));
1371
+ if (p.default === true)
1372
+ defaults.set(p.genre, [...(defaults.get(p.genre) ?? []), p.slug]);
1373
+ }
1374
+ for (const [genre, slugs] of defaults)
1375
+ if (slugs.length > 1)
1376
+ failures.push(`genre '${genre}' has ${slugs.length} default presets (${slugs.join(', ')}) — the genre's defaults name one default preset (R22)`);
1377
+ must(!failures.length, failures.join('\n'));
1378
+ },
1379
+ },
1380
+ {
1381
+ id: 'C38',
1382
+ law: 'PLAN-rulesets-authoring R1, R2, D3 (2026-10-22)',
1383
+ title: 'every shipped ruleset keeps the ruleset laws: chance reads through bands or degrees, every repertoire is tagged, and a template is copied, never played or offered by a genre',
1384
+ consequence: 'A ruleset that rolls with nothing to roll against and nothing to read the roll as hands the table a number and no outcome; an untagged repertoire leaves whether the ruleset has conditions or casting to a guess from its name, so a genre is rated against what a word looked like; and a template a genre offers, or the catalogue plays, puts an archetype meant to be copied into people’s sessions, where its sample rows become somebody’s rules.',
1385
+ async check(host, fx, report) {
1386
+ const shipped = await host.shipped?.();
1387
+ if (!shipped)
1388
+ return report.skip('the host declares no catalogue — supply `shipped()` for its rulesets to be judged');
1389
+ if (!shipped.rulesets?.length)
1390
+ return report.skip('the catalogue ships no rulesets — supply `shipped().rulesets` (and `rulesetTemplates`) for the ruleset laws to be judged');
1391
+ const failures = rulesetCatalogueFindings({
1392
+ rulesets: shipped.rulesets,
1393
+ templates: shipped.rulesetTemplates ?? [],
1394
+ genres: shipped.genres,
1395
+ });
1396
+ must(!failures.length, failures.join('\n'));
1397
+ },
1398
+ },
1399
+ {
1400
+ id: 'C39',
1401
+ law: 'pass 6 (RULED strict 2026-10-24), pass 8 §3',
1402
+ title: 'every lore write a catalogue ships names its entry type, and every lore write in a pipeline that reads a span of the story to summarise names the messages it was written from',
1403
+ consequence: 'A summary saved without its sources moves no settle line, so Back keeps reaching under it and takes back rows the lorebook already records; an entry filed without its type lands as world lore whatever it was.',
1404
+ async check(host, fx, report) {
1405
+ const shipped = await host.shipped?.();
1406
+ if (!shipped)
1407
+ return report.skip('the host declares no catalogue — supply `shipped()` for its lore writes to be judged');
1408
+ if (!shipped.pipelines?.length)
1409
+ return report.skip('the catalogue ships no pipelines — supply `shipped().pipelines` for its lore writes to be judged');
1410
+ const failures = shipped.pipelines.flatMap((d) => loreWriteFindings(d));
1411
+ must(!failures.length, failures.join('\n'));
1412
+ },
1413
+ },
1414
+ ];
1415
+ // ── C39: lore writes ────────────────────────────────────────────────────────
1416
+ const LORE_CREATE = 'core:outlet/create-lore-entry';
1417
+ const LORE_WRITES = [
1418
+ 'core:outlet/create-lore-entry',
1419
+ 'core:outlet/update-lore-entry',
1420
+ 'core:outlet/link-lore-entries',
1421
+ 'core:outlet/graph-proposal',
1311
1422
  ];
1423
+ const SPAN_READS = ['core:query/summarize-source', 'core:query/graph-scenes'];
1424
+ /** The param values a document declares for `nodeKey` — its default presets' `params` rows, over the node's own. */
1425
+ function declaredParams(d, nodeKey) {
1426
+ const out = {};
1427
+ const own = d.nodes.find((n) => n.key === nodeKey)?.config?.params;
1428
+ if (own && typeof own === 'object')
1429
+ Object.assign(out, own);
1430
+ for (const p of d.presets ?? [])
1431
+ if (p.default)
1432
+ for (const v of p.values)
1433
+ if (v.nodeKey === nodeKey && v.slot === 'params' && v.value && typeof v.value === 'object')
1434
+ Object.assign(out, v.value);
1435
+ return out;
1436
+ }
1437
+ /** C39's judgement of one shipped document. */
1438
+ function loreWriteFindings(d) {
1439
+ const out = [];
1440
+ const reads = d.nodes.some((n) => SPAN_READS.includes(n.definitionId));
1441
+ for (const n of d.nodes) {
1442
+ if (n.definitionId === LORE_CREATE) {
1443
+ const t = declaredParams(d, n.key).entryType;
1444
+ if (t === undefined || t === null || t === '')
1445
+ out.push(`${d.id} ${n.key}: files lore without naming its entry type.`);
1446
+ }
1447
+ if (reads && LORE_WRITES.includes(n.definitionId)) {
1448
+ const wired = n.config?.sources !== undefined ||
1449
+ d.edges.some((e) => e.to === n.key && (e.toPort === 'sources' || e.toPort.startsWith('sources.')));
1450
+ if (!wired)
1451
+ out.push(`${d.id} ${n.key}: writes lore from a span of the story without sources.`);
1452
+ }
1453
+ }
1454
+ return out;
1455
+ }
1456
+ // ── C35 · C36: the registrations a catalogue ships, at the one door ─────────
1457
+ /** The genres' defaults and each preset's own registrations, with the layer each was declared in. */
1458
+ function shippedRegistrations(shipped) {
1459
+ const out = [];
1460
+ for (const g of shipped.genres) {
1461
+ const decls = genreDefaultsOf(g)?.registrations;
1462
+ if (decls?.length)
1463
+ out.push({ layer: `the defaults of '${g.id}'`, decls });
1464
+ }
1465
+ for (const p of shipped.presets) {
1466
+ const g = shipped.genres.find((x) => x.id === p.genre);
1467
+ const added = presetChangesOf(p, genreDefaultsOf(g)?.registrations).register;
1468
+ if (added?.length)
1469
+ out.push({ layer: `preset '${p.slug}'`, decls: added });
1470
+ }
1471
+ return out;
1472
+ }
1473
+ /**
1474
+ * One law's findings from the registration door (`registrationFindings`) —
1475
+ * the same verdict a package build and a host's install give, quoted (01 §13).
1476
+ * A pipeline the catalogue does not ship is another package's: not judged here.
1477
+ */
1478
+ function doorFindings(shipped, decls, layer, law) {
1479
+ const byId = new Map((shipped.pipelines ?? []).map((d) => [d.id, d]));
1480
+ return registrationFindings(decls, {
1481
+ pipeline: (id) => byId.get(id),
1482
+ external: (id) => !byId.has(id),
1483
+ layer,
1484
+ })
1485
+ .filter((f) => f.severity === 'error' && f.law === law)
1486
+ .map((f) => f.message);
1487
+ }
1312
1488
  // ── C34: the summarize-scene fixture ────────────────────────────────────────
1313
1489
  /**
1314
1490
  * The span C34 runs a summarize-scene spec over: two story lines and an aside
@@ -10,7 +10,7 @@
10
10
  import type { Descriptor, GenreDecl, PresetDecl } from '@serene-pub/sdk';
11
11
  /** @experimental One swap a package offers, with the declaration of what it seats. */
12
12
  export interface SwapEvidence {
13
- /** The spec the swap targets (`core:spec/chat-turn-order`). */
13
+ /** The spec the swap targets (`core:spec/story-turn-order`). */
14
14
  spec: string;
15
15
  /** The node key on that spec it stands in for. */
16
16
  node: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serene-pub/conformance",
3
- "version": "0.6.0-pr-5",
3
+ "version": "0.6.0-pr-6",
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-5"
36
+ "@serene-pub/sdk": "^0.6.0-pr-6"
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-5"
42
+ "@serene-pub/sdk": "0.6.0-pr-6"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public",