@substrat-run/contract-tests 0.87.0 → 0.89.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/concurrency-suite.d.ts +3 -0
- package/dist/concurrency-suite.d.ts.map +1 -0
- package/dist/concurrency-suite.js +228 -0
- package/dist/concurrency-suite.js.map +1 -0
- package/dist/conformance.d.ts +85 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +17 -0
- package/dist/conformance.js.map +1 -0
- package/dist/entity-check-plan.d.ts +138 -0
- package/dist/entity-check-plan.d.ts.map +1 -0
- package/dist/entity-check-plan.js +181 -0
- package/dist/entity-check-plan.js.map +1 -0
- package/dist/entity-check-suite.d.ts +3 -90
- package/dist/entity-check-suite.d.ts.map +1 -1
- package/dist/entity-check-suite.js +42 -71
- package/dist/entity-check-suite.js.map +1 -1
- package/dist/entity-version-suite.d.ts +3 -0
- package/dist/entity-version-suite.d.ts.map +1 -0
- package/dist/entity-version-suite.js +160 -0
- package/dist/entity-version-suite.js.map +1 -0
- package/dist/idempotency-suite.d.ts +3 -0
- package/dist/idempotency-suite.d.ts.map +1 -0
- package/dist/idempotency-suite.js +243 -0
- package/dist/idempotency-suite.js.map +1 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/input-parse-suite.d.ts +3 -0
- package/dist/input-parse-suite.d.ts.map +1 -0
- package/dist/input-parse-suite.js +149 -0
- package/dist/input-parse-suite.js.map +1 -0
- package/dist/modules.d.ts +482 -160
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +367 -2
- package/dist/modules.js.map +1 -1
- package/dist/node-only-suite.d.ts +28 -0
- package/dist/node-only-suite.d.ts.map +1 -1
- package/dist/node-only-suite.js +43 -1
- package/dist/node-only-suite.js.map +1 -1
- package/dist/permission-suite.d.ts.map +1 -1
- package/dist/permission-suite.js +125 -0
- package/dist/permission-suite.js.map +1 -1
- package/dist/timeline-suite.d.ts +3 -0
- package/dist/timeline-suite.d.ts.map +1 -0
- package/dist/timeline-suite.js +223 -0
- package/dist/timeline-suite.js.map +1 -0
- package/package.json +11 -3
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contract suite for `readTimeline` / `readHistory` — the supported read of an
|
|
3
|
+
* entity's history (#800).
|
|
4
|
+
*
|
|
5
|
+
* What it pins is not that a `SELECT` runs. Five demos already had one and all
|
|
6
|
+
* five ran; the suite exists because of what they got WRONG, and every case here
|
|
7
|
+
* is one of those:
|
|
8
|
+
*
|
|
9
|
+
* - **A timestamp cursor loses rows.** Meridian's and rally's timelines walked
|
|
10
|
+
* `occurred_at > ?`, and `ctx.now()` is stable for a whole invocation (#812) —
|
|
11
|
+
* so every event one operation emits shares an instant, and a page boundary
|
|
12
|
+
* inside them dropped the rest. The burst case constructs that on purpose.
|
|
13
|
+
* - **`actor` is not an id.** It is stored `JSON.stringify`d over a union whose
|
|
14
|
+
* principal member is a bare string, so the column holds `"01J…"` WITH quotes.
|
|
15
|
+
* The suite asserts the decoded value, for a principal and for a system actor,
|
|
16
|
+
* because the string-shaped read is the trap that looks like it works.
|
|
17
|
+
* - **A shred keeps the row.** The payload goes, the envelope stays, and a
|
|
18
|
+
* history that threw or skipped the row would be a worse answer than
|
|
19
|
+
* "something happened here and you may not know what."
|
|
20
|
+
*
|
|
21
|
+
* Behavioural against a real database throughout, for the reason the entity
|
|
22
|
+
* version suite gives: a query that reads correctly can still be wrong, and a
|
|
23
|
+
* string assertion would call it a pass.
|
|
24
|
+
*/
|
|
25
|
+
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
|
26
|
+
import { dataSubjectId, permissionKey, platformActorId, principalId, scopeId, tenantId, } from '@substrat-run/contracts';
|
|
27
|
+
import { ulid } from '@substrat-run/kernel';
|
|
28
|
+
import { contractTestBareOps, testMod } from './modules.js';
|
|
29
|
+
const PERM_USE = permissionKey.parse('testmod:use');
|
|
30
|
+
export function timelineContractSuite(adapterName, makeFixture) {
|
|
31
|
+
describe(`entity timeline (readTimeline / readHistory): ${adapterName}`, () => {
|
|
32
|
+
let fixture;
|
|
33
|
+
let host;
|
|
34
|
+
let stub;
|
|
35
|
+
const t1 = tenantId.parse(ulid());
|
|
36
|
+
const s1 = scopeId.parse(ulid());
|
|
37
|
+
const alice = principalId.parse(ulid());
|
|
38
|
+
const staff = platformActorId.parse(ulid());
|
|
39
|
+
const timeline = (entityId, page = {}, entityType = 'test-thing') => stub.invoke('test/timeline', { entityType, entityId, ...page });
|
|
40
|
+
const history = (entityId, page = {}, entityType = 'test-thing') => stub.invoke('test/history', { entityType, entityId, ...page });
|
|
41
|
+
const emitAbout = (entityId, subject) => stub.invoke('test/emit-about', { entityId, ...(subject ? { subject } : {}) });
|
|
42
|
+
const burst = (entityId, count) => stub.invoke('test/emit-burst', { entityId, count });
|
|
43
|
+
const said = (entityId, subject, what) => stub.invoke('test/emit-about-with-payload', { entityId, subject, said: what });
|
|
44
|
+
beforeAll(async () => {
|
|
45
|
+
fixture = await makeFixture();
|
|
46
|
+
host = fixture.host;
|
|
47
|
+
for (const [name, handler] of Object.entries(contractTestBareOps)) {
|
|
48
|
+
host.defineOperation(name, handler);
|
|
49
|
+
}
|
|
50
|
+
host.registerModule(testMod);
|
|
51
|
+
await host.admin.createTenant(staff, { id: t1, slug: 'timeline-tenant', name: 'Timeline Tenant' });
|
|
52
|
+
await host.admin.grantEntitlement(staff, t1, 'testmod');
|
|
53
|
+
await host.admin.defineRole(staff, t1, {
|
|
54
|
+
key: 'timeline-admin',
|
|
55
|
+
permissions: [PERM_USE],
|
|
56
|
+
source: 'vertical',
|
|
57
|
+
});
|
|
58
|
+
await host.admin.assignRole(staff, {
|
|
59
|
+
principalId: alice,
|
|
60
|
+
roleKey: 'timeline-admin',
|
|
61
|
+
node: { tenantId: t1, scopeId: null },
|
|
62
|
+
});
|
|
63
|
+
await host.provisionScope(staff, { tenantId: t1, scopeId: s1, vertical: 'timeline-vertical' });
|
|
64
|
+
await host.admin.activateScope(staff, t1, s1);
|
|
65
|
+
stub = await host.getScope(alice, t1, s1);
|
|
66
|
+
});
|
|
67
|
+
afterAll(async () => {
|
|
68
|
+
await fixture.cleanup();
|
|
69
|
+
});
|
|
70
|
+
it('is empty for an entity nothing has emitted about', async () => {
|
|
71
|
+
const page = await timeline('never-touched');
|
|
72
|
+
expect(page.entries).toEqual([]);
|
|
73
|
+
// Short page ⇒ the walk is done. A non-null cursor here would send a
|
|
74
|
+
// client back for a second empty fetch forever.
|
|
75
|
+
expect(page.nextCursor).toBeNull();
|
|
76
|
+
});
|
|
77
|
+
it('returns the envelope in creation order', async () => {
|
|
78
|
+
const id = `e-${ulid()}`;
|
|
79
|
+
await emitAbout(id);
|
|
80
|
+
await emitAbout(id);
|
|
81
|
+
await emitAbout(id);
|
|
82
|
+
const { entries } = await timeline(id);
|
|
83
|
+
expect(entries).toHaveLength(3);
|
|
84
|
+
expect(entries.map((e) => e.type)).toEqual([
|
|
85
|
+
'test.happened',
|
|
86
|
+
'test.happened',
|
|
87
|
+
'test.happened',
|
|
88
|
+
]);
|
|
89
|
+
// `ORDER BY id` IS creation order because `ulid()` is monotonic — the same
|
|
90
|
+
// property `entityVersionQuery` relies on. Asserted rather than assumed,
|
|
91
|
+
// since losing it would make timelines subtly wrong and nothing else red.
|
|
92
|
+
const ids = entries.map((e) => e.id);
|
|
93
|
+
expect([...ids].sort()).toEqual(ids);
|
|
94
|
+
});
|
|
95
|
+
it('decodes `actor` into the union rather than handing back stored JSON', async () => {
|
|
96
|
+
const id = `e-${ulid()}`;
|
|
97
|
+
await emitAbout(id);
|
|
98
|
+
const [entry] = (await timeline(id)).entries;
|
|
99
|
+
// The trap this helper exists to close. The column holds `"01J…"` — quotes
|
|
100
|
+
// included — so a caller resolving a name against the raw text misses every
|
|
101
|
+
// time, and the natural fix is a string-trim that then breaks on a system
|
|
102
|
+
// actor. Here it is the principal id itself.
|
|
103
|
+
expect(entry.actor).toBe(alice);
|
|
104
|
+
expect(typeof entry.actor).toBe('string');
|
|
105
|
+
expect(JSON.stringify(entry.actor).startsWith('"\\"')).toBe(false);
|
|
106
|
+
});
|
|
107
|
+
it('is per entity — an event about one does not appear on another', async () => {
|
|
108
|
+
const left = `e-${ulid()}`;
|
|
109
|
+
const right = `e-${ulid()}`;
|
|
110
|
+
await emitAbout(left);
|
|
111
|
+
await emitAbout(right);
|
|
112
|
+
await emitAbout(right);
|
|
113
|
+
expect((await timeline(left)).entries).toHaveLength(1);
|
|
114
|
+
expect((await timeline(right)).entries).toHaveLength(2);
|
|
115
|
+
// Same id, other type: the pair identifies the row, not the id alone.
|
|
116
|
+
expect((await timeline(left, {}, 'other-thing')).entries).toEqual([]);
|
|
117
|
+
});
|
|
118
|
+
it('pages without losing events that share an instant', async () => {
|
|
119
|
+
const id = `e-${ulid()}`;
|
|
120
|
+
// One invocation, five events. `ctx.now()` does not move inside an
|
|
121
|
+
// operation, so all five carry the same `occurred_at` — this is the
|
|
122
|
+
// ordinary case, not a contrived tie.
|
|
123
|
+
const at = await burst(id, 5);
|
|
124
|
+
const first = await timeline(id, { limit: 2 });
|
|
125
|
+
expect(first.entries).toHaveLength(2);
|
|
126
|
+
expect(first.nextCursor).toBe(first.entries[1].id);
|
|
127
|
+
expect(first.entries.every((e) => e.occurredAt === at)).toBe(true);
|
|
128
|
+
const second = await timeline(id, { limit: 2, cursor: first.nextCursor });
|
|
129
|
+
const third = await timeline(id, { limit: 2, cursor: second.nextCursor });
|
|
130
|
+
expect(third.nextCursor).toBeNull();
|
|
131
|
+
const walked = [...first.entries, ...second.entries, ...third.entries].map((e) => e.id);
|
|
132
|
+
// The assertion the old timestamp cursor failed: five emitted, five walked,
|
|
133
|
+
// none seen twice. `occurred_at > ?` returned two and then nothing, because
|
|
134
|
+
// every remaining row shared the instant it had just walked past.
|
|
135
|
+
expect(walked).toHaveLength(5);
|
|
136
|
+
expect(new Set(walked).size).toBe(5);
|
|
137
|
+
});
|
|
138
|
+
it('walks newest-first on `desc`, over the same rows', async () => {
|
|
139
|
+
const id = `e-${ulid()}`;
|
|
140
|
+
await burst(id, 4);
|
|
141
|
+
const asc = (await timeline(id)).entries.map((e) => e.id);
|
|
142
|
+
const desc = (await timeline(id, { order: 'desc' })).entries.map((e) => e.id);
|
|
143
|
+
expect(desc).toEqual([...asc].reverse());
|
|
144
|
+
// The cursor is exclusive in BOTH directions — strictly before, walking down.
|
|
145
|
+
const firstDown = await timeline(id, { order: 'desc', limit: 2 });
|
|
146
|
+
const nextDown = await timeline(id, {
|
|
147
|
+
order: 'desc',
|
|
148
|
+
limit: 2,
|
|
149
|
+
cursor: firstDown.nextCursor,
|
|
150
|
+
});
|
|
151
|
+
expect(nextDown.entries.map((e) => e.id)).toEqual(asc.slice(0, 2).reverse());
|
|
152
|
+
});
|
|
153
|
+
it("uses the event id as the cursor — the entity's version at that point", async () => {
|
|
154
|
+
const id = `e-${ulid()}`;
|
|
155
|
+
await emitAbout(id);
|
|
156
|
+
await emitAbout(id);
|
|
157
|
+
const { entries } = await timeline(id);
|
|
158
|
+
const version = await stub.invoke('test/version-of', {
|
|
159
|
+
entityType: 'test-thing',
|
|
160
|
+
entityId: id,
|
|
161
|
+
});
|
|
162
|
+
// #901's token and this walk's last entry are the same value, which is the
|
|
163
|
+
// point of ordering by `id`: "list the history", "name a version" and
|
|
164
|
+
// "refuse my stale write" (#129) stop being three vocabularies.
|
|
165
|
+
expect(entries[entries.length - 1].id).toBe(version);
|
|
166
|
+
});
|
|
167
|
+
it('carries the payload, the classification and the authorization', async () => {
|
|
168
|
+
const id = `e-${ulid()}`;
|
|
169
|
+
await said(id, dataSubjectId.parse(ulid()), 'moved to Customer');
|
|
170
|
+
const [entry] = (await history(id)).entries;
|
|
171
|
+
// The fat event — the NEW values. "X → Y" is reconstructed by diffing
|
|
172
|
+
// consecutive payloads; nothing stores a before-state, which is a property
|
|
173
|
+
// of the spine and not something this read could have hidden.
|
|
174
|
+
expect(entry.payload).toEqual({ said: 'moved to Customer' });
|
|
175
|
+
expect(entry.piiClass).toBe('direct');
|
|
176
|
+
expect(entry.subjectId).not.toBeNull();
|
|
177
|
+
// K-34: the checks the emitting operation passed. Null would mean
|
|
178
|
+
// UNRECORDED — a row written before the column existed — which is a
|
|
179
|
+
// different fact from an empty list and must not be conflated with one.
|
|
180
|
+
expect(entry.authorization).not.toBeNull();
|
|
181
|
+
expect(entry.authorization.map((a) => a.permission)).toContain(PERM_USE);
|
|
182
|
+
// And the TIMELINE read of the same event carries none of it. That is the
|
|
183
|
+
// whole reason the two are separate: one has a disclosure decision behind
|
|
184
|
+
// it and the other cannot have.
|
|
185
|
+
const [envelope] = (await timeline(id)).entries;
|
|
186
|
+
expect(envelope).not.toHaveProperty('payload');
|
|
187
|
+
expect(envelope.id).toBe(entry.id);
|
|
188
|
+
});
|
|
189
|
+
it('degrades to a null payload after a shred, keeping the envelope', async () => {
|
|
190
|
+
const id = `e-${ulid()}`;
|
|
191
|
+
const subject = dataSubjectId.parse(ulid());
|
|
192
|
+
await said(id, subject, 'something about a person');
|
|
193
|
+
const before = (await history(id)).entries[0];
|
|
194
|
+
expect(before.payload).toEqual({ said: 'something about a person' });
|
|
195
|
+
const receipt = await host.admin.shredSubject(staff, t1, s1, subject);
|
|
196
|
+
expect(receipt.eventsRedacted).toBe(1);
|
|
197
|
+
const after = (await history(id)).entries[0];
|
|
198
|
+
// §5.3's line, held exactly: the payload goes, the envelope stays. A
|
|
199
|
+
// history after an erasure correctly reads "someone changed this, then" —
|
|
200
|
+
// so a renderer must expect the null. It is a supported result, which is
|
|
201
|
+
// why this is asserted rather than left to a caller to discover.
|
|
202
|
+
expect(after.payload).toBeNull();
|
|
203
|
+
expect(after.id).toBe(before.id);
|
|
204
|
+
expect(after.occurredAt).toBe(before.occurredAt);
|
|
205
|
+
expect(after.actor).toBe(before.actor);
|
|
206
|
+
expect(after.subjectId).toBe(subject);
|
|
207
|
+
// And the timeline — which never carried a payload — is unchanged by it.
|
|
208
|
+
expect((await timeline(id)).entries).toHaveLength(1);
|
|
209
|
+
});
|
|
210
|
+
it('defaults and caps the page size rather than answering unbounded', async () => {
|
|
211
|
+
const id = `e-${ulid()}`;
|
|
212
|
+
await burst(id, 3);
|
|
213
|
+
// An app walking a screen must not receive ten thousand rows because
|
|
214
|
+
// nobody named a number. This differs from `ListPage`'s kernel-read
|
|
215
|
+
// convention (unset ⇒ unbounded) deliberately, and matches what the HTTP
|
|
216
|
+
// layer would have given the same caller.
|
|
217
|
+
const page = await timeline(id, { limit: 0 });
|
|
218
|
+
expect(page.entries).toHaveLength(3);
|
|
219
|
+
expect(page.nextCursor).toBeNull();
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=timeline-suite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-suite.js","sourceRoot":"","sources":["../src/timeline-suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,EACX,OAAO,EACP,QAAQ,GAMT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAkC,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAEpD,MAAM,UAAU,qBAAqB,CACnC,WAAmB,EACnB,WAA4C;IAE5C,QAAQ,CAAC,iDAAiD,WAAW,EAAE,EAAE,GAAG,EAAE;QAC5E,IAAI,OAAyB,CAAC;QAC9B,IAAI,IAAe,CAAC;QACpB,IAAI,IAAe,CAAC;QACpB,MA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AAE,CAAC;YACzB,MAAM,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YACnB,qEAAqE;YACrE,oEAAoE;YACpE,yEAAyE;YACzE,0CAA0C;YAC1C,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/contract-tests",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "The suite every scope-host adapter must pass, forever (D-14)",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./conformance": {
|
|
21
|
+
"types": "./dist/conformance.d.ts",
|
|
22
|
+
"default": "./dist/conformance.js"
|
|
23
|
+
},
|
|
24
|
+
"./plan": {
|
|
25
|
+
"types": "./dist/entity-check-plan.d.ts",
|
|
26
|
+
"default": "./dist/entity-check-plan.js"
|
|
19
27
|
}
|
|
20
28
|
},
|
|
21
29
|
"files": [
|
|
@@ -23,8 +31,8 @@
|
|
|
23
31
|
],
|
|
24
32
|
"dependencies": {
|
|
25
33
|
"vitest": "^3.2.7",
|
|
26
|
-
"@substrat-run/contracts": "^0.
|
|
27
|
-
"@substrat-run/kernel": "^0.
|
|
34
|
+
"@substrat-run/contracts": "^0.89.0",
|
|
35
|
+
"@substrat-run/kernel": "^0.89.0"
|
|
28
36
|
},
|
|
29
37
|
"devDependencies": {
|
|
30
38
|
"@types/node": "^22.0.0",
|