@cratis/pi 8.5.0 → 8.7.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.
Files changed (217) hide show
  1. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
  2. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
  3. package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
  4. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
  5. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
  6. package/package/corpus/rules/glossary.md +5 -3
  7. package/package/corpus/rules/react.md +3 -1
  8. package/package/corpus/rules/reactors.md +3 -1
  9. package/package/corpus/rules/specs.csharp.md +6 -3
  10. package/package/corpus/rules/vertical-slices.md +5 -2
  11. package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
  12. package/package/corpus/skills/cratis-application-growth/references/csharp.md +0 -2
  13. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
  14. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
  15. package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
  16. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  17. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
  18. package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +19 -0
  19. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +15 -0
  20. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
  21. package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
  22. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +46 -7
  23. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
  24. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +4 -1
  25. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +31 -4
  26. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  27. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +24 -2
  28. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +49 -0
  29. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +3 -1
  30. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +27 -4
  31. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
  32. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +49 -2
  33. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
  34. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  35. package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
  36. package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
  37. package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
  38. package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +84 -2
  39. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +2 -0
  40. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
  41. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +18 -1
  42. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
  43. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +18 -16
  44. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +8 -3
  45. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +84 -16
  46. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +22 -2
  47. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
  48. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
  49. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
  50. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +40 -1
  51. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
  52. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +7 -3
  53. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
  54. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
  55. package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
  56. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
  57. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
  58. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
  59. package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
  60. package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
  61. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
  62. package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
  63. package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
  64. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
  65. package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
  66. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
  67. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
  68. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +2 -2
  69. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +28 -0
  70. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
  71. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
  72. package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
  73. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
  74. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +8 -1
  75. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
  76. package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
  77. package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
  78. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +2 -0
  79. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +27 -0
  80. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
  81. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +13 -6
  82. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +45 -0
  83. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +91 -1
  84. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +9 -0
  85. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
  86. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +11 -1
  87. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +1 -1
  88. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +1 -1
  89. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +14 -3
  90. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +3 -0
  91. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +3 -2
  92. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
  93. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
  94. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
  95. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +2 -0
  96. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +1 -0
  97. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +1 -1
  98. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -0
  99. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +40 -3
  100. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +20 -2
  101. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
  102. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
  103. package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
  104. package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
  105. package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
  106. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +24 -1
  107. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
  108. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
  109. package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
  110. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +17 -0
  111. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
  112. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +35 -2
  113. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
  114. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -0
  115. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
  116. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
  117. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
  118. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
  119. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
  120. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  121. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
  122. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
  123. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
  124. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
  125. package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
  126. package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
  127. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
  128. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
  129. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
  130. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
  131. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
  132. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
  133. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
  134. package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
  135. package/package/corpus/skills/cratis-code-review/references/csharp.md +1 -1
  136. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
  137. package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
  138. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
  139. package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
  140. package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
  141. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
  142. package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
  143. package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
  144. package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
  145. package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
  146. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
  147. package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
  148. package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
  149. package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
  150. package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
  151. package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
  152. package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
  153. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
  154. package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +5 -3
  155. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
  156. package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
  157. package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
  158. package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
  159. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
  160. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
  161. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
  162. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
  163. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +70 -0
  164. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +8 -0
  165. package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +1 -0
  166. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +33 -0
  167. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
  168. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +5 -0
  169. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
  170. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
  171. package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
  172. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
  173. package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
  174. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
  175. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
  176. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
  177. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
  178. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
  179. package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
  180. package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
  181. package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
  182. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
  183. package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
  184. package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
  185. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
  186. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
  187. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
  188. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
  189. package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
  190. package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
  191. package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
  192. package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
  193. package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +29 -0
  194. package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +82 -1
  195. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +1 -1
  196. package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +10 -0
  197. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -4
  198. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
  199. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
  200. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
  201. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
  202. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  203. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
  204. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +3 -1
  205. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
  206. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +1 -0
  207. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +4 -2
  208. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +3 -3
  209. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +34 -1
  210. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
  211. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
  212. package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
  213. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
  214. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  215. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
  216. package/package/profile-catalog.json +15 -0
  217. package/package.json +1 -1
@@ -7,6 +7,7 @@
7
7
  - events
8
8
  - shutdown
9
9
  - startup
10
+ - crashDumps
10
11
  - features
11
12
  - storage
12
13
  - storage.postgreSqlEntra
@@ -108,6 +109,10 @@ Paths are relative to the root of `chronicle.json`. `[]` denotes each array elem
108
109
 
109
110
  - `busySiloWaitLimit` — How long a required startup step keeps waiting for a silo that is up but not answering before the server treats it as a real failure and stops.
110
111
 
112
+ ## crashDumps
113
+
114
+ - `retain` — How many crash dump files to keep. At each start the kernel tries to delete the oldest matching dumps beyond that number; `0` (default) deletes nothing. Best effort, not a guaranteed bound: see [Crash dumps](container-and-kubernetes.md#crash-dumps).
115
+
111
116
  ## features
112
117
 
113
118
  - `api` — Whether the API is enabled.
@@ -229,19 +234,19 @@ Paths are relative to the root of `chronicle.json`. `[]` denotes each array elem
229
234
  - `maxEventsPerPage` — The most events in one page handed to a client reactor or reducer that declared page delivery, on every path.
230
235
  - `maxBytesPerSubscriberCall` — The most bytes of event content, and for a reducer of the states it reduces from, handed to a client reactor or reducer that declared page delivery, in one call, on every path.
231
236
  - `subscriptionReadyTimeout` — The timeout in seconds to wait for an event store subscription to become ready before returning to the client.
232
- - `maxRetryAttempts` — The maximum number of retries that can be attempted on a failed observer partition.
237
+ - `maxRetryAttempts` — The maximum number of retries that can be attempted on a failed observer partition. Default `10`; `0` turns off this attempt limit only: the observer quarantine thresholds below still apply. These settings govern reactors, reducers and projections; webhooks read `webhooks.retry` instead, which has its own defaults. The limit counts per retry budget: a retry that fails at a later event than the previous one, or clearing the partition's quarantine, starts a new budget, so only a partition that keeps failing at the same event uses it up and is quarantined.
233
238
  - `backoffDelay` — The delay for attempting to retry a failed partition in seconds.
234
239
  - `exponentialBackoffDelayFactor` — The retry delay exponential factor.
235
240
  - `maximumBackoffDelay` — The max delay time in seconds for retrying a failed partition.
236
- - `backoffScheduleSeconds` — The webhook retry delays in seconds.
237
- - `retryBudget` — The webhook retry budget from the first attempt since quarantine was cleared.
238
- - `quarantineOnFailedPartitionCount` — The threshold for quarantining an observer based on the number of failed partitions.
239
- - `quarantineOnFailedPartitionPercentage` — The threshold for quarantining an observer based on the percentage of failed partitions.
241
+ - `backoffScheduleSeconds` — The webhook retry delays in seconds. Used by webhooks only, from `webhooks.retry`.
242
+ - `retryBudget` — The webhook retry budget from the first attempt since quarantine was cleared. Used by webhooks only, from `webhooks.retry`.
243
+ - `quarantineOnFailedPartitionCount` — The threshold for quarantining an observer based on the number of failed partitions. Default `0`: never quarantine the observer on this count. A partition whose last attempt timed out is not counted.
244
+ - `quarantineOnFailedPartitionPercentage` — The threshold for quarantining an observer based on the share of failed partitions, written as a fraction (`0.5` is half). Default `0`: never quarantine the observer on this share. The share is not of every partition the observer has processed: failed partitions are counted as for `quarantineOnFailedPartitionCount`, and divided by the distinct partitions that are failing now or are among the last 100 that failed and recovered.
240
245
  - `definitionEvolution` — The policy for evolving read models when a projection or reducer definition changes: `Automatic`, `PartialOnly` or `Manual`.
241
246
  - `generationPromotion` — The promotion gate for projection generations.
242
247
  - `deploymentConditionGracePeriod` — How long the deployment condition must hold before promotion.
243
248
  - `pendingGenerationAlertAfter` — How long a generation may remain pending before an alert is raised.
244
- - `replayOnDefinitionChange` — Whether reactors and webhooks should automatically replay when their definition changes.
249
+ - `replayOnDefinitionChange` — Whether reactors and webhooks should automatically replay when their definition changes. Default `false`: a changed reactor or webhook does not replay; the development images set `true`. Projection and reducer changes follow `definitionEvolution` instead.
245
250
  - `watchdogInterval` — The interval in seconds between watchdog checks on each observer.
246
251
  - `stallWindow` — How long an observer's position must stay put while events it observes are waiting, and the end of the event sequence keeps advancing, before its measured progress is reported as stalled.
247
252
  - `idleDeactivationAfter` — How many seconds an observer that has no subscription and no pending work stays resident before it is released.
@@ -376,6 +381,8 @@ Each entry is keyed by the full observer key `<observer id>#<event store>#<names
376
381
 
377
382
  ## webhooks.retry
378
383
 
384
+ The retry, parking and quarantine policy for webhooks. It has the same settings as `observers` but is read independently of it, with its own defaults: `maxRetryAttempts` `0` (no attempt limit; `retryBudget` bounds the retries instead), `quarantineOnFailedPartitionCount` `5` and `quarantineOnFailedPartitionPercentage` `0.5`. For a webhook, only quarantined partitions count towards those two thresholds.
385
+
379
386
  - `maxConcurrentPartitions` — The upper bound on how many job steps run in parallel.
380
387
  - `maxConcurrentRegistrations` — The maximum number of gRPC reactor and reducer registrations running concurrently on a silo.
381
388
  - `maxConcurrentSubscriptions` — The maximum number of projection subscriptions and failed-partition recoveries running concurrently on a silo.
@@ -4,6 +4,7 @@
4
4
 
5
5
  - Ports
6
6
  - TLS on the kernel port
7
+ - Your own certificate in development
7
8
  - Certificate renewal
8
9
  - Run behind an HTTPS proxy
9
10
  - Trust forwarded headers
@@ -46,6 +47,32 @@ and REST, chosen per connection. Publish only 35000 from a single-node kernel.
46
47
  trust the issuing certificate authority; connecting with TLS validation
47
48
  switched off is for local development only.
48
49
 
50
+ ## Your own certificate in development
51
+
52
+ Keep the certificate the development image generates. Supply your own only to
53
+ test certificate trust or to connect through a custom host name.
54
+
55
+ 1. Create a PFX with a private key and a password.
56
+ `dotnet dev-certs https -ep ./chronicle-dev.pfx -p <password>` exports the
57
+ .NET development certificate, which is for `localhost`. For any other host
58
+ name, create a self-signed certificate that lists every name and address
59
+ clients connect with as subject alternative names, and export it to PFX.
60
+ 2. Mount the file read-only into the container, and set `tls.certificatePath`
61
+ to the path inside the container and `tls.certificatePassword`.
62
+ 3. Trust the certificate on every machine, and in every container, whose
63
+ clients must validate it. Exporting does not establish trust:
64
+ `dotnet dev-certs https --trust` trusts the .NET development certificate on
65
+ that one machine; import any other certificate into the operating system's
66
+ trust store.
67
+
68
+ - A custom host name must also resolve to the kernel; the certificate does not
69
+ configure name resolution.
70
+ - A client validation error after this means a host name missing from the
71
+ certificate, expired dates or a missing trust entry; re-exporting the PFX
72
+ fixes none of them.
73
+ - Never use such a certificate, or its password, outside development, and keep
74
+ both out of source control.
75
+
49
76
  ## Certificate renewal
50
77
 
51
78
  Renew the TLS certificate by replacing the file at `tls.certificatePath`; no
@@ -113,6 +140,24 @@ kernel published directly needs none of this.
113
140
 
114
141
  `healthCheckEndpoint` (default `/health`) moves all three paths together.
115
142
 
143
+ The readiness body is plain text with the combined status only: `Healthy`,
144
+ `Degraded`, `Unhealthy` or `Standby`. It does not name the check behind it;
145
+ only an overloaded kernel adds its reason on a second line. The HTTP code
146
+ follows that combined status, not one check: 503 when any check is unhealthy,
147
+ otherwise 200. Two checks gate the kernel's lifecycle, `kernel-ready` and
148
+ `startup`: they are unhealthy until startup completes and once shutdown
149
+ begins, except on a node waiting in standby, which reports `Standby` instead.
150
+ `kernel-projections-registration` never takes a node out of rotation: it is
151
+ healthy, or degraded (200) while the kernel's own projections are still being
152
+ registered in the background. These checks report an operating condition:
153
+
154
+ | Check | Reports | Then |
155
+ | --- | --- | --- |
156
+ | `kernel-overload` | Degraded (200) while the node is over an `overload` limit and until it has stayed under them for the recovery period | Read the reason in the body. Do not take the node out of rotation; the other nodes are probably as busy |
157
+ | `storage-authorization` | Degraded (200) while a storage permission failure is recorded | The kernel log names the database, collection and refused operation. Fix the grant; the status clears when the kernel next reconciles the indexes on that collection successfully |
158
+ | `mongodb` | Degraded (200) with no writable server connected; unhealthy (503) with no server connected | Check the replica set and the network path to it |
159
+ | `single-writer-lease` | Unhealthy (503) once this kernel no longer holds the lease or cannot confirm its renewal in time; the kernel then shuts down. Registered only for `Localhost` clustering on persistent storage with the lease enabled | Find the other kernel on the same storage; see [Clustering](configuration.md#clustering) |
160
+
116
161
  The probe status and traffic acceptance are separate. The kernel serves other
117
162
  requests once startup has completed and until shutdown begins, whatever the
118
163
  readiness status. Before that, and throughout standby, it refuses them with
@@ -3,6 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - Choose a storage engine
6
+ - MongoDB-compatible services
6
7
  - Resolve connections per tenant
7
8
  - Database names
8
9
  - Resolve shared database ownership
@@ -13,6 +14,7 @@
13
14
  - Separate SQL schema and runtime identities
14
15
  - Gate a MongoDB rollout on required indexes
15
16
  - Cut over to a dedicated compliance key store
17
+ - Upgrade keys stored under earlier names
16
18
 
17
19
  ## Choose a storage engine
18
20
 
@@ -43,6 +45,34 @@ SQL Server storage.
43
45
  | `storage.schemaAction` | `None` | `MigrateAndExit` or `VerifyAndExit` run a one-off schema job and exit. Never set on a serving node |
44
46
  | `storage.connectionResolution` | unset | Resolve server, database, schema and identity per event store, namespace and purpose on a platform-managed database |
45
47
 
48
+ ## MongoDB-compatible services
49
+
50
+ Use MongoDB itself, as a replica set. A service that only speaks the MongoDB
51
+ API must at least implement **change streams** and **index collation**. Both
52
+ are required, and neither wire compatibility nor having both proves that the
53
+ service can run the kernel. DocumentDB is not
54
+ supported: its open-source build lacks both, and the managed Azure DocumentDB
55
+ service is untested. Prove any service on a non-production endpoint before
56
+ choosing it.
57
+
58
+ With MongoDB storage the kernel probes both features once at startup:
59
+
60
+ | Probe outcome | Kernel behaviour |
61
+ | --- | --- |
62
+ | The service answers that a feature is not supported | Startup stops with a message naming the missing features |
63
+ | The probe fails for permissions, connectivity, a timeout or a standalone server | A warning, and startup continues. That is not a pass; a standalone server still cannot run the kernel |
64
+
65
+ - With `storage.schemaMode` `Migrate`, the collation probe creates and drops
66
+ a temporary collection in the System database, named
67
+ `chronicle_capability_probe_` followed by a generated identifier. When
68
+ cleanup fails the kernel warns. A later probe removes leftovers more than a
69
+ day old by itself. Do not drop collections on the prefix alone: another
70
+ kernel starting against the same database may be using one right now. Drop
71
+ one by hand only after confirming it is stale, with no kernel starting.
72
+ - With `Verify`, the probe only reads. A service can accept collation on a
73
+ read and reject it when creating an index, so a passing probe does not prove
74
+ index collation.
75
+
46
76
  ## Resolve connections per tenant
47
77
 
48
78
  Use `storage.connectionResolution` only when a platform decides where each
@@ -189,7 +219,7 @@ MongoDB drops the namespace database; SQL and in-memory providers retain namespa
189
219
 
190
220
  ## Choose cluster membership
191
221
 
192
- For multiple active nodes, use `clustering.type: Sql` with PostgreSQL or SQL Server, or `MongoDB` with MongoDB storage. Share the cluster database, `clusterId`, `serviceId` and compatible certificates across nodes. Make silo ports reachable between nodes and enabled gateway ports reachable by trusted Orleans clients. `Sql` with SQLite or non-SQL storage fails at startup; sharing a database under `Localhost` does not form a cluster.
222
+ For multiple active nodes, use `clustering.type: Sql` with PostgreSQL or SQL Server, or `MongoDB` with MongoDB storage. Share the cluster database, `clusterId`, `serviceId` and compatible certificates across nodes. Make silo ports reachable between nodes only; applications connect on the client port, never through the gateway. `Sql` with SQLite or non-SQL storage fails at startup; sharing a database under `Localhost` does not form a cluster.
193
223
 
194
224
  ## Separate SQL schema and runtime identities
195
225
 
@@ -215,3 +245,63 @@ The environment form is `Cratis__Chronicle__Compliance__Encryption__Storage__Typ
215
245
  Set `compliance.encryption.migrateFromDefaultStorage` before enabling the dedicated store. Chronicle then serves existing keys from the default store if necessary and migrates them on read. Without it, empty released fields can look like successful erasure. In an isolated rehearsal, release a synthetic subject before and after the switch and confirm it still decrypts. Then erase that subject and confirm release withholds the protected value. Keep the fallback until you verify that the dedicated store holds every key, including those for subjects never read during the rollout. Retiring the old store is a separate cleanup decision.
216
246
 
217
247
  For Azure Key Vault, grant the Chronicle identity purge permission and use a vault without purge protection. Every key revision must be purged, not just soft-deleted. Treat a refused or incomplete purge as unfinished erasure.
248
+
249
+ ## Upgrade keys stored under earlier names
250
+
251
+ Applies only when the compliance key store is HashiCorp Vault or Azure Key
252
+ Vault. An earlier kernel release may have stored a key under a name the
253
+ current release does not use. Where such a name cannot be tied to one
254
+ address, the kernel refuses to read, create, save or rotate that key rather
255
+ than guess, and logs a count of such keys at startup. Such a name does not
256
+ by itself stop an erasure from being recorded; a key store whose layout
257
+ conflicts or cannot be verified does.
258
+
259
+ Run the kernel image with one of these options instead of starting it. Each
260
+ prints counts only, never names or key material, and exits.
261
+
262
+ | Option | Does | Exit codes |
263
+ | --- | --- | --- |
264
+ | `--verify-encryption-keys` | Counts what is stored under earlier names; changes nothing | `0` nothing under earlier names still needs the upgrade (originals already copied, verified and kept may remain), `2` keys, erasure records or entries that cannot be tied to one address still need attention, `4` the key store could not be inspected, or its layout conflicts or could not be verified |
265
+ | `--migrate-encryption-keys` | Copies those keys to their current names, verifies each copy, and keeps the originals | `0` everything copied and verified, `2` entries left for review, `4` layout conflict and nothing done, `5` a copy failed or the run stopped (run it again), `6` another migration holds the lock |
266
+ | `--migrate-encryption-keys --dry-run` | Counts what would be copied; writes nothing | `2` when something would be copied |
267
+ | `--migrate-encryption-keys --remove-migrated-legacy-keys` | Also removes originals whose copies are verified; removes nothing when any copy failed or conflicts | as for the migration |
268
+
269
+ `--dry-run` and `--remove-migrated-legacy-keys` cannot be combined with each
270
+ other, and none of these options combine with the schema options.
271
+
272
+ 1. Prove the run on a restored copy of the key store first.
273
+ 2. Stop every kernel node, of every release, and every other writer of keys
274
+ or erasures. The migration is not safe against concurrent writers.
275
+ 3. Run `--verify-encryption-keys`; exit `2` means there is work to do.
276
+ 4. Run the dry run, then `--migrate-encryption-keys`. The migration is safe
277
+ to run again and resumes where it stopped.
278
+ 5. Start the nodes only after `--verify-encryption-keys` exits `0`.
279
+ 6. Keeping the originals preserves the keys as they were before the
280
+ migration, nothing more. Keys and erasures written afterwards exist only
281
+ under the current names, so do not treat the originals as a way back to an
282
+ earlier release once the nodes have written again.
283
+ 7. To remove them later, stop every node and every other writer of keys or
284
+ erasures again, run the migration with `--remove-migrated-legacy-keys`,
285
+ and start the nodes only after `--verify-encryption-keys` exits `0`.
286
+ Removal is never safe while anything writes.
287
+
288
+ - **Azure Key Vault:** earlier names do not reveal their event store and
289
+ namespace. List each affected pair, spelled exactly, under
290
+ `compliance.encryption.legacyKeyScopes` (`eventStore`, `namespace`).
291
+ Entries outside the listed scopes are reported as unresolved and left
292
+ alone. Removal deletes the earlier secrets and purges them when the vault
293
+ allows it; without purge permission, or with purge protection, they stay
294
+ recoverable and the report counts them. Deleted is not purged.
295
+ - **HashiCorp Vault:** a migration that crashes leaves its lock behind and
296
+ the next run exits `6`. Confirm that no migration is running before removing
297
+ the lock.
298
+ - `compliance.encryption.legacyKeyHandling`: `Warn` (default) logs the counts
299
+ and starts while keys still need the upgrade. `Refuse` inspects the whole
300
+ key store at every start, which is slower on a large one, and exits with
301
+ code 2 while a key still needs the upgrade. Under either value a start
302
+ exits with code 4 when the key store cannot be inspected or its layout
303
+ conflicts or cannot be verified.
304
+ - Removing an original is not erasure of a person's key. HashiCorp Vault
305
+ soft-deletes only the version that was copied. Azure Key Vault deletes the
306
+ secret and purges it when the vault allows; the report counts the ones the
307
+ vault still holds as recoverable.
@@ -51,6 +51,15 @@ path on a copy of production data, not on an empty database.
51
51
 
52
52
  - Crossing 10 → 11 leaves in-flight job state unreliable. Let jobs whose
53
53
  completion matters finish first.
54
+ - A major can break the .NET client's binary interface while changing
55
+ nothing on the wire or in storage. Rebuild every .NET assembly that
56
+ references the client against the target release, even when its source
57
+ compiles unchanged. The rebuild can be the first time Chronicle's code
58
+ analysis rules run in the build; fix what they report.
59
+ - A major can change the cluster so that the target cannot share a cluster
60
+ with the running release. Then stop every node and start them all on the
61
+ target together; never roll nodes one at a time across such a boundary.
62
+ Clients, their wire contract and stored data are unaffected by that alone.
54
63
  - Do not land on 14.0.0 or 17.0.0. If your target is major 14 or 17, use
55
64
  14.0.1 or 17.0.1; they are not stops you must make on the way past.
56
65
  - Compatibility runs one way and only within a major: the release gate checks
@@ -30,6 +30,18 @@ Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Nod
30
30
  - **Combine:** join ordered source properties with a separator into one target; prove a split in the other direction preserves the required meaning.
31
31
  - **Directional value map:** translate serialized values with ordered source/target pairs. First match wins; unmapped values pass through. Missing source is not explicit null.
32
32
  - **Bidirectional value map:** declare previous/current pairs once when reversing the same table is correct; many-to-one matches cannot restore the original distinction.
33
+ - **Enum members:** registration compares the values an enum declares in the schema, never the member names. Adding a value or renaming a member is accepted in the existing generation; so is removing a name whose value stays declared, such as an alias. Acceptance says nothing about deployed readers: a reader built before the change can fail on a value or name it does not know (the JVM client's decoder throws on an unknown ordinal or name). Test new values and renamed labels against the deployed readers before emitting them; when readers cannot be upgraded first, add a generation with a truthful downcast instead. Dropping a value the stored schema declares is breaking: add a generation, with a value map when the stored value must become another one. Changing which value a member has changes what stored events mean: add a generation with a value map. Only the set of values is compared, so a change that keeps or grows the set is accepted even when stored events silently change meaning. Where the schema carries the numbers you declare (C#), give every member an explicit number and never reuse one; with implicit numbers never reorder members or insert one between existing ones. Where the schema carries the declaration position (the JVM client uses the ordinal, whatever constructor values say), explicit values do not help: append new constants and never reorder, insert among or remove existing ones. In other SDKs inspect the submitted schema before relying on either rule. A non-nullable enum property added in place to an existing generation reads in .NET as the type default `0` for older events, even when no member is `0`. Prefer a new generation whose upcast supplies a truthful default; define a `0` member only when "unknown" is true of those events; a nullable property is the deliberate CHR0012 opt-in described in `references/csharp.md`, not the default path.
34
+ - **Why registration accepted or rejected a changed generation:** the kernel compares each submitted generation with the stored schema of the same generation; a generation that is not stored yet is not compared. The read-only check reports the worst class among the compared generations, so a registration that adds a new generation beside an unchanged one reports identical and still adds that generation. A rejection for an incomplete migration chain, an invalid migration property or an unreadable registration carries no class.
35
+
36
+ | Class | Difference from the stored schema | Outcome |
37
+ | --- | --- | --- |
38
+ | Identical | None, or annotation keywords only, such as titles and descriptions | Accepted; no change to the compared schemas |
39
+ | Tolerated | A `?` marker on a `format` (not a change of the JSON `type`), a full declaration for a property the other side declared with only a default (the default must stay the same and the declaration must include a `type`; a constraint keyword outside the supported set makes it breaking), protection metadata added or its free-text details changed, enum values added or enum names changed | Accepted in every store |
40
+ | Additive | Properties that older payloads can omit were added (not required, or required with a `type` that includes `"null"`; a `?` on the `format` alone does not qualify; also inside existing objects); the rest differs by tolerated differences at most | Accepted in place when both the stored and the submitted event type are client-owned and the event store is not listed in the kernel's `strictEventTypeSchemaEventStores`; otherwise it needs a new generation |
41
+ | Subset | The submitted schema lacks properties the stored one has and old payloads could omit (optional, nullable, or required with a stored default): an older application version, or a property deleted from the type | Accepted under the same conditions as additive; the stored schema keeps those properties, so deleting a property from the type does not remove it |
42
+ | Breaking | Anything else: a property renamed or retyped, a required non-nullable property added, protection metadata removed or changed, an enum value removed | Rejected; add a generation with a migration |
43
+
44
+ The class describes the schemas, not the decision: an additive change is still reported as additive in a strict store that rejects it. An accepted additive change replaces the registered schema and is recorded as an `EventTypeSchemaEvolved` system event and a kernel log entry; it creates no generation, rewrites no stored event and starts no backfill. Adding protection to an existing property is accepted but does not protect events already stored. The release gate prints accepted or rejected, not the class; a rejection shows its path and keyword only when the kernel supplies them, and any returned rejection fails the check; it is undetermined when nothing was rejected but the kernel did not answer for every event type. The strict list is described in `cratis-chronicle-deploy-kernel` (`references/kernel-options.md`).
33
45
  - **Generation validation:** enable additional registration checks where available to catch incomplete chains; also test mapping semantics against fixtures.
34
46
  - **Generation delivery:** compatibility delivery (the default) is not a pin: a reader gets the appended generation live and the highest stored one on replay. Request pinned delivery when a reader needs one declared generation per event type. Pin scopes are separate opt-ins: client-wide for reactors, reducers and typed materialized projections; per observer; per event-store subscription; per webhook. The client-wide setting does not pin subscriptions, webhooks, or immediate, passive or wildcard projections. Upgrade every kernel node before opting in.
35
47
  - **Pinned delivery behaviour:** live, catch-up, replay and retry all deliver the pinned generation. One reader pins one generation per event type; registration rejects conflicting or unregistered pins. A typed projection pins per clause, including joins, children, keys and removals. If the pinned representation is not stored, delivery migrates it for that delivery only, without storing a copy or supplying a durable hash. An unregistered or unreachable pin fails with `PinnedEventTypeGenerationUnavailable` rather than substituting another shape. Changing a pin or delivery mode does not trigger replay; request one when prior state must be rebuilt.
@@ -35,11 +35,21 @@ For authorized recovery, use the client reference if it covers the operation; ot
35
35
  - **Registration wait**, on the process that registers the observer, tells whether its definitions reached the server; it does not show that the observer is subscribed or caught up.
36
36
  - **Append-completion wait**, for a write already accepted, asks the server to wait within a time budget until observers on the write's sequence reach its position or record a failed partition. The SDKs differ in what it needs (the original append result or a known accepted position), whether it narrows to the appended event types, and whether a timeout returns outstanding observers or only an error: check Append-completion wait in your language reference before relying on it. Success is also reported when no observer matches, so it proves neither registration nor handling by the expected observer; a reported failed partition can predate this write; a timeout without a recorded failure is inconclusive. Never append again to obtain a result.
37
37
  - **Webhook definitions** show a webhook's sequence, event types, active flag and replay policy; they are store-wide definitions, not live subscriptions or delivery evidence.
38
- - **Job list, individual job and steps** distinguish an actual catch-up or rebuild from a recommendation; a missing job is not proof of completion. The job's type names the operation: `CatchUpObserver` (an observer behind its sequence catching up), `ReplayObserver` (a full rebuild), `ReplayObserverPartition` (one partition rebuilt) and `RetryFailedPartition` (a failed partition retried). Jobs are scoped to an event store and namespace. Read status together with progress (total, successful, failed and stopped steps): a job has concluded only as `CompletedSuccessfully`, `CompletedWithFailures` or `Failed`, and the second still needs investigation; `Stopped` is paused and can be resumed.
38
+ - **Job list, individual job and steps** distinguish an actual catch-up or rebuild from a recommendation; a missing job is not proof of completion. The job's type names the operation: `CatchUpObserver` (an observer behind its sequence catching up), `ReplayObserver` (a full rebuild), `ReplayObserverPartition` (one partition rebuilt) and `RetryFailedPartition` (a failed partition retried). `CatchUpObserverPartition` catches up one partition that is behind, and `ObserverOperatorCommandJob` hands an operator's command (retry, replay, fast-forward, quarantine clearance) to the observer. For a full replay it stays open until the replay job is no longer outstanding, which still does not show that the replay succeeded: read the `ReplayObserver` job. For the other commands only its successful completion means the observer took the command, not that the work it started is done; a job that concluded with failures or failed does not show the command was taken. The other types are not observer work: `ReindexConstraints` (a constraint index rebuild), `BackfillEventTypeGenerations` and `MigrateExistingEventsForType` (stored events brought in line with a changed event type), `CopyEventSourceEvents` (one event source's events copied to another in the same sequence) and `ImportEvents` (an import validated and committed). Jobs are scoped to an event store and namespace. Read status together with progress (total, successful, failed and stopped steps): a job has concluded only as `CompletedSuccessfully`, `CompletedWithFailures` or `Failed`, and the second still needs investigation; `Stopped` is paused and can be resumed.
39
39
  - **Open alert incidents**, where the SDK or the kernel's query API offers them, show what the kernel currently holds open for an observer: conditions such as a partition that keeps failing (`partition-failing`), one whose retries are exhausted (`partition-retries-exhausted`) or a quarantined observer (`observer-quarantined`), each with a severity. Always name the affected event store. Read the view's status first: only `Ready` makes an empty result mean no open incidents; `CatchingUp` and `Degraded` results can be partial or stale. Incidents describe current state, not a history of every failure, and the kernel sends no notification itself.
40
40
  - **Workbench** provides the read-only alternative: select the store and namespace, inspect Observers and Failed partitions, then correlate the position in Sequences. From a terminal, `cratis-chronicle-cli-operations` covers the same reads (`failed-partitions list` and `failed-partitions show`); through an MCP connection, `cratis-chronicle-mcp-inspection` does (`list_observers`, `diagnose_observer`).
41
41
  - **Local attempt summary**: with Node available, run `node scripts/summarize-failure.mjs <attempts.json>` from the skill directory on a JSON array of attempts with `sequenceNumber` and `kind`; use the emitted position/category pairs only on success.
42
42
 
43
+ ## Retry budget and quarantine
44
+
45
+ Default: Chronicle retries a failed partition on its own, backing off exponentially between attempts. When the attempt limit is used up it quarantines **that partition**: its automatic retries stop. Live delivery can continue for other partitions, but a new failure during a projection's catch-up stops that catch-up, which runs as one ordered step. The limit is 10 retries unless the kernel configures another, globally or for one observer: for a partition stuck on one event, the eleventh failure quarantines it. `0` removes only this cap; other quarantine causes still apply. Option names and defaults are in `cratis-chronicle-deploy-kernel`, `references/kernel-options.md`. Webhook delivery has its own retry settings.
46
+
47
+ - **The limit counts per retry budget.** An attempt that fails at a later event than the previous one made progress and starts a new budget; so does clearing the partition's quarantine. A partition that keeps advancing therefore does not use up the limit, however many failures it records, though it can still be quarantined for another reason; one stuck on the same event uses the limit up, unless the limit is `0`. Raising the limit does not get a partition past an event its handler cannot process: fix the handler.
48
+ - **Attempt history outlives a budget.** Starting a new budget keeps earlier attempts, so the number of recorded attempts can exceed the limit without the partition being quarantined. The history is not complete, though: once enough attempts from earlier budgets have built up, the oldest are trimmed. Judge by the quarantine flag and by whether the attempt positions move.
49
+ - **Many failed partitions do not stop the observer by default, webhooks excepted.** For reactors, reducers and projections, observer-level quarantine by number or share of failed partitions happens only when the kernel configures a threshold; both are off unless set. Where a threshold is set, a partition whose last attempt is a timeout does not count toward it. Never assume this safety net exists: read the failed partitions. Webhooks have thresholds by default (5 partitions, or half of the partitions with a failure record) and count quarantined partitions, timeouts included. That share is measured against the partitions currently failed plus the resolved ones the kernel still retains, not every partition delivered to, so a single quarantined partition can trip it even after many healthy deliveries.
50
+ - **Observer quarantine and partition quarantine are separate fences.** Clearing one does not clear the other.
51
+ - **Edge case, unknown recovery position:** a quarantined partition whose failure explanation says it has no recovery position (left when the kernel refuses a partition replay job stored by an older kernel) must not simply be cleared. Keep it quarantined while an operator reconciles the stored model with the event history and establishes a safe position; neither zero nor the observer's shared position is a safe guess. Clearing quarantine neither repairs the model nor chooses a position.
52
+
43
53
  ## When the definition changed
44
54
 
45
55
  Compare the deployed definition to the stored one before interpreting old read models. For projections and reducers, `observers.definitionEvolution` determines what happens to history:
@@ -69,7 +69,7 @@ A returned record is usually unresolved; if `IsResolved` is true, treat it as re
69
69
 
70
70
  ## Append-completion wait
71
71
 
72
- Only the original accepted append result can wait: `var completion = await result.WaitForCompletion();` (`Cratis.Chronicle.Observation`) waits for observers of the appended event types. Inspect `IsSuccess`, `TimedOut`, `OutstandingObservers` and `FailedPartitions`; timeout with no recorded failure is inconclusive. Both completion and registration waits accept a `TimeSpan`; the default is five seconds unless overridden by `CHRONICLE_TEST_TIMEOUT_SECONDS`, or infinite with a debugger attached.
72
+ Only the original accepted append result can wait: `var completion = await result.WaitForCompletion();` (`Cratis.Chronicle.Observation`) waits for the observers that handle the appended event types and the observers subscribed to all events, reactors included, each through the last event in the append that it handles. An observer whose tag, event source type or event stream type filters exclude the whole append does not hold the wait, but only when the server can verify that: the observer is subscribed and the append covers a bounded range. Otherwise, as for a disconnected observer or an append range it cannot bound, the server waits through the last appended event of the observer's event types even if its filters exclude that event, so a filtered observer can hold the wait until the timeout. A kernel-owned reactor that is not subscribed in the namespace is skipped, not waited for. The wait lasts until the slowest of those observers has caught up or the time budget runs out: a reactor making a slow external call delays the caller. An observer with a failed partition is not waited for; its failure is returned without it catching up. Inspect `IsSuccess`, `TimedOut`, `OutstandingObservers` and `FailedPartitions`; timeout with no recorded failure is inconclusive. Both completion and registration waits accept a `TimeSpan`; the default is five seconds unless overridden by `CHRONICLE_TEST_TIMEOUT_SECONDS`, or infinite with a debugger attached.
73
73
 
74
74
  ## Check a reported replay or catch-up
75
75
 
@@ -33,7 +33,7 @@ A read model has exactly one builder: one projection or one reducer.
33
33
  - **Persisted (default).** Instances are materialized in a sink: the document sink (MongoDB) by default, the graph sink (Neo4j) for graphs. SQL and other named sinks are set up on the kernel; a read model opts in where its SDK allows.
34
34
  - **Passive.** No sink. Each read replays the stream whose event source id equals the requested key. The result therefore reflects revisions, redactions and erased personal data. Never combine passive with a redirected key, a join or events from other sources: a source-local fold can miss the creation or return partial state. A passive read is not a protected command decision.
35
35
  - **Input is chosen by event type.** A projection receives every event of the types its mappings name, from every event source in its one selected sequence (the event log unless the SDK infers or you pick another; see your language reference); each event lands on the instance its key selects. Tags, event source type and stream type on an append do not narrow it: use a reducer or reactor when only a subset may count. Several event types can feed one model; a property an event does not carry is left unchanged.
36
- - **Replay rebuilds from history.** The view is rebuilt by handling the sequence again from the start, so it is incomplete until the replay finishes. Replay does not undo anything outside the sink.
36
+ - **Replay rebuilds from history.** The sequence is handled again from the start; the rebuilt state is incomplete until the replay finishes. Replay does not undo anything outside the sink.
37
37
  - **Identity.** The projection id is a deployed identity. Keep the previous id when renaming or moving a type; a new id is a new projection.
38
38
  - **Registration.** Clients with automatic registration submit definitions on connect. A full set retires omitted projections only for the same owner and registrant, leaving sink data intact; a partial set retires none. Check for per-projection failures and verify catch-up separately.
39
39
  - **Version guard.** Chronicle stores each definition with the registering client's software version and compares by semantic-version precedence. A registration older than the stored one is ignored (warning logged, Workbench recommendation); an equal, missing or unparseable version replaces it, so identical versions give no protection. A version change never replays. Roll back by redeploying the old code under a higher version. Only the .NET client sends a version today (see its reference); other SDKs always replace.
@@ -7,6 +7,7 @@
7
7
  - Keys
8
8
  - Property operations
9
9
  - Dictionary entries
10
+ - Base event types
10
11
  - Joins
11
12
  - Children
12
13
  - Nested objects
@@ -49,7 +50,7 @@ Methods on `IProjectionBuilderFor<T>` (root only):
49
50
  | Method | Effect |
50
51
  |---|---|
51
52
  | `FromEventSequence(id)` | Read another event sequence than the event log. |
52
- | `ContainerName(name)` | Store under this collection or table name instead of the naming-policy default. |
53
+ | `ContainerName(name)` | Store under this collection or table name instead of the naming-policy default. Every projection of the read model must use the same name. Arc's injected `IMongoCollection<T>` and `IMongoDatabase.GetCollection<T>()` still resolve the naming-policy default: get the collection by the explicit name (`database.GetCollection<T>("name")`) or read through `IReadModels`. |
53
54
  | `Passive()` | Compute on read; store nothing. Only the stream whose event source id is the requested key is read, so never combine it with `UsingKey` or events from other sources. |
54
55
  | `NotRewindable()` | Marks the definition non-rewindable; does not block observer replay. |
55
56
  | `VariantOf<TIdentity>(m => m.Id)`, `EntersOn<TEvent>()` | Declare a variant; see [Variants](#variants). |
@@ -58,7 +59,7 @@ Methods available at root, in `Children` and in `Nested`:
58
59
 
59
60
  | Method | Effect |
60
61
  |---|---|
61
- | `From<TEvent>(...)` | Create or update from an event. |
62
+ | `From<TEvent>(...)` | Create or update from an event. `TEvent` can be a base type or interface; see [base event types](#base-event-types). |
62
63
  | `Join<TEvent>(...)` | Enrich from an event of another source. |
63
64
  | `FromEvery(...)`, `FromAll(...)` | Map on every handled event, or on all events in the sequence. |
64
65
  | `RemovedWith<TEvent>(...)` | Remove the instance or child. |
@@ -145,14 +146,24 @@ public class ProductSalesProjection : IProjectionFor<ProductSales>
145
146
  - A key from event context or the causing identity is not checked, and a `.` in it nests the value. Key by `CausedBy.Subject`, not by a user name or email.
146
147
  - An event property the event type does not have fails at registration.
147
148
 
149
+ ## Base event types
150
+
151
+ `From<TBase>()` accepts a base type or an interface and registers every known event type assignable to it, each with the same mappings, key and parent key. It works at the root, in `Children` and in `Nested`.
152
+
153
+ - Add `From<TConcrete>()` for an exception. The two are combined: the concrete registration wins on conflicting properties and supplies the key and parent key, whatever the call order.
154
+ - Event types not assignable to `TBase` are not included; mapping every event type in the sequence is `FromAll`.
155
+
148
156
  ## Joins
149
157
 
150
158
  ```csharp
151
159
  .Join<CustomerRegistered>(j => j
152
160
  .On(m => m.CustomerId)
153
- .Set(m => m.CustomerName).To(e => e.Name))
161
+ .Set(m => m.CustomerName).To(e => e.Name)
162
+ .Set(m => m.CustomerSince).ToEventContextProperty(c => c.Occurred))
154
163
  ```
155
164
 
165
+ A join maps the joined event's payload and, with `ToEventContextProperty`, its context, such as when the joined fact occurred.
166
+
156
167
  `On` names the read-model member holding the match value; live joins match the joined event’s source ID by default, or its explicit `UsingKey` value; a root join falls back to the source ID when that value is null. `On` does not rename anything: map each differently named property with `Set`. A join-only event updates existing instances and never creates a root; an independent keyed `From` for the same event can create one. In a child scope, `children.Join<TEvent>()` joins on the child’s `IdentifiedBy` member and takes the same property operations; it has no `On`. Call `IdentifiedBy` before `Join`; otherwise building the projection throws `MissingIdentifiedByPropertyExpressionWhenJoiningWithEvent` at startup.
157
168
 
158
169
  Root backfill looks up earlier joined events by source ID, not by `UsingKey`. Use source IDs for joins that must work in either event order. If the explicit key differs, create the root with its match value before appending the joined event. Backfill runs after local mappings and can overwrite them, so give each field one owner.
@@ -230,3 +230,6 @@ public record OrderStageShared([property: SetFrom<ReferenceChanged>] string Refe
230
230
  ## Not supported as attributes
231
231
 
232
232
  Use the fluent builder for: dictionary entries keyed by event data, a composite key on the root instance, keys taken from event context on `FromEvent`, a child taken from an object on the event (`FromEventProperty`, `AddChild`), initial values, a container name, and excluding children from an every-event mapping.
233
+
234
+ - `[Join<TEvent>]` on a member takes a payload property of the joined event, and `[SetFromContext<TEvent>]` maps the context of a local event, not of a joined one. For the joined event's context, such as when it occurred, use a fluent join.
235
+ - Attributes bind to the type, not to each use of it. One type used for two members (a billing and a shipping address) cannot map differently per member: use separate fluent `Nested` scopes.
@@ -54,7 +54,8 @@ using var subscription = eventStore.ReadModels
54
54
  });
55
55
  ```
56
56
 
57
- - `Watch<T>()` emits a `ReadModelChangeset<T>` per change (`ModelKey`, `ReadModel`, `Removed`, `ChangeType`).
57
+ - `Watch<T>()` emits a `ReadModelChangeset<T>` per change: `Namespace`, `ModelKey`, `ReadModel`, `Removed`, `ChangeType` (`Added`, `Modified`, `Removed`) and `ChangeContext`. `ChangeContext` is an `EventContext` built for the change, not the context of the causing event: it holds the model key as event source id together with the sequence number, correlation id and time of the causing event, and its event type and other identity fields are defaults. A changeset carries no previous state: keep the last value per key to compare. A read model from an active reducer reports changes the same way, including `Added`; for a passive reducer every non-removal is `Modified` and `ChangeContext` holds only the model key.
58
+ - When `RemovedWithJoin` removes a child from several parents, the change for an affected parent carries its full state after the removal, with `ChangeType` `Modified` and `Removed` false. There is no per-child change, and changes are grouped per parent: several removals handled together give at most one change for that parent. A parent that no longer exists gives none, and neither does a parent whose root has not been initialised yet, unless the projection only maps children.
58
59
  - `Observe<T>(filter)` emits the whole collection on each change; the filter runs in the client and does not page on the server.
59
60
  - `Materialized.ObserveInstances<T>(skip, take)` emits one stored page on each change.
60
61
  - Subscribe before appending and keep the subscription for as long as the consumer needs updates.
@@ -94,7 +95,7 @@ Check `result.IsSuccess` before waiting and `completion.IsSuccess` before queryi
94
95
 
95
96
  | Call on `IProjections` | Effect |
96
97
  |---|---|
97
- | `Replay<TProjection>()`, `Replay(projectionId)` | Rebuild from the start of the sequence; returns a job id. |
98
+ | `Replay<TProjection>()`, `Replay(projectionId)` | Rebuild from the start of the sequence; returns a job id. Call it from code for automation; an operator-driven replay goes through the CLI (`cratis-chronicle-cli-operations`) or the Workbench. |
98
99
  | `FastForward<TProjection>()`, `FastForward(projectionId)` | Skip the unhandled backlog and discard failed partitions. Nothing is repaired; use only to abandon that backlog. |
99
100
  | `GetStateFor<TProjection>()`, `GetStateForModel<TReadModel>()` | `ProjectionState`: running state, subscribed, next, last handled and tail sequence numbers. |
100
101
  | `GetFailedPartitionsFor<TProjection>()`, `GetFailedPartitionsForModel<TReadModel>()` | Partitions that stopped on a failing event. |
@@ -2,11 +2,13 @@
2
2
 
3
3
  ## Contents
4
4
 
5
+ - Designing the read model
5
6
  - Default path
6
7
  - Common mistakes
7
8
  - Definition diagnostics
8
9
  - Projection-level options
9
10
  - Registration and identity
11
+ - Reads during a replay
10
12
  - Indexes
11
13
  - Choose a sink
12
14
  - Not supported in this SDK
@@ -14,6 +16,16 @@
14
16
 
15
17
  Names in every example (`Order`, `OrderPlaced`, `LineAdded`, `CustomerRegistered`) are illustrative; use the application's own domain language and its own value types instead of the primitives shown.
16
18
 
19
+ ## Designing the read model
20
+
21
+ Design the read model from the read it serves, before choosing attributes or the fluent builder.
22
+
23
+ - **One read model per read task.** A list gets a flat row per item, a detail view one document with its children embedded, a dashboard pre-aggregated values. Build them as separate read models from the same events. Share one read model only when its consumers need the same fields and the same freshness.
24
+ - **One read model per screen that needs facts to agree.** Projections advance independently, so two stored read models need not reflect the same position in the event sequence. Do not combine two of them in a query and assume they agree: project one read model that carries everything the screen needs.
25
+ - **No normalising in a constructor or property initializer.** A read through `IReadModels` and a read through the storage driver (`IMongoCollection<T>`) do not construct the type the same way, and the stored value can replace an initializer's result. Put defaults in the projection (`[SetValue]`, `WithInitialValues`) and validate before the event is appended.
26
+ - **A missing child collection.** Creating the root never writes a child collection: the field is absent until the first child is added, and holds `[]` after the last child is removed. When no value is stored, `IReadModels` returns an empty collection for a non-nullable member of a supported collection type and null for a nullable one; a stored `[]` is returned as `[]` for both. Strings, dictionaries and custom collection types the reader cannot construct are not filled. Declare the member non-nullable unless "never had children" must differ from "now empty". Arc's MongoDB conventions give a supported non-nullable collection on a `[ReadModel]` type read through `IMongoCollection<T>` the same empty collection, unless the type opts out of that convention or the member declares its own default; a filter that runs in the sink must still match both the absent field and `[]`.
27
+ - **A type used only as a child or nested object has no lookup of its own.** It is part of its parent's document. Read the parent and select the child, or declare a separate read model.
28
+
17
29
  ## Default path
18
30
 
19
31
  Reference `Cratis.Chronicle` in the server project and connect the host to the intended event store and namespace. Keep the event and model types visible to discovery.
@@ -69,12 +81,16 @@ Read it with `IReadModels` (`eventStore.ReadModels`): `GetInstanceById<Order>(or
69
81
  | No AutoMap | `[NoAutoMap]` on the type, or on one member | `.NoAutoMap()`; `.AutoMap()` re-enables it in a nested scope |
70
82
  | Leave a member to the query that serves the model | `[NotProjected]` on the member | not applicable: do not map it |
71
83
 
84
+ **Source sequence.** Without an explicit sequence a projection reads the event log, unless its source event types carry `[EventStore]`. A model-bound read model then reads the named store's inbox, or stays on the event log when the named store is the client's own. A fluent projection reads the named store's inbox in every case, also when it is the client's own store: set its sequence explicitly to keep it on the event log. An explicit sequence turns the inference off: `[EventLog]` (`Cratis.Chronicle.EventSequences`) on a model-bound read model selects the event log, and `[EventSequence]` or `FromEventSequence` selects the named sequence. While the sequence is inferred, source event types naming more than one event store are rejected with `MultipleEventStoresDefined`; with an explicit sequence that check does not run.
85
+
72
86
  Label a projection or read model with `[Cratis.Chronicle.Tag("shipping")]` or `[Cratis.Chronicle.Tags("shipping", "operations")]` for discovery, not event filtering.
73
87
 
74
88
  For an active typed projection that must handle a specific event generation, set `options.EventGenerationDelivery = Cratis.Chronicle.Observation.EventGenerationDelivery.Pinned` in the client options and map the CLR event type for that generation. All clauses must agree on one generation per event type. Compatibility delivery is the default; passive and wildcard definitions retain it.
75
89
 
76
90
  A passive read replays only the stream whose event source id equals the requested key. Do not combine `[Passive]` with `key:`, `UsingKey`, joins or events from other sources: the read returns a default-initialised model while registration and specs still pass. Materialise such a view instead. `[Passive]` alone does not make a type a projection; it needs at least one mapping attribute. `[Projection(eventSequence: ...)]` configures fluent projections only; a model-bound read model uses `[EventSequence]`. `[Passive]` together with `[Sink]` is an analyzer error, because a passive read model has no sink.
77
91
 
92
+ Chronicle has no synchronous projection: an append does not wait for a stored read model to be updated, so a read made right after it may still return the earlier state, and "immediate projection" means a passive read, computed from events at read time. To decide how a caller reads its own write, see `references/eventual-consistency.md` in `cratis-platform-deliver-slice`.
93
+
78
94
  ## Registration and identity
79
95
 
80
96
  - Automatic discovery submits model-bound read models and `IProjectionFor<T>` definitions on connect. A full set retires omitted projections owned by that application without deleting sink data; runtime registration and discovery batches with local build failures are partial and retire nothing.
@@ -85,6 +101,12 @@ A passive read replays only the stream whose event source id equals the requeste
85
101
  - Release version: the client registers projections under `ChronicleOptions.SoftwareVersion`, which the version guard compares. It defaults to the entry assembly's informational version, so stamp each release with a real `<Version>` in the build. A project that never sets one reports `1.0.0`, which gives no protection, and the client logs a startup warning. To override, set `options.SoftwareVersion` in code or, when registered with `AddCratisChronicle`, the configuration key `Cratis:Chronicle:SoftwareVersion`, or the environment variable `Cratis__Chronicle__SoftwareVersion`. Pre-release versions sort before their release (`2.4.0-rc.1` < `2.4.0`).
86
102
  - Check `eventStore.Registration.IsSuccess` and `IsRegistering` before relying on startup registration. Inspect `Failures` for artifacts that did not register and `Failure` for an error that stopped the run. One failed definition does not roll back successful ones; fix local build failures before retrying.
87
103
 
104
+ - A read model's container name is fixed once it is registered. A registration that gives the same read model another container name, also one differing only in case, is refused, and none of the read models in that registration are changed. The usual cause is a client with a different naming policy: use one naming policy and one container mapping in every client of an event store. To move a read model on purpose, coordinate every client and direct reader, update its definition explicitly (saving the read model in the Workbench does this), deploy matching clients, then rebuild. The explicit update changes routing only; it moves no data.
105
+
106
+ ## Reads during a replay
107
+
108
+ On the MongoDB, SQL and in-memory sinks a replay rebuilds a materialized read model in a shadow container and promotes it when the replay completes. Until promotion a read by key returns the state from before the replay, and a key that exists only in the rebuilt state reads as missing. The rebuilt state becomes visible for all keys at promotion. Do not treat missing or older data during a replay as a failure; check the projection's state (see [reading and operating](csharp-reading.md)). On MongoDB a read that overlaps the promotion itself can still succeed. When it cannot tell a missing key from a replaced container, it is retried a few times, and only if the promotion still prevents a reliable answer does it fail with an error instead of reporting the instance as missing: retry it after the promotion. A projection that publishes to an event sequence has no shadow container: events it publishes during a replay are readable at once.
109
+
88
110
  ## Indexes
89
111
 
90
112
  ```csharp
@@ -133,6 +155,7 @@ Read the notices from the outbox. For a different destination put `[Cratis.Chron
133
155
  - Filtering projection input by event metadata (`[FilterEventsByTag]` is for reactors and reducers) — select declared event types, or give the filtered subset its own producer.
134
156
  - Event-target preview or enumeration as documents — consume the destination sequence instead.
135
157
  - Per-stream materialization or collection reads of a stream-scoped model — query a specific source and stream, or design a separate materialized collection.
158
+ - A global (cross-namespace) projection — a projection declared with this SDK is namespace-scoped: each namespace has its own instances, and no attribute or builder method changes that. A `Global` definition already stored in an event store writes one instance shared by all namespaces; a graph target stays in the observing namespace. On the MongoDB sink the shared instance is protected against concurrent namespaces only when the read model is keyed by the event source id and maps event properties alone (a counter, a latest value); with another key, a join, children or removal, updates can be lost and the kernel logs a warning. Neither a `Global` nor a `Both` definition can be replayed from a namespace (see Replay in `SKILL.md`). Separately, when a changed `Global` definition needs a rebuild, the kernel records a replay recommendation instead of scheduling the replay; a change that needs no rebuild gives no recommendation.
136
159
  - Model-bound equivalents of every fluent operation — use the fluent builder for the exceptions in the model-bound reference.
137
160
 
138
161
  ## Where the rest is
@@ -63,5 +63,6 @@ Use `projections: [BacklogProjection, PullRequestProjection]` for explicitly reg
63
63
  - No projection tags, pinned projection delivery, custom container, per-projection sink, index declarations or query-only field annotation: use stable IDs, compatibility delivery and client sink settings; manage indexes in the sink and enrich query DTOs outside the projection.
64
64
  - No typed projection output to an event sequence or stream-scoped passive declaration: use a reactor for intentional event emission or keep a source-keyed passive model. Stream options on a lookup do not declare a projection's stream scope.
65
65
  - No sequence-wide wildcard macro: enumerate input types. No singleton nested scope, scalar/payload child insertion or polymorphic child discriminator DSL: map identified child fields explicitly or use a reducer.
66
+ - The serialized state a reducer returns must fit within a client guard, 4 MiB by default: a reducer whose state is larger reports the reduction as failed. Configure the guard with `config :cratis_chronicle, max_payload_bytes: ...`; raise it only when the kernel accepts larger messages. A projection is materialized in the kernel and its state does not pass through this guard. A child collection that can grow without bound does not belong in one document: give each child its own read model instance.
66
67
  - No graph collection-expansion macro or typed traversal execution: feed individual relationship events and query through the graph-owning service.
67
68
  - No public fold event-count result, external batch release helper, materialized-window reactor mode or projection replay command: use the returned position for diagnostics, SDK reads for protected values, observe a page for window updates, and to replay run `cratis chronicle observers replay <observer-id>` (the observer id is the projection id; see `cratis-chronicle-cli-operations`).
@@ -46,4 +46,5 @@ For joins, counters, keys, children and variants see [Document mappings](go-mapp
46
46
  - No pinned generation delivery for projections (they use compatibility delivery). No projection event-output or per-stream model declaration: use an owning service with event-target/per-stream support, or a source-local passive model when the source alone identifies all relevant events.
47
47
  - No composite/directional index builder: request managed sink indexes for compound query plans; `WithIndexes` does not express direction.
48
48
  - No direct scalar-child/whole-event append or fluent multiplication expression: map identified child fields explicitly, supply a computed amount in the event, or use a reducer for a custom fold. For ad-hoc multiplication use PDL in a query.
49
- - No graph collection expansion builder or typed traversal execution: declare separate element events and read the graph in its database. Ordinary keyed Go reads expose optional last-handled position, not a projected-event count; use snapshots for contributing history.
49
+ - No graph read API: the client declares, validates and registers graph projections, and the kernel stores the graph. Graph views are declared but not executed. Read the graph with the graph database's own tooling.
50
+ - No graph collection expansion builder: declare separate element events. Ordinary keyed Go reads expose optional last-handled position, not a projected-event count; use snapshots for contributing history.
@@ -46,6 +46,8 @@ ReadModelsJavaBridge.observeMaterializedInstancesPublisher(models, Bin.class, 0,
46
46
 
47
47
  For a discovered materialized-change handler implement `IReadModelReactor`, e.g. `public void modified(Bin bin, ReadModelChangeset<Bin> change)`; `added` and `removed` are other handler names, and `List<Bin>` selects collection delivery. Do not use this as proof an append is visible.
48
48
 
49
+ This client has no observer-completion wait. To read a change just appended, use a `@Passive` read model, which is computed from the events on each read, or let the consumer observe the stored view (`watch`, `observeMaterializedInstances`). Never sleep for a fixed delay and assume the view has caught up.
50
+
49
51
  Inspect `FailedPartitionsJavaBridge.getFor(failedPartitions, projectionId)` when rows lag. `ObserversJavaBridge.fastForward(observers, projectionId)` **skips** backlog; it does not rebuild missed rows. For an ad hoc declaration use `ProjectionsServiceJavaBridge.query(projections, declaration)` (optional third argument: event sequence id); handle `ProjectionQueryResult.Invalid` before consuming entries. This does not install a model. Register graphs and query the graph sink instead. In text, set `automap` or `no automap` in a join’s `with` block to override its scope.
50
52
 
51
53
  ## Graphs
@@ -54,6 +54,7 @@ With `val rm = store.readModels`, use suspend reads in a coroutine:
54
54
  - `rm.materialized.getInstances(Ticket::class, skip = 50)` fetches stored rows (defaults: skip 0, take 50). `rm.materialized.observeInstances(Ticket::class).collect { page -> ... }` emits windows including the initial page; `rm.watch(Ticket::class).collect { changes -> ... }` emits changesets, not initial rows. Cancel the collecting job when done. `IReadModelReactor` handlers such as `fun modified(ticket: Ticket)` consume these changesets, not materialized page differences.
55
55
  - For externally queried records `rm.release(ticket, subject)` or `rm.releaseMany(tickets)` returns released values; authorize first.
56
56
  - `store.projections.query("from TicketOpened\n set title to subject")` previews a declaration against the event log without registering it. Supply `eventSequenceId` for another sequence. Match `ProjectionQueryResult.Projected` (`entries` JSON or `instancesOf(Ticket::class)`) vs `Invalid` (`errors` with line, column and message). Register graphs and query the graph sink instead. In text, set `automap` or `no automap` in a join’s `with` block to override its scope. Keep the declaration as the source of truth; code generation loses the override.
57
+ - This client has no observer-completion wait. To read a change just appended, use a `@Passive` read model, which is computed from the events on each read, or let the consumer observe the stored view (`rm.materialized.observeInstances`, `rm.watch`). Never sleep for a fixed delay and assume the view has caught up.
57
58
  - Inspect `store.observers.getAll()` and `store.failedPartitions.getFor("OpenTickets")` when a view lags. `store.observers.fastForward("OpenTickets")` intentionally abandons backlog; do not use it to repair a mapping.
58
59
 
59
60
  ## Definition errors
@@ -17,7 +17,7 @@ Unless noted, imports come from `@cratis/chronicle`. Names in the examples (`Ord
17
17
 
18
18
  ## Default path
19
19
 
20
- Install `@cratis/chronicle`, `@cratis/fundamentals` and `reflect-metadata` in the Node service. Import `reflect-metadata` first in the entry point. Use legacy TypeScript decorators (`experimentalDecorators` and `emitDecoratorMetadata` enabled) for the fluent class decorator examples. Export decorated artifacts from modules loaded before store discovery. For example, with a local development kernel and compiled modules under `dist`:
20
+ Install `@cratis/chronicle`, `@cratis/fundamentals` and `reflect-metadata` in the Node service. Import `reflect-metadata` first in the entry point. Use the project's single decorator mode: Chronicle supports both, one mode applies to the whole project, and standard decorators are the default. In standard mode, declare event and read-model members as public fields with `@field(Type)`; a field whose default value is a string, number, boolean or class instance is inferred; a field without a default, or with `null` or a plain object as default, needs `@field`, and an array needs its element type (`@field(Array, { genericArguments: [Item] })`). Use legacy mode only when types rely on constructor parameter properties, and then enable `experimentalDecorators` and `emitDecoratorMetadata` together; in legacy mode member types are resolved from the emitted metadata, and `@field(Type)` also works. In standard mode a model-bound read model whose mappings are all on properties registers on import only with a class-level mapping decorator such as `@fromEvent(...)`; otherwise match its module with a discovery pattern, or register the class explicitly before `getEventStore(...)`. Export decorated artifacts from modules loaded before store discovery. For example, with a local development kernel and compiled modules under `dist`:
21
21
 
22
22
  ```typescript
23
23
  import 'reflect-metadata';
@@ -60,6 +60,7 @@ A stored or up-to-date view, a validator over such a view, a reactor, and a posi
60
60
  - **Declared dimensions:** where the SDK derives a scope from a registered declaration (see your language reference), a stream's declared concurrency dimensions replace its source's dimensions; they are not added to them. A stream that declares none uses the source's, so a stream cannot opt out; an append without a stream uses the source's. A declared set that omits the `EventSourceId` dimension spans every instance with that route. The scopes are asymmetric: an append scoped to the whole source checks events in all of its streams, but an append scoped to one stream does not check the others. Any derived guard covers only the window from tail lookup to append.
61
61
  - **Strategy and first-append policy** choose derived, unchecked or custom behavior for writes without explicit scopes; verify whether an empty scope is checked before relying on a first-write race being detected.
62
62
  - **No check** is for unconditional writes, never a fallback for a failed guard.
63
+ - **Revised and redacted history:** a revision or redaction rewrites existing events without appending one. No position moves, so a plain explicit scope does not notice it. The constraint indexes a revision affects are rebuilt from the changed content. Do not assume the same of redaction: a redacted closing or reopening event can leave existing closures as they were. Neither certifies that an earlier application read is still current. A decision read detects it only where the SDK and kernel carry a history-change marker: the C# client does when the kernel reports one, the Go client does not. Use a decision read when the rule must hold against changed history. The marker covers the whole event sequence, so an unrelated revision can also refuse the decision. Without it, pause the affected writers, let in-flight decisions finish, change the history, then resume with fresh reads.
63
64
  - **Incomplete-explicit-scope switch** (C# only) decides whether an explicit scope that narrows history but carries no position expects absence or goes unchecked. Keep it expecting absence.
64
65
  - **Route/stream-mismatch switch** (C# only) decides whether a definition-linked explicit scope may differ from the append's stream. Keep it strict; express a separate dependency as its own labelled guard.
65
66
 
@@ -75,4 +76,5 @@ A stored or up-to-date view, a validator over such a view, a reactor, and a posi
75
76
  - **Strict unit lifecycle policy** (C# only) rejects staging during or after completion on every unit, not only enforced ones; use it when helpers might stage late.
76
77
  - **Validate-only completion** checks the enrolled guards even without staged events where supported; do not report an unchecked no-op as validated.
77
78
  - **Early request completion** obtains the owner's commit result before sending a response when middleware would otherwise complete too late.
79
+ - **Check-performed flag:** where the SDK reports it, an append result says whether concurrency checking ran. On a single append it means the scope was compared. An unchecked success (no scope, an explicit no-check, an unchecked first write, a skipped incomplete scope) otherwise looks like a passing check and proves nothing about contention. On a batch the flag is set only when every scope sent was checked, so unset can mean some were checked and others skipped. A batch carrying idempotency keys first drops the guards described under batch scopes. It then sets the flag when, on any append attempt it made, every remaining scope was checkable, even if that attempt failed its check and wrote nothing. Set therefore proves neither that events were written nor that every dependency was checked. Require the flag in contention tests and wherever correctness depends on the guard.
78
80
  - **Conflict inspection** maps violated guards back to affected reads. Distinguish stale state from business refusals, constraints, infrastructure failures and unknown outcomes.