@substrat-run/contract-tests 0.141.0 → 0.143.0
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/become-mint-suite.d.ts +12 -0
- package/dist/become-mint-suite.d.ts.map +1 -0
- package/dist/become-mint-suite.js +457 -0
- package/dist/become-mint-suite.js.map +1 -0
- package/dist/caused-by-module.d.ts.map +1 -1
- package/dist/caused-by-module.js +3 -2
- package/dist/caused-by-module.js.map +1 -1
- package/dist/derived-module.d.ts +350 -0
- package/dist/derived-module.d.ts.map +1 -0
- package/dist/derived-module.js +153 -0
- package/dist/derived-module.js.map +1 -0
- package/dist/derived-suite.d.ts +3 -0
- package/dist/derived-suite.d.ts.map +1 -0
- package/dist/derived-suite.js +225 -0
- package/dist/derived-suite.js.map +1 -0
- package/dist/directory-restore-suite.js +1 -1
- package/dist/directory-restore-suite.js.map +1 -1
- package/dist/entity-state-module.d.ts.map +1 -1
- package/dist/entity-state-module.js +12 -6
- package/dist/entity-state-module.js.map +1 -1
- package/dist/entity-trash-module.d.ts.map +1 -1
- package/dist/entity-trash-module.js +4 -4
- package/dist/entity-trash-module.js.map +1 -1
- package/dist/entity-trash-suite.d.ts.map +1 -1
- package/dist/entity-trash-suite.js +17 -8
- package/dist/entity-trash-suite.js.map +1 -1
- package/dist/erasure-module.d.ts.map +1 -1
- package/dist/erasure-module.js +3 -2
- package/dist/erasure-module.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/input-parse-suite.d.ts.map +1 -1
- package/dist/input-parse-suite.js +33 -2
- package/dist/input-parse-suite.js.map +1 -1
- package/dist/membership-module.d.ts.map +1 -1
- package/dist/membership-module.js +3 -2
- package/dist/membership-module.js.map +1 -1
- package/dist/migration-comments.d.ts.map +1 -1
- package/dist/migration-comments.js +3 -2
- package/dist/migration-comments.js.map +1 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +74 -69
- package/dist/modules.js.map +1 -1
- package/dist/permission-suite.d.ts.map +1 -1
- package/dist/permission-suite.js +30 -2
- package/dist/permission-suite.js.map +1 -1
- package/dist/scope-host-suite.d.ts.map +1 -1
- package/dist/scope-host-suite.js +485 -32
- package/dist/scope-host-suite.js.map +1 -1
- package/dist/shape-reconcile-plan.d.ts +23 -0
- package/dist/shape-reconcile-plan.d.ts.map +1 -0
- package/dist/shape-reconcile-plan.js +87 -0
- package/dist/shape-reconcile-plan.js.map +1 -0
- package/dist/test-operations.d.ts +25 -0
- package/dist/test-operations.d.ts.map +1 -0
- package/dist/test-operations.js +22 -0
- package/dist/test-operations.js.map +1 -0
- package/dist/vertical-events-suite.d.ts.map +1 -1
- package/dist/vertical-events-suite.js +72 -7
- package/dist/vertical-events-suite.js.map +1 -1
- package/package.json +3 -3
package/dist/modules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAaL,CAAC,EAOF,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAaL,CAAC,EAOF,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAUL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAG9B;;;;GAIG;AACH,eAAO,MAAM,cAAc;aACzB,KAAK,EAAE,OAAO;aACd,OAAO,EAAE,OAAO;aAChB,MAAM;iBACJ,KAAK;qBAAI,EAAE;yBAAI,WAAW,EAAE,MAAM;;;iBAClC,IAAI;qBAAI,EAAE;yBAAI,WAAW,EAAE,MAAM;;;iBACjC,IAAI;qBAAI,QAAQ;;;CAEV,CAAC;AAGX;;;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AsB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,kBAyCzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,EAwEnD,CAAC;AAIF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC1B,CAAC;AAoGH,eAAO,MAAM,OAAO,EAAE,kBAarB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5B,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,kBASvB,CAAC;AAsBF,eAAO,MAAM,cAAc,EAAE,kBAU5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAMjC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAM7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,kBAM5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAM1B,CAAC"}
|
package/dist/modules.js
CHANGED
|
@@ -11,9 +11,11 @@ import { dataSubjectId, moduleManifest, operationInputsOf, operationConcurrencyO
|
|
|
11
11
|
import { membershipFixtureMod } from './membership-module.js';
|
|
12
12
|
import { rebuildMod, stateMod } from './entity-state-module.js';
|
|
13
13
|
import { trashMod } from './entity-trash-module.js';
|
|
14
|
+
import { derivedMod } from './derived-module.js';
|
|
14
15
|
import { erasureMod, erasureOtherMod } from './erasure-module.js';
|
|
15
16
|
import { commentedDdlMod } from './migration-comments.js';
|
|
16
17
|
import { assertAllowed, readAttachmentText, readHistory, readTimeline, readScopeTimeline, readScopeHistory, ulid, } from '@substrat-run/kernel';
|
|
18
|
+
import { testOperations } from './test-operations.js';
|
|
17
19
|
/**
|
|
18
20
|
* #1744: the machine `test/move` walks, in the form `model.json` emits — what the suite
|
|
19
21
|
* hands `lifecycleFlow`. #1745: also the one `test/refuse` asserts against, where
|
|
@@ -129,7 +131,7 @@ export const freshnessModManifest = moduleManifest.parse({
|
|
|
129
131
|
export const freshnessMod = {
|
|
130
132
|
manifest: freshnessModManifest,
|
|
131
133
|
migrations: [],
|
|
132
|
-
|
|
134
|
+
...testOperations({}),
|
|
133
135
|
};
|
|
134
136
|
/**
|
|
135
137
|
* #1577: the module a resumable RUN acts through.
|
|
@@ -163,7 +165,7 @@ export const jobsMod = {
|
|
|
163
165
|
migrations: [
|
|
164
166
|
{ version: '0001-init', sql: 'CREATE TABLE job_items (item TEXT NOT NULL)' },
|
|
165
167
|
],
|
|
166
|
-
|
|
168
|
+
...testOperations({
|
|
167
169
|
// Deliberately NOT idempotent and NOT unique-keyed: a repeated step shows up as
|
|
168
170
|
// a DUPLICATE ROW rather than being silently absorbed, which is the only way the
|
|
169
171
|
// resume assertion can fail loudly when the memo stops working.
|
|
@@ -174,7 +176,7 @@ export const jobsMod = {
|
|
|
174
176
|
'jobs/items': ((ctx) => ctx.sql
|
|
175
177
|
.query('SELECT item FROM job_items ORDER BY rowid')
|
|
176
178
|
.map((r) => r.item)),
|
|
177
|
-
},
|
|
179
|
+
}),
|
|
178
180
|
};
|
|
179
181
|
export const flowModManifest = moduleManifest.parse({
|
|
180
182
|
id: '@test/flow',
|
|
@@ -684,7 +686,7 @@ const forgeAfterMutating = (ctx, input) => {
|
|
|
684
686
|
// frozen: refused outright
|
|
685
687
|
}
|
|
686
688
|
}
|
|
687
|
-
emitType(ctx, input);
|
|
689
|
+
return emitType(ctx, input);
|
|
688
690
|
};
|
|
689
691
|
/** Every parent edge of one child, tombstones included, oldest object first. */
|
|
690
692
|
const readEdges = (ctx, input) => ctx.sql
|
|
@@ -1075,7 +1077,7 @@ export const testMod = {
|
|
|
1075
1077
|
`,
|
|
1076
1078
|
},
|
|
1077
1079
|
],
|
|
1078
|
-
|
|
1080
|
+
...testOperations({
|
|
1079
1081
|
'testmod/add': addItem,
|
|
1080
1082
|
'testmod/link-again': linkItemAgain,
|
|
1081
1083
|
'testmod/link-undeclared': linkUndeclared,
|
|
@@ -1104,14 +1106,14 @@ export const testMod = {
|
|
|
1104
1106
|
'testmod/project-journal': projectJournal,
|
|
1105
1107
|
'testmod/read-items': readItems,
|
|
1106
1108
|
'testmod/read-notes': readNotes,
|
|
1107
|
-
},
|
|
1109
|
+
}),
|
|
1108
1110
|
};
|
|
1109
1111
|
export const atomicMod = {
|
|
1110
1112
|
manifest: atomicModManifest,
|
|
1111
1113
|
migrations: [
|
|
1112
1114
|
{ version: '0001-init', sql: 'CREATE TABLE atomic_rows (id TEXT PRIMARY KEY, tag TEXT NOT NULL)' },
|
|
1113
1115
|
],
|
|
1114
|
-
|
|
1116
|
+
...testOperations({
|
|
1115
1117
|
'atomic/rollback': atomicRollback,
|
|
1116
1118
|
'atomic/success': atomicSuccess,
|
|
1117
1119
|
'atomic/stacked': atomicStacked,
|
|
@@ -1123,14 +1125,14 @@ export const atomicMod = {
|
|
|
1123
1125
|
'atomic/read-outbox': atomicReadOutbox,
|
|
1124
1126
|
'atomic/read-tuples': atomicReadTuples,
|
|
1125
1127
|
'atomic/read-intents': atomicReadIntents,
|
|
1126
|
-
},
|
|
1128
|
+
}),
|
|
1127
1129
|
};
|
|
1128
1130
|
export const scheduleMod = {
|
|
1129
1131
|
manifest: scheduleModManifest,
|
|
1130
1132
|
migrations: [
|
|
1131
1133
|
{ version: '0001-init', sql: 'CREATE TABLE sched_ticks (n INTEGER NOT NULL)' },
|
|
1132
1134
|
],
|
|
1133
|
-
|
|
1135
|
+
...testOperations({
|
|
1134
1136
|
// The scheduled operation: check the granted permission, then emit + record a
|
|
1135
1137
|
// tick. Under a system caller its emitted event's actor must be { system: … }.
|
|
1136
1138
|
'sched/tick': (async (ctx) => {
|
|
@@ -1177,7 +1179,7 @@ export const scheduleMod = {
|
|
|
1177
1179
|
// on `sched/schedule-state` — proving a FAILED run carries the identical id, not
|
|
1178
1180
|
// just a fired one.
|
|
1179
1181
|
'sched/read-denials': readDenialsOp,
|
|
1180
|
-
},
|
|
1182
|
+
}),
|
|
1181
1183
|
};
|
|
1182
1184
|
/**
|
|
1183
1185
|
* #1525: the failure twin of `scheduleMod` itself — a SEPARATE module so registering
|
|
@@ -1207,11 +1209,11 @@ export const deniedScheduleModManifest = moduleManifest.parse({
|
|
|
1207
1209
|
});
|
|
1208
1210
|
export const deniedScheduleMod = {
|
|
1209
1211
|
manifest: deniedScheduleModManifest,
|
|
1210
|
-
|
|
1212
|
+
...testOperations({
|
|
1211
1213
|
'sched-denied/tick': (async (ctx) => {
|
|
1212
1214
|
assertAllowed(await ctx.check('sched-denied:admin'));
|
|
1213
1215
|
}),
|
|
1214
|
-
},
|
|
1216
|
+
}),
|
|
1215
1217
|
};
|
|
1216
1218
|
// -- #1654: a composed engine's own schedule, on a tenant holding only the vertical's key --
|
|
1217
1219
|
/**
|
|
@@ -1246,7 +1248,7 @@ export function countComposedSweeps(ctx) {
|
|
|
1246
1248
|
export const composedEngineMod = {
|
|
1247
1249
|
manifest: composedEngineModManifest,
|
|
1248
1250
|
migrations: [{ version: '0001-init', sql: 'CREATE TABLE composed_engine_sweeps (n INTEGER NOT NULL)' }],
|
|
1249
|
-
|
|
1251
|
+
...testOperations({
|
|
1250
1252
|
'composed-engine/sweep': (async (ctx) => {
|
|
1251
1253
|
assertAllowed(await ctx.check('composed-engine:sweep'));
|
|
1252
1254
|
ctx.sql.exec('INSERT INTO composed_engine_sweeps (n) VALUES (1)');
|
|
@@ -1262,7 +1264,7 @@ export const composedEngineMod = {
|
|
|
1262
1264
|
assertAllowed(await ctx.check('composed-engine:sweep'));
|
|
1263
1265
|
ctx.sql.exec('INSERT INTO composed_engine_sweeps (n) VALUES (1)');
|
|
1264
1266
|
}),
|
|
1265
|
-
},
|
|
1267
|
+
}),
|
|
1266
1268
|
};
|
|
1267
1269
|
/**
|
|
1268
1270
|
* #1654's VERTICAL: holds the key a standard install grants (`composer`), and reads the
|
|
@@ -1282,9 +1284,9 @@ export const composerModManifest = moduleManifest.parse({
|
|
|
1282
1284
|
});
|
|
1283
1285
|
export const composerMod = {
|
|
1284
1286
|
manifest: composerModManifest,
|
|
1285
|
-
|
|
1287
|
+
...testOperations({
|
|
1286
1288
|
'composer/sweeps': ((ctx) => countComposedSweeps(ctx)),
|
|
1287
|
-
},
|
|
1289
|
+
}),
|
|
1288
1290
|
};
|
|
1289
1291
|
export const flowMod = {
|
|
1290
1292
|
manifest: flowModManifest,
|
|
@@ -1294,7 +1296,7 @@ export const flowMod = {
|
|
|
1294
1296
|
sql: 'CREATE TABLE flow_log (event_id TEXT PRIMARY KEY, type TEXT NOT NULL)',
|
|
1295
1297
|
},
|
|
1296
1298
|
],
|
|
1297
|
-
|
|
1299
|
+
...testOperations({
|
|
1298
1300
|
'flow/produce': ((ctx) => {
|
|
1299
1301
|
ctx.emit({
|
|
1300
1302
|
type: 'flow.step1',
|
|
@@ -1317,7 +1319,7 @@ export const flowMod = {
|
|
|
1317
1319
|
WHERE type IN ('flow.step1', 'flow.step2') ORDER BY id`)),
|
|
1318
1320
|
'flow/causes': ((ctx) => ctx.sql.query(`SELECT id, type, operation, caused_by FROM _substrat_outbox
|
|
1319
1321
|
WHERE type IN ('flow.step1', 'flow.step2') ORDER BY id`)),
|
|
1320
|
-
},
|
|
1322
|
+
}),
|
|
1321
1323
|
consumers: {
|
|
1322
1324
|
'flow.step1': flowStep1Consumer,
|
|
1323
1325
|
'flow.step2': flowStep2Consumer,
|
|
@@ -1326,7 +1328,7 @@ export const flowMod = {
|
|
|
1326
1328
|
export const guardedMod = {
|
|
1327
1329
|
manifest: guardedModManifest,
|
|
1328
1330
|
migrations: [{ version: '0001-init', sql: 'CREATE TABLE guarded_t (v TEXT NOT NULL)' }],
|
|
1329
|
-
|
|
1331
|
+
...testOperations({
|
|
1330
1332
|
'guarded/act': ((ctx, input) => {
|
|
1331
1333
|
ctx.sql.exec('INSERT INTO guarded_t (v) VALUES (?)', [input?.flag ?? 'none']);
|
|
1332
1334
|
ctx.emit({
|
|
@@ -1344,7 +1346,7 @@ export const guardedMod = {
|
|
|
1344
1346
|
'guarded/rows': ((ctx) => ctx.sql.query('SELECT v FROM guarded_t').map((r) => r.v)),
|
|
1345
1347
|
'guarded/events': ((ctx) => ctx.sql.query('SELECT id FROM _substrat_outbox WHERE type = ?', ['guarded.acted'])
|
|
1346
1348
|
.length),
|
|
1347
|
-
},
|
|
1349
|
+
}),
|
|
1348
1350
|
};
|
|
1349
1351
|
export const gateMod = {
|
|
1350
1352
|
manifest: gateModManifest,
|
|
@@ -1374,31 +1376,31 @@ export const gateMod = {
|
|
|
1374
1376
|
export const withdrawEarlyMod = { manifest: withdrawEarlyManifest };
|
|
1375
1377
|
export const victimMod = {
|
|
1376
1378
|
manifest: victimModManifest,
|
|
1377
|
-
|
|
1379
|
+
...testOperations({
|
|
1378
1380
|
'victim/a': (() => 'a'),
|
|
1379
1381
|
'victim/b': (() => 'b'),
|
|
1380
1382
|
'victim/c': (() => 'c'),
|
|
1381
|
-
},
|
|
1383
|
+
}),
|
|
1382
1384
|
};
|
|
1383
1385
|
export const withdrawLateMod = { manifest: withdrawLateManifest };
|
|
1384
1386
|
export const lateMod = {
|
|
1385
1387
|
manifest: lateModManifest,
|
|
1386
1388
|
migrations: [{ version: '0001-init', sql: 'CREATE TABLE late_t (id TEXT PRIMARY KEY)' }],
|
|
1387
|
-
|
|
1389
|
+
...testOperations({
|
|
1388
1390
|
'late/check': ((ctx) => ctx.sql.query(`SELECT name FROM sqlite_master WHERE name = 'late_t'`)
|
|
1389
1391
|
.length),
|
|
1390
|
-
},
|
|
1392
|
+
}),
|
|
1391
1393
|
};
|
|
1392
1394
|
export const billedMod = {
|
|
1393
1395
|
manifest: billedModManifest,
|
|
1394
|
-
|
|
1396
|
+
...testOperations({
|
|
1395
1397
|
'billed/act': (() => 'ran'),
|
|
1396
1398
|
// #304: read the request-time entitlement view. Gated on 'billed' like every op in this
|
|
1397
1399
|
// module, so the tenant holds 'billed' when it runs; the KEY read is the operation input,
|
|
1398
1400
|
// letting a test read a held key, an absent key (→ null), or an expired one (→ null).
|
|
1399
1401
|
'billed/read-entitlement': (async (ctx, key) => ctx.entitlement(key)),
|
|
1400
1402
|
'billed/list-entitlements': (async (ctx) => ctx.entitlements()),
|
|
1401
|
-
},
|
|
1403
|
+
}),
|
|
1402
1404
|
};
|
|
1403
1405
|
export const impersonationEchoMod = {
|
|
1404
1406
|
manifest: impersonationEchoManifest,
|
|
@@ -1408,9 +1410,9 @@ export const impersonationEchoMod = {
|
|
|
1408
1410
|
sql: 'CREATE TABLE imp_echo (event_id TEXT PRIMARY KEY, impersonation TEXT)',
|
|
1409
1411
|
},
|
|
1410
1412
|
],
|
|
1411
|
-
|
|
1413
|
+
...testOperations({
|
|
1412
1414
|
'imp-echo/seen': ((ctx) => ctx.sql.query('SELECT event_id, impersonation FROM imp_echo ORDER BY event_id')),
|
|
1413
|
-
},
|
|
1415
|
+
}),
|
|
1414
1416
|
consumers: {
|
|
1415
1417
|
// The stamp as the CONSUMER received it, JSON-encoded so an absent one and a
|
|
1416
1418
|
// null one stay distinguishable in the assertion.
|
|
@@ -1424,7 +1426,7 @@ export const impersonationEchoMod = {
|
|
|
1424
1426
|
};
|
|
1425
1427
|
export const permMod = {
|
|
1426
1428
|
manifest: permModManifest,
|
|
1427
|
-
|
|
1429
|
+
...testOperations({
|
|
1428
1430
|
'perm/link': linkOp,
|
|
1429
1431
|
'perm/relink': relinkOp,
|
|
1430
1432
|
'perm/probe': probeOp,
|
|
@@ -1499,7 +1501,7 @@ export const permMod = {
|
|
|
1499
1501
|
await ctx.revoke(principalId.parse(i.principal), permissionKey.parse(i.permission), i.entity);
|
|
1500
1502
|
return { revoked: true };
|
|
1501
1503
|
}),
|
|
1502
|
-
},
|
|
1504
|
+
}),
|
|
1503
1505
|
consumers: {
|
|
1504
1506
|
'perm.check-requested': checkRequestedConsumer,
|
|
1505
1507
|
},
|
|
@@ -1541,7 +1543,7 @@ export const connectorMod = {
|
|
|
1541
1543
|
sql: 'CREATE TABLE connector_requests (id TEXT PRIMARY KEY, principal TEXT NOT NULL)',
|
|
1542
1544
|
},
|
|
1543
1545
|
],
|
|
1544
|
-
|
|
1546
|
+
...testOperations({
|
|
1545
1547
|
'connector/request-member': ((ctx, input) => {
|
|
1546
1548
|
ctx.sql.exec('INSERT INTO connector_requests (id, principal) VALUES (?, ?)', [
|
|
1547
1549
|
input.principal,
|
|
@@ -1602,7 +1604,7 @@ export const connectorMod = {
|
|
|
1602
1604
|
});
|
|
1603
1605
|
}),
|
|
1604
1606
|
'connector/requests': ((ctx) => ctx.sql.query('SELECT id FROM connector_requests')),
|
|
1605
|
-
},
|
|
1607
|
+
}),
|
|
1606
1608
|
};
|
|
1607
1609
|
/**
|
|
1608
1610
|
* The modules the scope-host suite's `beforeAll` registers, in the exact order
|
|
@@ -1670,7 +1672,6 @@ export const listDeclaredOps = {
|
|
|
1670
1672
|
};
|
|
1671
1673
|
export const listMod = {
|
|
1672
1674
|
manifest: listModManifest,
|
|
1673
|
-
operationInputs: operationInputsOf(listDeclaredOps),
|
|
1674
1675
|
migrations: [
|
|
1675
1676
|
{
|
|
1676
1677
|
version: '0001-init',
|
|
@@ -1680,7 +1681,7 @@ export const listMod = {
|
|
|
1680
1681
|
},
|
|
1681
1682
|
{ version: '0002-hold', sql: 'ALTER TABLE list_orders ADD COLUMN hold TEXT;' },
|
|
1682
1683
|
],
|
|
1683
|
-
|
|
1684
|
+
...testOperations({
|
|
1684
1685
|
'list/add': (async (ctx, input) => {
|
|
1685
1686
|
const i = input;
|
|
1686
1687
|
ctx.sql.exec('INSERT INTO list_orders (id, number, status, kind, hold) VALUES (?, ?, ?, ?, ?)', [
|
|
@@ -1748,7 +1749,7 @@ export const listMod = {
|
|
|
1748
1749
|
]);
|
|
1749
1750
|
return ctx.page('listorder', { limit: 50 });
|
|
1750
1751
|
}),
|
|
1751
|
-
},
|
|
1752
|
+
}, { inputs: operationInputsOf(listDeclaredOps) }),
|
|
1752
1753
|
};
|
|
1753
1754
|
export const searchModManifest = moduleManifest.parse({
|
|
1754
1755
|
id: '@test/search',
|
|
@@ -1775,7 +1776,7 @@ export const searchMod = {
|
|
|
1775
1776
|
CREATE TABLE search_notes (id TEXT PRIMARY KEY, body TEXT NOT NULL);`,
|
|
1776
1777
|
},
|
|
1777
1778
|
],
|
|
1778
|
-
|
|
1779
|
+
...testOperations({
|
|
1779
1780
|
'search/add': (async (ctx, input) => {
|
|
1780
1781
|
const i = input;
|
|
1781
1782
|
ctx.sql.exec('INSERT INTO search_customers (id, number, name) VALUES (?, ?, ?)', [
|
|
@@ -1816,7 +1817,7 @@ export const searchMod = {
|
|
|
1816
1817
|
]);
|
|
1817
1818
|
return ctx.search('searchcustomer', i.term);
|
|
1818
1819
|
}),
|
|
1819
|
-
},
|
|
1820
|
+
}),
|
|
1820
1821
|
};
|
|
1821
1822
|
// -- #893: the declared input the HOST parses ---------------------------------
|
|
1822
1823
|
export const parseModManifest = moduleManifest.parse({
|
|
@@ -1873,12 +1874,11 @@ const parseDeclaration = {
|
|
|
1873
1874
|
};
|
|
1874
1875
|
export const parseMod = {
|
|
1875
1876
|
manifest: parseModManifest,
|
|
1876
|
-
|
|
1877
|
+
...testOperations({
|
|
1877
1878
|
'parse/echo': echo,
|
|
1878
1879
|
'parse/paged': echo,
|
|
1879
1880
|
'parse/bare': echo,
|
|
1880
|
-
},
|
|
1881
|
-
operationInputs: operationInputsOf(parseDeclaration),
|
|
1881
|
+
}, { inputs: operationInputsOf(parseDeclaration) }),
|
|
1882
1882
|
};
|
|
1883
1883
|
// -- #129: the precondition the HOST compares ---------------------------------
|
|
1884
1884
|
export const concurrencyModManifest = moduleManifest.parse({
|
|
@@ -1980,16 +1980,17 @@ const concurrencyDeclaration = {
|
|
|
1980
1980
|
};
|
|
1981
1981
|
export const concurrencyMod = {
|
|
1982
1982
|
manifest: concurrencyModManifest,
|
|
1983
|
-
|
|
1983
|
+
...testOperations({
|
|
1984
1984
|
'conc/update': concUpdate,
|
|
1985
1985
|
'conc/read': concRead,
|
|
1986
1986
|
'conc/silent': concSilent,
|
|
1987
1987
|
'conc/keyless': concRead,
|
|
1988
1988
|
'conc/forbidden': concForbidden,
|
|
1989
1989
|
'conc/unguarded': concUnguarded,
|
|
1990
|
-
},
|
|
1991
|
-
|
|
1992
|
-
|
|
1990
|
+
}, {
|
|
1991
|
+
inputs: operationInputsOf(concurrencyDeclaration),
|
|
1992
|
+
concurrency: operationConcurrencyOf(concurrencyDeclaration),
|
|
1993
|
+
}),
|
|
1993
1994
|
};
|
|
1994
1995
|
// -- #116: request idempotency ------------------------------------------------
|
|
1995
1996
|
export const idempotencyModManifest = moduleManifest.parse({
|
|
@@ -2080,17 +2081,18 @@ const idempotencyDeclaration = {
|
|
|
2080
2081
|
};
|
|
2081
2082
|
export const idempotencyMod = {
|
|
2082
2083
|
manifest: idempotencyModManifest,
|
|
2083
|
-
|
|
2084
|
+
...testOperations({
|
|
2084
2085
|
'idem/create': idemCreate,
|
|
2085
2086
|
'idem/create-guarded': idemCreate,
|
|
2086
2087
|
'idem/runs': idemRuns,
|
|
2087
2088
|
'idem/fails': idemFails,
|
|
2088
2089
|
'idem/big': idemBig,
|
|
2089
2090
|
'idem/secret': idemSecret,
|
|
2090
|
-
},
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2091
|
+
}, {
|
|
2092
|
+
inputs: operationInputsOf(idempotencyDeclaration),
|
|
2093
|
+
concurrency: operationConcurrencyOf(idempotencyDeclaration),
|
|
2094
|
+
idempotencyOptOuts: operationIdempotencyOptOutsOf(idempotencyDeclaration),
|
|
2095
|
+
}),
|
|
2094
2096
|
};
|
|
2095
2097
|
// -- capabilities (#1672) ------------------------------------------------------
|
|
2096
2098
|
/**
|
|
@@ -2146,7 +2148,7 @@ export const capMod = {
|
|
|
2146
2148
|
migrations: [
|
|
2147
2149
|
{ version: '0001-init', sql: 'CREATE TABLE cap_notes (id TEXT PRIMARY KEY, body TEXT NOT NULL)' },
|
|
2148
2150
|
],
|
|
2149
|
-
|
|
2151
|
+
...testOperations({
|
|
2150
2152
|
'cap/link': linkOp,
|
|
2151
2153
|
'cap/share': ((ctx, input) => ctx.capabilities.mint(input)),
|
|
2152
2154
|
// The link a vertical would hand back — the secret spliced into a URL fragment, so the
|
|
@@ -2269,7 +2271,7 @@ export const capMod = {
|
|
|
2269
2271
|
}
|
|
2270
2272
|
return out;
|
|
2271
2273
|
}),
|
|
2272
|
-
},
|
|
2274
|
+
}),
|
|
2273
2275
|
consumers: {
|
|
2274
2276
|
// Records what the mint answered rather than letting the delivery fail, so the test
|
|
2275
2277
|
// reads an outcome instead of inferring one from a dead letter.
|
|
@@ -2329,7 +2331,7 @@ export const peerMod = {
|
|
|
2329
2331
|
migrations: [
|
|
2330
2332
|
{ version: '0001-init', sql: 'CREATE TABLE peer_notes (id TEXT PRIMARY KEY, body TEXT NOT NULL)' },
|
|
2331
2333
|
],
|
|
2332
|
-
|
|
2334
|
+
...testOperations({
|
|
2333
2335
|
'peer/note': (async (ctx, input) => {
|
|
2334
2336
|
assertAllowed(await ctx.check(PEER_WRITE));
|
|
2335
2337
|
const { id, body } = input;
|
|
@@ -2366,7 +2368,7 @@ export const peerMod = {
|
|
|
2366
2368
|
'peer/outbox': ((ctx) => ctx.sql.query("SELECT actor, authorization, operation, entity_id FROM _substrat_outbox WHERE type = 'peer.noted' ORDER BY id")),
|
|
2367
2369
|
'peer/denials': readDenialsOp,
|
|
2368
2370
|
'peer/tuples': ((ctx) => ctx.sql.query("SELECT subject, relation, object, revoked_at FROM _substrat_tuples WHERE substr(subject, 1, 9) = 'vertical:' ORDER BY subject, relation")),
|
|
2369
|
-
},
|
|
2371
|
+
}),
|
|
2370
2372
|
};
|
|
2371
2373
|
// -- #1746: what an invocation emitted ----------------------------------------
|
|
2372
2374
|
export const emittedModManifest = moduleManifest.parse({
|
|
@@ -2404,7 +2406,7 @@ const touchAll = (ctx, ids) => {
|
|
|
2404
2406
|
*/
|
|
2405
2407
|
export const emittedMod = {
|
|
2406
2408
|
manifest: emittedModManifest,
|
|
2407
|
-
|
|
2409
|
+
...testOperations({
|
|
2408
2410
|
'emitted/touch': ((ctx, input) => {
|
|
2409
2411
|
touchAll(ctx, input.ids);
|
|
2410
2412
|
return { touched: input.ids.length };
|
|
@@ -2428,7 +2430,7 @@ export const emittedMod = {
|
|
|
2428
2430
|
}
|
|
2429
2431
|
return { ok: true };
|
|
2430
2432
|
}),
|
|
2431
|
-
},
|
|
2433
|
+
}),
|
|
2432
2434
|
consumers: {
|
|
2433
2435
|
'emitted.touched': ((ctx, event) => {
|
|
2434
2436
|
ctx.emit({
|
|
@@ -2462,7 +2464,7 @@ export const loggedModManifest = moduleManifest.parse({
|
|
|
2462
2464
|
*/
|
|
2463
2465
|
export const loggedMod = {
|
|
2464
2466
|
manifest: loggedModManifest,
|
|
2465
|
-
|
|
2467
|
+
...testOperations({
|
|
2466
2468
|
'logged/act': ((ctx, input) => {
|
|
2467
2469
|
// `tenantId` and `operation` in the fields are the caller's own values: they stay
|
|
2468
2470
|
// fields and never replace what the host stamps.
|
|
@@ -2480,7 +2482,7 @@ export const loggedMod = {
|
|
|
2480
2482
|
ctx.log.error('could not reach {ticketId}', { ticketId: input.ticketId });
|
|
2481
2483
|
throw new Error('logged/fail: refused after logging');
|
|
2482
2484
|
}),
|
|
2483
|
-
},
|
|
2485
|
+
}),
|
|
2484
2486
|
consumers: {
|
|
2485
2487
|
'logged.acted': ((ctx, event) => {
|
|
2486
2488
|
ctx.log.warn('saw {type}', { type: event.type });
|
|
@@ -2517,7 +2519,7 @@ export const ASYNC_LOG_SECRET_ENTITY = 'alice@example.com';
|
|
|
2517
2519
|
*/
|
|
2518
2520
|
export const asyncLogMod = {
|
|
2519
2521
|
manifest: asyncLogModManifest,
|
|
2520
|
-
|
|
2522
|
+
...testOperations({
|
|
2521
2523
|
'asynclog/act': ((ctx, input) => {
|
|
2522
2524
|
for (const tag of input.tags) {
|
|
2523
2525
|
ctx.emit({
|
|
@@ -2548,7 +2550,7 @@ export const asyncLogMod = {
|
|
|
2548
2550
|
ctx.log.info('ticking, about to refuse');
|
|
2549
2551
|
throw substratError('conflict', `tick refused: ${ASYNC_LOG_SECRET_TEXT}`);
|
|
2550
2552
|
}),
|
|
2551
|
-
},
|
|
2553
|
+
}),
|
|
2552
2554
|
consumers: {
|
|
2553
2555
|
'asynclog.acted': ((ctx, event) => {
|
|
2554
2556
|
const { tag, fail } = event.payload;
|
|
@@ -2594,6 +2596,9 @@ export const contractTestModules = [
|
|
|
2594
2596
|
// its tables or invokes a `state/*` operation.
|
|
2595
2597
|
stateMod,
|
|
2596
2598
|
trashMod,
|
|
2599
|
+
// #1773: the derived-handler suite's module. Inert for every other suite — nothing else reads
|
|
2600
|
+
// its tables or invokes a `derived/*` operation.
|
|
2601
|
+
derivedMod,
|
|
2597
2602
|
// #2068: the subject-erasure suite's modules. Every scope in the kit carries them, so every
|
|
2598
2603
|
// `shredSubject` in every suite runs their declared erasure and their hook — which reaches
|
|
2599
2604
|
// only `er_*` tables nothing else writes, and misbehaves only for a subject the erasure suite
|
|
@@ -2764,7 +2769,7 @@ const liveReshelveOp = async (ctx, input) => {
|
|
|
2764
2769
|
export const liveMod = {
|
|
2765
2770
|
manifest: liveModManifest,
|
|
2766
2771
|
migrations: [],
|
|
2767
|
-
|
|
2772
|
+
...testOperations({
|
|
2768
2773
|
'live/touch': liveTouchOp,
|
|
2769
2774
|
'live/touch-ledger': liveTouchLedgerOp,
|
|
2770
2775
|
'live/unshare': liveUnshareOp,
|
|
@@ -2773,7 +2778,7 @@ export const liveMod = {
|
|
|
2773
2778
|
'live/touch-each': liveTouchEachOp,
|
|
2774
2779
|
'live/shelve': liveShelveOp,
|
|
2775
2780
|
'live/reshelve': liveReshelveOp,
|
|
2776
|
-
},
|
|
2781
|
+
}),
|
|
2777
2782
|
};
|
|
2778
2783
|
export const brokenModManifest = moduleManifest.parse({
|
|
2779
2784
|
id: '@test/broken',
|
|
@@ -2801,9 +2806,9 @@ export const brokenMod = {
|
|
|
2801
2806
|
{ version: '0001-ok', sql: 'CREATE TABLE broken_ok (id TEXT PRIMARY KEY)' },
|
|
2802
2807
|
{ version: '0002-broken', sql: 'CREATE TABLE broken_t (' },
|
|
2803
2808
|
],
|
|
2804
|
-
|
|
2809
|
+
...testOperations({
|
|
2805
2810
|
'broken/act': (() => 'ran'),
|
|
2806
|
-
},
|
|
2811
|
+
}),
|
|
2807
2812
|
};
|
|
2808
2813
|
/**
|
|
2809
2814
|
* #1898: a module whose migration declares a foreign key to a spine table, and its twin whose
|
|
@@ -2832,7 +2837,7 @@ export const spineParentMod = {
|
|
|
2832
2837
|
sql: 'CREATE TABLE lists (id TEXT PRIMARY KEY);\nCREATE TABLE notes (t TEXT REFERENCES/**/"_Substrat_Tuples"(subject));',
|
|
2833
2838
|
},
|
|
2834
2839
|
],
|
|
2835
|
-
|
|
2840
|
+
...testOperations({}),
|
|
2836
2841
|
};
|
|
2837
2842
|
/**
|
|
2838
2843
|
* #2066: migrations that reach for the migration journal — one drops its digest fence, one writes
|
|
@@ -2845,14 +2850,14 @@ export const journalFenceDropMod = {
|
|
|
2845
2850
|
migrations: [
|
|
2846
2851
|
{ version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nDROP TRIGGER "_Substrat_Migrations_Digest_Required";' },
|
|
2847
2852
|
],
|
|
2848
|
-
|
|
2853
|
+
...testOperations({}),
|
|
2849
2854
|
};
|
|
2850
2855
|
export const journalWriteMod = {
|
|
2851
2856
|
manifest: foreignKeyModManifest('@test/journal-write'),
|
|
2852
2857
|
migrations: [
|
|
2853
2858
|
{ version: '0001-init', sql: "CREATE TABLE jt (id TEXT PRIMARY KEY);\nDELETE FROM main._substrat_migrations WHERE module_id = 'x';" },
|
|
2854
2859
|
],
|
|
2855
|
-
|
|
2860
|
+
...testOperations({}),
|
|
2856
2861
|
};
|
|
2857
2862
|
/**
|
|
2858
2863
|
* #2066 r3: authored migrations that reach for the rest of the spine — one shadows
|
|
@@ -2864,18 +2869,18 @@ export const spineShadowMod = {
|
|
|
2864
2869
|
migrations: [
|
|
2865
2870
|
{ version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nCREATE TEMP TABLE "_Substrat_Tuples" (subject TEXT);' },
|
|
2866
2871
|
],
|
|
2867
|
-
|
|
2872
|
+
...testOperations({}),
|
|
2868
2873
|
};
|
|
2869
2874
|
export const spineDropMod = {
|
|
2870
2875
|
manifest: foreignKeyModManifest('@test/spine-drop'),
|
|
2871
2876
|
migrations: [{ version: '0001-init', sql: 'CREATE TABLE jt (id TEXT PRIMARY KEY);\nDROP TABLE main._substrat_outbox;' }],
|
|
2872
|
-
|
|
2877
|
+
...testOperations({}),
|
|
2873
2878
|
};
|
|
2874
2879
|
export const ownParentMod = {
|
|
2875
2880
|
manifest: foreignKeyModManifest('@test/own-parent'),
|
|
2876
2881
|
migrations: [
|
|
2877
2882
|
{ version: '0001-init', sql: 'CREATE TABLE lists (id TEXT PRIMARY KEY);\nCREATE TABLE notes (t TEXT REFERENCES lists(id));' },
|
|
2878
2883
|
],
|
|
2879
|
-
|
|
2884
|
+
...testOperations({}),
|
|
2880
2885
|
};
|
|
2881
2886
|
//# sourceMappingURL=modules.js.map
|