@toa.io/norm 1.0.0-alpha.270 → 1.0.0-alpha.272
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 +54 -0
- package/package.json +6 -6
- package/src/.context/schema.yaml +59 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,60 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.272](https://github.com/toa-io/toa/compare/v1.0.0-alpha.271...v1.0.0-alpha.272) (2026-09-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **atomicity:** honour a cluster, and let it be unreachable ([c475d66](https://github.com/toa-io/toa/commit/c475d663ddf7329d86da517ccceee4cb03280e95))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
* feat(atomicity)!: take a quorum of independent servers ([862562f](https://github.com/toa-io/toa/commit/862562f24d77ec00127dbbd88d43802b208c643b))
|
|
15
|
+
* refactor(atomicity)!: take one Redis, not a cluster ([b0a4770](https://github.com/toa-io/toa/commit/b0a4770dff5dfe8fee4b9ae637a4dd297454fcd4))
|
|
16
|
+
* refactor(atomicity)!: take the lock manager from the stash ([4fd91eb](https://github.com/toa-io/toa/commit/4fd91eb2fdb68f7b87aaf16d182794bbc567ba57))
|
|
17
|
+
* refactor(core)!: pump the outbox in one cycle ([bf590fe](https://github.com/toa-io/toa/commit/bf590fe8ed59c701b5fd1a91ba4874685b79242f))
|
|
18
|
+
* refactor(atomicity)!: rename the connector and free it of the outbox ([21f1a41](https://github.com/toa-io/toa/commit/21f1a41aceafcfd35c7620014062fe46b54afa95))
|
|
19
|
+
* feat(core)!: commit events with the state that produced them ([1eb68cc](https://github.com/toa-io/toa/commit/1eb68cc435dbfa03faa16009fceb866693d22e1a)), closes [#20](https://github.com/toa-io/toa/issues/20)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **atomicity:** make the interval a setting, and stop repeating n-and-i ([5c3a6d1](https://github.com/toa-io/toa/commit/5c3a6d1533751a21b7eb7d9c737f1a270bf5a5ae))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### BREAKING CHANGES
|
|
28
|
+
|
|
29
|
+
* `atomicity.redis` accepts a list again, of independent servers rather
|
|
30
|
+
than cluster nodes, and refuses an even number of them.
|
|
31
|
+
|
|
32
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
33
|
+
* `atomicity.redis` is a string. A list is refused at export.
|
|
34
|
+
|
|
35
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
36
|
+
* `context.stash.lock` is gone; lock through `context.atom` instead.
|
|
37
|
+
A stash pointer resolving to several addresses now uses the first.
|
|
38
|
+
|
|
39
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
40
|
+
* `Storage.outbox.pending` takes a fourth argument, the id to
|
|
41
|
+
continue from.
|
|
42
|
+
|
|
43
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
44
|
+
* `@toa.io/partitions.redis` is now `@toa.io/atomicity`, and its
|
|
45
|
+
`lanes(total)` is `slots(total)`. Redis is declared as `atomicity` in the context
|
|
46
|
+
rather than `outbox.redis`, and read from `TOA_ATOMICITY_REDIS`.
|
|
47
|
+
`TOA_OUTBOX_PARTITION_INTERVAL` is `TOA_ATOMICITY_INTERVAL`.
|
|
48
|
+
|
|
49
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
50
|
+
* `event.changeset` is removed; use `origin` and `state`. `State`
|
|
51
|
+
takes an `Outbox` in place of an `Emission`. `difference` is dropped from
|
|
52
|
+
`@toa.io/generic` along with its last caller.
|
|
53
|
+
|
|
54
|
+
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
6
60
|
# [1.0.0-alpha.270](https://github.com/toa-io/toa/compare/v1.0.0-alpha.269...v1.0.0-alpha.270) (2026-08-31)
|
|
7
61
|
|
|
8
62
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/norm",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.272",
|
|
4
4
|
"description": "Toa declarations normalization and validation",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
24
|
-
"@toa.io/generic": "1.0.0-alpha.
|
|
25
|
-
"@toa.io/schemas": "1.0.0-alpha.
|
|
26
|
-
"@toa.io/yaml": "1.0.0-alpha.
|
|
23
|
+
"@toa.io/core": "1.0.0-alpha.272",
|
|
24
|
+
"@toa.io/generic": "1.0.0-alpha.272",
|
|
25
|
+
"@toa.io/schemas": "1.0.0-alpha.272",
|
|
26
|
+
"@toa.io/yaml": "1.0.0-alpha.272"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "1a451755445935c04cf5b373bcc73942cac0bb10"
|
|
29
29
|
}
|
package/src/.context/schema.yaml
CHANGED
|
@@ -65,6 +65,65 @@ properties:
|
|
|
65
65
|
resources:
|
|
66
66
|
$ref: '#/definitions/resources'
|
|
67
67
|
required: [name, components]
|
|
68
|
+
atomicity:
|
|
69
|
+
description: >
|
|
70
|
+
Where the replicas of a component decide together: who owns what, what they have spent
|
|
71
|
+
between them, and which of them holds a name while it works. Absent or unreachable,
|
|
72
|
+
nothing is owned and whoever asked stands down; metering and locking are refused.
|
|
73
|
+
type: object
|
|
74
|
+
additionalProperties: false
|
|
75
|
+
properties:
|
|
76
|
+
redis:
|
|
77
|
+
description: >
|
|
78
|
+
One address, or an odd number of them — independent servers, not the nodes of a
|
|
79
|
+
cluster. A lock is taken on a quorum of them; the registry and the meter use the
|
|
80
|
+
first, because each of them counts on a single key.
|
|
81
|
+
oneOf:
|
|
82
|
+
- type: string
|
|
83
|
+
- type: array
|
|
84
|
+
minItems: 1
|
|
85
|
+
items:
|
|
86
|
+
type: string
|
|
87
|
+
interval:
|
|
88
|
+
description: >
|
|
89
|
+
How often a replica registers, in milliseconds. It has to comfortably exceed a round
|
|
90
|
+
trip to Redis and the jitter around it, and nothing is owned until two consecutive
|
|
91
|
+
intervals have agreed — so this is also how long a replica owns nothing after it
|
|
92
|
+
joins, restarts or stalls.
|
|
93
|
+
type: integer
|
|
94
|
+
minimum: 100
|
|
95
|
+
required: [redis]
|
|
96
|
+
outbox:
|
|
97
|
+
type: object
|
|
98
|
+
additionalProperties: false
|
|
99
|
+
properties:
|
|
100
|
+
interval:
|
|
101
|
+
description: >
|
|
102
|
+
The pump's cycle, in milliseconds. One cycle reads what is unpublished, publishes it
|
|
103
|
+
and marks it. In steady state it reads nothing, so this is budgeted for how fast a rare
|
|
104
|
+
failure heals rather than for how fast events flow.
|
|
105
|
+
type: integer
|
|
106
|
+
minimum: 100
|
|
107
|
+
batch:
|
|
108
|
+
description: >
|
|
109
|
+
How many rows one read brings back. A page that comes back full is read on from,
|
|
110
|
+
so this bounds a read rather than a cycle.
|
|
111
|
+
type: integer
|
|
112
|
+
minimum: 1
|
|
113
|
+
retention:
|
|
114
|
+
description: >
|
|
115
|
+
Seconds a published row is kept as a change log before it expires. A row that never
|
|
116
|
+
made it out has no expiry and is never reaped.
|
|
117
|
+
type: integer
|
|
118
|
+
minimum: 0
|
|
119
|
+
events:
|
|
120
|
+
description: >
|
|
121
|
+
Events of this context that are consumed outside it. An event is otherwise published only
|
|
122
|
+
where something in the context receives it.
|
|
123
|
+
type: array
|
|
124
|
+
items:
|
|
125
|
+
type: string
|
|
126
|
+
pattern: ^[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*$
|
|
68
127
|
mono:
|
|
69
128
|
type: object
|
|
70
129
|
additionalProperties: false
|