@cratis/pi 7.51.4 → 7.52.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/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +2 -1
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +15 -0
- package/package/corpus/product-sync.json +26 -20
- package/package/corpus/rules/glossary.md +2 -1
- package/package/corpus/rules/profiles.md +15 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +14 -3
- package/package/corpus/skills/cratis-arc-command/SKILL.md +4 -0
- package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +22 -3
- package/package/corpus/skills/cratis-arc-command/references/fresh-identifiers.md +52 -0
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +7 -7
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +9 -0
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +5 -0
- package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +11 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +12 -1
- package/package/corpus/skills/cratis-arc-command-execution/references/command-refusals.md +65 -0
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +5 -0
- package/package/corpus/skills/cratis-arc-hosting/SKILL.md +1 -0
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +6 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +18 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +33 -1
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/lifecycle.md +7 -1
- package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +5 -0
- package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +17 -0
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md +3 -3
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +4 -0
- package/package/corpus/skills/cratis-chronicle-event-constraints/references/storage-uniqueness.md +28 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +5 -3
- package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +7 -0
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +18 -0
- package/package/corpus/skills/cratis-chronicle-event-type-migration/references/explicit-migrations.md +46 -0
- package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +8 -0
- package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +42 -0
- package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +1 -0
- package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +6 -0
- package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +7 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +13 -7
- package/package/corpus/skills/cratis-chronicle-reactor/references/cross-service-events.md +9 -2
- package/package/corpus/skills/cratis-chronicle-reactor/references/return-event-metadata.md +7 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/slice-delivery-checklist.md +3 -3
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +11 -5
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +8 -4
- package/package/corpus/skills/cratis-chronicle-read-model/references/collection-observation.md +49 -0
- package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +13 -2
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +8 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +15 -0
- package/package/corpus/skills/cratis-multi-service-architecture/SKILL.md +204 -0
- package/package/corpus/skills/cratis-multi-service-architecture/references/publish-and-consume.md +229 -0
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +172 -0
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +144 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +4 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +24 -5
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +11 -6
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +3 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +97 -26
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +2 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +45 -10
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +3 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +10 -6
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +12 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +5 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +7 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +28 -12
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +29 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +15 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +4 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +5 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +9 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +12 -10
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +11 -6
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +18 -10
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +14 -13
- package/package/corpus/skills/cratis-screenplay-specifications/references/query-rejections.md +44 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +2 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +188 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +6 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +12 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +10 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +28 -9
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +4658 -230
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +5 -0
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +1 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +1 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +63 -15
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +2 -2
- package/package/profile-catalog.json +3 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ One precise line per load-bearing term, so the same word means the same thing ev
|
|
|
16
16
|
- **Event sequence** — a named, append-ordered log; `EventSequenceId` (the event **log**, **outbox**, **inbox**).
|
|
17
17
|
- **Event log** — the default event sequence where domain events are appended.
|
|
18
18
|
- **Outbox / inbox** — cross-service event sequences: a producer appends its public contract event to the outbox; a consumer observes the inbox.
|
|
19
|
+
- **Public event** — an event type that is part of the contract an event store exposes to other services (`[Public]`, or `[EventStore]` on the type or its assembly); events are private by default. The outbox accepts only public events, and the event log refuses them.
|
|
19
20
|
- **EventContext** — metadata traveling with an event (event source id, sequence number, occurred, causation/correlation, subject).
|
|
20
21
|
|
|
21
22
|
## Read side
|
|
@@ -43,7 +44,7 @@ One precise line per load-bearing term, so the same word means the same thing ev
|
|
|
43
44
|
## Structure & types
|
|
44
45
|
|
|
45
46
|
- **Slice** — the vertical unit of one behavior (command + events + projection + read model + component + specs), created/changed/deleted together.
|
|
46
|
-
- **Slice types** — **State Change** (command → events), **State View** (events → read model), **Automation** (events → side effect, including a follow-up command or event — a Screenplay `produces` / `invokes`), **Translation** (data from *outside* the model's own facts → our own facts: an external system's or another service's data recorded as events we own, keeping the external fact distinct from the local one). A reactor that turns our own event into a follow-up event or command is an Automation, not a Translation.
|
|
47
|
+
- **Slice types** — **State Change** (command → events), **State View** (events → read model), **Automation** (events → side effect, including a follow-up command or event — a Screenplay `produces` / `invokes`), **Translation** (data from *outside* the model's own facts → our own facts: an external system's or another service's data recorded as events we own, keeping the external fact distinct from the local one; a Screenplay `Translate` slice with `direction outbound` is the other direction, publishing our private facts as one public contract event). A reactor that turns our own event into a follow-up event or command is an Automation, not a Translation.
|
|
47
48
|
- **Concept** — a `ConceptAs<T>`, a strongly-typed wrapper over a primitive domain value (never raw `Guid`/`string`/`int`).
|
|
48
49
|
- **EventSourceId<T>** — the strongly-typed event-source identity; derive entity identities from this, not `ConceptAs<Guid>`.
|
|
49
50
|
- **Proxy** — the generated TypeScript command/query client, produced from C# on a **Debug** build; carries a `// @generated by Cratis` header and is never hand-edited.
|
|
@@ -151,6 +151,21 @@ Node.js server and a C# or React-frontend project has no use for them. Select
|
|
|
151
151
|
Standalone Chronicle client usage (no Arc) in TypeScript is
|
|
152
152
|
`cratis-chronicle-client-typescript`.
|
|
153
153
|
|
|
154
|
+
### Several services with their own event stores
|
|
155
|
+
|
|
156
|
+
`cratis/chronicle/core` carries both multi-service skills, so every profile that
|
|
157
|
+
includes it loads them: `cratis/application`, `cratis/application/arc-chronicle`,
|
|
158
|
+
`cratis/application/chronicle-dotnet`, and `cratis/application/csharp` and
|
|
159
|
+
`cratis/chronicle` through `cratis/chronicle/compliance`.
|
|
160
|
+
|
|
161
|
+
| Skill | Covers |
|
|
162
|
+
| --- | --- |
|
|
163
|
+
| `cratis-multi-service-architecture` | Store per service on one kernel, namespace alignment, public contract events and the outbox, consumer routes, delivery semantics, PII across stores, contract versioning, Arc between services |
|
|
164
|
+
| `cratis-multi-service-local-orchestration` | Repository layout with contracts projects, .NET Aspire AppHost, Docker Compose with a MongoDB replica set, per-service settings, CLI contexts per store, frontends per service |
|
|
165
|
+
|
|
166
|
+
Modeling such a system in Screenplay (one model folder per service) is
|
|
167
|
+
`cratis-screenplay-streams-and-consistency`'s multi-service reference.
|
|
168
|
+
|
|
154
169
|
### Experimental Go modules
|
|
155
170
|
|
|
156
171
|
Select `cratis/language/go` for a Go repository without importing any HTTP or
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"repository": "Cratis/Stage",
|
|
28
28
|
"packages": [],
|
|
29
29
|
"synced": {
|
|
30
|
-
"version": "4.
|
|
31
|
-
"date": "2026-10-
|
|
32
|
-
"by": "Cratis/AI#
|
|
30
|
+
"version": "4.103.0",
|
|
31
|
+
"date": "2026-10-14",
|
|
32
|
+
"by": "Cratis/AI#681"
|
|
33
33
|
},
|
|
34
34
|
"covers": {
|
|
35
35
|
"skills": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"rules": []
|
|
48
48
|
},
|
|
49
|
-
"notes": "Source-checked Stage v4.
|
|
49
|
+
"notes": "Source-checked Stage v4.103.0: exact ESM v1-v17 and v19, not v18 or v20. Snapshot/live collection queries, identity-mapping all projections, stored event names, event-id publication checks, release-baseline warnings, command clock/receipt-time generation, conditional and multi-command slices, generated text constraints, no-event and bounded redelivery specs, refusal branches. Query concept validation still uses primitive workaround; Stage#370 is not released. CLI v3.62.0 bundles Stage 4.99.0, not 4.103.0. No new render/browser/Docker probe."
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"id": "arc",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"synced": {
|
|
66
|
-
"version": "22.
|
|
67
|
-
"date": "2026-10-
|
|
68
|
-
"by": "Cratis/AI#
|
|
66
|
+
"version": "22.97.0",
|
|
67
|
+
"date": "2026-10-14",
|
|
68
|
+
"by": "Cratis/AI#695"
|
|
69
69
|
},
|
|
70
70
|
"covers": {
|
|
71
71
|
"skills": [
|
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
"cratis-chronicle-read-model",
|
|
85
85
|
"cratis-code-review",
|
|
86
86
|
"cratis-lens-browser-extension",
|
|
87
|
+
"cratis-multi-service-architecture",
|
|
88
|
+
"cratis-multi-service-local-orchestration",
|
|
87
89
|
"cratis-performance-review",
|
|
88
90
|
"cratis-screenplay-automations-and-translations",
|
|
89
91
|
"cratis-screenplay-discovery",
|
|
@@ -96,7 +98,7 @@
|
|
|
96
98
|
"vertical-slices.md"
|
|
97
99
|
]
|
|
98
100
|
},
|
|
99
|
-
"notes": "
|
|
101
|
+
"notes": "Release-tag delta through 22.97.0: scoped completion and routing validation, generated-target freshness, observable scenarios, asynchronous execution scopes, read-model diagnostics and ordered reactor refusal handling. Existing context generation/self-reduction guidance retained; Screenplay extraction deltas handed to its owning lane. No new runtime probe."
|
|
100
102
|
},
|
|
101
103
|
{
|
|
102
104
|
"id": "ai",
|
|
@@ -122,14 +124,16 @@
|
|
|
122
124
|
}
|
|
123
125
|
],
|
|
124
126
|
"synced": {
|
|
125
|
-
"version": "3.
|
|
126
|
-
"date": "2026-10-
|
|
127
|
-
"by": "Cratis/AI#
|
|
127
|
+
"version": "3.62.0",
|
|
128
|
+
"date": "2026-10-14",
|
|
129
|
+
"by": "Cratis/AI#684"
|
|
128
130
|
},
|
|
129
131
|
"covers": {
|
|
130
132
|
"skills": [
|
|
131
133
|
"cratis-chronicle-cli-operations",
|
|
132
134
|
"cratis-cli-terminal-workbench",
|
|
135
|
+
"cratis-multi-service-architecture",
|
|
136
|
+
"cratis-multi-service-local-orchestration",
|
|
133
137
|
"cratis-screenplay-automations-and-translations",
|
|
134
138
|
"cratis-screenplay-captures-and-reactions",
|
|
135
139
|
"cratis-screenplay-command-surface",
|
|
@@ -153,7 +157,7 @@
|
|
|
153
157
|
],
|
|
154
158
|
"rules": []
|
|
155
159
|
},
|
|
156
|
-
"notes": "Render bundle source-checked at v3.
|
|
160
|
+
"notes": "Render bundle source-checked at v3.62.0: Screenplay 4.159.0 and Stage 4.99.0; CLI rendering admits ESM v1-v16, not standalone v17-v20 capabilities. PATH render uses persisted root identities read-only, rejects root/name conflicts, checks destination event ids at every scope, and reports baseline warnings. CLI baseline admit/check and open-question validation are available. Other CLI operations retain prior evidence; no new render/browser probe."
|
|
157
161
|
},
|
|
158
162
|
{
|
|
159
163
|
"id": "screenplay",
|
|
@@ -166,9 +170,9 @@
|
|
|
166
170
|
}
|
|
167
171
|
],
|
|
168
172
|
"synced": {
|
|
169
|
-
"version": "4.
|
|
170
|
-
"date": "2026-10-
|
|
171
|
-
"by": "Cratis/AI#
|
|
173
|
+
"version": "4.164.0",
|
|
174
|
+
"date": "2026-10-14",
|
|
175
|
+
"by": "Cratis/AI#668"
|
|
172
176
|
},
|
|
173
177
|
"covers": {
|
|
174
178
|
"skills": [
|
|
@@ -196,7 +200,7 @@
|
|
|
196
200
|
],
|
|
197
201
|
"rules": []
|
|
198
202
|
},
|
|
199
|
-
"notes": "Standalone 4.
|
|
203
|
+
"notes": "Standalone 4.164.0 and byte-identical compiler contract pinned. Cratis/AI#663: one origin per capture (PLAY0687). #668: executable no-event/redelivery v17. #684: concept query-argument validation in every version and query-error assertions v18. #681: executable refusal branches and refusal values v19. #666: proposal summary/severity counts and exact structural source proposals. Generated-concept rules select v20 with PLAY0688/0689 proofs and derived-matches repair; generated secrets and preview strategies remain refused. Release-baseline from-esm admission reads storedName. Standalone binding is not renderer admission: Stage 4.103.0 admits v1-v17 and v19; CLI 3.62.0 bundles Screenplay 4.159.0 / Stage 4.99.0 and renders through v16. Prior evidence remains unless superseded; no new renderer, Docker or browser probe."
|
|
200
204
|
},
|
|
201
205
|
{
|
|
202
206
|
"id": "scene",
|
|
@@ -279,9 +283,9 @@
|
|
|
279
283
|
}
|
|
280
284
|
],
|
|
281
285
|
"synced": {
|
|
282
|
-
"version": "19.
|
|
283
|
-
"date": "2026-10-
|
|
284
|
-
"by": "Cratis/AI#
|
|
286
|
+
"version": "19.65.0",
|
|
287
|
+
"date": "2026-10-14",
|
|
288
|
+
"by": "Cratis/AI#695"
|
|
285
289
|
},
|
|
286
290
|
"covers": {
|
|
287
291
|
"skills": [
|
|
@@ -307,6 +311,8 @@
|
|
|
307
311
|
"cratis-chronicle-web-workbench",
|
|
308
312
|
"cratis-code-review",
|
|
309
313
|
"cratis-fundamentals-concept",
|
|
314
|
+
"cratis-multi-service-architecture",
|
|
315
|
+
"cratis-multi-service-local-orchestration",
|
|
310
316
|
"cratis-performance-review",
|
|
311
317
|
"cratis-screenplay-automations-and-translations",
|
|
312
318
|
"cratis-screenplay-discovery",
|
|
@@ -316,7 +322,7 @@
|
|
|
316
322
|
],
|
|
317
323
|
"rules": []
|
|
318
324
|
},
|
|
319
|
-
"notes": "
|
|
325
|
+
"notes": "Release-tag delta through 19.65.0: explicit artifacts, collection observation, redelivery scenarios, webhook generation pins, enrollment contributors, seed ownership, reconnect readiness and hosting/storage fixes. Existing self-reduction guidance retained; publication eligibility corrected and forwarded-tag boundary recorded. No new kernel/transport probe."
|
|
320
326
|
},
|
|
321
327
|
{
|
|
322
328
|
"id": "arc-go",
|
|
@@ -15,6 +15,7 @@ One precise line per load-bearing term, so the same word means the same thing ev
|
|
|
15
15
|
- **Event sequence** — a named, append-ordered log; `EventSequenceId` (the event **log**, **outbox**, **inbox**).
|
|
16
16
|
- **Event log** — the default event sequence where domain events are appended.
|
|
17
17
|
- **Outbox / inbox** — cross-service event sequences: a producer appends its public contract event to the outbox; a consumer observes the inbox.
|
|
18
|
+
- **Public event** — an event type that is part of the contract an event store exposes to other services (`[Public]`, or `[EventStore]` on the type or its assembly); events are private by default. The outbox accepts only public events, and the event log refuses them.
|
|
18
19
|
- **EventContext** — metadata traveling with an event (event source id, sequence number, occurred, causation/correlation, subject).
|
|
19
20
|
|
|
20
21
|
## Read side
|
|
@@ -42,7 +43,7 @@ One precise line per load-bearing term, so the same word means the same thing ev
|
|
|
42
43
|
## Structure & types
|
|
43
44
|
|
|
44
45
|
- **Slice** — the vertical unit of one behavior (command + events + projection + read model + component + specs), created/changed/deleted together.
|
|
45
|
-
- **Slice types** — **State Change** (command → events), **State View** (events → read model), **Automation** (events → side effect, including a follow-up command or event — a Screenplay `produces` / `invokes`), **Translation** (data from *outside* the model's own facts → our own facts: an external system's or another service's data recorded as events we own, keeping the external fact distinct from the local one). A reactor that turns our own event into a follow-up event or command is an Automation, not a Translation.
|
|
46
|
+
- **Slice types** — **State Change** (command → events), **State View** (events → read model), **Automation** (events → side effect, including a follow-up command or event — a Screenplay `produces` / `invokes`), **Translation** (data from *outside* the model's own facts → our own facts: an external system's or another service's data recorded as events we own, keeping the external fact distinct from the local one; a Screenplay `Translate` slice with `direction outbound` is the other direction, publishing our private facts as one public contract event). A reactor that turns our own event into a follow-up event or command is an Automation, not a Translation.
|
|
46
47
|
- **Concept** — a `ConceptAs<T>`, a strongly-typed wrapper over a primitive domain value (never raw `Guid`/`string`/`int`).
|
|
47
48
|
- **EventSourceId<T>** — the strongly-typed event-source identity; derive entity identities from this, not `ConceptAs<Guid>`.
|
|
48
49
|
- **Proxy** — the generated TypeScript command/query client, produced from C# on a **Debug** build; carries a `// @generated by Cratis` header and is never hand-edited.
|
|
@@ -150,6 +150,21 @@ Node.js server and a C# or React-frontend project has no use for them. Select
|
|
|
150
150
|
Standalone Chronicle client usage (no Arc) in TypeScript is
|
|
151
151
|
`cratis-chronicle-client-typescript`.
|
|
152
152
|
|
|
153
|
+
### Several services with their own event stores
|
|
154
|
+
|
|
155
|
+
`cratis/chronicle/core` carries both multi-service skills, so every profile that
|
|
156
|
+
includes it loads them: `cratis/application`, `cratis/application/arc-chronicle`,
|
|
157
|
+
`cratis/application/chronicle-dotnet`, and `cratis/application/csharp` and
|
|
158
|
+
`cratis/chronicle` through `cratis/chronicle/compliance`.
|
|
159
|
+
|
|
160
|
+
| Skill | Covers |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| `cratis-multi-service-architecture` | Store per service on one kernel, namespace alignment, public contract events and the outbox, consumer routes, delivery semantics, PII across stores, contract versioning, Arc between services |
|
|
163
|
+
| `cratis-multi-service-local-orchestration` | Repository layout with contracts projects, .NET Aspire AppHost, Docker Compose with a MongoDB replica set, per-service settings, CLI contexts per store, frontends per service |
|
|
164
|
+
|
|
165
|
+
Modeling such a system in Screenplay (one model folder per service) is
|
|
166
|
+
`cratis-screenplay-streams-and-consistency`'s multi-service reference.
|
|
167
|
+
|
|
153
168
|
### Experimental Go modules
|
|
154
169
|
|
|
155
170
|
Select `cratis/language/go` for a Go repository without importing any HTTP or
|
|
@@ -35,8 +35,14 @@ change streams; the harness does not emulate it.
|
|
|
35
35
|
The discovered `IQueryScenarioExtender` supports additional context/services.
|
|
36
36
|
With `Cratis.Arc.Chronicle.Testing` and its Queries namespace, use
|
|
37
37
|
`Given.ForEventSource(id).ReadModel(instance)` or `.Events(...)` before performing.
|
|
38
|
-
The query must read
|
|
39
|
-
|
|
38
|
+
The query must read through injected `IReadModels`; seeding does not replace
|
|
39
|
+
arbitrary stores.
|
|
40
|
+
|
|
41
|
+
Requires Arc 22.87.0 and Chronicle 19.54.0 for scenario `IReadModels.Observe<T>(filter)` snapshots from given events or pinned models,
|
|
42
|
+
including new emissions after scenario command appends. Pins need a readable key
|
|
43
|
+
or throw `PinnedReadModelCannotBeObserved`.
|
|
44
|
+
Requires Arc 22.91.1 and Chronicle 19.59.1 for default-mode children, joins and reducers to observe through scenario-owned storage (the initial Arc package was not published); older default mode cannot
|
|
45
|
+
observe children, so use decision mode. Check both package versions.
|
|
40
46
|
|
|
41
47
|
For a query with `by`, `filter` or `scoped to`, seed instances for two keys, two filter values
|
|
42
48
|
or two tenants with distinct callers, as applicable, and assert that each call returns only its
|
|
@@ -57,7 +63,12 @@ Queue interference using `AppendConcurrently(id, route, event)` and assert a
|
|
|
57
63
|
nonempty decision is rejected on the intended boundary. An empty identical-retry
|
|
58
64
|
append deliberately returns no scope and cannot prove the conflict guard.
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
Requires Arc 22.92.0 for `AppendConcurrently` without decision reads; older Arc
|
|
67
|
+
needs decision mode. Its early interference does not make a plain read guarded;
|
|
68
|
+
assert the actual scope/outcome, not merely that the competing append ran.
|
|
69
|
+
|
|
70
|
+
`ShouldHaveCompletedStream(type, id)` proves successful completion;
|
|
71
|
+
`ShouldHaveCompletedStream(ClosedStreamScope)` asserts the exact source and route.
|
|
61
72
|
`DecisionReadAdmissions.ShouldAdmitDecisionReadsIn(assembly)` checks projection
|
|
62
73
|
admission in assembly-wide specs. These APIs are in
|
|
63
74
|
`Cratis.Arc.Chronicle.Testing.Commands`. Routed seeding is refused in legacy mode.
|
|
@@ -154,6 +154,10 @@ Use the [threaded shop example](references/shop-generation.md): CustomerId
|
|
|
154
154
|
received time/tenant (Requires Arc 22.83.0); Clock/Tenant scenario setup
|
|
155
155
|
is shown there.
|
|
156
156
|
|
|
157
|
+
Read references/fresh-identifiers.md when a generated value is an append target:
|
|
158
|
+
Requires Arc 22.95.0 for whole-source emptiness protection, collision outcomes,
|
|
159
|
+
explicit opt-out and decision-mode scenario setup.
|
|
160
|
+
|
|
157
161
|
## When not to generate
|
|
158
162
|
|
|
159
163
|
Read [references/generation-boundaries.md](references/generation-boundaries.md) when deciding whether to generate.
|
|
@@ -49,6 +49,12 @@ constraint, not to any read. For the routing steps, the matrix and the traps rea
|
|
|
49
49
|
(ARCCHR0016). The default check also reads the tail after `Handle`, and the first
|
|
50
50
|
append into a scope is unchecked unless `CheckFirstAppendIntoAScope` is set.
|
|
51
51
|
|
|
52
|
+
Requires Arc 22.81.0 for stream-scoped `IDecisionReads.Get<T>`,
|
|
53
|
+
`GetDetached<T>` and `AdmitForStream<T>` to participate in command protection,
|
|
54
|
+
caching and enrollment. Older Arc refuses these stream reads inside commands;
|
|
55
|
+
check the Arc package version before choosing this path. `[Unprotected]` command
|
|
56
|
+
reads are unguarded, not refused.
|
|
57
|
+
|
|
52
58
|
Do not manually append or commit to bypass the owner-capable unit of work.
|
|
53
59
|
The guard detects every matching event appended after its boundary, whoever wrote
|
|
54
60
|
it, but it protects only guarded decisions: an unguarded writer deciding on the
|
|
@@ -88,6 +94,13 @@ two independent stream decisions for the same source and assume both are guarded
|
|
|
88
94
|
`route.Route(id, fact)` produces a routing wrapper. Explicit routing on a returned
|
|
89
95
|
`EventForEventSourceId` wins over command context in every return shape.
|
|
90
96
|
|
|
97
|
+
Requires Arc 22.79.0 for legacy wrapper-route validation on definition-routed
|
|
98
|
+
commands: a registered definition with an undeclared stream fails with
|
|
99
|
+
`EventStreamDoesNotBelongToEventSource`. ARCCHR0020 flags literal mistakes;
|
|
100
|
+
ARCCHR0021 recommends `EventSource = typeof(...)` and `EventStream` instead of
|
|
101
|
+
legacy strings. Older legacy routing can append to an undeclared stream; use the
|
|
102
|
+
typed definition route rather than relying on strings.
|
|
103
|
+
|
|
91
104
|
## Tags and completion
|
|
92
105
|
|
|
93
106
|
In `Cratis.Arc.Chronicle.Commands`, `[EventTag("projectId", nameof(ProjectId))]`
|
|
@@ -100,10 +113,15 @@ to returned events, not manual appends or aggregate commits.
|
|
|
100
113
|
|
|
101
114
|
Return `CompleteStream` (`Cratis.Arc.Chronicle.Streams`) alone or with events in
|
|
102
115
|
a command tuple. It completes **after commit**, not atomically with append.
|
|
103
|
-
|
|
116
|
+
Requires Arc 22.81.0 and Chronicle kernel 19.39.0 for source-scoped completion:
|
|
117
|
+
a declared key, `ICanProvideEventSourceId` or response-supplied id scopes the
|
|
118
|
+
command's completion to that source (and resolved source type). A keyless command
|
|
119
|
+
still closes the stream type/id across the log; its internally generated id does
|
|
120
|
+
not scope completion. Older Arc closes across sources; an older kernel refuses
|
|
121
|
+
scoped completion, never falling back to all sources. Check both versions.
|
|
104
122
|
A failure leaves earlier events committed; retry completion rather than blindly
|
|
105
|
-
duplicating events. Reactors may return it directly,
|
|
106
|
-
reactor tuples/collections cannot mix it with events.
|
|
123
|
+
duplicating events. Reactors may return it directly, scoped to the observed
|
|
124
|
+
source id/type and stream route; reactor tuples/collections cannot mix it with events.
|
|
107
125
|
|
|
108
126
|
## Decision specifications
|
|
109
127
|
|
|
@@ -113,6 +131,7 @@ Call `new CommandScenario<T>().UseDecisionReads()` before seeding events.
|
|
|
113
131
|
cannot supply guards. Assert a real nonempty decision conflicts on the intended
|
|
114
132
|
route, and that an independent route is not over-guarded.
|
|
115
133
|
`ShouldHaveCompletedStream(type, id)` asserts completion;
|
|
134
|
+
`ShouldHaveCompletedStream(ClosedStreamScope)` asserts the exact owner and route;
|
|
116
135
|
`DecisionReadAdmissions.ShouldAdmitDecisionReadsIn(assembly)` checks projection
|
|
117
136
|
admission in assembly-level specs.
|
|
118
137
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Fresh generated append targets
|
|
5
|
+
|
|
6
|
+
Requires Arc 22.95.0 and Chronicle client 19.59.4 for guarded generated targets; deploy a Chronicle kernel 19.40.1 or later for retry-time emptiness checks. Check package references and the deployed kernel version before relying on the guard; older Arc needs an explicit whole-source `BeforeFirst` scope.
|
|
7
|
+
|
|
8
|
+
A `[GeneratedValue]` parameter defaults to `GeneratedValueFreshness.Guarded`.
|
|
9
|
+
When an Arc-owned append targets a validated value generated in that invocation,
|
|
10
|
+
it requires the **whole event source** to be empty, including other streams and
|
|
11
|
+
event types. Payload-only and response-only generated values add no scope.
|
|
12
|
+
Returned events, tuples, wrappers, `EventsWithConcurrencyScopes` and aggregates
|
|
13
|
+
acquired for that generated identifier are covered. Direct `IUnitOfWork.AddEvent`,
|
|
14
|
+
`AddEvents` and `eventLog.Transactional.Append` calls are not: return events
|
|
15
|
+
through Arc or supply the exact emptiness scope explicitly.
|
|
16
|
+
|
|
17
|
+
An occupied destination returns `ValidationResultReason.ConcurrencyViolation`
|
|
18
|
+
with `ReasonDetail` `GeneratedIdentifierCollision`. Arc does not rerun `Handle()`.
|
|
19
|
+
A new invocation can generate another value, but first resolve an uncertain
|
|
20
|
+
commit: freshness is not idempotency. A fixed scenario pin remains fixed.
|
|
21
|
+
|
|
22
|
+
A compatible whole-source `BeforeFirst` scope merges with the guard. A conflicting
|
|
23
|
+
explicit scope, including `ConcurrencyScope.None` or a narrowed scope, fails with
|
|
24
|
+
`ConflictingConcurrencyScopes` before append. Without a transaction, keep each
|
|
25
|
+
generated source's returned events contiguous; an interleaved shape that would
|
|
26
|
+
split its guard fails with `GeneratedIdentifierEventsCannotBeSplit`.
|
|
27
|
+
|
|
28
|
+
Only when appending to an existing generated destination is intentional, use this
|
|
29
|
+
parameter attribute fragment (imports `Cratis.Arc.Commands.ModelBound` and
|
|
30
|
+
`Cratis.Arc.Commands`):
|
|
31
|
+
|
|
32
|
+
```csharp
|
|
33
|
+
[GeneratedValue(Freshness = GeneratedValueFreshness.Unguarded)]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The opt-out retains generation, validation and capture, not automatic freshness.
|
|
37
|
+
Client-minted and natural identifiers are outside this generated-parameter policy;
|
|
38
|
+
use an appropriate constraint or explicit concurrency scope for them.
|
|
39
|
+
|
|
40
|
+
## Specify the collision
|
|
41
|
+
|
|
42
|
+
Use `new CommandScenario<TCommand>().UseDecisionReads()` **before seeding**, then
|
|
43
|
+
`PinGeneratedValue(name, id)` and `Given.ForEventSource(id).Events(existingEvent)`.
|
|
44
|
+
Assert the concurrency reason and collision detail, unchanged append tail and
|
|
45
|
+
one handler execution. Also cover an empty source receiving two events and an
|
|
46
|
+
occupied source whose events belong to another stream.
|
|
47
|
+
|
|
48
|
+
Requires Arc 22.95.1 for `GeneratedIdentifierCollisionRequiresDecisionReads`:
|
|
49
|
+
default scenario mode fails fast when given events and a guarded pin share an id.
|
|
50
|
+
Older default mode silently leaves the append log empty; it cannot prove occupancy.
|
|
51
|
+
Run `dotnet build -c Debug` and the affected specification project with
|
|
52
|
+
`dotnet test`; all collision and empty-source facts must pass.
|
|
@@ -111,13 +111,13 @@ site: `PinGeneratedValue<TCommand, TOtherCommand>(name, concept)`.
|
|
|
111
111
|
|
|
112
112
|
Published guides:
|
|
113
113
|
|
|
114
|
-
- [Generated values](/arc/backend/csharp/commands/generated-values/)
|
|
115
|
-
- [Pin generated values in command specs](/arc/backend/csharp/testing/generated-values/)
|
|
116
|
-
- [Migrate generated identifiers](/arc/upgrading/generated-values/)
|
|
117
|
-
- Analyzer pages: [ARC0022](/arc/backend/csharp/code-analysis/arc0022/),
|
|
118
|
-
[ARC0023](/arc/backend/csharp/code-analysis/arc0023/),
|
|
119
|
-
[ARC0024](/arc/backend/csharp/code-analysis/arc0024/),
|
|
120
|
-
[ARC0025](/arc/backend/csharp/code-analysis/arc0025/).
|
|
114
|
+
- [Generated values](https://www.cratis.io/arc/backend/csharp/commands/generated-values/)
|
|
115
|
+
- [Pin generated values in command specs](https://www.cratis.io/arc/backend/csharp/testing/generated-values/)
|
|
116
|
+
- [Migrate generated identifiers](https://www.cratis.io/arc/upgrading/generated-values/)
|
|
117
|
+
- Analyzer pages: [ARC0022](https://www.cratis.io/arc/backend/csharp/code-analysis/arc0022/),
|
|
118
|
+
[ARC0023](https://www.cratis.io/arc/backend/csharp/code-analysis/arc0023/),
|
|
119
|
+
[ARC0024](https://www.cratis.io/arc/backend/csharp/code-analysis/arc0024/),
|
|
120
|
+
[ARC0025](https://www.cratis.io/arc/backend/csharp/code-analysis/arc0025/).
|
|
121
121
|
|
|
122
122
|
Source: `Source/DotNET/Arc.Core/Commands/ModelBound/GeneratedValueAttribute.cs`,
|
|
123
123
|
`Commands/GeneratedValueParameters.cs`, `GeneratedValueFactories.cs`,
|
|
@@ -168,6 +168,15 @@ Do not reach for `IEventLog` to do this instead. `ARCCHR0007` warns when a
|
|
|
168
168
|
command's `Handle` injects `IEventLog`, because that bypasses Arc's append
|
|
169
169
|
pipeline along with its correlation and ordering guarantees.
|
|
170
170
|
|
|
171
|
+
Requires Arc 22.85.1 for single-source event collections with a compliance
|
|
172
|
+
subject to append atomically even without a command transaction, and 22.87.1
|
|
173
|
+
for multi-source/mixed wrapper collections to do so. Check `dotnet list package`;
|
|
174
|
+
older immediate paths can leave earlier events appended on a later refusal.
|
|
175
|
+
One id routed to several streams without a declared guard can still require
|
|
176
|
+
individual appends: a batch has one guard per source. For atomicity, use the
|
|
177
|
+
command transaction or compatible explicit scopes; do not infer rollback from
|
|
178
|
+
the failed result alone.
|
|
179
|
+
|
|
171
180
|
## Failure shapes
|
|
172
181
|
|
|
173
182
|
| Situation | What the caller sees |
|
|
@@ -33,6 +33,11 @@ That is the first thing to check when a build succeeds but no proxies appear.
|
|
|
33
33
|
Output folders mirror the C# **namespace**, not the file path. A command in
|
|
34
34
|
`<Root>.<Feature>` lands in `<output>/<Feature>/`.
|
|
35
35
|
|
|
36
|
+
Requires Arc 22.82.0 for collection command responses to generate array types
|
|
37
|
+
in `Command<...>` and `useCommand<...>` (for example `IEnumerable<ProjectSummary>`
|
|
38
|
+
becomes `ProjectSummary[]`). Check the generator package version and regenerate;
|
|
39
|
+
older proxies can type the already-array runtime response incorrectly.
|
|
40
|
+
|
|
36
41
|
## MSBuild properties
|
|
37
42
|
|
|
38
43
|
Properties below are forwarded by the package's `.props`/`.targets`; boolean
|
|
@@ -35,6 +35,12 @@ var other = await readModels.GetInstanceById<<Other>>((EventSourceId)<OtherId>);
|
|
|
35
35
|
`ReadModelKey` converts implicitly from `EventSourceId`, `Guid` and `string`, so
|
|
36
36
|
the cast is all that is needed.
|
|
37
37
|
|
|
38
|
+
Requires Arc 22.93.0 for ARCCHR0023 (no unique key-type match), ARCCHR0025
|
|
39
|
+
(keyless command reads a newly generated id and finds no model) and ARCCHR0026
|
|
40
|
+
(command or validator reads Chronicle state through `IMongoCollection<T>`).
|
|
41
|
+
These diagnostics expose lookup mistakes; they do not change plain-read protection.
|
|
42
|
+
Check the package version, and inspect keys explicitly on older versions.
|
|
43
|
+
|
|
38
44
|
## Nullability is the required/optional switch
|
|
39
45
|
|
|
40
46
|
| Parameter | No instance for the command's key |
|
|
@@ -81,6 +87,11 @@ read model's schema, filling every non-nullable value property with its type
|
|
|
81
87
|
default. Neither the `is null` guard nor the non-nullable "must exist" switch
|
|
82
88
|
fires there.
|
|
83
89
|
|
|
90
|
+
Requires Chronicle 19.53.3 for nullable string/bool concepts in read-model schemas
|
|
91
|
+
to stay nullable, including unset passive properties. Check the client version;
|
|
92
|
+
older schemas can turn these into defaults. Event-type schemas are unaffected,
|
|
93
|
+
and this does not turn an absent passive projection into `null`.
|
|
94
|
+
|
|
84
95
|
⚠️ This is invisible when a status enum's `0` is a real state — absent becomes
|
|
85
96
|
byte-identical to freshly created, so a command reads never-invited as already
|
|
86
97
|
invited. Renumbering the enum from `1` is **not** the fix; the value is then
|
|
@@ -45,7 +45,7 @@ it records a failed compensator. Compose operation declarations instead.
|
|
|
45
45
|
> commands, registered events and `EventForEventSourceId`. events
|
|
46
46
|
> append first; append rejection stops all commands, and the first failed command
|
|
47
47
|
> stops the rest. Earlier effects stay committed, so retries need idempotency.
|
|
48
|
-
>
|
|
48
|
+
> An unhandled denied or invalid result fails the partition instead of being
|
|
49
49
|
> discarded, and `[ExecuteCommandsAsSystem]` on the reactor class supplies a
|
|
50
50
|
> principal for those returned commands. That attribute does **not** cover manual
|
|
51
51
|
> `Execute` calls — the form below needs its own execution context. See the
|
|
@@ -66,6 +66,17 @@ public class <Name>Reactor(ICommandPipeline pipeline) : IReactor
|
|
|
66
66
|
scope for the call. This is the normal case. **A DI scope is not an independent
|
|
67
67
|
transaction boundary**; see the nested-command contract below.
|
|
68
68
|
|
|
69
|
+
Read references/command-refusals.md when a returned reactor command has an
|
|
70
|
+
expected business refusal: Requires Arc 22.88.0 for ordered `Invoke.Command`
|
|
71
|
+
branches, acknowledgment and `CommandResult.GetRefusal()`.
|
|
72
|
+
|
|
73
|
+
Requires Arc 22.92.0 for `IAsyncCommandExecutionScope.BeginAsync(context)`.
|
|
74
|
+
All synchronous `Begin` calls run first, then asynchronous initialization runs
|
|
75
|
+
sequentially before filters and validators. Establish ambient `AsyncLocal` state
|
|
76
|
+
in synchronous `Begin`, honor `context.CancellationToken`, and retain the ordinary
|
|
77
|
+
completion cleanup on failure. `Validate` skips execution scopes entirely.
|
|
78
|
+
Check the Arc package version; older scopes only support synchronous initialization.
|
|
79
|
+
|
|
69
80
|
## The overloads
|
|
70
81
|
|
|
71
82
|
| Overload | Use it when |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Handle a returned command's refusal
|
|
5
|
+
|
|
6
|
+
Requires Arc 22.88.0 for `Invoke.Command` and refusal classification. Check the
|
|
7
|
+
`Cratis.Arc.Chronicle` package version; older returned commands fail the reactor
|
|
8
|
+
on any unsuccessful result.
|
|
9
|
+
Requires Arc 22.97.0 with Chronicle 19.63.0 for the synchronous `CommandInvocation` analyzer marker and ARCCHR0027 branch checks;
|
|
10
|
+
on older analyzers, use `Task<CommandInvocation>` and review branch results explicitly.
|
|
11
|
+
|
|
12
|
+
Import `Cratis.Arc.Chronicle.Reactors`. This handler fragment assumes registered
|
|
13
|
+
`WorkRequested` and `WorkRefused` events and a discoverable `StartWork` command:
|
|
14
|
+
|
|
15
|
+
```csharp
|
|
16
|
+
[OnceOnly]
|
|
17
|
+
public CommandInvocation Requested(WorkRequested @event) =>
|
|
18
|
+
Invoke.Command(new StartWork(@event.Name))
|
|
19
|
+
.OnRefused(Refused.ByConstraint("UniqueWork"), refusal => new WorkRefused(refusal.Message))
|
|
20
|
+
.OnRefused(Refused.ByValidation, refusal => new WorkRefused(refusal.Message));
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use the actual constraint name. The first matching branch wins. Selectors are
|
|
24
|
+
`ByValidation`, `ByConstraint(name)` (exact, case-sensitive), `ByAnyConstraint`,
|
|
25
|
+
`ByAuthorization` and `Any`. **`Any` excludes authorization**; opt into handling
|
|
26
|
+
a denial explicitly rather than concealing a missing system actor.
|
|
27
|
+
`ExecuteCommandsAsSystem` still applies only to returned commands.
|
|
28
|
+
|
|
29
|
+
`OnRefused` returns a registered event, `EventForEventSourceId`, a stable nonempty
|
|
30
|
+
sequence of those, or `null` for acknowledgment. `Acknowledge(selector)` is the
|
|
31
|
+
explicit no-event form. Commands, operations, completions, unknown objects,
|
|
32
|
+
empty collections and invalid members are rejected before any branch event is
|
|
33
|
+
appended. ARCCHR0027 checks visible callbacks, not opaque helpers.
|
|
34
|
+
|
|
35
|
+
A handled refusal appends its branch events and **stops every remaining command
|
|
36
|
+
or invocation in that delivery**. Branch append failure fails the delivery;
|
|
37
|
+
no other refusal branch handles it. Collections mixing ordinary events and
|
|
38
|
+
invocations keep the events-first ordering. Earlier appends and successful
|
|
39
|
+
commands remain committed. No branch adds atomicity, deduplication or exactly-once
|
|
40
|
+
execution. If fan-out must continue independently after one duplicate, separate
|
|
41
|
+
its delivery/execution boundary rather than returning one invocation collection.
|
|
42
|
+
|
|
43
|
+
## Classify a result without hiding faults
|
|
44
|
+
|
|
45
|
+
`CommandResult.GetRefusal()` (import `Cratis.Arc.Commands`) returns a nullable
|
|
46
|
+
`CommandRefusal`: `Kind`, `Message`, `ConstraintName` and all `ConstraintNames`.
|
|
47
|
+
Authorization wins over constraints, which win over error-severity authored rules.
|
|
48
|
+
Named selectors match any violated name. Messages preserve authored text; do not
|
|
49
|
+
parse them to identify a rule.
|
|
50
|
+
|
|
51
|
+
Exceptions, authorization configuration failures, concurrency conflicts,
|
|
52
|
+
unavailable dependencies, malformed input and unknown or framework validation
|
|
53
|
+
reasons prevent classification even when a business refusal is also present.
|
|
54
|
+
`ValidationResultReason.FrameworkFailure` distinguishes framework-composed stream
|
|
55
|
+
completion errors from authored rules. Warnings/information alone do not classify
|
|
56
|
+
as refusals, including a warning that blocks under the command's severity policy.
|
|
57
|
+
These non-refusal failures and unhandled refusals fail the observer for recovery.
|
|
58
|
+
|
|
59
|
+
## Verify
|
|
60
|
+
|
|
61
|
+
Run `dotnet build -c Debug` and the affected specification project with
|
|
62
|
+
`dotnet test`. Cover selector ordering, each handled refusal, unchanged
|
|
63
|
+
remaining-command collaborators, branch append failure, and a concurrency or
|
|
64
|
+
exception failure that must not be acknowledged. Assert earlier committed effects
|
|
65
|
+
separately; a failed result does not prove rollback.
|
|
@@ -77,6 +77,11 @@ The pipeline runs **authorization → validation → `Provide()` → `Handle()`*
|
|
|
77
77
|
Authorization filters are explicitly ordered ahead of validation filters, so a
|
|
78
78
|
caller who may not act never learns whether their input was valid.
|
|
79
79
|
|
|
80
|
+
Requires Arc 22.87.2 for the frontend `notEmpty` text rule to match the backend's
|
|
81
|
+
Unicode whitespace set (including U+0085 and excluding U+FEFF). Check the
|
|
82
|
+
`@cratis/arc` package version with `yarn why @cratis/arc`; older client validation
|
|
83
|
+
can disagree. Server validation remains authoritative.
|
|
84
|
+
|
|
80
85
|
## Step 2 — Value invariants: `ConceptValidator<T>`
|
|
81
86
|
|
|
82
87
|
```csharp
|
|
@@ -94,3 +94,4 @@ Source: [secure defaults](https://github.com/Cratis/Arc/blob/main/Documentation/
|
|
|
94
94
|
- EF schema/migrations: `cratis-arc-ef-core-migration`.
|
|
95
95
|
- Authentication and identity: `cratis-arc-authentication-authorization-and-identity`.
|
|
96
96
|
- A standalone Chronicle client or running store: the Chronicle client/CLI skills.
|
|
97
|
+
- Several Arc services with their own event stores: `cratis-multi-service-architecture`; running them together locally: `cratis-multi-service-local-orchestration`.
|
|
@@ -101,6 +101,12 @@ over one connection:
|
|
|
101
101
|
Use the per-query route for debugging. The demultiplexer is what a browser
|
|
102
102
|
client uses, and driving it by hand means managing subscription state yourself.
|
|
103
103
|
|
|
104
|
+
Requires Arc 22.87.2 for invalid observable arguments to emit a structured
|
|
105
|
+
invalid `QueryResult` with `validationResults` then end the SSE/WebSocket
|
|
106
|
+
subscription, in direct and hub mode. Check `dotnet list package`; older servers
|
|
107
|
+
can return a bare error or fail the connection. Controller-based direct
|
|
108
|
+
WebSocket queries are outside this guarantee.
|
|
109
|
+
|
|
104
110
|
## Long polling
|
|
105
111
|
|
|
106
112
|
```bash
|
package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md
CHANGED
|
@@ -46,6 +46,19 @@ unannotated added properties.
|
|
|
46
46
|
`ICanSeedEvents.Seed(IEventSeedingBuilder)` declares seeds sent on connection and
|
|
47
47
|
applied once per namespace. `ForNamespace` targets one namespace; global seeds
|
|
48
48
|
also apply to namespaces created later (not a retroactive replay of all history).
|
|
49
|
+
Opening a namespace starts their application asynchronously, without an ordering
|
|
50
|
+
promise before the first write; scope development/sample data with `ForNamespace`.
|
|
51
|
+
Requires Chronicle 19.64.0 client and kernel for authoritative discovered global
|
|
52
|
+
sets: each program replaces only its own declaration, including an empty set.
|
|
53
|
+
Removing a seeder stops future namespace application, never retracts appended
|
|
54
|
+
events. Set a stable, distinct `ChronicleOptions.ProgramIdentifier` per program;
|
|
55
|
+
the fallback is the entry assembly name. Manual globals and other programs' sets
|
|
56
|
+
remain; identical shared seeds are not multiplied across programs. The first
|
|
57
|
+
upgraded authoritative registration clears ownerless legacy globals. Failed
|
|
58
|
+
seeder activation/callback keeps the previous declaration, not a partial set.
|
|
59
|
+
Check both versions; old clients/kernels retain append-only globals. To clear
|
|
60
|
+
stale development declarations, upgrade both, remove or namespace-scope the
|
|
61
|
+
seeder, then start the application once.
|
|
49
62
|
`For` / `ForEventSource` route by source/stream metadata; `ForEvents` keeps each
|
|
50
63
|
wrapper's routing and tags. Routing participates in seed identity, so the same
|
|
51
64
|
payload on another stream is another seed. Seeding is a write, not a read-only
|
|
@@ -57,6 +70,11 @@ Calls while disconnected fail fast (`ConnectionTimedOut`, then
|
|
|
57
70
|
`ConnectionUnavailable` after backoff); ASP.NET hosts start while the kernel is
|
|
58
71
|
unreachable, log failure and expose the `chronicle` health check.
|
|
59
72
|
`AddChronicleHealthCheck(HealthStatus)` honors its configured failure status.
|
|
73
|
+
Requires Chronicle 19.59.6 for readiness to require successful artifact
|
|
74
|
+
registration as well as connection, and 19.65.0 to stay down during
|
|
75
|
+
re-registration (`IsRegistering`). With automatic registration off, an unrun
|
|
76
|
+
registration is connected-only; once manually run, its outcome is checked. Check the client package
|
|
77
|
+
version; a connected-only probe on older clients does not prove registration.
|
|
60
78
|
`IEventStore.Discovery` and startup reports expose discovered artifacts.
|
|
61
79
|
`IEventSources` is scoped in host wiring, not a singleton to retain across requests.
|
|
62
80
|
|