@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
@@ -35,8 +35,8 @@ A successful parse does not show that a kernel is reachable or that the identity
35
35
 
36
36
  | Field of the frozen `ChronicleConnectionOptions` | Value |
37
37
  |---|---|
38
- | `host` | Host name, IPv4 address, or IPv6 address without its brackets |
39
- | `port` | Defaults to `DEFAULT_PORT` (`35000`) |
38
+ | `host` | Host name, IPv4 address, or IPv6 address without its brackets. The parser preserves case, a trailing dot, and Unicode or punycode spelling. Comparing `host` strings checks spelling, not DNS equivalence |
39
+ | `port` | An `int`, defaulting to `DEFAULT_PORT` (`35000`). Leading zeros are accepted and dropped: `:035000` gives `35000` |
40
40
  | `client_id`, `client_secret` | Percent-decoded. Absent credentials yield `DEVELOPMENT_CLIENT_ID` and `DEVELOPMENT_CLIENT_SECRET` |
41
41
  | `tls` | Always `True` |
42
42
  | `skip_tls_validation` | `True` unless `skipTlsValidation=false`; the certificate is then accepted unverified |
@@ -1,5 +1,14 @@
1
1
  # Connect a Node server
2
2
 
3
+ ## Contents
4
+
5
+ - Setup (below)
6
+ - Open the store and verify registration
7
+ - Transport and credentials
8
+ - Application options
9
+ - Behavior patterns
10
+ - Not supported in this SDK
11
+
3
12
  Install `@cratis/chronicle`, its `@cratis/fundamentals` peer and `reflect-metadata`. Load `reflect-metadata` before decorated modules. Use standard decorators and an ES2022 target; only enable `experimentalDecorators` and `emitDecoratorMetadata` together for a legacy decorator build. Declare field types explicitly rather than relying on the transpiler to emit runtime metadata. Names below are illustrative.
4
13
 
5
14
  ## Open the store and verify registration
@@ -64,7 +73,7 @@ Pass these as the second argument of `ChronicleOptions.fromConnectionString(uri,
64
73
  - **Concurrency:** `concurrencyScopeStrategy: ConcurrencyScopeStrategies.none` (enum from `@cratis/chronicle`) disables the default optimistic scope. Alternatively supply a sync/async callback returning a scope or `undefined` for no check. Explicit scopes bypass it; callback failure prevents the append.
65
74
  - **Enrichment:** `eventEnrichmentProviders: [(content, ctx) => { content.partition = ctx.namespace; }]` sets a declared cross-cutting field on serialized content, not on `ctx.event`. Providers may be async; the default list is empty.
66
75
  - **Reactor results:** `reactorResultHandler: (result, ctx, type, storeName, ns) => handleEffect(result, ctx, type, storeName, ns)` returns true only for a fully handled result; throw on failure. `readModelReactorResultHandler` receives `(result, changeset, type, store, ns)` instead. Set `readModelReactorOnError: (error, changeset, type) => reportFailure(error, changeset, type)` for non-terminal activation, handler or effect failures; reporting does not retry.
67
- - **Diagnostics:** `logger: { log: entry => applicationLog(entry) }` receives sanitized diagnostics; the sink should not throw. Built-in telemetry uses convention span names; `telemetry.spanNames` accepts `legacy`/`convention` but neither changes naming. Source IDs are omitted by default; `telemetry: { eventSourceId: { mode: 'hmac', key: deploymentKey } }` uses SHA-256 with a nonempty `Uint8Array`. Select `raw` only if exposing identifiers is intended.
76
+ - **Diagnostics:** `logger: { log: entry => applicationLog(entry) }` routes the client's own diagnostics to the application logger; each client has its own sink and `log` is called synchronously. An entry has `category`, `level` (`Verbose`, `Debug`, `Info`, `Warn`, `Error`), `message` and `attributes`. Entries are sanitized: a failure appears as its error type (attribute `error.type`) and, for gRPC, `rpc.grpc.status_code`; exception messages, stacks and event payloads are left out, so the text is only on the errors your own code catches. Do not log those verbatim: a caught error can contain the authorization server's raw response body, because a token request answered with an error status puts that body in its message and a call the kernel then rejects as unauthenticated can repeat it. Inspect them privately and log only the type, the status code and a redacted message. The sink should not throw; a failing sink does not change call results or acknowledgements. Without `logger` the entries go to OpenTelemetry `diag`, which discards them until the application calls `diag.setLogger(...)`; use one of the two paths, not both. Built-in telemetry uses convention span names; `telemetry.spanNames` accepts `legacy`/`convention` but neither changes naming. Source IDs are omitted by default; `telemetry: { eventSourceId: { mode: 'hmac', key: deploymentKey } }` uses SHA-256 with a nonempty `Uint8Array`. Select `raw` only if exposing identifiers is intended.
68
77
 
69
78
  ## Behavior patterns
70
79
 
@@ -10,6 +10,8 @@ A lookup can tell a writer that a value is free; it cannot reserve it. A registe
10
10
 
11
11
  Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Node server `package.json` → typescript, `*.kt` → kotlin, `*.java` → java, `go.mod` → go, `mix.exs` → elixir); only the project's languages are installed.
12
12
 
13
+ Read [operations](references/operations.md) when upgrading a kernel that holds unique claims, when a rule is added to or changed on a store that already holds events, when reading a reindex job's skipped-duplicates report, or when a rebuild keeps refusing appends.
14
+
13
15
  ## Default: reserve one property for one source
14
16
 
15
17
  Names here are illustrative. Suppose a locker claims a pickup code until the locker is emptied.
@@ -23,15 +25,18 @@ Names here are illustrative. Suppose a locker claims a pickup code until the loc
23
25
 
24
26
  - **Model-bound declaration:** keep a single field claim, once-only event or close marker with the event it governs when the model expresses the whole rule.
25
27
  - **Dedicated definition:** use the builder when multiple event types participate or comparison, scope or message logic does not belong on the model.
28
+ - **Declaration only:** a definition describes the rule and does nothing else. It must not append events or run commands, its body has no branches, loops, variables or assignments, and each selector is a plain property access. The .NET analyzers catch the common breaches (an injected event log or command pipeline, those statement forms, a selector that is not a property chain), not every side effect, so a clean build is not proof.
26
29
  - **Constraint name:** give related declarations one stable identity for grouping, release and diagnostics; keep unrelated rules separately named. Claims are indexed under this name, so renaming a rule starts a new, empty index until it is rebuilt.
27
30
  - **Ordered composite key:** select multiple properties together when only the tuple must be unique; map other claiming events to the same tuple in the same order.
28
31
  - **Multiple claiming events:** include every event that introduces or changes the value, even when its field has a different name. An event with no constrained properties present does not replace a claim.
29
32
  - **Case comparison:** opt into ignoring case when differently cased strings denote one value; use the same comparison for release.
30
33
  - **One value per source:** by default reclaiming one's current value succeeds; replacing it frees the previous value.
34
+ - **Once per source is a type rule:** a unique property that carries the source's own identifier never rejects a second event on that source, because the owner re-claims its own value. To allow a fact once per source, use a unique event type.
35
+ - **Hashed claims:** the index stores a hash of the constrained value, not the value, so a rule may cover personal data. A hash is not encryption or anonymisation: predictable values can be guessed. Protect the event property separately and keep custom messages free of the value.
31
36
  - **Retain per value:** when a source owns multiple identifiers, keep each until released. The owner can reclaim its own identifiers.
32
37
  - **Source-wide removal:** declare each lifecycle event that should release the owner's claims in the matching scope. One removal event can release multiple named rules.
33
38
  - **Value-specific removal:** map removal fields in tuple order when a retained identifier, rather than all the owner's identifiers, becomes free.
34
- - **Unique event type:** when a fact may occur only once per source and scope, constrain its type instead of a field. A removal opens the next cycle.
39
+ - **Unique event type:** when a fact may occur only once per source and scope, constrain its type instead of a field. A removal opens the next cycle. If the removal type is itself constrained, it must pass the rule first, so a stored claim can reject it before it releases anything. A removal that passes ends the current cycle for that source and scope, including one opened earlier in the same batch or just started by a competing writer, so two racing release-and-reclaim batches can both succeed. When a release must end only the cycle the caller saw, also guard that append with a concurrency scope for that source and scope, filtered to the constrained and removal event types. Its expected position must be the revision the caller saw or the tail captured before reading those events; a materialized read model can lag that tail and hide a reclaim. On the event log, a decision read whose model covers that source, scope and every claim and removal type can supply the guard instead (`cratis-chronicle-protect-decision`). A tail sampled at append time misses a reclaim that it already includes.
35
40
  - **Mutually exclusive event types:** group alternatives under one occurrence rule when any one of them must exclude the others until release.
36
41
  - **Source type:** partition by the appending source's type when different types may reuse a value or start independent cycles.
37
42
  - **Stream type:** partition by stream type when the same claim may coexist in distinct kinds of stream.
@@ -39,7 +44,7 @@ Names here are illustrative. Suppose a locker claims a pickup code until the loc
39
44
  - **Sequence selection:** limit enforcement to named sequences, or just the event log, when other sequences must not check the rule. Unrestricted means every sequence, not one shared index. Merged selections form a union; an unrestricted declaration wins.
40
45
  - **Static violation message:** use a template when callers need a domain-specific explanation; substitute violation detail keys rather than parsing the kernel's prose.
41
46
  - **Message provider:** use a callback when the message must be computed. Check the SDK's callback timing and arguments before relying on violation details.
42
- - **Closing event:** when *all* subsequent writes in a scope should stop, close it by event. Reads and replay remain available. Registration alone does not apply historical closures.
47
+ - **Closing event:** when *all* subsequent writes in a scope should stop, close it by event. Reads and replay remain available. Registration alone does not apply historical closures. Marking an event type as a tombstone closes nothing and rejects no later append.
43
48
  - **Closure dimensions:** default to source ID, stream type and stream ID together; select source ID, source type, stream type or stream ID in combination to match the intended write boundary. Every closing and reopening append must supply each selected dimension, and a scope that resolves only to the default stream is refused.
44
49
  - **Payload stream ID:** when the closing event names a different stream, take its ID from a required nonempty property; reopening events must carry the same property.
45
50
  - **Reopening events:** allow named event types to lift this rule's closure for the exact scope; they cannot clear a manual closure or another rule's closure. To reopen, append a configured reopening event addressing the same scope. A manual scope reopen refuses a closure owned by a closing event (closed by event). Without reopening events, no append or manual reopen lifts it.
@@ -47,4 +52,6 @@ Names here are illustrative. Suppose a locker claims a pickup code until the loc
47
52
  - **Registration and inspection:** discover or explicitly register definitions at store setup. Inspect the registered identity where available; prove enforcement with an append, not just a successful startup.
48
53
  - **Violation result:** branch on constraint kind and name; use event type, sequence number and structured details for diagnosis. Property values may be sensitive. In a batch, occurrence and release follow call order; failed constraint validation rejects the whole append.
49
54
  - **Unavailable index:** this refusal is not a business collision: none of the attempted new events were written. Back off and retry the unchanged request, preserving idempotency keys. The event and claim-index update are not crash-atomic, and renumbering after a duplicate sequence number does not revalidate the constraint.
55
+ - **Rule added or changed on stored events:** registering a new property rule, or one whose claiming or removal mapping, comparison, retention mode or scope changed or whose sequence selection grew, makes the kernel rebuild that index from history in each sequence that holds events and that the rule newly covers or whose index the change affects. Registering an unchanged rule rebuilds nothing, and a selection that only grew rebuilds only the newly covered sequences. Until the rebuild finishes, appends the rule governs get the unavailable-index refusal. History is not rejected: where sources already share a value, the earliest claimant keeps it; a later colliding claim that storage rejects is not written, and the reindex step's progress message counts those rejected writes per constraint. Read that message on the job's step and settle every duplicate in the domain with events (`references/operations.md`). An occurrence rule keeps no index; it judges the next append against the source's stored events as soon as it is registered. A closing rule ignores history until rebuilt.
56
+ - **Revised events:** revising a constrained event schedules a refold of its index from the revised position; revision is not validated against the rule, so it does not guarantee the source the revised value when another source already holds it. A retained per-value claim is released only when the revising source owns it and that event made it; one made by another event stays. If constrained events were revised on a kernel from before that behaviour, rebuild that rule's index once to release the stale claims (`references/operations.md`).
50
57
  - **Operator rebuild:** when an index needs repair, request reindexing for the intended store, namespace, sequence and constraint names; an empty selection means all applicable indexed rules. Follow the job to completion. Rebuilding closure rules, unlike registering them, applies closing and reopening history. Verify contention afterward; duplicate values already in the index make storage fall back to a non-unique index, with only a logged warning, despite successful startup.
@@ -1,5 +1,14 @@
1
1
  # Append constraints in C#
2
2
 
3
+ ## Contents
4
+
5
+ - Reserve and release a property
6
+ - Map tuples and alternative claims
7
+ - Occurrence rather than property
8
+ - Close and reopen a write scope
9
+ - Registration, failures and repair
10
+ - In an Arc command
11
+
3
12
  ## Reserve and release a property
4
13
 
5
14
  Reference `Cratis.Chronicle`. Names are illustrative. With a connected `IEventStore store`, include both event types in the store's registered artifacts. For a positional record, target the **property**, not the constructor parameter:
@@ -17,7 +26,7 @@ public record LockerEmptied;
17
26
 
18
27
  In a disposable namespace, append `await store.EventLog.Append("locker-1", new PickupCodeAssigned("A7"))`, then the same event to `"locker-2"`. Only the first result should have `IsSuccess`. Append `new LockerEmptied()` to `"locker-1"`; the second assignment should now succeed. If both initial appends succeed, check store registration, event sequence and namespace before relying on the rule. `store.Constraints.HasFor("PickupCode")` checks local discovery, not kernel enforcement.
19
28
 
20
- By default the comparison is case-sensitive and `PerEventSource` replaces the owner's previous claim. Assigning the current value again succeeds for that owner. For multiple simultaneous codes, declare `[property: Unique("PickupCode", Mode = UniqueConstraintMode.PerValue)]`. To drop just one, put `[RemoveConstraint("PickupCode", Properties = new[] { nameof(CodeReleased.Code) })]` on a `CodeReleased(string Code)` event. No properties means release all for that owner in scope. Repeat the attribute for different rules, or use it on several ending events. Use a stable explicit name for shared declarations and removers; otherwise the attribute derives identity from the annotated member. Shared property declarations must agree on retention mode.
29
+ By default the comparison is case-sensitive and `PerEventSource` replaces the owner's previous claim. Assigning the current value again succeeds for that owner. `[Unique]` also works on a property typed as a `ConceptAs<T>`: the underlying value is compared, so keep the concept type on the event. For multiple simultaneous codes, declare `[property: Unique("PickupCode", Mode = UniqueConstraintMode.PerValue)]`. To drop just one, put `[RemoveConstraint("PickupCode", Properties = new[] { nameof(CodeReleased.Code) })]` on a `CodeReleased(string Code)` event. No properties means release all for that owner in scope. Repeat the attribute for different rules, or use it on several ending events. Use a stable explicit name for shared declarations and removers; otherwise the attribute derives identity from the annotated member. Shared property declarations must agree on retention mode.
21
30
 
22
31
  ## Map tuples and alternative claims
23
32
 
@@ -42,6 +51,8 @@ public class DepotCodeRule : IConstraint
42
51
 
43
52
  Specify each claiming type once, selecting property paths (not computed expressions) in tuple order. Map the same order on a value-specific remover. No constrained properties present means no replacement. Runtime type mappings can use `u.On(eventType, new[] { "Depot", "Code" })`, `u.RemovedWith(removalType, new[] { "Site", "ExternalCode" })` or `u.RemovedWith(removalType)` with registered `EventType` values. Missing paths fail definition. A dedicated property definition without `WithName` uses its owner identity; without an owner supply the name.
44
53
 
54
+ A definition class only declares. The analyzers report a violation as a build error: `CHR0017`, `CHR0018` and `CHR0020`; their meanings are in the `cratis-code-review` skill, `references/csharp-diagnostics.md`.
55
+
45
56
  Select `.PerEventSourceType()`, `.PerEventStreamType()` or `.PerEventStreamId()` **before** declaring a unique rule; each partitions by one more dimension. Otherwise all sources compete for the tuple in that namespace and sequence. `.ForEventLog()` is `.ForEventSequences(EventSequenceId.Log)` (`Cratis.Chronicle.EventSequences`); e.g. `.ForEventSequences(new EventSequenceId("dispatch"))` selects another sequence. Sequence selection applies to the builder's built definitions. Attribute equivalent on `Unique` or `ClosesStream`: `EventSequences = new[] { "event-log" }`. Empty means all sequences independently; merged selections union, with unrestricted winning.
46
57
 
47
58
  ## Occurrence rather than property
@@ -81,9 +92,30 @@ A declaration that cannot be built throws while constraints are discovered, befo
81
92
  | `NoEventTypesAddedToUniqueConstraint` | A unique rule was built without any `On<TEvent>(...)` |
82
93
  | `MissingNameForUniqueConstraint` | A unique rule has no explicit name and no owning constraint type to derive one from |
83
94
  | `NoUniqueEventTypeConstraintToRemove` | `RemovedWith<T>()` on the outer builder has no preceding occurrence rule (`Unique<TEvent>()`) to attach to |
95
+ | `EventTypeAlreadyAddedToUniqueConstraint` | One unique rule maps the same event type twice with `On` |
96
+ | `ConflictingUniqueConstraintModes` | `[Unique]` properties that share a name declare different `Mode` values |
97
+ | `DuplicateConstraintNames` | Two rules built in one `Define` resolve to the same name. Occurrence rules that share a name are grouped instead, and so are closing declarations |
98
+ | `MissingNameForClosesStreamConstraint` | A closing declaration has an empty name; the empty name is reserved for manual closures |
99
+ | `ConflictingClosesStreamDeclarations` | Closing declarations that share a name differ in dimensions or stream-ID property, or a closing declaration shares its name with another kind of rule |
84
100
 
85
- For an unsuccessful append, distinguish `result.IsRetryable` (transient refusal, no new events written; honor `result.RetryAfter` or back off and retry unchanged, preserving idempotency keys) from `result.ConstraintViolations`. For example, `result.ConstraintViolations.Any(v => v.ConstraintType == ConstraintType.Unique && v.ConstraintName.Value == "PickupCode")` identifies the domain conflict. Do not convert other failures into “code taken.” `UniqueEventType` is an occurrence violation; `StreamClosed` is a closed-scope refusal: every one is the violation named `closed-stream`, whatever `Name` the closing declaration has. That `Name` identifies the closure owner, reported in `Details[WellKnownConstraintDetailKeys.ClosedBy]` and as `ClosedBy` from `GetClosedStreams()` (empty or null for a manual closure); match the refusal on `closed-stream` and use `ClosedBy` only to tell owners apart. Inspect `EventTypeId`, `SequenceNumber`, `Message` and `Details`; `WellKnownConstraintDetailKeys` includes `PropertyName`, `PropertyValue`, `ClosedBy` and `ClosedAtSequenceNumber`. Avoid logging sensitive values. `store.Constraints.ResolveMessageFor(v)` resolves a known local rule's callback/template, leaving unknown rules alone. Ordered batch validation includes earlier claims/releases in the batch; rejection writes none of the batch.
101
+ One failure comes later, when the definitions are registered with the kernel: `ClosesStreamConstraintsNotSupported` means the connected kernel has no closing-event constraints. Upgrade the kernel before registering closing declarations.
86
102
 
87
- For repair, on an authorized operator connection use `await services.ConstraintIndexes.ReindexConstraints(new ReindexConstraintsRequest { EventStore = "dispatch", Namespace = "default", EventSequenceId = "event-log", ConstraintNames = new[] { "PickupCode" } })` (`Cratis.Chronicle.Contracts.Events.Constraints.Operator`). An empty list selects all applicable indexed rules. Check command success before using `Response` as a job ID; follow that ID in Jobs until `CompletedSuccessfully`, then verify contention. Reindexing closures, unlike registration, applies history; redacted payload IDs may prevent reconstruction without a matching snapshot. Index updates and event writes are not crash-atomic. Do not treat startup or job acceptance as proof the storage index enforces uniqueness.
103
+ For an unsuccessful append, distinguish `result.IsRetryable` (transient refusal, no new events written; honor `result.RetryAfter` or back off and retry unchanged, preserving idempotency keys) from `result.ConstraintViolations`. For example, `result.ConstraintViolations.Any(v => v.ConstraintType == ConstraintType.Unique && v.ConstraintName.Value == "PickupCode")` identifies the domain conflict. Do not convert other failures into “code taken.” `UniqueEventType` is an occurrence violation; `Schema` means the event content does not match its registered schema and `Unknown` is a refusal the kernel could not classify, so treat neither as a business collision; `StreamClosed` is a closed-scope refusal: every one is the violation named `closed-stream`, whatever `Name` the closing declaration has. That `Name` identifies the closure owner, reported in `Details[WellKnownConstraintDetailKeys.ClosedBy]` and as `ClosedBy` from `GetClosedStreams()` (empty or null for a manual closure); match the refusal on `closed-stream` and use `ClosedBy` only to tell owners apart. Inspect `EventTypeId`, `SequenceNumber`, `Message` and `Details`; `WellKnownConstraintDetailKeys` includes `PropertyName`, `PropertyValue`, `ClosedBy` and `ClosedAtSequenceNumber`. Avoid logging sensitive values. `store.Constraints.ResolveMessageFor(v)` resolves a known local rule's callback/template, leaving unknown rules alone. Ordered batch validation includes earlier claims/releases in the batch; rejection writes none of the batch.
104
+
105
+ For repair, on an authorized operator connection use `await services.ConstraintIndexes.ReindexConstraints(new ReindexConstraintsRequest { EventStore = "dispatch", Namespace = "default", EventSequenceId = "event-log", ConstraintNames = new[] { "PickupCode" } })` (`Cratis.Chronicle.Contracts.Events.Constraints.Operator`). An empty list selects all applicable indexed rules. Check command success before using `Response` as a job ID; follow that ID in Jobs until `CompletedSuccessfully`, then verify contention. Reindexing closures, unlike registration, applies history; redacted payload IDs may prevent reconstruction without a matching snapshot. Index updates and event writes are not crash-atomic. Do not treat startup or job acceptance as proof the storage index enforces uniqueness. Kernel upgrades that touch stored claims, the skipped-duplicates report and a rebuild that does not finish are in `references/operations.md`.
88
106
 
89
107
  **Not supported in this SDK:** no append constraint for cross-namespace/sequence uniqueness, arbitrary counts or balance predicates. Route competing claims to one authoritative scope; for decisions over previously read events use `cratis-chronicle-protect-decision`, not a preflight lookup.
108
+
109
+ ## In an Arc command
110
+
111
+ When a constraint refuses the events an Arc command produces, the command fails as invalid and none of the events in that rejected batch are stored. Events an earlier immediate append or explicit commit already persisted stay persisted. Every violation, whatever its kind, becomes one entry in the result's `ValidationResults`:
112
+
113
+ | Member | Value |
114
+ | --- | --- |
115
+ | `Severity` | `Error` |
116
+ | `Reason` | `ValidationResultReason.ConstraintViolation`, serialized as `constraintViolation` |
117
+ | `ReasonDetail` | The constraint name |
118
+ | `Message` | The constraint's message |
119
+ | `Members` | The violating property in camel case when the violation's details carry `PropertyName`; otherwise empty |
120
+
121
+ Branch on `Reason` and `ReasonDetail`, never on the message. Clients select their text by constraint name, so give every rule a stable explicit name and treat renaming it as a breaking change for them. A lookup in a validator or the handler does not reserve the value; it never replaces the constraint.
@@ -82,4 +82,4 @@ Check `result.Errors` separately: when `result.Disposition == eventsequences.Rej
82
82
 
83
83
  - Value-specific removal: `RemovedWith` accepts event descriptors, not paths. If releasing all the owner's tuples is incorrect, have a supporting SDK own the definition.
84
84
  - Event-driven closure (including closure dimensions, payload-derived stream ID, shared close owner and reopening events): register the rule through a supporting SDK. Go writers can receive `constraints.StreamClosed`; a unique event type is not a stream closure.
85
- - Application-level constraint reindex operation: have an operator request and monitor the rebuild for the correct store, namespace, sequence and rules. Re-registering the registry is not a rebuild.
85
+ - Application-level constraint reindex operation: have an operator request and monitor the rebuild for the correct store, namespace, sequence and rules. Re-registering an unchanged registry is not a rebuild; the kernel starts one itself only for a new property rule or one whose index-affecting definition changed (`references/operations.md`).
@@ -0,0 +1,70 @@
1
+ # Operating constraint indexes
2
+
3
+ Language-neutral. How to request a rebuild from an application is in `references/<language>.md`.
4
+
5
+ ## Contents
6
+
7
+ - [A rule added or changed on stored events](#a-rule-added-or-changed-on-stored-events)
8
+ - [The skipped-duplicates report](#the-skipped-duplicates-report)
9
+ - [A rebuild that does not finish](#a-rebuild-that-does-not-finish)
10
+ - [Revised events](#revised-events)
11
+ - [Upgrading a kernel that holds unique claims](#upgrading-a-kernel-that-holds-unique-claims)
12
+
13
+ ## A rule added or changed on stored events
14
+
15
+ What registration does with history depends on the kind of rule:
16
+
17
+ | Rule | On registration |
18
+ | --- | --- |
19
+ | Unique property rule, new or changed | The kernel starts a reindex job for each sequence that holds events and that the rule newly covers or whose index the change affects, and rebuilds the index from the events in log order |
20
+ | Unique property rule, unchanged | Nothing. Registering the same definitions again is not a rebuild |
21
+ | Unique event type rule | Nothing to rebuild: it keeps no index and judges the next append against the source's stored events |
22
+ | Closing rule | History is ignored. Request a rebuild to apply past closing and reopening events |
23
+
24
+ A property rule counts as changed when its claiming or removal events or properties, case comparison, retention mode or scope differ, or when its sequence selection now covers a sequence it did not cover before. A selection that only grew rebuilds the newly covered sequences and leaves the ones it already covered alone. Narrowing the selection rebuilds nothing.
25
+
26
+ While a unique property index rebuilds, appends governed by that index are refused with the unavailable-index error and store nothing; retry the unchanged append after a delay. Appends the index does not govern continue, and a rebuild of closure rules alone refuses no append.
27
+
28
+ Default procedure after deploying a new or changed property rule to a store that holds events:
29
+
30
+ 1. Find the reindex job for each namespace and affected sequence and follow it to `CompletedSuccessfully`. Registration does not wait for it and does not fail when the job cannot start. If no job appears for a sequence that holds governed events, request the rebuild explicitly.
31
+ 2. Read the progress message of the job's reindex step for skipped duplicates (next section).
32
+ 3. Prove contention with an append in each namespace.
33
+
34
+ ## The skipped-duplicates report
35
+
36
+ A rebuild does not fail on history that already breaks the rule. When storage rejects a claim because it collides with one already rebuilt, the kernel logs a warning, does not write that claim and continues. The first historical claimant keeps the value until an event releases or replaces it.
37
+
38
+ The progress message of the job's reindex step, not of the job itself, reports the skips per constraint, for example `Skipped 3 duplicate claims: UniqueEmail=2, UniqueName=1`. It holds constraint names and counts only: no values, hashes or claimant identities. The counts are rejected claim writes, not sources or values. A rebuild without collisions leaves the message unchanged, so a clean message on a step of a job that reached `CompletedSuccessfully` means storage rejected no claim; it does not describe values that history claimed twice and later released. Only rejected writes are skipped and counted: storage that has fallen back to a non-unique index can accept a colliding claim without reporting it, so prove contention as well.
39
+
40
+ For each reported constraint, find the sources that share a value from the events or a read model, decide in the domain which one keeps it, and record that with events: the others take another value or release theirs. A source whose colliding claim was not written does not hold that value. When that claim was a change of value, the source's previous claim can still stand, so do not assume it holds nothing. If the domain gives the value to such a source, first release the current owner's claim with an event, then append a fresh claim for the chosen source.
41
+
42
+ ## A rebuild that does not finish
43
+
44
+ Symptoms: governed appends keep returning the unavailable-index error, the gauge `chronicle-event-sequences-constraint-indexes-rebuilding` stays above zero, and every 5 minutes the kernel logs a line that starts with `Constraint rebuild` and contains `is still holding`.
45
+
46
+ The kernel refuses governed appends on purpose: accepting them against an incomplete index would let duplicates in. About every 30 seconds it checks the reindex job step. Once the step has ended (failed, stopped, completed or removed) it releases the rebuild and catches the index up from the event sequence before governed appends resume. A warning that starts with `Constraint index rebuild terminal handoff failed` or `Constraint index rebuild cancellation handoff failed` means the step could not hand over; the same check recovers it.
47
+
48
+ - Default: wait and follow the job. Do not restart the kernel to hurry a running rebuild.
49
+ - Restart the kernel only when the `still holding` line ends with `restart the Kernel to recover`. The kernel adds that when it cannot tell whether the step is alive: the step is `unreadable`, the rebuild has `no job` (for example a step started by an earlier kernel version), or a finished step has `missing or inconsistent status history`. The restart is safe: the index is caught up from the event sequence before governed appends resume.
50
+ - A job that ended as `Failed` or `CompletedWithFailures` did not confirm successful completion; do not rely on the index or on its skipped-duplicates report. Read its steps for the cause, fix it, then request the rebuild again. A missing schema for a claiming or removal event type fails the rebuild.
51
+
52
+ ## Revised events
53
+
54
+ Revising a constrained event schedules a refold: the index is refolded from the revised position before the next governed append. A revision is not validated against the rule, so the refold does not guarantee the source the revised value: when another source already holds it, that source keeps it. Check the outcome with an append or a read model rather than assuming the claim transferred. For a rule that retains each value, the value the old content held is released only when the revising source owns it and the claim was made by that same event; a claim on that value made by another event is kept. Kernels from before this behaviour left the old claim in place. If constrained events were revised on such a kernel, rebuild that constraint's index once after upgrading; the stale claims are then released.
55
+
56
+ ## Upgrading a kernel that holds unique claims
57
+
58
+ Edge case: upgrading from a kernel that may have persisted unhashed claims. General upgrade order and rollback are in the `cratis-chronicle-deploy-kernel` skill, `references/upgrade-and-recovery.md`.
59
+
60
+ 1. Back up every namespace database before starting the new kernel.
61
+ 2. Start the new kernel. Its startup patch permanently deletes every unique claim whose stored value is not a 64-character lowercase hexadecimal hash, for all sequences and scopes and for both retention modes. The match is case-sensitive, so an uppercase value is deleted too. In-memory storage has nothing to clean.
62
+ 3. Unless every stored claim is known to have been a hash already, request a rebuild for each namespace and sequence and follow each job to `CompletedSuccessfully`. The rebuild recreates the claims from the events with current hashes; governed appends are refused while it runs.
63
+ 4. Read each job's skipped-duplicates report and prove contention.
64
+
65
+ Facts to plan around:
66
+
67
+ - Between the upgrade and the rebuild, a deleted claim does not stop another source from taking the value. Rebuild before reopening the store to writers when that matters.
68
+ - A downgrade does not bring the deleted claims back, and neither does a rebuild: it derives new claims from history. To roll back, stop the kernels and restore the backup.
69
+ - A patch that fails during cleanup or schema update is not recorded as done; starting the kernel again retries it safely.
70
+ - Duplicate claims that already have the hash shape are kept. Storage then falls back to a non-unique index and logs a warning, so verify contention after the upgrade.
@@ -45,7 +45,7 @@ Settings come from the file `/app/chronicle.json` and from `Cratis__Chronicle__
45
45
  | Capability | What it gives; when to use it | Reference |
46
46
  | --- | --- | --- |
47
47
  | Images | `latest-development` (with MongoDB), `latest-development-slim` (bring a database), `latest` (production). The image, not an environment name, decides development behaviour | [Images](references/development-and-production.md) |
48
- | Storage engines | `MongoDB`, `PostgreSql`, `MsSql`, `Sqlite`, `InMemory`; database naming; PostgreSQL pools | [Storage](references/storage.md) |
48
+ | Storage engines | `MongoDB`, `PostgreSql`, `MsSql`, `Sqlite`, `InMemory`; database naming and MongoDB grants; PostgreSQL pools | [Storage](references/storage.md) |
49
49
  | Schema jobs | Run with `--migrate-only` or `--verify-schema` (or `storage.schemaAction`) to migrate or check the schema and exit, when serving nodes must not change it | [Storage](references/storage.md) |
50
50
  | Platform-managed databases | `storage.connectionResolution` resolves server, database, schema and identity per store and namespace, when a platform places each tenant's database | [Storage](references/storage.md) |
51
51
  | Compliance key store | Keep encryption keys for personal data in HashiCorp Vault or Azure Key Vault instead of the main storage | [Storage](references/storage.md) |
@@ -69,11 +69,13 @@ Settings come from the file `/app/chronicle.json` and from `Cratis__Chronicle__
69
69
  | Back-pressure | `registration` queues client registrations and answers busy; `overload` reports a degraded node | [Configuration](references/configuration.md) |
70
70
  | Occurrences, imports, patterns | Occurrence delivery retry, bulk-import limits, pattern capture per store | [Configuration](references/configuration.md) |
71
71
  | Federation | Exchange public events between separate kernels on a dedicated port (35100); off by default | [Configuration](references/configuration.md) |
72
- | Clustering | Single node (default) or a multi-node cluster through MongoDB or SQL membership | [Configuration](references/configuration.md) |
72
+ | Clustering | Single node (default) or a multi-node cluster through MongoDB or SQL membership; lease standby for platforms that start the replacement first; best-effort node roles | [Configuration](references/configuration.md) |
73
+ | Constraint index repair | Retries and time budgets for keeping constraint indexes in step with the log; startup ranges | [Configuration](references/configuration.md) |
73
74
  | Shutdown | Drain time on stop | [Configuration](references/configuration.md) |
75
+ | Containers and Kubernetes | Memory and CPU sizing, StatefulSet shape with probes and disruption budget, crash dumps. Read when sizing a kernel container, running it on Kubernetes or capturing a crash | [Container and Kubernetes](references/container-and-kubernetes.md) |
74
76
  | Alerts | Incidents for observer failure conditions | [Configuration](references/configuration.md) |
75
77
  | Webhooks and external services | Where the kernel may call out, delivery retry, quarantine probes, managed identity | [Webhooks](references/webhooks.md) |
76
- | Upgrade, backup, restore | Single-node, rolling or stop-all upgrades, restore order, System event store | [Upgrade](references/upgrade-and-recovery.md) |
78
+ | Upgrade, backup, restore | Single-node, rolling or stop-all upgrades, crossing major versions, restore order, System event store | [Upgrade](references/upgrade-and-recovery.md) |
77
79
  | Troubleshooting | Symptom to setting | [Troubleshooting](references/troubleshooting.md) |
78
80
 
79
81
  Kernel telemetry export is taught by the `cratis-observability` skill, and the Workbench by the `cratis-chronicle-web-workbench` skill.
@@ -124,6 +126,7 @@ Every bindable setting, grouped by JSON object. Consult the [option index](refer
124
126
  - `events`: `queues`, `queueBoundedCapacity`, `queueBoundedEvents`, `statePersistenceInterval`, `constraintsVersionCheckInterval`, `causationPropertyRetention`, `queueDepletionWaitTimeoutMilliseconds`.
125
127
  - `shutdown`: `drainTimeout`, `hostShutdownReserve`.
126
128
  - `startup`: `busySiloWaitLimit`.
129
+ - `crashDumps`: `retain`.
127
130
  - `features`: `api`, `workbench`, `changesetStorage`, `oAuthAuthority`, `projectionGenerations`, `isolatedPartitionReplay`.
128
131
  - `storage`: `type`, `connectionDetails`, `connectionDetailsFile`, `databaseNamePrefix`, `systemDatabaseName`, `schema`, `createIfMissing`, `schemaMode`, `schemaAction`.
129
132
  - `storage.postgreSqlEntra`: `enabled`, `managedIdentityClientId`.
@@ -15,6 +15,7 @@
15
15
  - Alerts and telemetry
16
16
  - Named sinks and graphs
17
17
  - Memory and back-pressure
18
+ - Constraint index repair
18
19
  - Occurrences, imports and pattern capture
19
20
  - Federation
20
21
  - Sections with their own reference
@@ -42,6 +43,33 @@ Put structure in the file and secrets (connection strings, passwords, tokens)
42
43
  in environment variables fed from a secret store. Every node of a cluster must
43
44
  resolve the same values.
44
45
 
46
+ Write settings at the top level of `chronicle.json`:
47
+
48
+ ```json
49
+ {
50
+ "storage": { "type": "MongoDB" },
51
+ "observers": { "subscriberTimeout": 60 }
52
+ }
53
+ ```
54
+
55
+ Never wrap them in `Cratis` and `Chronicle` objects. The kernel places the
56
+ file under that path itself, so a wrapped setting binds to nothing and is
57
+ ignored without an error or a warning. Each such setting keeps its default or
58
+ the value from an environment variable; when a wrapped setting is one the
59
+ kernel requires, such as the TLS certificate, startup stops as if it were
60
+ missing. The `Cratis__Chronicle__` prefix belongs to environment variables
61
+ only.
62
+
63
+ ### Ignored legacy settings
64
+
65
+ The kernel still accepts two settings from earlier releases and ignores them.
66
+ Remove them when you find them.
67
+
68
+ | Legacy setting | What applies now |
69
+ | --- | --- |
70
+ | `additiveEventTypeSchemaEvolutionEventStores` | Every event store accepts compatible additions to its event types. The list no longer limits that to the stores it names, and a populated list logs a startup warning. List the stores that must keep strict validation under `strictEventTypeSchemaEventStores`, with the same value on every node |
71
+ | `identityProvider.certificate` | The top-level `tls` certificate serves the kernel's token endpoint; see [Network and TLS](network-and-tls.md). The setting logs a startup warning whenever it is present. Remove it and any `Cratis__Chronicle__IdentityProvider__Certificate__*` variables |
72
+
45
73
  ## Features
46
74
 
47
75
  | Setting | Default | Turn it off or on when |
@@ -140,10 +168,8 @@ been subscribed to them in any namespace for `observers.unseenRemovalAfter`
140
168
  jobs. Resolve those first.
141
169
  - An observer with no recorded last-seen time gets its clock started by the
142
170
  first sweep, so it is removed only a full period later.
143
- - Confirm each removal through its `Information` log (event store, namespace,
144
- observer id) and the `chronicle.observers.unseen_removed` metric. Silos
145
- sweep without coordinating, so one removal can be logged and counted by
146
- more than one silo.
171
+ - Each removal is logged at `Information` and counted in the
172
+ `chronicle.observers.unseen_removed` metric, possibly by more than one silo.
147
173
 
148
174
  ## Per-observer retry overrides
149
175
 
@@ -300,12 +326,49 @@ is a sound floor); a platform that kills after 10 seconds leaves no margin.
300
326
  | `clustering.gatewayEnabled` | `true` | Off when nothing connects through the gateway |
301
327
  | `clustering.advertisedIP` | detected | The address other nodes should use, when detection picks the wrong interface |
302
328
  | `clustering.responseTimeout` | 30 seconds | Node-to-node call timeout |
329
+ | `clustering.roles.eventSequences`, `clustering.roles.observers` | `true` | `false` makes this node leave itself out when it is the node that places new event sequences or observers. Best-effort only: a node knows just its own roles, so another node can still place that work here. Treat roles as a scheduling hint, never promise that a node will not run the work, and size every node to host any workload |
303
330
  | `clustering.defunctSiloCleanupPeriod`, `clustering.defunctSiloExpiration` | 1 hour, 3 hours | Cleanup of dead membership entries only |
304
331
 
305
332
  `Sql` clustering needs PostgreSQL or SQL Server storage; `MongoDB` clustering
306
333
  needs MongoDB storage. SQLite and in-memory storage are single-node. Two
307
334
  `Localhost` kernels on the same database do not form a cluster: a single-writer
308
- lease lets only one of them become ready.
335
+ lease lets only one of them serve. The other stays not ready, or reports
336
+ `Standby` with standby on.
337
+
338
+ ### Start-before-stop rollouts of a single node
339
+
340
+ Run one `Localhost` replica and keep the lease enabled. Some platforms start
341
+ the replacement and wait for it to be ready before stopping the old instance:
342
+ Azure Container Apps in single-revision mode, Cloud Run, and a one-replica
343
+ Kubernetes rolling update with `maxSurge: 1` and `maxUnavailable: 0`. There
344
+ the replacement waits for the lease, never becomes ready, and the rollout times
345
+ out. Set `clustering.singleWriterLease.standby` to `true`
346
+ (`Cratis__Chronicle__Clustering__SingleWriterLease__Standby=true`). It matters
347
+ only when the readiness probe (on Cloud Run, the startup probe) targets the
348
+ readiness path: `/health` or `/health/ready`, moved by `healthCheckEndpoint`.
349
+ Handover on Cloud Run is unverified; test a rollout first. Do not disable the
350
+ lease or add a replica to get past the timeout. Platforms that stop the old
351
+ instance first (`Recreate`, or `maxSurge: 0`) need no standby. What standby
352
+ costs:
353
+
354
+ - The replacement answers readiness with 200 and the body `Standby` while it
355
+ waits for the lease and until its startup completes, unless another
356
+ readiness check is unhealthy. That 200 does not mean it accepts traffic: it
357
+ processes nothing until it holds the lease and has started, and application traffic gets HTTP 503 with
358
+ `Retry-After` or gRPC `Unavailable`. Clients must retry through the whole
359
+ handover, including the replacement's startup and rehydration, which can
360
+ take minutes on a large store.
361
+ - Readiness no longer gates the rollout: the old instance stops before the
362
+ replacement has shown it can start, so a broken release takes the service
363
+ down. Validate images in staging against a copy of production data, and
364
+ keep the previous image or revision ready to redeploy.
365
+ - `standbyStartupTimeout` (default 10 minutes) bounds how long readiness
366
+ reports `Standby` after the lease is taken. Past it, readiness reports
367
+ `Unhealthy` (503); startup is not aborted and the kernel keeps the lease. Set it above your longest startup, including
368
+ rehydration of the largest store.
369
+ - `acquireTimeout` (default 2 minutes) still bounds the wait for the lease;
370
+ the kernel exits when it expires. Set it to cover the platform's time to stop
371
+ the old instance plus `ttl` (default 30 seconds).
309
372
 
310
373
  ## Alerts and telemetry
311
374
 
@@ -314,10 +377,8 @@ conditions such as a failing partition; `alerts.conditions.<name>.raiseAfter`
314
377
  (default 5 minutes) and `.enabled` tune one condition, and
315
378
  `alerts.excludeObservers` lists observer ids or `*` / `?` patterns to leave
316
379
  out. Open incidents are also exported as a gauge (`chronicle_alerts_open_incidents`
317
- in Prometheus under the default names). Exporting
318
- kernel traces, metrics and logs, and writing Prometheus or other backend alert
319
- rules on observer failure metrics or incidents, is taught by the
320
- `cratis-observability` skill.
380
+ in Prometheus under the default names). Exporting telemetry and writing alert
381
+ rules are taught by the `cratis-observability` skill.
321
382
 
322
383
  ## Named sinks and graphs
323
384
 
@@ -352,7 +413,7 @@ graph server.
352
413
  }
353
414
  ```
354
415
 
355
- Names here are illustrative. The environment form is
416
+ The environment form is
356
417
  `Cratis__Chronicle__Sinks__Configurations__<name>__Type`.
357
418
 
358
419
  ## Memory and back-pressure
@@ -368,6 +429,31 @@ All three are on by default; change them only against a measured problem.
368
429
  A projection observes nothing until its registration has been applied; it
369
430
  then receives every event from its own position.
370
431
 
432
+ ## Constraint index repair
433
+
434
+ When a constraint-index write fails or runs out of time, the event sequence
435
+ repairs the index from the event log; the committed append is not failed.
436
+ Until the index is repaired, an append of an event type it governs can
437
+ return `ConstraintIndexUnavailable` and write nothing; retry it unchanged.
438
+ Keep the defaults unless storage latency calls for a change.
439
+
440
+ | Setting | Default | Allowed | Trade-off |
441
+ | --- | --- | --- | --- |
442
+ | `updateAttempts` | 3 | 1–10 | Each retry delays the append; more attempts mean fewer repairs |
443
+ | `attemptTimeout` | 1 second | above zero | How long Chronicle waits for one index write. When it does not finish in time, the attempt is cancelled and the wait abandoned, though storage may still complete the write. Lower for fast storage, raise for slow or distant storage |
444
+ | `postCommitBudget` | 2 seconds | above zero | Time to update indexes after an append commits; the rest is left to repair |
445
+ | `timerTurnBudget` | 2 seconds | at least 500 ms | One timer-driven repair turn; a catch-up turn gets this minus 250 ms |
446
+ | `appendRepairBudget` | 5 seconds | at least 500 ms | Added to the append that triggers the repair; more means faster convergence and slower appends |
447
+ | `appendRepairInterval` | 5 seconds | not negative | Minimum time between repairs started by appends; zero lets every append repair |
448
+ | `poisonThreshold` | 5 | at least 2 | Consecutive identical failures at the same event position before it is settled as poison. Only non-transient failures count, and only in an attempt where another storage call succeeded; lower settles sooner but may settle a failure that would have cleared |
449
+
450
+ The kernel refuses to start when a value is out of range, and the error names
451
+ the setting, for example `ConstraintIndexRepair.UpdateAttempts`. One append
452
+ turn can take up to about `timerTurnBudget` + 2 × `attemptTimeout` +
453
+ `appendRepairBudget` + 2 × `postCommitBudget` + 4 seconds: 17 seconds with the
454
+ defaults. Keep it well below `clustering.responseTimeout` (30 seconds).
455
+ Startup does not check the sum; recompute it before changing either.
456
+
371
457
  ## Occurrences, imports and pattern capture
372
458
 
373
459
  | Section | What it controls |
@@ -386,7 +472,7 @@ inbound port. It is off by default and never uses the main port.
386
472
  | --- | --- |
387
473
  | `federation.enabled` | Opens the federation listener and runs consumer bindings. `false` stops every link |
388
474
  | `federation.port` | Listener port, default 35100. Must differ from the main and health ports |
389
- | `federation.certificatePath`, `certificatePasswordPath` | PKCS#12 certificate for the listener and a **file** holding its password. Required; the main TLS certificate is not reused |
475
+ | `federation.certificatePath`, `certificatePasswordPath` | PKCS#12 certificate for the listener and a **file** holding its password. Required for pinned federation; with `federation.hosted.enabled` and no path, the kernel issues its own listener certificate. The main TLS certificate is never reused |
390
476
  | `federation.grants.<name>` | Producer side: which peer (`clientPin`) may read which `eventStore` and `namespaces`, and either `allPublic` or a list of `eventTypes` |
391
477
  | `federation.certificates.<name>` | Consumer side: a named client certificate, `path` and `passwordPath` |
392
478
  | `federation.bindings.<name>` | Consumer side: maps the `logicalSource` name application code uses to an `endpoint` (HTTPS), the peer's `serverPin`, the name of a `clientCertificate`, `remoteEventStore` / `remoteNamespace` and `targetEventStore` / `targetNamespace` |
@@ -397,15 +483,26 @@ inbound port. It is off by default and never uses the main port.
397
483
  - Peers are identified by a pin, `sha256:<base64 of the SHA-256 of the
398
484
  certificate's public key>`, not by a shared certificate authority. The
399
485
  listener requires a client certificate.
400
- - A grant never delivers private event types, whatever it lists.
486
+ - A grant never delivers private event types, whatever it lists, nor any
487
+ event whose schema declares personal-data or `[Encrypted]` properties: the
488
+ producer skips it and moves on. Undeclared personal data is not detected.
489
+ - The consumer's `targetEventStore` must have a different name from the
490
+ producer's store: an event whose origin is the receiving store is rejected.
401
491
  - The kernel refuses to start when federation is enabled without a
402
- certificate or when the port collides with another listener.
492
+ certificate (unless hosted federation issues one) or when the port collides
493
+ with another listener.
403
494
  - Grants and bindings can also be changed at runtime from the Workbench
404
- Federation page or the CLI; revoking a link stops delivery at once.
495
+ Federation page. A revoked grant no longer authorizes later pulls, but
496
+ another active grant that covers the same peer, store and namespace still
497
+ does. A pull already authorized is not checked again. Runtime
498
+ state wins: configuration only seeds a grant or binding whose name has no
499
+ history yet. Once it has any (its first seeding, a runtime change, removal or
500
+ revocation), editing configuration and restarting changes nothing and never
501
+ brings back a removed or revoked entry; change it at runtime.
405
502
  - `federation.hosted`, `federation.enrollment` and `federation.dial` serve
406
503
  hosted federation, where one kernel is the certificate authority for many
407
- customer kernels and enrols each with a one-time code instead of a pin. Their options are listed in the
408
- [option index](kernel-options.md).
504
+ customer kernels and enrols each with a one-time code instead of a pin. See
505
+ the [option index](kernel-options.md).
409
506
 
410
507
  ## Sections with their own reference
411
508