@cratis/pi 8.4.1 → 8.6.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 (286) hide show
  1. package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +2 -1
  2. package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +1 -1
  3. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
  4. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
  5. package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
  6. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +2 -1
  7. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
  8. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
  9. package/package/corpus/hooks/scripts/cratis-guard-secrets.sh +131 -9
  10. package/package/corpus/rules/ai-distribution.md +2 -1
  11. package/package/corpus/rules/exit-codes-and-wrappers.md +1 -1
  12. package/package/corpus/rules/glossary.md +5 -3
  13. package/package/corpus/rules/react.md +3 -1
  14. package/package/corpus/rules/reactors.md +3 -1
  15. package/package/corpus/rules/scripting.md +2 -1
  16. package/package/corpus/rules/specs.csharp.md +6 -3
  17. package/package/corpus/rules/vertical-slices.md +5 -2
  18. package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
  19. package/package/corpus/skills/cratis-application-growth/references/csharp.md +1 -3
  20. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
  21. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
  22. package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
  23. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  24. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +3 -3
  25. package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +47 -3
  26. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +18 -3
  27. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
  28. package/package/corpus/skills/cratis-arc-authorize-request/references/typescript.md +2 -0
  29. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -0
  30. package/package/corpus/skills/cratis-arc-connect-storage/references/elixir.md +9 -2
  31. package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
  32. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +47 -8
  33. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
  34. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +6 -3
  35. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +38 -11
  36. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  37. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-abilities.md +2 -2
  38. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-recovery.md +6 -4
  39. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +2 -2
  40. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  41. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +29 -7
  42. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/java.md +1 -1
  43. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/kotlin.md +1 -1
  44. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp-diagnose-tool-call.md +9 -7
  45. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +52 -1
  46. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +4 -2
  47. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +36 -10
  48. package/package/corpus/skills/cratis-arc-expose-query/references/go.md +2 -2
  49. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +6 -3
  50. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
  51. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +55 -6
  52. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
  53. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  54. package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
  55. package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
  56. package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
  57. package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +87 -4
  58. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +9 -0
  59. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp-extensions.md +4 -0
  60. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
  61. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +19 -2
  62. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +4 -2
  63. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
  64. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +33 -36
  65. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +18 -3
  66. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +94 -19
  67. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +29 -5
  68. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
  69. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
  70. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
  71. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +41 -2
  72. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
  73. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +8 -4
  74. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
  75. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
  76. package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +2 -2
  77. package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
  78. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
  79. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +1 -0
  80. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
  81. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
  82. package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
  83. package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
  84. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
  85. package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
  86. package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
  87. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
  88. package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
  89. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
  90. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
  91. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +6 -6
  92. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +11 -3
  93. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +50 -0
  94. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +17 -3
  95. package/package/corpus/skills/cratis-chronicle-cli-operations/references/setup-and-target.md +8 -2
  96. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
  97. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
  98. package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
  99. package/package/corpus/skills/cratis-chronicle-connect-application/references/python.md +2 -2
  100. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
  101. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +9 -2
  102. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
  103. package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
  104. package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
  105. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +6 -3
  106. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +113 -16
  107. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
  108. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +16 -9
  109. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +60 -7
  110. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +124 -2
  111. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +36 -1
  112. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
  113. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  114. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +15 -5
  115. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +9 -8
  116. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/go.md +2 -2
  117. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
  118. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +1 -1
  119. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  120. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +15 -4
  121. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +4 -1
  122. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +5 -2
  123. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
  124. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
  125. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
  126. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +3 -1
  127. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +4 -3
  128. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +3 -1
  129. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +3 -1
  130. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +41 -4
  131. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +22 -4
  132. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
  133. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
  134. package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
  135. package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
  136. package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
  137. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  138. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +28 -3
  139. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +7 -6
  140. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
  141. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir-integrations.md +3 -3
  142. package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
  143. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +19 -1
  144. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
  145. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-pages.md +1 -1
  146. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +37 -4
  147. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
  148. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +2 -1
  149. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
  150. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +3 -3
  151. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
  152. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
  153. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
  154. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  155. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
  156. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
  157. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
  158. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
  159. package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
  160. package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
  161. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
  162. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
  163. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
  164. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
  165. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
  166. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
  167. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
  168. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +1 -1
  169. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +4 -3
  170. package/package/corpus/skills/cratis-ci-pipeline-performance/references/publish-pipelines.md +19 -4
  171. package/package/corpus/skills/cratis-code-review/SKILL.md +6 -2
  172. package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
  173. package/package/corpus/skills/cratis-code-review/references/csharp.md +4 -4
  174. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +6 -38
  175. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +2 -0
  176. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +5 -4
  177. package/package/corpus/skills/cratis-commits-and-pull-requests/references/workflow-inputs.md +39 -0
  178. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
  179. package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
  180. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
  181. package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
  182. package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
  183. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
  184. package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
  185. package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
  186. package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
  187. package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
  188. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
  189. package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
  190. package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
  191. package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
  192. package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
  193. package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
  194. package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
  195. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +6 -6
  196. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +21 -1
  197. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
  198. package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +7 -5
  199. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
  200. package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
  201. package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
  202. package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
  203. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
  204. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
  205. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
  206. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
  207. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +72 -1
  208. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +9 -0
  209. package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +2 -1
  210. package/package/corpus/skills/cratis-fundamentals-concept/references/java-json.md +3 -2
  211. package/package/corpus/skills/cratis-fundamentals-concept/references/kotlin-json.md +3 -2
  212. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +41 -2
  213. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -7
  214. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
  215. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +3 -3
  216. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +8 -0
  217. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp.md +2 -2
  218. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
  219. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
  220. package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
  221. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
  222. package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
  223. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
  224. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
  225. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
  226. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
  227. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
  228. package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
  229. package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
  230. package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
  231. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
  232. package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
  233. package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
  234. package/package/corpus/skills/cratis-platform-deliver-slice/references/typescript.md +14 -1
  235. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
  236. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +8 -8
  237. package/package/corpus/skills/cratis-platform-prepare-release-pr/references/product-release-checks.md +16 -2
  238. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
  239. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
  240. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
  241. package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
  242. package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
  243. package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
  244. package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
  245. package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
  246. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +6 -3
  247. package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +34 -3
  248. package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +84 -3
  249. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +7 -11
  250. package/package/corpus/skills/cratis-screenplay-declare-slice/references/commands.md +8 -4
  251. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projections.md +2 -0
  252. package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +29 -1
  253. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +2 -1
  254. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/mcp-tools.md +1 -1
  255. package/package/corpus/skills/cratis-screenplay-handoff-slice/references/csharp.md +13 -1
  256. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +1 -1
  257. package/package/corpus/skills/cratis-screenplay-model-translation/references/boundary-diagnostics.md +1 -1
  258. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +30 -51
  259. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
  260. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
  261. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/studio.md +5 -0
  262. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
  263. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
  264. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +8 -12
  265. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/running-mcp.md +12 -0
  266. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenarios.md +2 -2
  267. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  268. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
  269. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +4 -2
  270. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
  271. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +7 -0
  272. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +7 -4
  273. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +18 -5
  274. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-read-models.md +4 -2
  275. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +35 -2
  276. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
  277. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +4 -2
  278. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
  279. package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
  280. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
  281. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  282. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
  283. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +6 -0
  284. package/package/corpus/skills/cratis-stage-render-slice/references/semantic-conformance.md +64 -0
  285. package/package/profile-catalog.json +15 -0
  286. package/package.json +1 -1
@@ -0,0 +1,293 @@
1
+ # Container sizing, Kubernetes and crash dumps
2
+
3
+ ## Contents
4
+
5
+ - Size the container
6
+ - Garbage collection settings
7
+ - Kubernetes workload
8
+ - Probes and stopping
9
+ - Disruptions, placement and network
10
+ - Replace kernels in Kubernetes
11
+ - Crash dumps
12
+
13
+ Setting names are written as they appear in `chronicle.json`. The environment
14
+ form is `Cratis__Chronicle__` plus the path with `__` between segments.
15
+
16
+ ## Size the container
17
+
18
+ Size from the peak of your own workload, not from a table.
19
+
20
+ 1. Run the real workload with a generous memory limit and no heap setting.
21
+ 2. Read the container's peak memory, including a cold start against the full
22
+ backlog. Memory follows the number of resident observers, reactors and
23
+ reducers, not the event rate; the `cratis.chronicle.observer.resident`
24
+ gauge reports that number per kernel.
25
+ 3. Set the memory limit above that peak, with headroom for the next cold
26
+ start. A limit below what the kernel needs gets the container killed.
27
+ 4. Measure again after a kernel upgrade or when the application adds
28
+ namespaces or observers.
29
+
30
+ | Kernel | CPU | Memory limit |
31
+ | --- | --- | --- |
32
+ | Development, test, a kernel per tenant, low event rates | One CPU works, at a clearly lower append rate and slower catch-up | Above the observed peak. As an order of magnitude from a synthetic workload, 512 MiB ran out of memory and 1 GiB left moderate headroom |
33
+ | Shared by many namespaces and observers | Two or more. The step from one CPU to two gives the largest gain in append rate and catch-up time | Above the observed peak, with cold-start headroom |
34
+
35
+ CPU is a cold-start concern. A starting kernel reactivates observers and
36
+ catches up, and needs far more CPU than it does at steady state.
37
+
38
+ - Size the CPU request from the cold-start peak, not from the average.
39
+ - Prefer no CPU limit, so a starting kernel can use idle CPU on its node.
40
+ - When the platform enforces a CPU limit, set it from the cold-start peak. A
41
+ lower limit starves the thread pool; a kernel that cannot complete a startup
42
+ step stops itself and is restarted, and no probe budget fixes that.
43
+
44
+ ## Garbage collection settings
45
+
46
+ The production image runs Server GC with dynamic adaptation and a
47
+ conserve-memory setting. Keep those defaults; they suit both a small and a
48
+ large container. With a container memory limit and no heap setting, the
49
+ runtime caps the heap at 75 % of the limit, or at 20 MB when that is larger.
50
+
51
+ Change a setting only for a measured reason, as an environment variable on the
52
+ container. `DOTNET_GC*` values that take a number are **hexadecimal**:
53
+ `DOTNET_GCHeapHardLimitPercent=0x4B` is 75 %.
54
+
55
+ | Variable | Change it when |
56
+ | --- | --- |
57
+ | `DOTNET_GCHeapHardLimitPercent` | Other processes share the container, so the heap must stay below the default 75 % |
58
+ | `DOTNET_gcServer=0` (Workstation GC) | Memory, not CPU, limits a kernel with several CPUs. It lowers peak memory and costs a large share of the append throughput |
59
+
60
+ Anti-patterns:
61
+
62
+ - Do not turn dynamic adaptation off (`DOTNET_GCDynamicAdaptationMode=0`): it
63
+ raises memory without raising throughput.
64
+ - Do not switch the GC mode on a one-CPU container; in the measured workload
65
+ the mode made no measurable difference with one CPU.
66
+ - Do not write a decimal number into a `DOTNET_GC*` variable; `75` is read as
67
+ hexadecimal, not as 75.
68
+
69
+ ## Kubernetes workload
70
+
71
+ Run the kernel as a **StatefulSet**, although it keeps all state in the
72
+ storage backend and needs no persistent volume. A StatefulSet stops a pod
73
+ before it creates the replacement, replaces one pod at a time and waits for
74
+ readiness, and gives each kernel a stable name in logs and cluster membership.
75
+ A single `Localhost` kernel depends on stop-before-start: the replacement
76
+ waits for the single-writer lease, which the old kernel releases when it
77
+ stops.
78
+
79
+ | Alternative | When it works |
80
+ | --- | --- |
81
+ | Deployment, several kernels with `MongoDB` or `Sql` clustering | With the default rolling update |
82
+ | Deployment, one `Localhost` kernel | Only with `strategy: Recreate`, or `RollingUpdate` with `maxSurge: 0` and `maxUnavailable: 1`. The default rollout never completes: the new pod waits for the lease while Kubernetes waits for it to become ready. Prefer `Recreate`. Lease standby is the exception that makes the default start-before-stop rollout complete, but it gives up readiness as a rollout gate: validate the image first and keep the previous one ready to roll back to. See [Clustering](configuration.md#clustering) |
83
+
84
+ The parts of the pod that are specific to the kernel:
85
+
86
+ ```yaml
87
+ spec:
88
+ automountServiceAccountToken: false # the kernel does not call the Kubernetes API
89
+ terminationGracePeriodSeconds: 30
90
+ securityContext:
91
+ runAsNonRoot: true
92
+ runAsUser: 1654 # the image's user
93
+ runAsGroup: 1654
94
+ fsGroup: 1654
95
+ seccompProfile:
96
+ type: RuntimeDefault
97
+ containers:
98
+ - name: chronicle
99
+ image: cratis/chronicle:<pinned release>
100
+ ports:
101
+ - { name: chronicle, containerPort: 35000 }
102
+ - { name: silo, containerPort: 11111 }
103
+ - { name: health, containerPort: 8080 }
104
+ env:
105
+ - name: POD_IP
106
+ valueFrom: { fieldRef: { fieldPath: status.podIP } }
107
+ - name: Cratis__Chronicle__Clustering__AdvertisedIP
108
+ value: $(POD_IP)
109
+ - name: Cratis__Chronicle__Clustering__GatewayEnabled
110
+ value: "false"
111
+ - name: Cratis__Chronicle__Health__Port
112
+ value: "8080"
113
+ - name: Cratis__Chronicle__Health__Tls
114
+ value: "false"
115
+ - name: Cratis__Chronicle__Health__Exclusive
116
+ value: "true"
117
+ # plus storage, clustering type, TLS and encryption certificate settings
118
+ startupProbe:
119
+ tcpSocket: { port: 35000 }
120
+ periodSeconds: 10
121
+ failureThreshold: 30
122
+ livenessProbe:
123
+ httpGet: { path: /health/live, port: health }
124
+ periodSeconds: 10
125
+ timeoutSeconds: 5
126
+ failureThreshold: 6
127
+ readinessProbe:
128
+ httpGet: { path: /health, port: health }
129
+ periodSeconds: 5
130
+ timeoutSeconds: 5
131
+ failureThreshold: 3
132
+ lifecycle:
133
+ preStop:
134
+ sleep: { seconds: 5 }
135
+ securityContext:
136
+ allowPrivilegeEscalation: false
137
+ readOnlyRootFilesystem: true
138
+ capabilities: { drop: ["ALL"] }
139
+ volumeMounts:
140
+ - { name: tmp, mountPath: /tmp }
141
+ volumes:
142
+ - name: tmp
143
+ emptyDir: { sizeLimit: 256Mi }
144
+ ```
145
+
146
+ - **Health port.** Serve probes from a dedicated plaintext health port and
147
+ make it exclusive, so it answers nothing but the health paths. Do not open
148
+ it to other namespaces. See [Health probes](network-and-tls.md#health-probes).
149
+ - **Cluster gateway.** Turn it off. Applications connect to Chronicle on port
150
+ 35000 only; the gateway is outside Chronicle's authentication and is never
151
+ an application entry point. Allow nothing to reach port 30000.
152
+ - **Advertised address.** Take it from the pod IP, so each kernel advertises
153
+ an address its peers can reach.
154
+ - **Cluster identity.** `clustering.clusterId` and `clustering.serviceId` are
155
+ identical on every kernel of one cluster, and different for every cluster
156
+ that shares a database.
157
+ - **Read-only root filesystem.** Nothing under `/app` is writable. The
158
+ `emptyDir` on `/tmp` holds the runtime's diagnostics socket and pipes; it is
159
+ not a place for dumps.
160
+ - **Secrets.** Mount the certificates and the storage connection string from
161
+ Secrets, without `subPath`, so a renewed TLS certificate reaches the kernel.
162
+ See [Certificate renewal](network-and-tls.md#certificate-renewal).
163
+ - **Resources.** Set requests and limits as in Size the container above.
164
+
165
+ ## Probes and stopping
166
+
167
+ The kernel binds its listeners before it starts, so each probe checks a
168
+ different thing.
169
+
170
+ | Probe | Target | Checks |
171
+ | --- | --- | --- |
172
+ | Startup | TCP on 35000 | The process is up and has bound its listeners |
173
+ | Liveness | `GET /health/live` on the health port | The process answers HTTP; it runs no health checks |
174
+ | Readiness | `GET /health` on the health port | Startup has completed, the readiness checks pass and shutdown has not begun |
175
+
176
+ - Never use the readiness path as the liveness probe: a kernel that is still
177
+ starting or has storage trouble would be killed and start over.
178
+ - Never use a TCP check as the liveness probe: an open socket passes even when
179
+ the kernel no longer answers HTTP. Use `/health/live`.
180
+ - Never use a TCP check as the readiness probe; the port is open long before
181
+ the kernel is ready.
182
+ - Readiness keeps a starting kernel out of the Service for as long as it
183
+ needs and never restarts it. Do not tighten the liveness budget: a restart
184
+ throws away the cold-start work done so far.
185
+ - Raising the startup `failureThreshold` does not fix a kernel that restarts
186
+ during a cold start. The startup probe passes within seconds; the cause is
187
+ starved CPU or a failing startup step.
188
+ - The production image has no shell, so the `preStop` hook must be the
189
+ kubelet's `sleep` action, which needs Kubernetes 1.30 or later. It keeps the
190
+ kernel serving while load balancers stop sending traffic.
191
+ - `terminationGracePeriodSeconds` covers the `preStop` sleep plus the kernel's
192
+ own shutdown: `shutdown.drainTimeout` plus `shutdown.hostShutdownReserve`,
193
+ 13 seconds by default. Keep it at 30 or more, and raise it when you raise
194
+ either setting.
195
+
196
+ ## Disruptions, placement and network
197
+
198
+ - Add a PodDisruptionBudget with `maxUnavailable: 1`, so a drain or a cluster
199
+ upgrade evicts one kernel at a time. With one kernel keep `maxUnavailable:
200
+ 1` and accept a short outage; never use `minAvailable: 1` with one replica,
201
+ because no drain could then evict the pod.
202
+ - Keep kernels on separate nodes with required pod anti-affinity on
203
+ `kubernetes.io/hostname`. An evicted kernel then needs a free node: have one
204
+ node more than kernels, or use the preferred form of anti-affinity.
205
+ - Restrict traffic with a NetworkPolicy that your network plugin enforces:
206
+
207
+ | Port | Allow from |
208
+ | --- | --- |
209
+ | 35000 | Application namespaces and the ingress |
210
+ | 11111 | Other kernel pods only |
211
+ | 30000 | Nothing |
212
+ | Health port | The node's probes only |
213
+
214
+ - Allow the kernel's outbound traffic to DNS, the other kernels and storage,
215
+ plus whatever the configuration uses: an external authority, a telemetry
216
+ collector, webhook and sink targets, federation peers, a compliance key
217
+ store. A kernel that cannot resolve its storage host never becomes ready.
218
+ - With TLS and authentication both off behind an ingress, the NetworkPolicy
219
+ is the only access control: every pod it lets in has full access. See
220
+ [Run behind an HTTPS proxy](network-and-tls.md#run-behind-an-https-proxy).
221
+
222
+ ## Replace kernels in Kubernetes
223
+
224
+ | Situation | How |
225
+ | --- | --- |
226
+ | One `Localhost` kernel | StatefulSet with one replica and `RollingUpdate`. For a Deployment prefer `Recreate`; `RollingUpdate` with `maxSurge: 0` and `maxUnavailable: 1` also stops the old pod first. Never the default rolling update without lease standby |
227
+ | Several kernels whose releases can share a cluster, or a configuration change | Rolling update, one kernel at a time |
228
+ | A stop-all upgrade | Scale the StatefulSet to zero, wait until the pods are gone, change the image, scale back up. Changing the image while kernels still run starts the rolling update you are avoiding |
229
+
230
+ [Upgrade, backup and recovery](upgrade-and-recovery.md) decides which row
231
+ applies. Reverting the image does not unstick a stalled StatefulSet rollout:
232
+ revert the template, then delete the pod that never became ready.
233
+
234
+ ## Crash dumps
235
+
236
+ Dumps are off by default. Turn them on only to capture a crash, with the .NET
237
+ runtime's variables and a dedicated writable volume:
238
+
239
+ | Variable | Value | Effect |
240
+ | --- | --- | --- |
241
+ | `DOTNET_DbgEnableMiniDump` | `1` | Write a dump when the kernel crashes |
242
+ | `DOTNET_DbgMiniDumpType` | `2` | Include the managed heap, which heap analysis needs |
243
+ | `DOTNET_DbgMiniDumpName` | `/dumps/core.%h.%t` | Where to write it; host name and time keep a later crash from overwriting an earlier dump |
244
+
245
+ - Always set `DOTNET_DbgMiniDumpName` to a path on the dumps volume. Without
246
+ it the runtime writes to `/tmp`.
247
+ - Never write dumps to the size-limited `/tmp` volume. A heap dump is about as
248
+ large as the kernel's memory, and the kubelet evicts a pod whose `emptyDir`
249
+ grows past its `sizeLimit`: the dump would kill the kernel you are
250
+ diagnosing.
251
+ - Size the dumps volume for more than one dump of the memory limit. An
252
+ `emptyDir` survives a container restart but not the pod being deleted,
253
+ evicted or rescheduled; copy the dump out first, or use a
254
+ PersistentVolumeClaim when dumps must survive the pod.
255
+ - In Docker, mount a host directory owned by user 1654 at `/dumps`.
256
+ - The production image has no `tar`, so `kubectl cp` does not work against the
257
+ kernel container. Copy through an ephemeral debug container that mounts the
258
+ dumps volume.
259
+ - Turn dumps off again once you have the one you need.
260
+
261
+ A kernel in a crash loop can write a dump on every crash. `crashDumps.retain`
262
+ (`Cratis__Chronicle__CrashDumps__Retain`) limits that on a best-effort basis:
263
+
264
+ | Value | Behaviour |
265
+ | --- | --- |
266
+ | `0` (default) | Nothing is deleted; dumps accumulate |
267
+ | `N` above zero | At every kernel start, the kernel tries to delete the oldest matching dumps and keep the newest `N` |
268
+
269
+ - Opt in only for a directory dedicated to dumps with one kernel writing to
270
+ it, and copy out dumps you need before you enable it: the first start with
271
+ retention on already deletes.
272
+ - Give the file name a fixed part, as in `/dumps/core.%h.%t`. Placeholders
273
+ (`%h`, `%t`, `%p`, `%%`) belong in the file name only, never in the
274
+ directory path.
275
+ - Leave room for `N + 1` dumps of the memory limit: the retained ones plus the
276
+ next write before the kernel restarts. Retention does not cap bytes and does
277
+ not prevent an eviction between starts.
278
+ - Pruning runs only when dumps are enabled and `DOTNET_DbgMiniDumpName` is
279
+ set. A negative value is invalid.
280
+ - Pruning is not a guarantee. It considers only regular files whose names
281
+ match the configured name, skips names ending in `.partial`, and does not
282
+ check that a dump is complete. It gives up for that start after a few
283
+ seconds or when the directory holds more than 1000 entries, and never fails
284
+ startup; the kernel log says when it gave up. The directory can therefore
285
+ hold more than `N` dumps: watch the volume's free space rather than rely on
286
+ the count.
287
+
288
+ **A dump is a copy of the kernel's memory.** It contains storage connection
289
+ strings, certificate and signing keys, and event data, including personal data
290
+ that is encrypted at rest. Treat every dump as a secret that holds personal
291
+ data: restrict who can take and copy it, never attach it to an issue, and
292
+ delete every copy when the analysis is done. Erasing a person's data does not
293
+ remove it from an earlier dump.
@@ -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.
@@ -275,7 +280,7 @@ Each entry is keyed by the full observer key `<observer id>#<event store>#<names
275
280
  ## constraintIndexRepair
276
281
 
277
282
  - `updateAttempts` — The total number of in-turn attempts, the first try included, to write a constraint index update.
278
- - `attemptTimeout` — The longest a single index write may run before it is abandoned.
283
+ - `attemptTimeout` — How long Chronicle waits for a single index write before it cancels the attempt and abandons the wait; storage may still complete the write.
279
284
  - `postCommitBudget` — The time budget for updating the constraint indexes after an append has committed.
280
285
  - `timerTurnBudget` — The time budget for one timer-driven repair or catch-up turn.
281
286
  - `appendRepairBudget` — The time budget for a repair performed in the turn of an append.
@@ -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.
@@ -429,8 +436,8 @@ Each entry is keyed by the full observer key `<observer id>#<event store>#<names
429
436
 
430
437
  ## clustering.roles
431
438
 
432
- - `eventSequences` — Whether Event Sequences can be placed on this node.
433
- - `observers` — Whether Observers can be placed on this node.
439
+ - `eventSequences` — When `false`, this node leaves itself out when it places Event Sequences. Best-effort: another node can still place them here.
440
+ - `observers` — When `false`, this node leaves itself out when it places Observers. Best-effort: another node can still place them here.
434
441
 
435
442
  ## clustering.singleWriterLease
436
443
 
@@ -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
@@ -109,10 +136,34 @@ kernel published directly needs none of this.
109
136
  | Path | Answers 200 when | Use for |
110
137
  | --- | --- | --- |
111
138
  | `/health/live` | The listener accepts requests, even during startup | Startup and liveness probes |
112
- | `/health/ready`, `/health` | Startup completed, storage checks pass and shutdown has not begun; otherwise 503 | Readiness and traffic gating |
113
-
114
- `healthCheckEndpoint` (default `/health`) moves all three paths together. Until
115
- ready, the kernel refuses other traffic with HTTP 503 or gRPC `Unavailable`.
139
+ | `/health/ready`, `/health` | No check reports unhealthy. Checks report unhealthy, for example, until startup completes, once shutdown begins, and on MongoDB while no server is connected. A degraded check, such as an overloaded kernel, a recorded storage authorization failure or MongoDB without a writable server, still answers 200 and names the status in the body. An unhealthy check answers 503. With lease standby on, also 200 with the body `Standby` while the kernel waits for the lease and starts, unless another check is unhealthy; it serves nothing yet | Readiness and traffic gating |
140
+
141
+ `healthCheckEndpoint` (default `/health`) moves all three paths together.
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
+
161
+ The probe status and traffic acceptance are separate. The kernel serves other
162
+ requests once startup has completed and until shutdown begins, whatever the
163
+ readiness status. Before that, and throughout standby, it refuses them with
164
+ HTTP 503 (`Retry-After: 1`) or gRPC `Unavailable`. So a started kernel can
165
+ answer 503 on readiness while it still serves requests, and a standby kernel
166
+ can answer 200 while it refuses them.
116
167
  **Ready does not mean observers have caught up**; projections and reactors keep
117
168
  catching up in the background.
118
169
 
@@ -130,9 +181,11 @@ cluster-internal. gRPC is never served there. The production image contains no
130
181
  shell or `curl`; probe from the orchestrator over HTTP, not with an exec
131
182
  command.
132
183
 
133
- On a single node with persistent storage, readiness also requires that this
134
- process holds the single-writer lease; a second kernel on the same storage
135
- stays not ready.
184
+ On a single node with persistent storage, the kernel finishes startup only
185
+ after it holds the single-writer lease. A second kernel on the same storage
186
+ serves nothing and stays not ready. With lease standby on, it instead reports
187
+ `Standby` with 200 while it waits, unless another check is unhealthy, and
188
+ still serves nothing (see [Clustering](configuration.md#clustering)).
136
189
 
137
190
  ## Message size limits
138
191
 
@@ -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
 
@@ -35,7 +37,7 @@ SQL Server storage.
35
37
 
36
38
  | Other setting | Default | Meaning |
37
39
  | --- | --- | --- |
38
- | `storage.databaseNamePrefix` | empty | Prefix on every MongoDB database name, to share a server between environments. MongoDB only |
40
+ | `storage.databaseNamePrefix` | empty | Prefix on every MongoDB database name the kernel derives (not on a name from connection resolution), to share a server between environments. Decide it before the first start: changing it later selects different databases and moves no data. MongoDB only |
39
41
  | `storage.systemDatabaseName` | `_system` | Name of the System event store's MongoDB databases. MongoDB only; same on every node |
40
42
  | `storage.schema` | the user's default schema | SQL schema that holds the kernel's tables. PostgreSQL and SQL Server |
41
43
  | `storage.createIfMissing` | `true` | Whether the kernel creates missing databases and schemas. Set `false` when the platform provisions them |
@@ -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
@@ -86,6 +116,38 @@ the binding is permanent, so adding a namespace never moves an existing
86
116
  database. The database user therefore needs the right to create databases
87
117
  unless `createIfMissing` is `false` and the platform creates them.
88
118
 
119
+ On MongoDB the kernel derives these names, with `storage.databaseNamePrefix`
120
+ in front of each. A database name returned by connection resolution is used
121
+ as is, without the prefix; grant that name. Some access ignores the resolver
122
+ and always uses `storage.connectionDetails` with the prefixed derived name:
123
+ jobs use the namespace database, and Orleans reminders and MongoDB cluster
124
+ membership use `chronicle+main`. When a resolver redirects storage, grant
125
+ those databases on the configured connection as well.
126
+
127
+ | Holds | Database name |
128
+ | --- | --- |
129
+ | Cluster state, membership and reminders | `chronicle+main` |
130
+ | Event store state shared by its namespaces | `<store>+es` |
131
+ | Events, observer state, jobs and constraints of a namespace | `<store>+es+<namespace>` |
132
+ | Read models of the `Default` namespace | `<store>` |
133
+ | Read models of a named namespace | `<store>+<namespace>` |
134
+ | Global confidentiality keys, only when encryption keys use global scope | `!chronicle-encrypted!+es+!chronicle-encrypted!` |
135
+
136
+ The kernel's own System event store uses three databases. Their derived
137
+ default names come from `storage.systemDatabaseName` (default `_system`):
138
+ `_system`, `_system+es` and `_system+es+Default`, each with the prefix;
139
+ connection resolution can replace them, and then you grant the resolved names.
140
+ A credential limited to the application's databases fails at startup with
141
+ `not authorized on _system` (or the System name in use). On a server shared with others, grant
142
+ `readWrite` on every database above under its actual names: the cluster
143
+ database, all three System databases, every store and namespace database, and
144
+ the global confidentiality-key database when it applies. MongoDB cannot grant by name prefix, so add the grants for a new event store or
145
+ namespace before creating it. On a server dedicated to Chronicle, grant
146
+ `readWriteAnyDatabase` instead; it covers new databases automatically. With
147
+ either role, removing a namespace also needs `dropDatabase` (for example
148
+ `dbAdmin` on that database): neither `readWrite` nor `readWriteAnyDatabase`
149
+ includes it.
150
+
89
151
  ## Resolve shared database ownership
90
152
 
91
153
  The bindings live in the cluster database's `DatabaseNames` table: `Kind`
@@ -157,7 +219,7 @@ MongoDB drops the namespace database; SQL and in-memory providers retain namespa
157
219
 
158
220
  ## Choose cluster membership
159
221
 
160
- 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.
161
223
 
162
224
  ## Separate SQL schema and runtime identities
163
225
 
@@ -183,3 +245,63 @@ The environment form is `Cratis__Chronicle__Compliance__Encryption__Storage__Typ
183
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.
184
246
 
185
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.