@cratis/pi 7.50.0 → 7.51.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/authoring-skills.instructions.md +93 -0
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +4 -0
- package/package/corpus/prompts/review-skill.prompt.md +6 -8
- package/package/corpus/rules/authoring-skills.md +92 -0
- package/package/corpus/rules/general.md +1 -0
- package/package/corpus/rules/profiles.md +4 -0
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +23 -29
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +7 -7
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +34 -32
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authproxy.md +1 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +2 -2
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +3 -3
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +8 -6
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/tenancy.md +3 -3
- package/package/corpus/skills/cratis-arc-command/SKILL.md +23 -25
- package/package/corpus/skills/cratis-arc-command/references/command-result.md +1 -1
- package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +9 -9
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +11 -12
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +4 -4
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +3 -3
- package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +1 -3
- package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +11 -14
- package/package/corpus/skills/cratis-arc-command-execution/LICENSE +6 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +17 -19
- package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +8 -7
- package/package/corpus/skills/cratis-arc-command-kotlin/references/read-model-naming.md +2 -2
- package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +14 -15
- package/package/corpus/skills/cratis-arc-command-operation/references/execution-and-recovery.md +2 -2
- package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +7 -8
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +14 -11
- package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +7 -7
- package/package/corpus/skills/cratis-arc-command-typescript/references/command-operations.md +4 -4
- package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +11 -7
- package/package/corpus/skills/cratis-arc-command-typescript/references/identity-and-introspection.md +4 -2
- package/package/corpus/skills/cratis-arc-command-typescript/references/observability-and-host-scopes.md +2 -2
- package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +3 -3
- package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +1 -1
- package/package/corpus/skills/cratis-arc-command-typescript/verification.json +2 -2
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -14
- package/package/corpus/skills/cratis-arc-ef-core-migration/LICENSE +6 -0
- package/package/corpus/skills/cratis-arc-ef-core-migration/SKILL.md +9 -10
- package/package/corpus/skills/cratis-arc-go/SKILL.md +14 -15
- package/package/corpus/skills/cratis-arc-go/references/queries.md +2 -2
- package/package/corpus/skills/cratis-arc-hosting/SKILL.md +8 -8
- package/package/corpus/skills/cratis-arc-hosting/references/integrations-and-publish.md +11 -11
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +13 -13
- package/package/corpus/skills/cratis-arc-observable-query-http/verification.json +1 -1
- package/package/corpus/skills/cratis-arc-query-kotlin/SKILL.md +2 -3
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +11 -14
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-query-typescript/references/storage-observation-and-compliance.md +2 -2
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +1 -2
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +19 -22
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +36 -36
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +4 -2
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/client-construction.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +13 -13
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/pinned-generation-delivery.md +7 -5
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +59 -64
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +17 -17
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/compliance.md +5 -3
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/connections.md +15 -11
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/event-sources.md +3 -1
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/pitfalls.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/projections.md +8 -4
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/upgrading.md +19 -19
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +3 -8
- package/package/corpus/skills/cratis-chronicle-client-elixir/verification.json +2 -2
- package/package/corpus/skills/cratis-chronicle-client-go/SKILL.md +16 -18
- package/package/corpus/skills/cratis-chronicle-client-go/references/projections.md +2 -2
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +61 -58
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +9 -10
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +6 -6
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-sources.md +4 -2
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/java-api.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/options.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +24 -24
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +6 -5
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +26 -20
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/testing.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +4 -3
- package/package/corpus/skills/cratis-chronicle-client-typescript/verification.json +2 -2
- package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +9 -9
- package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +11 -10
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +1 -1
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md +5 -6
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-event-constraints/references/closing-streams.md +1 -1
- package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +12 -10
- package/package/corpus/skills/cratis-chronicle-event-type-migration/references/pinned-generations.md +2 -3
- package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +5 -5
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +5 -5
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -10
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +29 -29
- package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +9 -9
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -14
- package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +3 -5
- package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +2 -4
- package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +1 -3
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +16 -15
- package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +8 -8
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +14 -13
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +11 -12
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +6 -6
- package/package/corpus/skills/cratis-code-review/SKILL.md +13 -17
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +3 -3
- package/package/corpus/skills/cratis-components-common-controls/SKILL.md +15 -15
- package/package/corpus/skills/cratis-components-data-surfaces/SKILL.md +29 -29
- package/package/corpus/skills/cratis-components-schema-editor/SKILL.md +4 -4
- package/package/corpus/skills/cratis-components-schema-editor/references/tree-layout.md +1 -1
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +6 -6
- package/package/corpus/skills/cratis-components-styling/LICENSE +6 -0
- package/package/corpus/skills/cratis-components-styling/SKILL.md +5 -4
- package/package/corpus/skills/cratis-components-toolbar/SKILL.md +5 -5
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +2 -2
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +3 -3
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +1 -1
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +19 -24
- package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +10 -10
- package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-concepts.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +10 -11
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +18 -18
- package/package/corpus/skills/cratis-fundamentals-telemetry/verification.json +1 -1
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +4 -4
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +19 -19
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +27 -27
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +12 -12
- package/package/corpus/skills/cratis-performance-review/SKILL.md +8 -10
- package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +1 -1
- package/package/corpus/skills/cratis-security-review/SKILL.md +8 -10
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +18 -16
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +1 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +26 -29
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +8 -8
- package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +2 -2
- package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +6 -4
- package/package/corpus/skills/cratis-specifications-csharp/references/shared-lifecycle.md +6 -2
- package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +2 -2
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -4
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +1 -1
- package/package/corpus/skills/guiding-refactoring-with-code-health/SKILL.md +1 -1
- package/package/corpus/skills/prioritizing-technical-debt/SKILL.md +1 -1
- package/package/corpus/skills/risk-based-testing-with-code-health/SKILL.md +3 -3
- package/package/corpus/skills/safeguarding-ai-generated-code/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Spring Boot
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Source: `Cratis/Chronicle.Kotlin`: `ChronicleProperties`,
|
|
4
4
|
`ChronicleAutoConfiguration`, `ChronicleStartup` and `ChronicleWebAutoConfiguration`.
|
|
5
5
|
|
|
6
6
|
The starter registers exactly two auto-configurations —
|
|
@@ -10,7 +10,7 @@ The starter registers exactly two auto-configurations —
|
|
|
10
10
|
- `io.cratis.chronicle.spring.ChronicleWebAutoConfiguration`
|
|
11
11
|
|
|
12
12
|
Configuration binds under the prefix `cratis.chronicle` —
|
|
13
|
-
`ChronicleProperties.kt
|
|
13
|
+
`ChronicleProperties.kt`. The minimum real configuration is one key, as in
|
|
14
14
|
the shipped sample (`Samples/Kotlin/SpringBoot/src/main/resources/application.yml`):
|
|
15
15
|
|
|
16
16
|
```yaml
|
|
@@ -19,21 +19,21 @@ cratis:
|
|
|
19
19
|
event-store: <EventStoreName>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Everything else has a default (`ChronicleProperties.kt
|
|
22
|
+
Everything else has a default (`ChronicleProperties.kt`):
|
|
23
23
|
|
|
24
|
-
| Key under `cratis.chronicle` | Default |
|
|
25
|
-
| --- | --- |
|
|
26
|
-
| `connection-string` | the development connection string |
|
|
27
|
-
| `event-store` | `"Default"` |
|
|
28
|
-
| `namespace` | `"Default"` |
|
|
29
|
-
| `auto-discover-and-register` | `true` |
|
|
30
|
-
| `artifact-packages` | empty — falls back to Spring's auto-configuration packages |
|
|
31
|
-
| `default-sink-type-id` | `null` |
|
|
32
|
-
| `program-identifier` | `null` — falls back to `spring.application.name` |
|
|
33
|
-
| `registration-timeout` | `PT30S` |
|
|
34
|
-
| `namespace-resolution.strategy` | `FIXED` |
|
|
35
|
-
| `namespace-resolution.http-header` | `"x-cratis-tenant-id"` |
|
|
36
|
-
| `namespace-resolution.claim` | `"tenant_id"` |
|
|
24
|
+
| Key under `cratis.chronicle` | Default |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `connection-string` | the development connection string |
|
|
27
|
+
| `event-store` | `"Default"` |
|
|
28
|
+
| `namespace` | `"Default"` |
|
|
29
|
+
| `auto-discover-and-register` | `true` |
|
|
30
|
+
| `artifact-packages` | empty — falls back to Spring's auto-configuration packages |
|
|
31
|
+
| `default-sink-type-id` | `null` |
|
|
32
|
+
| `program-identifier` | `null` — falls back to `spring.application.name` |
|
|
33
|
+
| `registration-timeout` | `PT30S` |
|
|
34
|
+
| `namespace-resolution.strategy` | `FIXED` |
|
|
35
|
+
| `namespace-resolution.http-header` | `"x-cratis-tenant-id"` |
|
|
36
|
+
| `namespace-resolution.claim` | `"tenant_id"` |
|
|
37
37
|
| `unit-of-work.enabled` | `true` | `ChronicleProperties.UnitOfWork` |
|
|
38
38
|
| `causation.enabled` | `true` | `ChronicleProperties.Causation` |
|
|
39
39
|
| `identity.enabled` | `true` | `ChronicleProperties.Identity` |
|
|
@@ -42,26 +42,26 @@ The starter selects a unique `ReadModelNamingPolicy` bean. With none or an
|
|
|
42
42
|
ambiguous set, it retains identifier-based naming. A rejected connection at
|
|
43
43
|
startup propagates `ChronicleConnectionFailed` and fails the application;
|
|
44
44
|
an unreachable kernel only logs after `registration-timeout` and keeps retrying.
|
|
45
|
-
Chronicle
|
|
46
|
-
`kotlin-coroutines.version` override
|
|
45
|
+
Requires Chronicle.Kotlin 6.5.0 for the starter to run on the kotlinx-coroutines version Spring Boot manages; remove a
|
|
46
|
+
`kotlin-coroutines.version` override added for an older client.
|
|
47
47
|
|
|
48
48
|
`NamespaceResolution.Strategy` is `FIXED`, `HTTP_HEADER`, `SUBDOMAIN`,
|
|
49
|
-
`AUTHENTICATION` (`ChronicleProperties.kt
|
|
49
|
+
`AUTHENTICATION` (`ChronicleProperties.kt`).
|
|
50
50
|
|
|
51
51
|
The beans you inject are `IChronicleClient`, `IEventStore`, and the convenience
|
|
52
|
-
facade `Chronicle` (`ChronicleAutoConfiguration.kt
|
|
52
|
+
facade `Chronicle` (`ChronicleAutoConfiguration.kt`). `Chronicle` wraps
|
|
53
53
|
the suspending API in blocking calls and takes `Class<T>` rather than
|
|
54
54
|
`KClass<T>`, so Java can use it unchanged —
|
|
55
|
-
`Integrations/SpringBoot/src/main/kotlin/io/cratis/chronicle/spring/Chronicle.kt
|
|
56
|
-
`append`
|
|
55
|
+
`Integrations/SpringBoot/src/main/kotlin/io/cratis/chronicle/spring/Chronicle.kt`,
|
|
56
|
+
`append` and `appendMany`.
|
|
57
57
|
|
|
58
58
|
`ChronicleWebAutoConfiguration` is **servlet-only**
|
|
59
|
-
(`@ConditionalOnWebApplication(SERVLET)`, `ChronicleWebAutoConfiguration.kt
|
|
59
|
+
(`@ConditionalOnWebApplication(SERVLET)`, `ChronicleWebAutoConfiguration.kt`).
|
|
60
60
|
A WebFlux application gets no per-request namespace, identity, causation, or
|
|
61
61
|
unit-of-work filter.
|
|
62
62
|
|
|
63
63
|
**Artifacts are Spring beans.** `SpringArtifactActivator` resolves a discovered
|
|
64
64
|
artifact from the container when it is uniquely defined and otherwise builds it
|
|
65
65
|
through `autowireCapableBeanFactory.createBean`
|
|
66
|
-
(`SpringArtifactActivator.kt
|
|
66
|
+
(`SpringArtifactActivator.kt`), so a reactor takes constructor
|
|
67
67
|
dependencies exactly like a `@Service` would.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
## Variants — mutually exclusive read models for one entity's lifecycle
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Source: `Cratis/Chronicle.Kotlin` (`projections/VariantOf.kt`,
|
|
4
|
+
`EntersOn.kt`, `GlobalFor.kt`, `ProjectionsService.kt`).
|
|
5
|
+
|
|
6
|
+
Requires Chronicle.Kotlin 6.5.0 for end-to-end variant key support. Earlier definitions
|
|
7
|
+
stored `$eventSourceId` keys empty: replay affected projections once on upgrade.
|
|
8
|
+
Take the version from Maven Central, not the checked-in source.
|
|
8
9
|
|
|
9
10
|
Some entities do not have one shape for their whole lifetime — a work item is a
|
|
10
11
|
backlog entry until a pull request exists for it, then it is a pull request
|
|
@@ -28,31 +28,33 @@ HTTP and never sees this package.
|
|
|
28
28
|
| A connection string with no credentials | Silently falls back to the development client credentials |
|
|
29
29
|
| Shipping the default TLS behavior | `skipTlsValidation` defaults to `true` |
|
|
30
30
|
| Constructor-injecting without an `artifactActivator` | By default the client constructs the artifact itself |
|
|
31
|
-
| Side-effect reactor without `@onceOnly()` | Reactors run again on kernel replay by default
|
|
31
|
+
| Side-effect reactor without `@onceOnly()` | Reactors run again on kernel replay by default |
|
|
32
32
|
| Reading `result.sequenceNumber` as a number | It is a `bigint` behind `.value` |
|
|
33
33
|
| A `@globalFor` mapping targeting a property one variant lacks | `GlobalHandlerPropertyNotOnVariant` when the group is built, not a silently skipped mapping |
|
|
34
34
|
| Expecting a `@globalFor`-only class to appear as a projection | It is never registered on its own; it is merged into its variants |
|
|
35
35
|
|
|
36
36
|
## Verified product sources
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Source: `Cratis/Chronicle.TypeScript`, reading
|
|
39
39
|
`Source/**` and `Documentation/getting-started.md`, `testing.md`,
|
|
40
|
-
`migrate-append-routing.md` and `reactors.md`.
|
|
40
|
+
`migrate-append-routing.md` and `reactors.md`.
|
|
41
41
|
|
|
42
|
-
| Package |
|
|
43
|
-
| --- | --- |
|
|
44
|
-
| `@cratis/chronicle` |
|
|
45
|
-
| `@cratis/chronicle.contracts` |
|
|
46
|
-
| `@cratis/fundamentals` |
|
|
42
|
+
| Package | Where |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `@cratis/chronicle` | npm; `Source/package.json` carries a placeholder version |
|
|
45
|
+
| `@cratis/chronicle.contracts` | Client's pinned dependency, not the latest contracts package |
|
|
46
|
+
| `@cratis/fundamentals` | **peer dependency** — you install it |
|
|
47
47
|
|
|
48
|
-
> **Do not read the version out of the repository.** `Source/package.json`
|
|
49
|
-
>
|
|
48
|
+
> **Do not read the version out of the repository.** `Source/package.json` carries
|
|
49
|
+
> a placeholder; `publish-version.js` overwrites it at publish time. Take the version
|
|
50
50
|
> from npm.
|
|
51
51
|
|
|
52
|
-
**Upgrade the kernel first.**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
**Upgrade the kernel first.** Reactors replay by default, so review side-effect handlers when
|
|
53
|
+
upgrading.
|
|
54
|
+
|
|
55
|
+
Requires Chronicle kernel 18.4.1 for the contract compatibility check and for omitted append routes.
|
|
56
|
+
|
|
57
|
+
Requires `@cratis/chronicle` 6.49.0, Chronicle kernel 19.30.0 and `@cratis/chronicle.contracts` 19.30.0 for registered event sources.
|
|
56
58
|
|
|
57
59
|
## Project setup
|
|
58
60
|
|
|
@@ -229,7 +231,9 @@ if (!result.isSuccess) {
|
|
|
229
231
|
`concurrencyScope`, `concurrencyScopes`, `eventSource`, and `eventStream`.
|
|
230
232
|
The reserved legacy `eventSourceId` option does not override the method's id.
|
|
231
233
|
|
|
232
|
-
|
|
234
|
+
Requires `@cratis/chronicle` 6.0.0 for omitted append routes.
|
|
235
|
+
|
|
236
|
+
**Single `append()` supports routing and subject options.** An
|
|
233
237
|
unspecified route is omitted on the wire; the kernel resolves source `Default`,
|
|
234
238
|
stream type `All`, stream id `Default`. Subject precedence is the explicit option,
|
|
235
239
|
then the event's `@subject()` property, then its event source id.
|
|
@@ -251,7 +255,7 @@ await unitOfWork.commit();
|
|
|
251
255
|
```
|
|
252
256
|
|
|
253
257
|
`ITransactionalEventSequence` returns `Promise<void>`, not an `AppendResult`;
|
|
254
|
-
results are on the unit of work.
|
|
258
|
+
results are on the unit of work. Requires `@cratis/chronicle` 6.51.0 for transactional appends to retain
|
|
255
259
|
routing, subject, occurrence, tags and concurrency scopes in enrollment order;
|
|
256
260
|
conflicting scopes for one source throw `ConflictingConcurrencyScopesInUnitOfWork`
|
|
257
261
|
before enrollment.
|
|
@@ -265,7 +269,7 @@ An unmatched name is simply never called. Reactors and reducers also support
|
|
|
265
269
|
`@handles(EventType)` on a public instance method: one handler per event;
|
|
266
270
|
a reactor handler cannot combine it with `@replay`.
|
|
267
271
|
|
|
268
|
-
**Reactors replay by default
|
|
272
|
+
**Reactors replay by default.** Use class `@onceOnly()` (not inherited)
|
|
269
273
|
or method `@onceOnly()` for effects that must not run on replay; `@replay(EventType)`
|
|
270
274
|
provides a separate replay handler. This never prevents failed-partition
|
|
271
275
|
redelivery or proves exactly-once effects.
|
|
@@ -353,10 +357,12 @@ Three consecutive credential rejections cause `RejectedChronicleCredentials`.
|
|
|
353
357
|
A failed token request is logged and the call proceeds without a token (allowing
|
|
354
358
|
an auth-less kernel); tokens come from the selected server, not the first host.
|
|
355
359
|
|
|
356
|
-
|
|
360
|
+
Requires `@cratis/chronicle` 6.43.0 for the built-in spans below.
|
|
361
|
+
|
|
362
|
+
Built-in spans use `cratis.chronicle.client.*` and scope
|
|
357
363
|
`Cratis.Chronicle.Client`; metrics use seconds. Legacy millisecond metrics and
|
|
358
364
|
`chronicle.*` attributes are retired except the retained exact-string
|
|
359
|
-
`chronicle.sequence_number`.
|
|
365
|
+
`chronicle.sequence_number`. The old constants, `ChronicleMetrics`, and
|
|
360
366
|
`telemetry.spanNames` are deprecated; migrate dashboards.
|
|
361
367
|
|
|
362
368
|
## Artifact activation
|
|
@@ -379,7 +385,7 @@ reactors or read models with `EventScenario`, `ReactorScenario`, or
|
|
|
379
385
|
| Registered sources/streams | Root `@eventSource`, repeatable `@eventStream`, `ConcurrencyDimensions`, `store.eventSources`; append `eventSource/eventStream`. Kernel 19.30+; see `Source/eventSources/` |
|
|
380
386
|
| Named tags | `namedTags` on appends; batches cannot combine them with registered event sources |
|
|
381
387
|
| Personal data and retained secrets | `@pii`, `@subject`, `store.pii`; `@encrypted` with `EncryptionScope` from `./confidentiality`; release through `readModels.release*`. Never combine PII/encrypted or put either on `eventSourceId` |
|
|
382
|
-
| Subject migration | Subject uses `@subject()
|
|
388
|
+
| Subject migration | Subject uses `@subject()`; events appended before it used the source id for protection keys |
|
|
383
389
|
| Operational catalogs | `store.observers` (list/remove), `store.patterns`; mutations need authority |
|
|
384
390
|
| Diagnostics/privacy | `ChronicleOptions.telemetry` and per-client `logger`; source ids are omitted by default, raw/HMAC recording is opt-in |
|
|
385
391
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
## Read models and projections
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Source: `Cratis/Chronicle.TypeScript`:
|
|
7
7
|
`Source/readModels/IReadModels.ts`, `indexDecorator.ts`,
|
|
8
8
|
`Source/projections/modelBound/**`, `declarative/**`, and
|
|
9
9
|
`Source/events/constraints/**`.
|
|
@@ -32,7 +32,7 @@ Verified at `Cratis/Chronicle.TypeScript` **v6.51.0**:
|
|
|
32
32
|
implementing `IProjectionFor<TReadModel>` with
|
|
33
33
|
`define(builder: IProjectionBuilderFor<TReadModel>): void`.
|
|
34
34
|
|
|
35
|
-
Chronicle's `@readModel()` is deprecated
|
|
35
|
+
Chronicle's `@readModel()` is deprecated: infer the read model from
|
|
36
36
|
mappings or the type supplied to projection/reducer registration. A custom id
|
|
37
37
|
uses `static readonly readModelId = 'custom-id'`. This does **not** deprecate
|
|
38
38
|
Arc's separate `@readModel()` query marker.
|
|
@@ -54,8 +54,8 @@ Arc's separate `@readModel()` query marker.
|
|
|
54
54
|
|
|
55
55
|
### Append-time constraints
|
|
56
56
|
|
|
57
|
-
`@unique()` and repeatable `@removeConstraint(name)
|
|
58
|
-
`@cratis/chronicle` and `@cratis/chronicle/events
|
|
57
|
+
Requires `@cratis/chronicle` 6.8.0 for `@unique()` and repeatable `@removeConstraint(name)`, exported from
|
|
58
|
+
`@cratis/chronicle` and `@cratis/chronicle/events`.
|
|
59
59
|
`@unique(name?, message?)` or `@unique({ name, message, eventSequences })`
|
|
60
60
|
marks a property unique across sources, or a class unique per source.
|
|
61
61
|
Same-named declarations merge; conflicting scopes throw.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- Materialization — ReadModelScenario
|
|
11
11
|
- Use kernel-backed tests outside the boundary
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Source: `Cratis/Chronicle.TypeScript`:
|
|
14
14
|
`Source/testing/index.ts`, `EventScenario.ts`, `ReactorScenario.ts`,
|
|
15
15
|
`ReadModelScenario.ts`, and `Documentation/testing.md`.
|
|
16
16
|
Import the three scenarios from `@cratis/chronicle/testing`. They share
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
## Variants — mutually exclusive read models for one entity's lifecycle
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Requires `@cratis/chronicle` 6.2.0 or later.
|
|
4
|
+
|
|
5
|
+
Source: `Source/projections/VariantReclassifier.ts` and model-bound decorators.
|
|
6
|
+
Read models are inferred; use `static readModelId` for a custom id.
|
|
6
7
|
|
|
7
8
|
Some entities do not have one shape for their whole lifetime — a work item is a
|
|
8
9
|
backlog entry until a pull request exists for it, then it is a pull request
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"input": "Append a routed event and specify a TypeScript Chronicle reactor without a kernel.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
-
{ "kind": "skill-contains", "value": "
|
|
6
|
+
{ "kind": "skill-contains", "value": "`Cratis/Chronicle.TypeScript`" },
|
|
7
7
|
{ "kind": "skill-contains", "value": "**Single `append()` supports routing and subject options.**" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "Standard TC39 decorators" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "**A compiled-JS entry defaults to `[]`.**" },
|
|
10
10
|
{ "kind": "skill-contains", "value": "IncompatibleChronicleServer" },
|
|
11
11
|
{ "kind": "skill-contains", "value": "installed package version" },
|
|
12
|
-
{ "kind": "skill-contains", "value": "**Reactors replay by default
|
|
12
|
+
{ "kind": "skill-contains", "value": "**Reactors replay by default.**" },
|
|
13
13
|
{ "kind": "skill-contains", "value": "@handles(EventType)" },
|
|
14
14
|
{ "kind": "skill-contains", "value": "Returns **null when absent**", "file": "references/read-models-and-projections.md" },
|
|
15
15
|
{ "kind": "skill-contains", "value": "`@unique()`", "file": "references/read-models-and-projections.md" },
|
|
@@ -13,12 +13,12 @@ decide the event shape — the subject is what erasure operates on.
|
|
|
13
13
|
|
|
14
14
|
## Verified product sources
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Sources:
|
|
17
17
|
|
|
18
|
-
| Package |
|
|
19
|
-
| --- | --- |
|
|
20
|
-
| `Cratis.Chronicle` | `
|
|
21
|
-
| `Cratis.Chronicle.CodeAnalysis` | `
|
|
18
|
+
| Package | Purpose |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `Cratis.Chronicle` | `Cratis.Chronicle.Compliance.GDPR`, `Cratis.Chronicle.SubjectAttribute`, `IEventSequence.Redact`, `IReadModels.Release` |
|
|
21
|
+
| `Cratis.Chronicle.CodeAnalysis` | `CHR0026`, `CHR0034`, `CHR0035`, `CHR0043`, `CHR0046` |
|
|
22
22
|
|
|
23
23
|
Reverify product sources before claiming support for another version.
|
|
24
24
|
|
|
@@ -63,7 +63,7 @@ are `[PII]` for personal data and `[Encrypted]` for retained operational secrets
|
|
|
63
63
|
there is no `[Redact]`, `[Erase]`, `[Anonymize]`, or `[Encrypt]` annotation.
|
|
64
64
|
Redaction is an API call. `[NotAudited]` belongs to Arc, not Chronicle.
|
|
65
65
|
|
|
66
|
-
`[Encrypted]` (`Cratis.Chronicle.ProtectedValues
|
|
66
|
+
`[Encrypted]` (`Cratis.Chronicle.ProtectedValues`) is a
|
|
67
67
|
security marker, not a compliance category: it encrypts an operational secret
|
|
68
68
|
(API key, token, a company's bank account number) at rest with no data subject
|
|
69
69
|
and no erasure. Never put it on a value that is also `[PII]` (analyzer
|
|
@@ -161,7 +161,7 @@ What this does and does not do:
|
|
|
161
161
|
number/boolean → `0`/`false`; nullable number/boolean → `null`; collection →
|
|
162
162
|
empty collection; object/value object → empty object. An erased `0`, `false`
|
|
163
163
|
or empty string is indistinguishable from a genuinely recorded one.
|
|
164
|
-
Source
|
|
164
|
+
Source: `Documentation/compliance/erasing-a-subject.mdx`.
|
|
165
165
|
- Appending a new `[PII]` value for an erased subject **fails** with
|
|
166
166
|
`EncryptionKeyErased`. It does not quietly mint a new key. Call
|
|
167
167
|
`AllowNewEncryptionKeyFor` deliberately if the subject must be re-enrolled.
|
|
@@ -192,14 +192,14 @@ Use redaction for content that should never have been appended. Use key erasure
|
|
|
192
192
|
for a subject exercising a right to erasure. They are different mechanisms and
|
|
193
193
|
one does not imply the other.
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
Requires Chronicle 19.11.0 for redaction to also drop retained causation property values, revision
|
|
196
196
|
history and content hashes. It does not reach backups, oplogs or events already
|
|
197
197
|
forwarded elsewhere. Subject erasure does **not** erase causation values: these
|
|
198
198
|
are not encrypted under the subject key. Kernel configuration
|
|
199
199
|
`events.causationPropertyRetention = Omit`
|
|
200
200
|
(`Cratis__Chronicle__Events__CausationPropertyRetention`) prevents **new** retention
|
|
201
201
|
on appends, forwarding, revisions and redactions; it does not rewrite history.
|
|
202
|
-
Source
|
|
202
|
+
Source: `Documentation/hosting/configuration/events.md` and
|
|
203
203
|
`Documentation/compliance/erasing-a-subject.mdx`.
|
|
204
204
|
|
|
205
205
|
Adding `[PII]` / `[Encrypted]` to an existing generation is accepted with a warning
|
|
@@ -23,14 +23,15 @@ use, and the traps. A plain read, a validator read, `Result<,>` and
|
|
|
23
23
|
|
|
24
24
|
## Verified product sources
|
|
25
25
|
|
|
26
|
-
| Product |
|
|
27
|
-
| --- | --- |
|
|
28
|
-
| `Cratis.Chronicle` | `
|
|
29
|
-
| `Cratis.Chronicle` transactions | `
|
|
30
|
-
| `Cratis.Chronicle` scope resolution | `
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
| Product | Sources |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `Cratis.Chronicle` | `Source/Clients/DotNET/ReadModels/{IDecisionReads,DecisionReads,DecisionRead,DecisionReadRefusalReason}.cs` |
|
|
29
|
+
| `Cratis.Chronicle` transactions | `Source/Clients/DotNET/Transactions/{IUnitOfWork,UnitOfWork,DecisionReadCommitOwner,UnitOfWorkLifecyclePolicy}.cs` |
|
|
30
|
+
| `Cratis.Chronicle` scope resolution | `Source/Clients/DotNET/EventSequences/Concurrency/DefinitionConcurrencyScopeResolver.cs` |
|
|
31
|
+
|
|
32
|
+
Requires Chronicle 19.9.0 for decision reads, and a Chronicle 19.39.0 kernel for stream-scoped reads.
|
|
33
|
+
|
|
34
|
+
Reverify a client/kernel pair rather than disabling
|
|
34
35
|
compatibility checking to force a read through.
|
|
35
36
|
|
|
36
37
|
## Route the work
|
|
@@ -56,7 +57,7 @@ compatibility checking to force a read through.
|
|
|
56
57
|
`Admit<T>()` / `AdmitForStream<T>()` check shape **without I/O**, returning
|
|
57
58
|
`DecisionReadAdmission(IsAdmitted, Reason)`. The model needs an `Id` property
|
|
58
59
|
(string, or a Guid in lowercase hyphenated form) and an event-source-keyed flat
|
|
59
|
-
projection. Reducers, including self-reducing models
|
|
60
|
+
projection. Reducers, including self-reducing models, are refused with
|
|
60
61
|
`Reducer`; a missing `Id` or an unconvertible key refuses with `KeyConversion`. A successful shape check is not
|
|
61
62
|
runtime read success: definitions, key conversion and fold completion are also
|
|
62
63
|
checked while reading.
|
|
@@ -94,7 +95,7 @@ Enroll the read **before** staging its decision's events through
|
|
|
94
95
|
`IsSuccess`, append errors/constraint violations/concurrency violations and
|
|
95
96
|
`GetDecisionConflicts()`; the latter reports decision conflicts without exposing
|
|
96
97
|
sequence numbers. On a kernel whose append validators accept an empty batch
|
|
97
|
-
(
|
|
98
|
+
(a kernel that does so when a scope carries an actual boundary or expects no matching event), a checked empty
|
|
98
99
|
append validates its scope and writes nothing; a kernel that rejects it surfaces
|
|
99
100
|
`DecisionReadValidateOnlyNotSupported`, which fails closed. Do not mistake "no
|
|
100
101
|
event" for "no consistency check", and assert validate-only in an integration
|
package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# Admission and commit ownership
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Source: `Cratis/Chronicle`:
|
|
7
7
|
`Source/Clients/DotNET/ReadModels/DecisionReads.cs`, `DecisionReadRefusalReason.cs`,
|
|
8
8
|
`Source/Clients/DotNET/Transactions/UnitOfWork.cs`, `DecisionReadCommitOwner.cs`,
|
|
9
9
|
and `UnitOfWorkLifecyclePolicy.cs`.
|
|
@@ -20,8 +20,7 @@ question: **which mechanism makes this rule hold while other writers append at t
|
|
|
20
20
|
same time**, and which look correct but do not. Read it before writing a command,
|
|
21
21
|
validator, endpoint or handler that reads state and then appends.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
self-reducing models since 19.58.0) and Arc main `0986d097a`. Published guides, which
|
|
23
|
+
Checked against the Chronicle and Arc sources. Published guides, which
|
|
25
24
|
this agrees with:
|
|
26
25
|
[Chronicle: choosing how a rule holds](/chronicle/dynamic-consistency-boundary/choosing/),
|
|
27
26
|
[decision reads](/chronicle/read-models/decision-reads/),
|
|
@@ -80,7 +79,7 @@ Whatever the backing, a plain read captures no position and enrolls no guard.
|
|
|
80
79
|
| Materialized projection or reducer (default) | may lag the log | none |
|
|
81
80
|
| `[Passive]` projection | fresh at read time | none |
|
|
82
81
|
| `[Passive]` reducer | fresh at read time | none |
|
|
83
|
-
| Self-reducing model
|
|
82
|
+
| Self-reducing model | as its `[Passive]` setting | none |
|
|
84
83
|
|
|
85
84
|
Passive is fresher, not safer. Capturing the tail yourself before a materialized
|
|
86
85
|
read does not fix it: the read may be older than the position you captured, and
|
|
@@ -95,10 +94,10 @@ A constraint binds every writer, whichever client or service appends, per namesp
|
|
|
95
94
|
and per event sequence. It cannot count, sum or test a predicate; it expresses
|
|
96
95
|
uniqueness (with release on a removal event), create-once and closed streams.
|
|
97
96
|
|
|
98
|
-
- The claim is settled after the durable append (
|
|
97
|
+
- The claim is settled after the durable append (not yet
|
|
99
98
|
implemented in every store). A failed index update is logged and a later duplicate
|
|
100
99
|
may pass until a reindex. SQL and InMemory stores do not yet settle claims
|
|
101
|
-
|
|
100
|
+
A constraint is the right mechanism, not an
|
|
102
101
|
unconditional proof.
|
|
103
102
|
- Tenants in different namespaces can claim the same value.
|
|
104
103
|
- `[RemoveConstraint]` releases attribute constraints (`[Unique]` on a property
|
|
@@ -138,7 +137,7 @@ stored tail filtered by key, types and route). See the skill's
|
|
|
138
137
|
bypass the kernel's serialized append path (duplicate grain activations, direct
|
|
139
138
|
storage writes) are outside the guard.
|
|
140
139
|
- **Empty protected commit.** A unit that enrolled a decision read and staged no
|
|
141
|
-
events appends an empty batch with the guard scopes.
|
|
140
|
+
events appends an empty batch with the guard scopes. The kernel
|
|
142
141
|
validators (`AppendManyValidator`, `AppendManyForEventSourcesValidator`) accept an
|
|
143
142
|
empty batch when a scope carries an actual boundary or expects no matching event, and the integration
|
|
144
143
|
spec `for_ReadModels/when_reading_for_a_decision` shows `AppendMany([], guardedBy:)`
|
|
@@ -18,21 +18,21 @@ the mechanism for uniqueness and create-once. It cannot count, sum or test a
|
|
|
18
18
|
predicate: capacity and stock rules need a decision read, a stream decision or an
|
|
19
19
|
aggregate. Read [choosing how a rule holds](../cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md)
|
|
20
20
|
when it is unclear which one a rule needs. Limits: the claim is settled after the
|
|
21
|
-
durable append
|
|
21
|
+
durable append, so a failed index update can let a later duplicate
|
|
22
22
|
through until a reindex; constraints apply per event store namespace and event
|
|
23
23
|
sequence, so tenants in different namespaces can claim the same value; and a
|
|
24
24
|
constraint is not re-run when the kernel retries a duplicate sequence number.
|
|
25
25
|
|
|
26
26
|
## Verified product sources
|
|
27
27
|
|
|
28
|
-
| Package |
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| `Cratis.Chronicle` (client) |
|
|
31
|
-
| `Cratis.Chronicle` code analysis | `
|
|
32
|
-
| `Cratis.Chronicle.Testing` | `
|
|
28
|
+
| Package | Purpose |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `Cratis.Chronicle` (client) | uniqueness, stream closing, constraint builders and append results |
|
|
31
|
+
| `Cratis.Chronicle` code analysis | `CHR0017`, `CHR0018`, `CHR0020` |
|
|
32
|
+
| `Cratis.Chronicle.Testing` | `EventScenario` and the `IAppendResult` `Should*` assertions |
|
|
33
33
|
|
|
34
34
|
Sources: `Source/Clients/DotNET/Events/Constraints/`,
|
|
35
|
-
`EventSequences/IEventSequence.cs` and `Source/Clients/Testing
|
|
35
|
+
`EventSequences/IEventSequence.cs` and `Source/Clients/Testing/`.
|
|
36
36
|
|
|
37
37
|
Reverify against the Chronicle repository before claiming support for another
|
|
38
38
|
version. Never translate an attribute argument order or an assertion name from
|
package/package/corpus/skills/cratis-chronicle-event-constraints/references/closing-streams.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# Closing scope and recovery
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Source: `Cratis/Chronicle`:
|
|
7
7
|
`Source/Clients/DotNET/EventSequences/{IEventSequence,ClosedStreamScope,CompleteStreamError}.cs`,
|
|
8
8
|
`Events/Constraints/ClosesStreamAttribute.cs`,
|
|
9
9
|
`Documentation/closing-streams/` and `Documentation/scenarios/close-the-books.mdx`.
|
|
@@ -12,13 +12,13 @@ application's constraints discovered and active.
|
|
|
12
12
|
|
|
13
13
|
## Verified product sources
|
|
14
14
|
|
|
15
|
-
| Package |
|
|
16
|
-
| --- | --- |
|
|
17
|
-
| `Cratis.Chronicle.Testing` | `
|
|
18
|
-
| `Cratis.Chronicle` | `
|
|
15
|
+
| Package | Purpose |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `Cratis.Chronicle.Testing` | `EventScenario`, its `Given`/`When` builders, the `IAppendResult` `Should*` assertions |
|
|
18
|
+
| `Cratis.Chronicle` | `IEventSequence.Append`/`AppendMany`, `IAppendResult`, `ConstraintViolation` |
|
|
19
19
|
|
|
20
20
|
Sources: `Source/Clients/Testing/EventSequences/`, `TestingEventStore.cs`,
|
|
21
|
-
and `Source/Clients/DotNET/EventSequences
|
|
21
|
+
and `Source/Clients/DotNET/EventSequences/`.
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
dotnet add package Cratis.Chronicle.Testing
|
|
@@ -71,7 +71,7 @@ in the loaded assemblies — which is what makes a constraint specification work
|
|
|
71
71
|
without wiring. Pass an `ICanProvideConstraints` to the single-argument
|
|
72
72
|
constructor when the specification needs a narrower set.
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
It implements `IDisposable`: dispose in `Destroy()`.
|
|
75
75
|
`new EventScenario(sequenceId, eventStore, @namespace)` selects identifiers;
|
|
76
76
|
constructors also accept per-run `Defaults`. One scenario shares production
|
|
77
77
|
in-memory storage across its sequences and uses the kernel append grain,
|
|
@@ -31,12 +31,12 @@ events.
|
|
|
31
31
|
|
|
32
32
|
## Verified product sources
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Sources:
|
|
35
35
|
|
|
36
|
-
| Package |
|
|
37
|
-
| --- | --- |
|
|
38
|
-
| `Cratis.Chronicle` | `
|
|
39
|
-
| `Cratis.Chronicle.CodeAnalysis` | `
|
|
36
|
+
| Package | Purpose |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `Cratis.Chronicle` | `Cratis.Chronicle.Events` and `Cratis.Chronicle.Events.Migrations` |
|
|
39
|
+
| `Cratis.Chronicle.CodeAnalysis` | `CHR0012`, `CHR0037`, `CHR0049`, `CHR0050` |
|
|
40
40
|
|
|
41
41
|
Reverify product sources before claiming support for another version.
|
|
42
42
|
|
|
@@ -178,7 +178,7 @@ target schema supplies absence/drops undeclared properties. That is a migration
|
|
|
178
178
|
fact, not a reason to put nullable facts on newly authored events. Schema `title`
|
|
179
179
|
is ignored, so renaming a CLR record with a pinned `[EventType("id")]` does not
|
|
180
180
|
raise `EventTypeSchemaChanged`. A property described only by `default` may gain
|
|
181
|
-
`type`/`format` without that error. Source
|
|
181
|
+
`type`/`format` without that error. Source:
|
|
182
182
|
`Documentation/migrations/dotnet-client.mdx` and the kernel event-type schema comparison.
|
|
183
183
|
|
|
184
184
|
## Step 3 — When the values changed meaning, declare a value map
|
|
@@ -235,7 +235,7 @@ dependencies.
|
|
|
235
235
|
|
|
236
236
|
## Backfill scope and rollout
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
Per `Documentation/migrations/index.md`, registering a new
|
|
239
239
|
generation starts **add-only** backfill in the **default namespace's event log
|
|
240
240
|
only**. Other namespaces and sequences are not covered. Existing stored
|
|
241
241
|
representations remain unchanged; changing a migration alone does not launch
|
|
@@ -245,11 +245,13 @@ kernel silo is upgraded**; an old worker can still overwrite content mid-rollout
|
|
|
245
245
|
|
|
246
246
|
## Choose the generation an observer receives
|
|
247
247
|
|
|
248
|
+
Requires Chronicle 19.41.0 for reactors and reducers, and 19.48.0 for typed materialized projections.
|
|
249
|
+
|
|
248
250
|
`Compatibility` remains the default. With
|
|
249
251
|
`ChronicleOptions.EventGenerationDelivery = EventGenerationDelivery.Pinned`,
|
|
250
|
-
reactors and reducers receive the generation of their handler's CLR event type
|
|
251
|
-
|
|
252
|
-
generation they declare
|
|
252
|
+
reactors and reducers receive the generation of their handler's CLR event type.
|
|
253
|
+
Typed materialized projection clauses receive the
|
|
254
|
+
generation they declare, including joins, children,
|
|
253
255
|
removals, and event-content keys on live, catch-up, and replay.
|
|
254
256
|
|
|
255
257
|
Read [references/pinned-generations.md](references/pinned-generations.md) for
|
package/package/corpus/skills/cratis-chronicle-event-type-migration/references/pinned-generations.md
CHANGED
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
- Verify delivery through a real client
|
|
11
11
|
- Product sources
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
**19.41.0**; typed materialized projection opt-in shipped in **19.48.0**.
|
|
13
|
+
Requires Chronicle 19.41.0 or later for reactor/reducer opt-in and 19.48.0 or later for typed materialized projection opt-in.
|
|
15
14
|
Configure `ChronicleOptions.EventGenerationDelivery` before connecting; see
|
|
16
15
|
[standalone and host examples](../../cratis-chronicle-client-dotnet/references/pinned-generation-delivery.md).
|
|
17
16
|
|
|
@@ -111,4 +110,4 @@ validates all clauses; `Engine/DefinitionLanguage/ProjectionEventTypeReference.c
|
|
|
111
110
|
resolves PDL bare names. `Source/Clients/Testing/ReadModels/ProjectionReadModelProcessor.cs`
|
|
112
111
|
and `Reactors/ReactorScenario.cs` define the scenario boundary.
|
|
113
112
|
|
|
114
|
-
See [Chronicle's event type migration documentation](https://github.com/Cratis/Chronicle/blob/
|
|
113
|
+
See [Chronicle's event type migration documentation](https://github.com/Cratis/Chronicle/blob/main/Documentation/concepts/event-type-migrations.mdx#opt-in-to-pinned-observer-delivery).
|
|
@@ -17,7 +17,7 @@ rotating keys, clearing quarantine or deploying to an unnamed environment.
|
|
|
17
17
|
|
|
18
18
|
## Verified product sources
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Source: `Cratis/Chronicle`:
|
|
21
21
|
|
|
22
22
|
| Source | Contract |
|
|
23
23
|
| --- | --- |
|
|
@@ -26,7 +26,7 @@ Verified at **Cratis/Chronicle v19.50.1**:
|
|
|
26
26
|
| `Documentation/hosting/configuration/health-endpoint.md` | dedicated probe port and exclusive routing |
|
|
27
27
|
| `Documentation/hosting/configuration/observers.md` | retries, quarantine, definition evolution |
|
|
28
28
|
| `Source/Kernel/Core/Configuration/{Events,Alerts}.cs` | causation retention and incident metrics |
|
|
29
|
-
| `Source/Kernel/Core/Setup/Authentication/AuthenticationService.cs
|
|
29
|
+
| `Source/Kernel/Core/Setup/Authentication/AuthenticationService.cs` | persisted development application |
|
|
30
30
|
|
|
31
31
|
Reverify these sources before recommending another kernel version. This is the
|
|
32
32
|
operator/kernel surface, not an application-profile layout rule.
|
|
@@ -63,10 +63,10 @@ ephemeral OAuth keys. Supply passwords from the approved secret mechanism,
|
|
|
63
63
|
never commit them. Every cluster node needs the same certificate ring.
|
|
64
64
|
|
|
65
65
|
The .NET client uses known development credentials when ClientCredentials has
|
|
66
|
-
both username and password absent (`ChronicleClient.cs
|
|
67
|
-
`Connections/ServiceCollectionExtensions.cs
|
|
66
|
+
both username and password absent (`ChronicleClient.cs`,
|
|
67
|
+
`Connections/ServiceCollectionExtensions.cs`). The development
|
|
68
68
|
kernel creates the application **directly in persistent storage**
|
|
69
|
-
(`AuthenticationService.cs
|
|
69
|
+
(`AuthenticationService.cs`). Changing to a production
|
|
70
70
|
image does not revoke it. Remove the application and any configuration declaration
|
|
71
71
|
that recreates it before reusing that storage. See **cratis-chronicle-client-dotnet**.
|
|
72
72
|
|
|
@@ -82,10 +82,10 @@ traffic over h2c; HTTP/1.1 upstream fails. Restrict direct access. With auth ena
|
|
|
82
82
|
use an external HTTPS `authentication.authority`: the internal authority and
|
|
83
83
|
`/connect/token` are unavailable; .NET SDK ClientCredentials cannot use the
|
|
84
84
|
external authority. Independently obtained bearer tokens and Workbench cookie
|
|
85
|
-
login are supported. These claims
|
|
85
|
+
login are supported. These claims come from
|
|
86
86
|
`Documentation/hosting/configuration/tls.md`, "Configuration file"/"TLS behavior".
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
The same file's "Trusted reverse proxies" section specifies:
|
|
89
89
|
|
|
90
90
|
- `X-Forwarded-For/Proto` is trusted from loopback only by default. Add the
|
|
91
91
|
**immediate proxy** IP to `forwardedHeaders.knownProxies` or a restricted
|