@fleetless/contracts 15.1.0-next.2 → 15.1.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/CHANGELOG.md +6 -1
- package/artifacts/schema/journal-deletion-manifest.schema.json +3 -3
- package/artifacts/schema/journal-manifest-batch.schema.json +2 -2
- package/artifacts/schema/journal-manifest-binding.schema.json +3 -3
- package/artifacts/schema/journal-manifest-row.schema.json +1 -1
- package/dist/journal-manifests.js +13 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,8 @@ version.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [15.1.0] — 2026-11-12
|
|
13
|
+
|
|
12
14
|
### Added
|
|
13
15
|
|
|
14
16
|
- **Deletion journal: the waiting list** (fleetless/fleetless#1082). Two
|
|
@@ -29,7 +31,10 @@ version.
|
|
|
29
31
|
`waitlist_reinvite`, `waitlist_decline` and `waitlist_confirm`, so no
|
|
30
32
|
manifest can name a billing or plan-change effect.
|
|
31
33
|
- `journalManifestBinding` refuses waiting-list rows and members outside the
|
|
32
|
-
`waitlist` scope, and object entries inside it.
|
|
34
|
+
`waitlist` scope, and object entries inside it. In a `waitlist` manifest a
|
|
35
|
+
delivery and its effect member agree on the source action, and a
|
|
36
|
+
withdrawal names an effect only as the parent of one of its own
|
|
37
|
+
deliveries. Replay deletes an effect only once it has no delivery left.
|
|
33
38
|
|
|
34
39
|
## [15.0.1] — 2026-11-12
|
|
35
40
|
|
|
@@ -887,7 +887,7 @@
|
|
|
887
887
|
"waitlist_decline",
|
|
888
888
|
"waitlist_confirm"
|
|
889
889
|
],
|
|
890
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
890
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
891
891
|
}
|
|
892
892
|
},
|
|
893
893
|
"required": [
|
|
@@ -1668,7 +1668,7 @@
|
|
|
1668
1668
|
"waitlist_decline",
|
|
1669
1669
|
"waitlist_confirm"
|
|
1670
1670
|
],
|
|
1671
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
1671
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
1672
1672
|
}
|
|
1673
1673
|
},
|
|
1674
1674
|
"required": [
|
|
@@ -2432,7 +2432,7 @@
|
|
|
2432
2432
|
"waitlist_decline",
|
|
2433
2433
|
"waitlist_confirm"
|
|
2434
2434
|
],
|
|
2435
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
2435
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
2436
2436
|
}
|
|
2437
2437
|
},
|
|
2438
2438
|
"required": [
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
"waitlist_decline",
|
|
646
646
|
"waitlist_confirm"
|
|
647
647
|
],
|
|
648
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
648
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
649
649
|
}
|
|
650
650
|
},
|
|
651
651
|
"required": [
|
|
@@ -1409,7 +1409,7 @@
|
|
|
1409
1409
|
"waitlist_decline",
|
|
1410
1410
|
"waitlist_confirm"
|
|
1411
1411
|
],
|
|
1412
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
1412
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
1413
1413
|
}
|
|
1414
1414
|
},
|
|
1415
1415
|
"required": [
|
|
@@ -2393,7 +2393,7 @@
|
|
|
2393
2393
|
"waitlist_decline",
|
|
2394
2394
|
"waitlist_confirm"
|
|
2395
2395
|
],
|
|
2396
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
2396
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
2397
2397
|
}
|
|
2398
2398
|
},
|
|
2399
2399
|
"required": [
|
|
@@ -3174,7 +3174,7 @@
|
|
|
3174
3174
|
"waitlist_decline",
|
|
3175
3175
|
"waitlist_confirm"
|
|
3176
3176
|
],
|
|
3177
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
3177
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
3178
3178
|
}
|
|
3179
3179
|
},
|
|
3180
3180
|
"required": [
|
|
@@ -3938,7 +3938,7 @@
|
|
|
3938
3938
|
"waitlist_decline",
|
|
3939
3939
|
"waitlist_confirm"
|
|
3940
3940
|
],
|
|
3941
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
3941
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
3942
3942
|
}
|
|
3943
3943
|
},
|
|
3944
3944
|
"required": [
|
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
"waitlist_decline",
|
|
604
604
|
"waitlist_confirm"
|
|
605
605
|
],
|
|
606
|
-
"description": "The source action the operator_effect_outbox row had when it was frozen
|
|
606
|
+
"description": "The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them."
|
|
607
607
|
}
|
|
608
608
|
},
|
|
609
609
|
"required": [
|
|
@@ -57,7 +57,7 @@ export const journalManifestRow = z.union([
|
|
|
57
57
|
z.strictObject({ ...member, type: z.literal('global_operator_audit'), audit_id: uuid }),
|
|
58
58
|
z.strictObject({
|
|
59
59
|
...member, type: z.literal('waitlist_mail_effect'), effect_id: uuid,
|
|
60
|
-
source_action: waitlistMailAction.meta({ description: 'The source action the operator_effect_outbox row had when it was frozen
|
|
60
|
+
source_action: waitlistMailAction.meta({ description: 'The source action the operator_effect_outbox row had when it was frozen. Replay deletes the row only while it still has it and has no delivery left: an invitation effect carries the deliveries of many entries, and deleting it would cascade to them.' }),
|
|
61
61
|
}),
|
|
62
62
|
z.strictObject({
|
|
63
63
|
...member, type: z.literal('waitlist_mail_delivery'), delivery_id: uuid, effect_id: uuid,
|
|
@@ -261,6 +261,11 @@ export const journalManifestBinding = z.strictObject({
|
|
|
261
261
|
// The waiting list has no objects: no mapping, so no free string can carry an address into this manifest.
|
|
262
262
|
if (manifest.entries.length !== 0)
|
|
263
263
|
problem('A waitlist manifest has no object entries', ['manifest', 'entries']);
|
|
264
|
+
const effects = new Map(manifest.rows.flatMap((row) => (row.type === 'waitlist_mail_effect' ? [[row.effect_id, row.source_action]] : [])));
|
|
265
|
+
const deliveries = manifest.rows.filter((row) => row.type === 'waitlist_mail_delivery');
|
|
266
|
+
if (deliveries.some((row) => effects.has(row.effect_id) && effects.get(row.effect_id) !== row.source_action)) {
|
|
267
|
+
problem('A delivery and its effect disagree on the source action', ['manifest', 'rows']);
|
|
268
|
+
}
|
|
264
269
|
if (intent.kind === 'waitlist.withdrawal') {
|
|
265
270
|
// One entry: exactly its own row, and mail deliveries addressed for it alone.
|
|
266
271
|
const entries = manifest.rows.filter((row) => row.type === 'uuid_row' && row.table === 'waitlist');
|
|
@@ -268,9 +273,15 @@ export const journalManifestBinding = z.strictObject({
|
|
|
268
273
|
if (entries.length !== 1 || only?.type !== 'uuid_row' || only.id !== ids.entry_id || only.membership_kind !== 'affected') {
|
|
269
274
|
problem('A withdrawal names exactly its own entry', ['manifest', 'rows']);
|
|
270
275
|
}
|
|
271
|
-
if (
|
|
276
|
+
if (deliveries.some((row) => row.entry_id !== ids.entry_id)) {
|
|
272
277
|
problem('A withdrawal deletes only its own entry\'s deliveries', ['manifest', 'rows']);
|
|
273
278
|
}
|
|
279
|
+
// An effect goes only as the parent of one of the withdrawal's own deliveries (replay then deletes it only once it has none left).
|
|
280
|
+
for (const [effectId, sourceAction] of effects) {
|
|
281
|
+
if (!deliveries.some((row) => row.effect_id === effectId && row.source_action === sourceAction)) {
|
|
282
|
+
problem('A withdrawal deletes only the effects of its own deliveries', ['manifest', 'rows']);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
274
285
|
}
|
|
275
286
|
}
|
|
276
287
|
const ranges = manifest.rows.filter((row) => row.type === 'retention_range');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "15.1.0
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dehne Robotik GmbH",
|