hecks 5.0.0 → 7.0.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 (1687) hide show
  1. checksums.yaml +4 -4
  2. data/examples/pizzas/bluebook/pizzas.bluebook +1 -0
  3. data/exe/hecks +31 -12
  4. data/lib/hecks/adapters/driven/claude_code.rb +3 -3
  5. data/lib/hecks/adapters/driven/d1.rb +2 -1
  6. data/lib/hecks/adapters/driven/folder.rb +44 -28
  7. data/lib/hecks/adapters/driven/folder_overlay.rb +66 -0
  8. data/lib/hecks/adapters/driven/google_authentication.adapter +3 -0
  9. data/lib/hecks/adapters/driven/google_authentication.rb +99 -0
  10. data/lib/hecks/adapters/driven/governance_authorization.rb +32 -36
  11. data/lib/hecks/adapters/driven/heki/journal.rb +45 -0
  12. data/lib/hecks/adapters/driven/heki.rb +1 -1
  13. data/lib/hecks/adapters/driven/identity_registry.rb +1 -1
  14. data/lib/hecks/adapters/driven/in_memory_ordering.rb +3 -2
  15. data/lib/hecks/adapters/driven/in_process_key_vault.rb +1 -1
  16. data/lib/hecks/adapters/driven/key_keeper.rb +42 -0
  17. data/lib/hecks/adapters/driven/lambda/client.rb +8 -2
  18. data/lib/hecks/adapters/driven/lambda/remote_dispatcher.rb +185 -0
  19. data/lib/hecks/adapters/driven/lambda.rb +14 -2
  20. data/lib/hecks/adapters/driven/memory/dispatch_claims.rb +25 -0
  21. data/lib/hecks/adapters/driven/memory/outbox_rows.rb +2 -2
  22. data/lib/hecks/adapters/driven/memory.rb +15 -4
  23. data/lib/hecks/adapters/driven/postgres/codec.rb +1 -1
  24. data/lib/hecks/adapters/driven/postgres/journal.rb +46 -0
  25. data/lib/hecks/adapters/driven/postgres/name_guard.rb +25 -0
  26. data/lib/hecks/adapters/driven/postgres/outbox.rb +33 -7
  27. data/lib/hecks/adapters/driven/postgres/projection.rb +43 -0
  28. data/lib/hecks/adapters/driven/postgres/repository.rb +2 -2
  29. data/lib/hecks/adapters/driven/postgres/schema_builder.rb +2 -1
  30. data/lib/hecks/adapters/driven/postgres/set_dialect.rb +44 -0
  31. data/lib/hecks/adapters/driven/postgres/shared_connection.rb +1 -1
  32. data/lib/hecks/adapters/driven/postgres.adapter +8 -0
  33. data/lib/hecks/adapters/driven/postgres.rb +11 -3
  34. data/lib/hecks/adapters/driven/postgres_dump/connection.rb +57 -0
  35. data/lib/hecks/adapters/driven/postgres_dump.rb +117 -0
  36. data/lib/hecks/adapters/driven/postgres_era/boot.rb +58 -0
  37. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/class_methods.rb +28 -8
  38. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/dialect.rb +11 -6
  39. data/lib/hecks/adapters/driven/postgres_era/field_cache_provisioner.rb +39 -0
  40. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/journal.rb +52 -13
  41. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/chain_sql.rb +37 -53
  42. data/lib/hecks/adapters/driven/postgres_era/lineage/direct_sql.rb +73 -0
  43. data/lib/hecks/adapters/driven/postgres_era/lineage/direct_verified.json +10 -0
  44. data/lib/hecks/adapters/driven/postgres_era/lineage/direct_verified.rb +65 -0
  45. data/lib/hecks/adapters/driven/postgres_era/lineage/domain_rename.rb +143 -0
  46. data/lib/hecks/adapters/driven/postgres_era/lineage/domain_rename_state.rb +108 -0
  47. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/era_integrity.rb +13 -8
  48. data/lib/hecks/adapters/driven/postgres_era/lineage/era_store.rb +125 -0
  49. data/lib/hecks/adapters/driven/postgres_era/lineage/layered_sql.rb +64 -0
  50. data/lib/hecks/adapters/driven/postgres_era/lineage/ledger_reset.rb +150 -0
  51. data/lib/hecks/adapters/driven/postgres_era/lineage/mint_provisioning.rb +85 -0
  52. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/mint_transaction.rb +13 -9
  53. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/provisioning.rb +11 -5
  54. data/lib/hecks/adapters/driven/postgres_era/lineage/split_sql.rb +76 -0
  55. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/sql_templates.rb +15 -2
  56. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/tail_merge.rb +1 -1
  57. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage.rb +11 -3
  58. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/context.rb +68 -0
  59. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/coverage_check.rb +16 -12
  60. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/disposable_ledger.rb +119 -0
  61. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/era_resolution.rb +219 -0
  62. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/era_resolver.rb +114 -0
  63. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/held_era.rb +68 -0
  64. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/ledger_change.rb +63 -0
  65. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/merge_coordinator.rb +3 -3
  66. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/mint_decision.rb +163 -0
  67. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/mint_request.rb +24 -0
  68. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/minter.rb +143 -0
  69. data/lib/hecks/adapters/driven/postgres_era/lineage_manager/refusals.rb +76 -0
  70. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager.rb +46 -12
  71. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/query_phases.rb +8 -2
  72. data/lib/hecks/adapters/driven/postgres_era/shared_tables.rb +32 -0
  73. data/lib/hecks/adapters/driven/postgres_era.adapter +19 -1
  74. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era.rb +39 -23
  75. data/lib/hecks/adapters/driven/prism.rb +4 -4
  76. data/lib/hecks/adapters/driven/projection/read_model_walk.rb +126 -0
  77. data/lib/hecks/adapters/driven/projection/row_decoding.rb +57 -0
  78. data/lib/hecks/adapters/driven/set_transform/assignments.rb +101 -0
  79. data/lib/hecks/adapters/driven/set_transform/expressions.rb +138 -0
  80. data/lib/hecks/adapters/driven/set_transform.rb +81 -0
  81. data/lib/hecks/adapters/driven/sql_keyset.rb +61 -0
  82. data/lib/hecks/adapters/driven/sql_query_builder.rb +29 -9
  83. data/lib/hecks/adapters/driven/sqlite/codec.rb +1 -1
  84. data/lib/hecks/adapters/driven/sqlite/ddl.rb +7 -0
  85. data/lib/hecks/adapters/driven/sqlite/dialect.rb +2 -1
  86. data/lib/hecks/adapters/driven/sqlite/dispatch_claims.rb +28 -0
  87. data/lib/hecks/adapters/driven/sqlite/journal.rb +46 -0
  88. data/lib/hecks/adapters/driven/sqlite/name_guard.rb +25 -0
  89. data/lib/hecks/adapters/driven/sqlite/outbox.rb +5 -4
  90. data/lib/hecks/adapters/driven/sqlite/projection.rb +9 -135
  91. data/lib/hecks/adapters/driven/sqlite/repository.rb +2 -2
  92. data/lib/hecks/adapters/driven/sqlite/schema_builder.rb +36 -4
  93. data/lib/hecks/adapters/driven/sqlite/set_dialect.rb +39 -0
  94. data/lib/hecks/adapters/driven/sqlite.adapter +2 -0
  95. data/lib/hecks/adapters/driven/sqlite.rb +20 -3
  96. data/lib/hecks/adapters/driven/tenant_provisioner.rb +1 -1
  97. data/lib/hecks/adapters/driven/worktree_overlay.rb +117 -0
  98. data/lib/hecks/adapters/driven.rb +8 -3
  99. data/lib/hecks/adapters/driving/cli/shorthand.rb +5 -1
  100. data/lib/hecks/adapters/driving/cli.rb +2 -2
  101. data/lib/hecks/adapters/driving/cli_runner/answers.rb +96 -34
  102. data/lib/hecks/adapters/driving/cli_runner/bang_rule.rb +35 -0
  103. data/lib/hecks/adapters/driving/cli_runner/completion_words.rb +36 -0
  104. data/lib/hecks/adapters/driving/cli_runner/json_words.rb +55 -0
  105. data/lib/hecks/adapters/driving/cli_runner/name_index.rb +63 -0
  106. data/lib/hecks/adapters/driving/cli_runner/read_context.rb +32 -0
  107. data/lib/hecks/adapters/driving/cli_runner/renamed_names.rb +49 -0
  108. data/lib/hecks/adapters/driving/cli_runner/resolution.rb +66 -39
  109. data/lib/hecks/adapters/driving/cli_runner/resume_words.rb +63 -0
  110. data/lib/hecks/adapters/driving/cli_runner/run_reference.rb +66 -0
  111. data/lib/hecks/adapters/driving/cli_runner/run_replay.rb +118 -0
  112. data/lib/hecks/adapters/driving/cli_runner/search_words.rb +35 -0
  113. data/lib/hecks/adapters/driving/cli_runner/settling.rb +14 -9
  114. data/lib/hecks/adapters/driving/cli_runner/streaming.rb +12 -11
  115. data/lib/hecks/adapters/driving/cli_runner/suggestions.rb +16 -8
  116. data/lib/hecks/adapters/driving/cli_runner/tour_words.rb +77 -0
  117. data/lib/hecks/adapters/driving/cli_runner/verb_names.rb +81 -0
  118. data/lib/hecks/adapters/driving/cli_runner/verbosity.rb +75 -0
  119. data/lib/hecks/adapters/driving/cli_runner.rb +110 -9
  120. data/lib/hecks/adapters/driving/context_line.rb +85 -0
  121. data/lib/hecks/adapters/driving/exit_status.rb +31 -0
  122. data/lib/hecks/adapters/driving/github_webhook.rb +2 -1
  123. data/lib/hecks/adapters/driving/handle/verb_methods.rb +46 -0
  124. data/lib/hecks/adapters/driving/handle.rb +9 -17
  125. data/lib/hecks/adapters/driving/json.rb +11 -8
  126. data/lib/hecks/adapters/driving/launcher_options.rb +41 -34
  127. data/lib/hecks/adapters/driving/mcp/progress_sink.rb +45 -0
  128. data/lib/hecks/adapters/driving/mcp/tool_calls.rb +7 -5
  129. data/lib/hecks/adapters/driving/mcp.rb +25 -5
  130. data/lib/hecks/adapters/driving/mcp_scope/argument_policy.rb +40 -7
  131. data/lib/hecks/adapters/driving/mcp_scope/env_problems.rb +3 -1
  132. data/lib/hecks/adapters/driving/mcp_scope.rb +11 -9
  133. data/lib/hecks/adapters/driving/newcomer.rb +6 -5
  134. data/lib/hecks/adapters/driving/ruby/aggregate_module/hooks.rb +154 -0
  135. data/lib/hecks/adapters/driving/ruby/aggregate_module.rb +73 -101
  136. data/lib/hecks/adapters/driving/ruby/bulk_verbs.rb +127 -0
  137. data/lib/hecks/adapters/driving/ruby/{chapter.rb → declaration.rb} +27 -27
  138. data/lib/hecks/adapters/driving/ruby/query_rows.rb +27 -0
  139. data/lib/hecks/adapters/driving/ruby.rb +25 -24
  140. data/lib/hecks/adapters/driving/usage_cache.rb +14 -3
  141. data/lib/hecks/adapters/driving/usage_log.rb +146 -0
  142. data/lib/hecks/adapters/driving/write_guard.rb +55 -0
  143. data/lib/hecks/adapters/driving.rb +0 -1
  144. data/lib/hecks/assembly.rb +101 -0
  145. data/lib/hecks/behaviors/dsl.rb +18 -4
  146. data/lib/hecks/behaviors/expectations/boot.rb +7 -7
  147. data/lib/hecks/behaviors/expectations/checks.rb +1 -1
  148. data/lib/hecks/behaviors/expectations/dispatching.rb +10 -9
  149. data/lib/hecks/behaviors/expectations/qualify.rb +9 -9
  150. data/lib/hecks/behaviors/expectations.rb +24 -10
  151. data/lib/hecks/behaviors/ir.rb +4 -2
  152. data/lib/hecks/behaviors/rspec.rb +1 -1
  153. data/lib/hecks/behaviors/runner.rb +31 -4
  154. data/lib/hecks/bench/environment.rb +6 -2
  155. data/lib/hecks/bench/postgres_probe.rb +3 -1
  156. data/lib/hecks/bench/report.rb +4 -1
  157. data/lib/hecks/bench/suite.rb +9 -3
  158. data/lib/hecks/bluebook/acknowledgements.rb +81 -0
  159. data/lib/hecks/bluebook/aggregate.rb +29 -17
  160. data/lib/hecks/bluebook/ask_resolution.rb +17 -17
  161. data/lib/hecks/bluebook/assembly/aggregate_assembly.rb +8 -5
  162. data/lib/hecks/bluebook/assembly/contracts/sagas.rb +2 -0
  163. data/lib/hecks/bluebook/assembly/contracts/structure.rb +24 -15
  164. data/lib/hecks/bluebook/assembly/marks.rb +10 -1
  165. data/lib/hecks/bluebook/assembly/scalars.rb +8 -2
  166. data/lib/hecks/bluebook/assembly/specializer.rb +2 -2
  167. data/lib/hecks/bluebook/assembly.rb +10 -10
  168. data/lib/hecks/bluebook/behaviour/aggregate.rb +29 -4
  169. data/lib/hecks/bluebook/behaviour/attribute.rb +12 -0
  170. data/lib/hecks/bluebook/behaviour/command.rb +1 -1
  171. data/lib/hecks/bluebook/behaviour/{chapter.rb → declaration.rb} +17 -17
  172. data/lib/hecks/bluebook/behaviour/domain_port.rb +1 -1
  173. data/lib/hecks/bluebook/behaviour/entity.rb +1 -0
  174. data/lib/hecks/bluebook/behaviour/hecksagon.rb +8 -1
  175. data/lib/hecks/bluebook/behaviour/process_manager.rb +4 -1
  176. data/lib/hecks/bluebook/behaviour/query.rb +5 -0
  177. data/lib/hecks/bluebook/behaviour/read_model.rb +4 -1
  178. data/lib/hecks/bluebook/behaviour/traits.rb +13 -0
  179. data/lib/hecks/bluebook/capabilities/attribute_values.rb +17 -16
  180. data/lib/hecks/bluebook/capabilities/package_declared.rb +65 -0
  181. data/lib/hecks/bluebook/capabilities.rb +32 -132
  182. data/lib/hecks/bluebook/command.rb +33 -7
  183. data/lib/hecks/bluebook/context_map.rb +104 -0
  184. data/lib/hecks/bluebook/{chapter.rb → declaration.rb} +45 -17
  185. data/lib/hecks/bluebook/domain_port.rb +7 -3
  186. data/lib/hecks/bluebook/dsl/adapter_builder.rb +28 -4
  187. data/lib/hecks/bluebook/dsl/aggregate_builder/draining.rb +2 -2
  188. data/lib/hecks/bluebook/dsl/aggregate_builder/one_of_reference.rb +54 -0
  189. data/lib/hecks/bluebook/dsl/aggregate_builder/query_field_sealing.rb +11 -2
  190. data/lib/hecks/bluebook/dsl/aggregate_builder/query_sealing.rb +15 -5
  191. data/lib/hecks/bluebook/dsl/aggregate_builder/relationships.rb +21 -5
  192. data/lib/hecks/bluebook/dsl/aggregate_builder/renaming.rb +25 -0
  193. data/lib/hecks/bluebook/dsl/aggregate_builder/rules.rb +22 -22
  194. data/lib/hecks/bluebook/dsl/aggregate_builder/sealing.rb +2 -2
  195. data/lib/hecks/bluebook/dsl/aggregate_builder.rb +30 -22
  196. data/lib/hecks/bluebook/dsl/attribute_collector.rb +0 -1
  197. data/lib/hecks/bluebook/dsl/audience_word.rb +40 -0
  198. data/lib/hecks/bluebook/dsl/bluebook_builder/metadata.rb +56 -0
  199. data/lib/hecks/bluebook/dsl/bluebook_builder/modules.rb +80 -0
  200. data/lib/hecks/bluebook/dsl/bluebook_builder/pending_givens.rb +22 -22
  201. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/computed_sources.rb +27 -21
  202. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/correlation_keys.rb +54 -5
  203. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/event_shapes.rb +5 -4
  204. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/fan_out_rows.rb +3 -3
  205. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/hop_tails.rb +13 -5
  206. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/projected_fields.rb +4 -4
  207. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/provisions.rb +38 -84
  208. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/query_hops.rb +5 -5
  209. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/references.rb +6 -6
  210. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/with_projections.rb +6 -6
  211. data/lib/hecks/bluebook/dsl/bluebook_builder/validation.rb +4 -3
  212. data/lib/hecks/bluebook/dsl/bluebook_builder.rb +75 -92
  213. data/lib/hecks/bluebook/dsl/bootstrap_table.rb +10 -0
  214. data/lib/hecks/bluebook/dsl/command_builder/folded_sets.rb +48 -0
  215. data/lib/hecks/bluebook/dsl/command_builder.rb +39 -16
  216. data/lib/hecks/bluebook/dsl/context_map_builder.rb +73 -0
  217. data/lib/hecks/bluebook/dsl/entity_builder/rules.rb +17 -17
  218. data/lib/hecks/bluebook/dsl/entity_builder/scope.rb +3 -3
  219. data/lib/hecks/bluebook/dsl/entity_builder/sealing.rb +2 -2
  220. data/lib/hecks/bluebook/dsl/entity_builder.rb +3 -5
  221. data/lib/hecks/bluebook/dsl/generic_dispatch.rb +6 -4
  222. data/lib/hecks/bluebook/dsl/hecksagon_builder/{chapter_scope.rb → bluebook_scope.rb} +14 -14
  223. data/lib/hecks/bluebook/dsl/hecksagon_builder.rb +33 -27
  224. data/lib/hecks/bluebook/dsl/identity_declaration.rb +6 -2
  225. data/lib/hecks/bluebook/dsl/kinds.rb +53 -0
  226. data/lib/hecks/bluebook/dsl/lifecycle_builder.rb +4 -1
  227. data/lib/hecks/bluebook/dsl/port_operation_builder.rb +9 -2
  228. data/lib/hecks/bluebook/dsl/process_manager_builder.rb +25 -15
  229. data/lib/hecks/bluebook/dsl/query_builder.rb +14 -8
  230. data/lib/hecks/bluebook/dsl/read_model_builder/sealing.rb +6 -11
  231. data/lib/hecks/bluebook/dsl/read_model_builder.rb +1 -2
  232. data/lib/hecks/bluebook/dsl/translation_builder.rb +16 -1
  233. data/lib/hecks/bluebook/dsl/word_gate.rb +3 -2
  234. data/lib/hecks/bluebook/dsl/world_builder.rb +2 -2
  235. data/lib/hecks/bluebook/dsl.rb +4 -2
  236. data/lib/hecks/bluebook/expression/ast_json/emitters.rb +4 -0
  237. data/lib/hecks/bluebook/expression/ast_json.rb +5 -3
  238. data/lib/hecks/bluebook/expression/ast_reader/blocks.rb +41 -0
  239. data/lib/hecks/bluebook/expression/ast_reader.rb +2 -10
  240. data/lib/hecks/bluebook/expression/canonical_form.rb +9 -4
  241. data/lib/hecks/bluebook/expression/evaluator/parser.rb +4 -1
  242. data/lib/hecks/bluebook/expression/evaluator.rb +13 -9
  243. data/lib/hecks/bluebook/expression/projection.json +6 -0
  244. data/lib/hecks/bluebook/expression/resolver/block_predicates.rb +50 -2
  245. data/lib/hecks/bluebook/expression/resolver/lookups.rb +2 -1
  246. data/lib/hecks/bluebook/expression/resolver/operations.rb +1 -0
  247. data/lib/hecks/bluebook/expression/resolver/parsing.rb +21 -15
  248. data/lib/hecks/bluebook/expression/resolver/scanning.rb +4 -1
  249. data/lib/hecks/bluebook/expression.rb +1 -1
  250. data/lib/hecks/bluebook/hecksagon.rb +48 -23
  251. data/lib/hecks/bluebook/meta_validator/adapter_judge.rb +4 -1
  252. data/lib/hecks/bluebook/meta_validator/judge/cells.rb +1 -1
  253. data/lib/hecks/bluebook/meta_validator/judge/identity.rb +11 -5
  254. data/lib/hecks/bluebook/meta_validator/modes.rb +27 -27
  255. data/lib/hecks/bluebook/meta_validator/plan/category.rb +10 -2
  256. data/lib/hecks/bluebook/meta_validator/plan/verbs.rb +9 -0
  257. data/lib/hecks/bluebook/meta_validator/plan.rb +7 -6
  258. data/lib/hecks/bluebook/meta_validator/readings/fields.rb +3 -3
  259. data/lib/hecks/bluebook/meta_validator/reconstruction/heads.rb +14 -4
  260. data/lib/hecks/bluebook/meta_validator/reconstruction/reading.rb +8 -1
  261. data/lib/hecks/bluebook/meta_validator/reconstruction.rb +24 -19
  262. data/lib/hecks/bluebook/meta_validator/shapes.rb +9 -1
  263. data/lib/hecks/bluebook/meta_validator/syntax_boot/disk_cache.rb +19 -16
  264. data/lib/hecks/bluebook/meta_validator/syntax_boot.rb +21 -15
  265. data/lib/hecks/bluebook/meta_validator/verdict_cache/prebuilt.rb +4 -1
  266. data/lib/hecks/bluebook/meta_validator/verdict_cache.rb +11 -10
  267. data/lib/hecks/bluebook/meta_validator.rb +25 -22
  268. data/lib/hecks/bluebook/model_check/aggregate_checks.rb +95 -0
  269. data/lib/hecks/bluebook/model_check/ask_checks.rb +31 -5
  270. data/lib/hecks/bluebook/model_check/client_profile.rb +8 -42
  271. data/lib/hecks/bluebook/model_check/context_checks.rb +97 -0
  272. data/lib/hecks/bluebook/model_check/context_map_checks.rb +158 -0
  273. data/lib/hecks/bluebook/model_check/lifecycle_checks.rb +27 -5
  274. data/lib/hecks/bluebook/model_check/one_of_checks.rb +106 -0
  275. data/lib/hecks/bluebook/model_check/orphan_checks.rb +129 -0
  276. data/lib/hecks/bluebook/model_check/reaction_chains.rb +114 -0
  277. data/lib/hecks/bluebook/model_check/reaction_cycles.rb +53 -0
  278. data/lib/hecks/bluebook/model_check/reaction_depth_checks.rb +58 -0
  279. data/lib/hecks/bluebook/model_check/reaction_walk.rb +62 -0
  280. data/lib/hecks/bluebook/model_check/redundant_relationships.rb +38 -0
  281. data/lib/hecks/bluebook/model_check/reference_checks.rb +11 -1
  282. data/lib/hecks/bluebook/model_check/saga_checks.rb +8 -3
  283. data/lib/hecks/bluebook/model_check/verbs.rb +4 -4
  284. data/lib/hecks/bluebook/model_check.rb +33 -35
  285. data/lib/hecks/bluebook/named_pattern.rb +12 -1
  286. data/lib/hecks/bluebook/one_of_union.rb +35 -0
  287. data/lib/hecks/bluebook/pattern_subset.rb +12 -3
  288. data/lib/hecks/bluebook/process_manager.rb +20 -3
  289. data/lib/hecks/bluebook/project_loader.rb +3 -2
  290. data/lib/hecks/bluebook/project_register.rb +21 -5
  291. data/lib/hecks/bluebook/query.rb +4 -1
  292. data/lib/hecks/bluebook/read_model.rb +5 -5
  293. data/lib/hecks/bluebook/reference.rb +3 -3
  294. data/lib/hecks/bluebook/smoke_test.rb +15 -13
  295. data/lib/hecks/bluebook/synthesizer.rb +48 -13
  296. data/lib/hecks/bluebook/translation.rb +5 -3
  297. data/lib/hecks/bluebook/translation_expression/parser.rb +14 -5
  298. data/lib/hecks/bluebook/translation_plan.rb +9 -2
  299. data/lib/hecks/bluebook.rb +6 -3
  300. data/lib/hecks/bulk/bluebook/adapters/row_sweeper.adapter +7 -0
  301. data/lib/hecks/bulk/bluebook/bulk.behaviors +18 -0
  302. data/lib/hecks/bulk/bluebook/bulk.bluebook +126 -0
  303. data/lib/hecks/bulk/bluebook/bulk.hecksagon +11 -0
  304. data/lib/hecks/bulk/bluebook/bulk.ports.hecksagon +13 -0
  305. data/lib/hecks/bulk/plan.rb +60 -0
  306. data/lib/hecks/bulk/row_sweeper.rb +34 -0
  307. data/lib/hecks/bulk/set_arguments.rb +68 -0
  308. data/lib/hecks/bulk/set_eligibility.rb +50 -0
  309. data/lib/hecks/bulk/set_planner.rb +100 -0
  310. data/lib/hecks/bulk/set_sweep.rb +78 -0
  311. data/lib/hecks/bulk/sweep.rb +67 -0
  312. data/lib/hecks/ci_pipeline/adapters/ci_cache.adapter +7 -0
  313. data/lib/hecks/ci_pipeline/adapters/ci_cache.rb +39 -0
  314. data/lib/hecks/ci_pipeline/adapters/ci_runner.adapter +7 -0
  315. data/lib/hecks/ci_pipeline/adapters/ci_runner.rb +55 -0
  316. data/lib/hecks/ci_pipeline/ci_pipeline.behaviors +322 -0
  317. data/lib/hecks/ci_pipeline/ci_pipeline.bluebook +938 -0
  318. data/lib/hecks/ci_pipeline/ci_pipeline.hecksagon +12 -0
  319. data/lib/hecks/ci_pipeline/ci_pipeline.ports.hecksagon +16 -0
  320. data/lib/hecks/ci_speed/adapters/ci_reader.adapter +7 -0
  321. data/lib/hecks/ci_speed/adapters/ci_reader.rb +141 -0
  322. data/lib/hecks/ci_speed/adapters/local_runner/answer.rb +41 -0
  323. data/lib/hecks/ci_speed/adapters/local_runner/catalog.rb +89 -0
  324. data/lib/hecks/ci_speed/adapters/local_runner/checkouts.rb +89 -0
  325. data/lib/hecks/ci_speed/adapters/local_runner/launcher.rb +69 -0
  326. data/lib/hecks/ci_speed/adapters/local_runner/load_average.rb +38 -0
  327. data/lib/hecks/ci_speed/adapters/local_runner/refs.rb +39 -0
  328. data/lib/hecks/ci_speed/adapters/local_runner/refused.rb +11 -0
  329. data/lib/hecks/ci_speed/adapters/local_runner/verdict.rb +71 -0
  330. data/lib/hecks/ci_speed/adapters/local_runner.adapter +7 -0
  331. data/lib/hecks/ci_speed/adapters/local_runner.rb +168 -0
  332. data/lib/hecks/ci_speed/adapters/replayed_runner.rb +39 -0
  333. data/lib/hecks/ci_speed/ci_speed.behaviors +341 -0
  334. data/lib/hecks/ci_speed/ci_speed.bluebook +1073 -0
  335. data/lib/hecks/ci_speed/ci_speed.hecksagon +11 -0
  336. data/lib/hecks/ci_speed/ci_speed.ports.hecksagon +21 -0
  337. data/lib/hecks/ci_workflows/ci_workflows.behaviors +13 -0
  338. data/lib/hecks/ci_workflows/ci_workflows.bluebook +173 -0
  339. data/lib/hecks/ci_workflows/ci_workflows.hecksagon +15 -0
  340. data/lib/hecks/codemod.rb +3 -3
  341. data/lib/hecks/coder/coder.bluebook +385 -0
  342. data/lib/hecks/coder/coder.hecksagon +12 -0
  343. data/lib/hecks/command_names/check.rb +39 -0
  344. data/lib/hecks/command_names/extractor.rb +67 -0
  345. data/lib/hecks/command_names/index.rb +40 -0
  346. data/lib/hecks/command_names/resolution.rb +81 -0
  347. data/lib/hecks/command_names/scan.rb +54 -0
  348. data/lib/hecks/command_names/sources.rb +73 -0
  349. data/lib/hecks/command_names.rb +26 -0
  350. data/lib/hecks/composer/adapters/claude_composer.rb +3 -2
  351. data/lib/hecks/composer/agent.rb +1 -1
  352. data/lib/hecks/composer/assistant.rb +2 -2
  353. data/lib/hecks/composer/behavior_run.rb +7 -1
  354. data/lib/hecks/composer/bluebook/composer.bluebook +18 -25
  355. data/lib/hecks/composer/bluebook/composer.hecksagon +1 -1
  356. data/lib/hecks/composer/board.rb +6 -6
  357. data/lib/hecks/composer/board_edit/command_text.rb +4 -1
  358. data/lib/hecks/composer/board_edit/source.rb +18 -9
  359. data/lib/hecks/composer/board_edit.rb +2 -2
  360. data/lib/hecks/composer/check.rb +22 -22
  361. data/lib/hecks/composer/domains.rb +1 -1
  362. data/lib/hecks/composer/jobs.rb +1 -1
  363. data/lib/hecks/composer/live.rb +19 -13
  364. data/lib/hecks/composer/outline.rb +4 -1
  365. data/lib/hecks/composer/page.html +1 -1
  366. data/lib/hecks/composer/panels.rb +6 -3
  367. data/lib/hecks/composer/parse.rb +53 -36
  368. data/lib/hecks/composer/session.rb +22 -16
  369. data/lib/hecks/composer/toolbox.rb +17 -7
  370. data/lib/hecks/composer/web.rb +3 -2
  371. data/lib/hecks/composer/workbench.rb +12 -9
  372. data/lib/hecks/composer.rb +1 -1
  373. data/lib/hecks/construct.rb +7 -7
  374. data/lib/hecks/corpus/adapters.rb +2 -1
  375. data/lib/hecks/corpus/generated_key.rb +205 -0
  376. data/lib/hecks/corpus/listing.rb +34 -0
  377. data/lib/hecks/corpus/routes.rb +25 -5
  378. data/lib/hecks/corpus/rust.rb +86 -35
  379. data/lib/hecks/corpus/sources.rb +14 -12
  380. data/lib/hecks/corpus/worlds.rb +2 -1
  381. data/lib/hecks/corpus.rb +57 -54
  382. data/lib/hecks/deploy/bluebook/deploy.bluebook +304 -518
  383. data/lib/hecks/deprecation.rb +23 -0
  384. data/lib/hecks/doc/reference/harvester.rb +4 -1
  385. data/lib/hecks/doc/reference/readme.rb +11 -6
  386. data/lib/hecks/doc/reference/rendering.rb +12 -6
  387. data/lib/hecks/doc/reference.rb +8 -6
  388. data/lib/hecks/embryonaut_bluebook/lock.rb +5 -1
  389. data/lib/hecks/embryonaut_bluebook/manifest.rb +8 -2
  390. data/lib/hecks/embryonaut_bluebook/registry/changelog.rb +4 -1
  391. data/lib/hecks/embryonaut_bluebook/registry/versions.rb +13 -2
  392. data/lib/hecks/embryonaut_bluebook/registry.rb +5 -2
  393. data/lib/hecks/embryonaut_bluebook/shape.rb +1 -1
  394. data/lib/hecks/embryonaut_bluebook/vendor.rb +5 -2
  395. data/lib/hecks/embryonaut_bluebook/vendor_cli.rb +15 -1
  396. data/lib/hecks/embryonaut_bluebook.rb +26 -12
  397. data/lib/hecks/engine_agreement.rb +4 -1
  398. data/lib/hecks/fixer/fixer.bluebook +240 -0
  399. data/lib/hecks/fixer/fixer.hecksagon +17 -0
  400. data/lib/hecks/forms/app/commands.rb +35 -2
  401. data/lib/hecks/forms/app/records.rb +12 -12
  402. data/lib/hecks/forms/app/responses.rb +1 -1
  403. data/lib/hecks/forms/app.rb +22 -19
  404. data/lib/hecks/forms/command_form_renderer.rb +2 -2
  405. data/lib/hecks/forms/field_controls.rb +6 -1
  406. data/lib/hecks/forms/field_shape.rb +14 -6
  407. data/lib/hecks/forms/html.rb +8 -7
  408. data/lib/hecks/forms/html_pattern.rb +80 -0
  409. data/lib/hecks/forms/index_renderer.rb +11 -11
  410. data/lib/hecks/forms/params.rb +2 -1
  411. data/lib/hecks/forms/port_argument.rb +4 -1
  412. data/lib/hecks/forms/query_form_renderer.rb +1 -1
  413. data/lib/hecks/forms/record_renderer.rb +2 -2
  414. data/lib/hecks/forms/record_table.rb +1 -1
  415. data/lib/hecks/forms/reference_options.rb +2 -1
  416. data/lib/hecks/forms/text_shape.rb +4 -1
  417. data/lib/hecks/forms/value_object_shape.rb +1 -1
  418. data/lib/hecks/forms.rb +7 -7
  419. data/lib/hecks/fqn.rb +8 -2
  420. data/lib/hecks/framework/bluebook/change.bluebook +10 -15
  421. data/lib/hecks/framework/bluebook/change.hecksagon +1 -1
  422. data/lib/hecks/framework/bluebook/compliance.bluebook +27 -126
  423. data/lib/hecks/framework/bluebook/console_settings.bluebook +199 -114
  424. data/lib/hecks/framework/bluebook/framework.hecksagon +7 -0
  425. data/lib/hecks/framework/bluebook/governance.bluebook +36 -14
  426. data/lib/hecks/framework/bluebook/identity.bluebook +1 -1
  427. data/lib/hecks/framework/bluebook/privacy.bluebook +123 -19
  428. data/lib/hecks/framework/bluebook/privacy.key_keeper.adapter +7 -0
  429. data/lib/hecks/framework/bluebook/privacy.ports.hecksagon +19 -0
  430. data/lib/hecks/framework/compliance.oidc.json +6 -36
  431. data/lib/hecks/framework/console_settings.oidc.json +39 -24
  432. data/lib/hecks/framework/privacy.oidc.json +25 -0
  433. data/lib/hecks/framework.rb +24 -8
  434. data/lib/hecks/framework_bluebooks.rb +181 -0
  435. data/lib/hecks/freezer.rb +7 -1
  436. data/lib/hecks/fuzzing/combination_miner.rb +9 -6
  437. data/lib/hecks/fuzzing/concurrent_dispatch/world_copy.rb +4 -1
  438. data/lib/hecks/fuzzing/concurrent_dispatch.rb +2 -2
  439. data/lib/hecks/fuzzing/domain_generator.rb +8 -3
  440. data/lib/hecks/fuzzing/era_boundary.rb +1 -1
  441. data/lib/hecks/fuzzing/failure_triage.rb +13 -6
  442. data/lib/hecks/fuzzing/form_census/{chapter_forms.rb → bluebook_forms.rb} +12 -12
  443. data/lib/hecks/fuzzing/form_census.rb +14 -12
  444. data/lib/hecks/fuzzing/generated_domain_check.rb +2 -1
  445. data/lib/hecks/fuzzing/isolated_boot/postgres_scratch.rb +14 -15
  446. data/lib/hecks/fuzzing/isolated_boot/scratch_schema.rb +19 -9
  447. data/lib/hecks/fuzzing/isolated_boot/worlds.rb +36 -13
  448. data/lib/hecks/fuzzing/isolated_boot.rb +5 -6
  449. data/lib/hecks/fuzzing/mutation/checks.rb +5 -4
  450. data/lib/hecks/fuzzing/mutation/finders.rb +25 -8
  451. data/lib/hecks/fuzzing/mutation/observation.rb +3 -1
  452. data/lib/hecks/fuzzing/mutation/source_map.rb +3 -1
  453. data/lib/hecks/fuzzing/nondeterministic.rb +10 -4
  454. data/lib/hecks/fuzzing/outside_world.rb +1 -1
  455. data/lib/hecks/fuzzing/projection_agreement/binding.rb +63 -0
  456. data/lib/hecks/fuzzing/projection_agreement/comparison.rb +104 -0
  457. data/lib/hecks/fuzzing/projection_agreement.rb +68 -0
  458. data/lib/hecks/fuzzing/properties/aggregation_recompute.rb +1 -1
  459. data/lib/hecks/fuzzing/properties/bulk_parity.rb +118 -0
  460. data/lib/hecks/fuzzing/properties/catalog.rb +7 -0
  461. data/lib/hecks/fuzzing/properties/cursor_walks.rb +56 -0
  462. data/lib/hecks/fuzzing/properties/dispatch_and_mutations.rb +39 -1
  463. data/lib/hecks/fuzzing/properties/group_by_recompute.rb +6 -2
  464. data/lib/hecks/fuzzing/properties/grouped_reduction_recompute.rb +88 -0
  465. data/lib/hecks/fuzzing/properties/guards.rb +4 -1
  466. data/lib/hecks/fuzzing/properties/invariants_and_aggregation.rb +12 -2
  467. data/lib/hecks/fuzzing/properties/lifecycle_and_replay.rb +2 -1
  468. data/lib/hecks/fuzzing/properties/mutation_recompute.rb +3 -2
  469. data/lib/hecks/fuzzing/properties/piece_invariants.rb +3 -2
  470. data/lib/hecks/fuzzing/properties/query_rows.rb +5 -3
  471. data/lib/hecks/fuzzing/properties/querying.rb +6 -3
  472. data/lib/hecks/fuzzing/properties/read_model_names.rb +8 -2
  473. data/lib/hecks/fuzzing/properties/read_models.rb +2 -1
  474. data/lib/hecks/fuzzing/properties/refusals.rb +35 -0
  475. data/lib/hecks/fuzzing/properties/role_checks.rb +3 -2
  476. data/lib/hecks/fuzzing/properties/set_transform_parity.rb +73 -0
  477. data/lib/hecks/fuzzing/properties/tenant_scope.rb +3 -2
  478. data/lib/hecks/fuzzing/properties.rb +6 -0
  479. data/lib/hecks/fuzzing/qa_settings.rb +4 -4
  480. data/lib/hecks/fuzzing/replay/fan_out.rb +4 -3
  481. data/lib/hecks/fuzzing/replay/filters.rb +2 -2
  482. data/lib/hecks/fuzzing/replay/guard_check.rb +2 -2
  483. data/lib/hecks/fuzzing/replay/mutation_trace.rb +23 -10
  484. data/lib/hecks/fuzzing/replay/observation.rb +11 -7
  485. data/lib/hecks/fuzzing/replay/read_only_steps.rb +40 -3
  486. data/lib/hecks/fuzzing/replay/refusal_trace.rb +44 -0
  487. data/lib/hecks/fuzzing/replay/role_check.rb +2 -2
  488. data/lib/hecks/fuzzing/replay/session.rb +38 -18
  489. data/lib/hecks/fuzzing/replay/validation_reports.rb +61 -0
  490. data/lib/hecks/fuzzing/replay.rb +2 -2
  491. data/lib/hecks/fuzzing/rust_gap_manifest.rb +3 -3
  492. data/lib/hecks/fuzzing/self_consistency/saga_redelivery.rb +18 -8
  493. data/lib/hecks/fuzzing/self_consistency/sagas.rb +2 -2
  494. data/lib/hecks/fuzzing/self_consistency/value_objects.rb +9 -2
  495. data/lib/hecks/fuzzing/self_consistency.rb +4 -8
  496. data/lib/hecks/fuzzing/sequence_generator/adversary/argument_mutations.rb +15 -5
  497. data/lib/hecks/fuzzing/sequence_generator/adversary/caller_draw.rb +14 -10
  498. data/lib/hecks/fuzzing/sequence_generator/adversary/precedence_mutations.rb +1 -1
  499. data/lib/hecks/fuzzing/sequence_generator/argument_drawing.rb +2 -1
  500. data/lib/hecks/fuzzing/sequence_generator/catalog.rb +21 -13
  501. data/lib/hecks/fuzzing/sequence_generator/picker.rb +1 -1
  502. data/lib/hecks/fuzzing/sequence_generator/query_binding.rb +3 -3
  503. data/lib/hecks/fuzzing/sequence_generator/step_builder.rb +2 -2
  504. data/lib/hecks/fuzzing/sequence_generator.rb +1 -2
  505. data/lib/hecks/fuzzing/shrinker.rb +4 -1
  506. data/lib/hecks/fuzzing/value_generator.rb +14 -8
  507. data/lib/hecks/fuzzing.rb +1 -0
  508. data/lib/hecks/grammar/dialects.rb +56 -0
  509. data/lib/hecks/grammar/evolve/arguments.rb +1 -1
  510. data/lib/hecks/grammar/evolve/keywords.rb +1 -1
  511. data/lib/hecks/grammar/evolve/seeds.rb +34 -8
  512. data/lib/hecks/grammar/expression.bluebook +3 -0
  513. data/lib/hecks/grammar/expression_operators.json +1071 -1
  514. data/lib/hecks/grammar/operators.rb +45 -22
  515. data/lib/hecks/grammar/translation.bluebook +3 -1
  516. data/lib/hecks/grammar/translation_ledger.rb +45 -0
  517. data/lib/hecks/grammar/translation_rules.json +710 -0
  518. data/lib/hecks/grammar.rb +27 -23
  519. data/lib/hecks/hecks/adapter_words.json +7 -0
  520. data/lib/hecks/hecks/adapters/area_overlap.rb +156 -0
  521. data/lib/hecks/hecks/adapters/claude_agents.adapter +7 -0
  522. data/lib/hecks/hecks/adapters/claude_agents.rb +124 -0
  523. data/lib/hecks/hecks/adapters/claude_transcript.rb +71 -0
  524. data/lib/hecks/hecks/adapters/codebase/batch_runs.rb +60 -0
  525. data/lib/hecks/hecks/adapters/codebase/cache_clearing.rb +32 -0
  526. data/lib/hecks/hecks/adapters/codebase/cargo_tests.rb +50 -0
  527. data/lib/hecks/hecks/adapters/codebase/changed_specs.rb +52 -0
  528. data/lib/hecks/hecks/adapters/codebase/codemods.rb +3 -2
  529. data/lib/hecks/hecks/adapters/codebase/composing.rb +3 -2
  530. data/lib/hecks/hecks/adapters/codebase/conformance.rb +30 -1
  531. data/lib/hecks/hecks/adapters/codebase/corpus_queries.rb +53 -0
  532. data/lib/hecks/hecks/adapters/codebase/corpus_tasks.rb +1 -1
  533. data/lib/hecks/hecks/adapters/codebase/declarations.rb +144 -0
  534. data/lib/hecks/hecks/adapters/codebase/generated_keys.rb +31 -0
  535. data/lib/hecks/hecks/adapters/codebase/impacted_specs.rb +110 -0
  536. data/lib/hecks/hecks/adapters/codebase/inspection.rb +5 -4
  537. data/lib/hecks/hecks/adapters/codebase/language.rb +3 -2
  538. data/lib/hecks/hecks/adapters/codebase/launcher_text.rb +39 -0
  539. data/lib/hecks/hecks/adapters/codebase/minitest_runs.rb +52 -0
  540. data/lib/hecks/hecks/adapters/codebase/npm_registry.rb +7 -1
  541. data/lib/hecks/hecks/adapters/codebase/previewing.rb +62 -0
  542. data/lib/hecks/hecks/adapters/codebase/promotion/gate.rb +1 -1
  543. data/lib/hecks/hecks/adapters/codebase/reading.rb +94 -0
  544. data/lib/hecks/hecks/adapters/codebase/regeneration.rb +57 -10
  545. data/lib/hecks/hecks/adapters/codebase/release_facts.rb +1 -1
  546. data/lib/hecks/hecks/adapters/codebase/ruby_child.rb +5 -2
  547. data/lib/hecks/hecks/adapters/codebase/run_options.rb +35 -0
  548. data/lib/hecks/hecks/adapters/codebase/scripting.rb +39 -0
  549. data/lib/hecks/hecks/adapters/codebase/search.rb +91 -0
  550. data/lib/hecks/hecks/adapters/codebase/source_tree.rb +114 -51
  551. data/lib/hecks/hecks/adapters/codebase/spec_files/report.rb +71 -0
  552. data/lib/hecks/hecks/adapters/codebase/spec_files/shared_run.rb +73 -0
  553. data/lib/hecks/hecks/adapters/codebase/spec_files.rb +95 -0
  554. data/lib/hecks/hecks/adapters/codebase/static_directory.rb +59 -0
  555. data/lib/hecks/hecks/adapters/codebase/style.rb +2 -2
  556. data/lib/hecks/hecks/adapters/codebase/test_runner.rb +82 -14
  557. data/lib/hecks/hecks/adapters/codebase/test_scope.rb +105 -0
  558. data/lib/hecks/hecks/adapters/codebase/test_suite.rb +73 -21
  559. data/lib/hecks/hecks/adapters/console_capture.rb +28 -1
  560. data/lib/hecks/hecks/adapters/cost_explorer.rb +9 -1
  561. data/lib/hecks/hecks/adapters/deploy_plans.rb +12 -3
  562. data/lib/hecks/hecks/adapters/deploy_toolchain/answers.rb +14 -5
  563. data/lib/hecks/hecks/adapters/deploy_toolchain/scripts.rb +6 -3
  564. data/lib/hecks/hecks/adapters/deploy_toolchain.rb +3 -3
  565. data/lib/hecks/hecks/adapters/desktop_alert/alert.rb +50 -0
  566. data/lib/hecks/hecks/adapters/desktop_alert.adapter +7 -0
  567. data/lib/hecks/hecks/adapters/desktop_alert.rb +99 -0
  568. data/lib/hecks/hecks/adapters/dispatching/brief_text.rb +51 -0
  569. data/lib/hecks/hecks/adapters/dispatching/launcher.rb +97 -0
  570. data/lib/hecks/hecks/adapters/dispatching/plan.rb +82 -0
  571. data/lib/hecks/hecks/adapters/dispatching/rows.rb +66 -0
  572. data/lib/hecks/hecks/adapters/dispatching/settings.rb +81 -0
  573. data/lib/hecks/hecks/adapters/dispatching/settler.rb +40 -0
  574. data/lib/hecks/hecks/adapters/dispatching.adapter +7 -0
  575. data/lib/hecks/hecks/adapters/dispatching.rb +93 -0
  576. data/lib/hecks/hecks/adapters/doctor_reading/report.rb +27 -0
  577. data/lib/hecks/hecks/adapters/doctor_reading.adapter +7 -0
  578. data/lib/hecks/hecks/adapters/doctor_reading.rb +161 -0
  579. data/lib/hecks/hecks/adapters/finding_github.rb +4 -1
  580. data/lib/hecks/hecks/adapters/first_admin.rb +16 -9
  581. data/lib/hecks/hecks/adapters/git.rb +5 -5
  582. data/lib/hecks/hecks/adapters/git_checkout.adapter +7 -0
  583. data/lib/hecks/hecks/adapters/git_checkout.rb +99 -0
  584. data/lib/hecks/hecks/adapters/git_commit.adapter +7 -0
  585. data/lib/hecks/hecks/adapters/git_commit.rb +61 -0
  586. data/lib/hecks/hecks/adapters/git_landing/finisher.rb +82 -0
  587. data/lib/hecks/hecks/adapters/git_landing/foreign_hold.rb +111 -0
  588. data/lib/hecks/hecks/adapters/git_landing/line.rb +171 -0
  589. data/lib/hecks/hecks/adapters/git_landing/lineup.rb +98 -0
  590. data/lib/hecks/hecks/adapters/git_landing/merger.rb +85 -0
  591. data/lib/hecks/hecks/adapters/git_landing/numbering.rb +54 -0
  592. data/lib/hecks/hecks/adapters/git_landing/rivals.rb +59 -0
  593. data/lib/hecks/hecks/adapters/git_landing/ticket.rb +156 -0
  594. data/lib/hecks/hecks/adapters/git_landing/tidy.rb +147 -0
  595. data/lib/hecks/hecks/adapters/git_landing/train.rb +104 -0
  596. data/lib/hecks/hecks/adapters/git_landing/verdict.rb +64 -0
  597. data/lib/hecks/hecks/adapters/git_landing/waiting.rb +120 -0
  598. data/lib/hecks/hecks/adapters/git_landing.adapter +7 -0
  599. data/lib/hecks/hecks/adapters/git_landing.rb +189 -0
  600. data/lib/hecks/hecks/adapters/git_launcher.adapter +7 -0
  601. data/lib/hecks/hecks/adapters/git_launcher.rb +82 -0
  602. data/lib/hecks/hecks/adapters/git_main_pull.rb +99 -0
  603. data/lib/hecks/hecks/adapters/git_refs.rb +8 -4
  604. data/lib/hecks/hecks/adapters/git_rehearsal/bench.rb +82 -0
  605. data/lib/hecks/hecks/adapters/git_rehearsal/due.rb +84 -0
  606. data/lib/hecks/hecks/adapters/git_rehearsal/impacted/skips.rb +47 -0
  607. data/lib/hecks/hecks/adapters/git_rehearsal/impacted/spec_run.rb +75 -0
  608. data/lib/hecks/hecks/adapters/git_rehearsal/impacted.rb +181 -0
  609. data/lib/hecks/hecks/adapters/git_rehearsal/line.rb +76 -0
  610. data/lib/hecks/hecks/adapters/git_rehearsal/reading.rb +24 -0
  611. data/lib/hecks/hecks/adapters/git_rehearsal/record.rb +146 -0
  612. data/lib/hecks/hecks/adapters/git_rehearsal/spec_map/corpus.rb +25 -0
  613. data/lib/hecks/hecks/adapters/git_rehearsal/spec_map/needles.rb +61 -0
  614. data/lib/hecks/hecks/adapters/git_rehearsal/spec_map.rb +105 -0
  615. data/lib/hecks/hecks/adapters/git_rehearsal/stages.rb +118 -0
  616. data/lib/hecks/hecks/adapters/git_rehearsal.adapter +7 -0
  617. data/lib/hecks/hecks/adapters/git_rehearsal.rb +141 -0
  618. data/lib/hecks/hecks/adapters/git_train/bench.rb +76 -0
  619. data/lib/hecks/hecks/adapters/git_train/branch_guard.rb +62 -0
  620. data/lib/hecks/hecks/adapters/git_train/carriage.rb +115 -0
  621. data/lib/hecks/hecks/adapters/git_train/launcher_shape.rb +75 -0
  622. data/lib/hecks/hecks/adapters/git_train/local_branch.rb +69 -0
  623. data/lib/hecks/hecks/adapters/git_train/mint_step.rb +47 -0
  624. data/lib/hecks/hecks/adapters/git_train/reading.rb +26 -0
  625. data/lib/hecks/hecks/adapters/git_train/settlement.rb +167 -0
  626. data/lib/hecks/hecks/adapters/git_train/survey.rb +60 -0
  627. data/lib/hecks/hecks/adapters/git_train.adapter +7 -0
  628. data/lib/hecks/hecks/adapters/git_train.rb +146 -0
  629. data/lib/hecks/hecks/adapters/git_worktree_add.adapter +7 -0
  630. data/lib/hecks/hecks/adapters/git_worktree_add.rb +68 -0
  631. data/lib/hecks/hecks/adapters/git_worktrees.rb +81 -0
  632. data/lib/hecks/hecks/adapters/github_pull_requests.adapter +7 -0
  633. data/lib/hecks/hecks/adapters/github_pull_requests.rb +109 -0
  634. data/lib/hecks/hecks/adapters/host_http.rb +9 -8
  635. data/lib/hecks/hecks/adapters/in_process_access.rb +3 -2
  636. data/lib/hecks/hecks/adapters/in_process_boot.rb +68 -39
  637. data/lib/hecks/hecks/adapters/in_process_operations.rb +40 -20
  638. data/lib/hecks/hecks/adapters/in_process_undo.rb +17 -0
  639. data/lib/hecks/hecks/adapters/journal_store/changes.rb +18 -9
  640. data/lib/hecks/hecks/adapters/journal_store/compaction.rb +14 -7
  641. data/lib/hecks/hecks/adapters/journal_store/edge_audit.rb +35 -20
  642. data/lib/hecks/hecks/adapters/journal_store/examination.rb +20 -4
  643. data/lib/hecks/hecks/adapters/journal_store/held_domain/renaming.rb +45 -0
  644. data/lib/hecks/hecks/adapters/journal_store/held_domain.rb +47 -9
  645. data/lib/hecks/hecks/adapters/journal_store/held_mint.rb +128 -0
  646. data/lib/hecks/hecks/adapters/journal_store/readings/attestation.rb +3 -3
  647. data/lib/hecks/hecks/adapters/journal_store/readings/boot_status.rb +58 -0
  648. data/lib/hecks/hecks/adapters/journal_store/readings/composition.rb +39 -0
  649. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/outcomes.rb +76 -0
  650. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/postgres_reader.rb +44 -0
  651. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/reader.rb +64 -0
  652. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/report.rb +102 -0
  653. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/sqlite_reader.rb +43 -0
  654. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/stores.rb +80 -0
  655. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/subscribers.rb +72 -0
  656. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/summary.rb +39 -0
  657. data/lib/hecks/hecks/adapters/journal_store/readings/event_trace.rb +39 -0
  658. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/command_line.rb +57 -0
  659. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/edge_guards.rb +107 -0
  660. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/inspection.rb +94 -0
  661. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/plan.rb +66 -0
  662. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/report.rb +72 -0
  663. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/store.rb +34 -0
  664. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/watermark_guards.rb +86 -0
  665. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/world.rb +66 -0
  666. data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan.rb +36 -0
  667. data/lib/hecks/hecks/adapters/journal_store/readings/projection_audit.rb +64 -0
  668. data/lib/hecks/hecks/adapters/journal_store/readings/scaffolding.rb +10 -7
  669. data/lib/hecks/hecks/adapters/journal_store/readings/sqlite_status/database_reading.rb +113 -0
  670. data/lib/hecks/hecks/adapters/journal_store/readings/sqlite_status/read_only.rb +33 -0
  671. data/lib/hecks/hecks/adapters/journal_store/readings/sqlite_status.rb +32 -0
  672. data/lib/hecks/hecks/adapters/journal_store/readings.rb +15 -3
  673. data/lib/hecks/hecks/adapters/journal_store/reconcile_report.rb +60 -0
  674. data/lib/hecks/hecks/adapters/journal_store/reconciliation.rb +121 -0
  675. data/lib/hecks/hecks/adapters/journal_store/translation_write/shape_edge.rb +59 -0
  676. data/lib/hecks/hecks/adapters/journal_store/translation_write.rb +123 -0
  677. data/lib/hecks/hecks/adapters/journal_store.rb +18 -2
  678. data/lib/hecks/hecks/adapters/landed_work.adapter +7 -0
  679. data/lib/hecks/hecks/adapters/landed_work.rb +52 -0
  680. data/lib/hecks/hecks/adapters/ledger/chain.rb +63 -0
  681. data/lib/hecks/hecks/adapters/ledger/journal.rb +105 -0
  682. data/lib/hecks/hecks/adapters/ledger.adapter +7 -0
  683. data/lib/hecks/hecks/adapters/ledger.rb +89 -0
  684. data/lib/hecks/hecks/adapters/local_files.rb +21 -7
  685. data/lib/hecks/hecks/adapters/pg_admin.rb +7 -1
  686. data/lib/hecks/hecks/adapters/process_pool.rb +3 -2
  687. data/lib/hecks/hecks/adapters/push_size.rb +57 -0
  688. data/lib/hecks/hecks/adapters/qa_quiescing.adapter +7 -0
  689. data/lib/hecks/hecks/adapters/qa_quiescing.rb +57 -0
  690. data/lib/hecks/hecks/adapters/rails_app_files.rb +64 -0
  691. data/lib/hecks/hecks/adapters/rehearsal/audit_report.rb +4 -1
  692. data/lib/hecks/hecks/adapters/rehearsal/inquiry.rb +39 -12
  693. data/lib/hecks/hecks/adapters/rehearsal/memory_store.rb +65 -5
  694. data/lib/hecks/hecks/adapters/rehearsal/postgres_census.rb +4 -4
  695. data/lib/hecks/hecks/adapters/rehearsal/postgres_reading.rb +30 -7
  696. data/lib/hecks/hecks/adapters/rehearsal/postgres_store.rb +4 -1
  697. data/lib/hecks/hecks/adapters/rehearsal/rust_audit.rb +1 -1
  698. data/lib/hecks/hecks/adapters/rehearsal/subject.rb +44 -9
  699. data/lib/hecks/hecks/adapters/rust_toolchain.rb +15 -4
  700. data/lib/hecks/hecks/adapters/rust_workspace.rb +1 -1
  701. data/lib/hecks/hecks/adapters/settings_reading/disposable_ledger.rb +32 -0
  702. data/lib/hecks/hecks/adapters/settings_reading/push_nudge.rb +26 -0
  703. data/lib/hecks/hecks/adapters/settings_reading/stores.rb +76 -0
  704. data/lib/hecks/hecks/adapters/settings_reading/test_scope.rb +28 -0
  705. data/lib/hecks/hecks/adapters/settings_reading.adapter +7 -0
  706. data/lib/hecks/hecks/adapters/settings_reading.rb +168 -0
  707. data/lib/hecks/hecks/adapters/shell.rb +3 -0
  708. data/lib/hecks/hecks/adapters/site_toolchain.rb +8 -8
  709. data/lib/hecks/hecks/adapters/started_work.rb +42 -0
  710. data/lib/hecks/hecks/adapters/terminal.rb +12 -10
  711. data/lib/hecks/hecks/adapters/where_reading.adapter +7 -0
  712. data/lib/hecks/hecks/adapters/where_reading.rb +64 -0
  713. data/lib/hecks/hecks/adapters/work_areas.rb +57 -0
  714. data/lib/hecks/hecks/adapters/work_limits.rb +57 -0
  715. data/lib/hecks/hecks/adapters/world_clearing.rb +2 -1
  716. data/lib/hecks/hecks/build/build.bluebook +576 -0
  717. data/lib/hecks/hecks/check/check.bluebook +966 -0
  718. data/lib/hecks/hecks/codebase.behaviors +72 -4
  719. data/lib/hecks/hecks/composer.behaviors +10 -10
  720. data/lib/hecks/hecks/context_map.hecksagon +7 -6
  721. data/lib/hecks/hecks/custodian.behaviors +124 -3
  722. data/lib/hecks/hecks/delegate/delegate.bluebook +355 -0
  723. data/lib/hecks/hecks/deliver/deliver.bluebook +945 -0
  724. data/lib/hecks/hecks/deploy.behaviors +1 -1
  725. data/lib/hecks/hecks/deploy.world +3 -4
  726. data/lib/hecks/hecks/evolve/evolve.bluebook +788 -0
  727. data/lib/hecks/hecks/find/find.bluebook +81 -0
  728. data/lib/hecks/hecks/hecks.behaviors +2 -2
  729. data/lib/hecks/hecks/hecks.bluebook +0 -138
  730. data/lib/hecks/hecks/hecks.contextmap +27 -0
  731. data/lib/hecks/hecks/hecks.hecksagon +312 -23
  732. data/lib/hecks/hecks/hecks.world +54 -27
  733. data/lib/hecks/hecks/implicit_moves.json +24 -0
  734. data/lib/hecks/hecks/migrate/migrate.bluebook +1066 -0
  735. data/lib/hecks/hecks/operate/operate.bluebook +695 -0
  736. data/lib/hecks/hecks/quiesce/quiesce.bluebook +117 -0
  737. data/lib/hecks/hecks/rehearse/rehearse.bluebook +133 -0
  738. data/lib/hecks/hecks/release/release.bluebook +916 -0
  739. data/lib/hecks/hecks/serve/serve.bluebook +134 -0
  740. data/lib/hecks/hecks/shapes.json +3 -0
  741. data/lib/hecks/hecks/site.behaviors +1 -1
  742. data/lib/hecks/hecks/site.world +3 -3
  743. data/lib/hecks/hecks/start/start.bluebook +194 -0
  744. data/lib/hecks/hecks/test/test.bluebook +638 -0
  745. data/lib/hecks/hecks/tickets.world +14 -0
  746. data/lib/hecks/ir.rb +8 -1
  747. data/lib/hecks/kernel_capabilities/templates.rb +4 -3
  748. data/lib/hecks/kernel_capabilities.rb +6 -6
  749. data/lib/hecks/language/adapter.bluebook +61 -0
  750. data/lib/hecks/language/bluebook/aggregate.bluebook +58 -6
  751. data/lib/hecks/language/bluebook/attaches/paging.bluebook +1 -1
  752. data/lib/hecks/language/bluebook/bluebook.behaviors +6 -6
  753. data/lib/hecks/language/bluebook/bluebook.bluebook +62 -51
  754. data/lib/hecks/language/bluebook/bluebook.hecksagon +1 -1
  755. data/lib/hecks/language/bluebook/command.bluebook +69 -2
  756. data/lib/hecks/language/bluebook/entity.bluebook +2 -2
  757. data/lib/hecks/language/bluebook/policy.behaviors +2 -2
  758. data/lib/hecks/language/bluebook/policy.bluebook +3 -3
  759. data/lib/hecks/language/bluebook/process_manager.bluebook +17 -4
  760. data/lib/hecks/language/bluebook/projection.bluebook +11 -10
  761. data/lib/hecks/language/bluebook/query.bluebook +1 -0
  762. data/lib/hecks/language/bluebook/shape.bluebook +1 -1
  763. data/lib/hecks/language/bluebook/syntax.bluebook +3 -1
  764. data/lib/hecks/language/bluebook/vocabulary.bluebook +417 -16
  765. data/lib/hecks/language/context_map/context_map.bluebook +90 -0
  766. data/lib/hecks/language/hecksagon/domain_port.bluebook +3 -2
  767. data/lib/hecks/language/hecksagon/hecksagon.bluebook +8 -8
  768. data/lib/hecks/language/hecksagon/port_operation.bluebook +14 -0
  769. data/lib/hecks/language/kinds/run.kind +120 -0
  770. data/lib/hecks/language/oidc.json +20 -0
  771. data/lib/hecks/language/port.bluebook +1 -1
  772. data/lib/hecks/language/sentence/sentence.bluebook +210 -0
  773. data/lib/hecks/language/translation/translation_aggregate.bluebook +24 -0
  774. data/lib/hecks/language/world/world.bluebook +6 -6
  775. data/lib/hecks/literal.rb +8 -2
  776. data/lib/hecks/module_folders.rb +31 -0
  777. data/lib/hecks/naming.rb +44 -14
  778. data/lib/hecks/persistence_legacy_fixture/postgres_stores.rb +7 -6
  779. data/lib/hecks/persistence_legacy_fixture/regenerate.rb +6 -2
  780. data/lib/hecks/ports/access_control.rb +2 -2
  781. data/lib/hecks/ports/agent/answers.rb +2 -2
  782. data/lib/hecks/ports/agent.rb +2 -2
  783. data/lib/hecks/ports/authentication.port +6 -0
  784. data/lib/hecks/ports/authentication.rb +67 -0
  785. data/lib/hecks/ports/authorization.rb +3 -3
  786. data/lib/hecks/ports/dispatch.port +5 -0
  787. data/lib/hecks/ports/dispatch.rb +28 -0
  788. data/lib/hecks/ports/key_vault.rb +10 -7
  789. data/lib/hecks/ports/loading.rb +23 -7
  790. data/lib/hecks/ports/persistence/append_only.rb +44 -9
  791. data/lib/hecks/ports/persistence/binding_policy.rb +73 -12
  792. data/lib/hecks/ports/persistence/codec_boundary.rb +4 -3
  793. data/lib/hecks/ports/persistence/mint_door.rb +74 -0
  794. data/lib/hecks/ports/persistence/plugins/era/era_check.rb +16 -15
  795. data/lib/hecks/ports/persistence/plugins/era/era_guard/shape_diff.rb +9 -6
  796. data/lib/hecks/ports/persistence/plugins/era/era_guard.rb +11 -11
  797. data/lib/hecks/ports/persistence/plugins/era/era_status.rb +48 -0
  798. data/lib/hecks/ports/persistence/plugins/era/era_tamper.rb +1 -1
  799. data/lib/hecks/ports/persistence/plugins/era/projected_bluebook.rb +127 -0
  800. data/lib/hecks/ports/persistence/plugins/era/storage_shape.rb +6 -6
  801. data/lib/hecks/ports/persistence/plugins/era/translation/additive_shape.rb +107 -0
  802. data/lib/hecks/ports/persistence/plugins/era/translation/audit.rb +9 -3
  803. data/lib/hecks/ports/persistence/plugins/era/translation/compose.rb +155 -0
  804. data/lib/hecks/ports/persistence/plugins/era/translation/compose_render.rb +79 -0
  805. data/lib/hecks/ports/persistence/plugins/era/translation/edge_files.rb +49 -0
  806. data/lib/hecks/ports/persistence/plugins/era/translation/edge_route.rb +61 -0
  807. data/lib/hecks/ports/persistence/plugins/era/translation/implicit_edge.rb +67 -0
  808. data/lib/hecks/ports/persistence/plugins/era/translation/reattest.rb +1 -1
  809. data/lib/hecks/ports/persistence/plugins/era/translation/reconcile.rb +130 -0
  810. data/lib/hecks/ports/persistence/plugins/era/translation/reconcile_files.rb +35 -0
  811. data/lib/hecks/ports/persistence/plugins/era/translation/rule_compiler.rb +32 -19
  812. data/lib/hecks/ports/persistence/plugins/era/translation/scaffold/differ.rb +13 -5
  813. data/lib/hecks/ports/persistence/plugins/era/translation.rb +5 -0
  814. data/lib/hecks/ports/persistence/plugins/era.rb +1 -1
  815. data/lib/hecks/ports/persistence/remote_runtime.rb +3 -2
  816. data/lib/hecks/ports/persistence/repository_factory.rb +11 -3
  817. data/lib/hecks/ports/persistence/set_statement.rb +29 -0
  818. data/lib/hecks/ports/persistence/set_transforming.rb +30 -0
  819. data/lib/hecks/ports/persistence/state_codec.rb +3 -3
  820. data/lib/hecks/ports/persistence/stored_name_guard.rb +36 -0
  821. data/lib/hecks/ports/persistence.rb +2 -4
  822. data/lib/hecks/ports/projection.rb +4 -1
  823. data/lib/hecks/ports/query/cursor.rb +131 -0
  824. data/lib/hecks/ports/query/in_memory.rb +17 -10
  825. data/lib/hecks/ports/query.rb +4 -2
  826. data/lib/hecks/ports.rb +1 -0
  827. data/lib/hecks/projection_files/expression_tables.rb +3 -3
  828. data/lib/hecks/projection_files/sentence_table.rb +17 -0
  829. data/lib/hecks/projection_files.rb +16 -13
  830. data/lib/hecks/projections/bootstrap_table.rb +3 -3
  831. data/lib/hecks/projections/ci_pipeline/table/checks.rb +137 -0
  832. data/lib/hecks/projections/ci_pipeline/table/lookup.rb +59 -0
  833. data/lib/hecks/projections/ci_pipeline/table/refusals.rb +58 -0
  834. data/lib/hecks/projections/ci_pipeline/table/rows.rb +119 -0
  835. data/lib/hecks/projections/ci_pipeline/table/tree.rb +30 -0
  836. data/lib/hecks/projections/ci_pipeline/table/typing.rb +92 -0
  837. data/lib/hecks/projections/ci_pipeline/table.rb +112 -0
  838. data/lib/hecks/projections/ci_pipeline/workflows.rb +162 -0
  839. data/lib/hecks/projections/ci_pipeline/yaml_text.rb +104 -0
  840. data/lib/hecks/projections/command_schema/shape.rb +95 -0
  841. data/lib/hecks/projections/command_schema.rb +74 -0
  842. data/lib/hecks/projections/context_map_diagram.rb +135 -0
  843. data/lib/hecks/projections/context_relationships.rb +125 -0
  844. data/lib/hecks/projections/deploy/box/access.rb +7 -4
  845. data/lib/hecks/projections/deploy/box/caddy.rb +2 -1
  846. data/lib/hecks/projections/deploy/box/compose.rb +4 -8
  847. data/lib/hecks/projections/deploy/box/edge.rb +2 -1
  848. data/lib/hecks/projections/deploy/box/hosting.rb +5 -3
  849. data/lib/hecks/projections/deploy/box/hosting_parts.rb +27 -12
  850. data/lib/hecks/projections/deploy/box/logging.rb +2 -3
  851. data/lib/hecks/projections/deploy/box/roll_recipe.rb +2 -4
  852. data/lib/hecks/projections/deploy/box/roll_scripts.rb +2 -17
  853. data/lib/hecks/projections/deploy/box/settings/containers.rb +29 -15
  854. data/lib/hecks/projections/deploy/box/settings/patterns.rb +5 -6
  855. data/lib/hecks/projections/deploy/box/settings/types.rb +5 -10
  856. data/lib/hecks/projections/deploy/box/settings.rb +9 -8
  857. data/lib/hecks/projections/deploy/box/stack_yaml.rb +10 -14
  858. data/lib/hecks/projections/deploy/box/templates/box.yaml.tmpl +0 -1
  859. data/lib/hecks/projections/deploy/box/templates/deploy-service.sh.tmpl +16 -3
  860. data/lib/hecks/projections/deploy/box/templates/hosting.mk.tmpl +7 -6
  861. data/lib/hecks/projections/deploy/box/templates/render-compose-taskdef.sh.tmpl +2 -6
  862. data/lib/hecks/projections/deploy/box/templates/render-compose.sh.tmpl +2 -6
  863. data/lib/hecks/projections/deploy/box.rb +17 -10
  864. data/lib/hecks/projections/deploy/fargate/assembly.rb +7 -2
  865. data/lib/hecks/projections/deploy/fargate/cdn/options.rb +4 -1
  866. data/lib/hecks/projections/deploy/fargate/check.rb +3 -1
  867. data/lib/hecks/projections/deploy/fargate/containers/rendering.rb +8 -5
  868. data/lib/hecks/projections/deploy/fargate/containers/routing.rb +2 -1
  869. data/lib/hecks/projections/deploy/fargate/monitoring/reading.rb +4 -1
  870. data/lib/hecks/projections/deploy/fargate/sections.rb +7 -4
  871. data/lib/hecks/projections/deploy/fargate/settings/ids.rb +4 -1
  872. data/lib/hecks/projections/deploy/fargate/settings/tuning.rb +13 -4
  873. data/lib/hecks/projections/deploy/fargate/stack/blocks.rb +6 -1
  874. data/lib/hecks/projections/deploy/fargate/stack/readers.rb +2 -1
  875. data/lib/hecks/projections/deploy/fargate/stack.rb +11 -6
  876. data/lib/hecks/projections/deploy/fargate/yaml.rb +10 -3
  877. data/lib/hecks/projections/deploy/fargate.rb +8 -3
  878. data/lib/hecks/projections/deploy/lambda/stack/blocks.rb +4 -2
  879. data/lib/hecks/projections/deploy/lambda/stack/deploy_chain.rb +2 -1
  880. data/lib/hecks/projections/deploy/lambda/stack/reading.rb +12 -9
  881. data/lib/hecks/projections/deploy/lambda/stack/reading_web.rb +7 -2
  882. data/lib/hecks/projections/deploy/lambda/stack/web.rb +2 -1
  883. data/lib/hecks/projections/deploy/lambda.rb +8 -3
  884. data/lib/hecks/projections/deploy/preview/containers.rb +14 -1
  885. data/lib/hecks/projections/deploy/preview/preview.sh.erb +2 -2
  886. data/lib/hecks/projections/deploy/preview/routing_yaml.rb +8 -6
  887. data/lib/hecks/projections/deploy/preview/settings.rb +23 -5
  888. data/lib/hecks/projections/deploy/preview/task_yaml.rb +1 -1
  889. data/lib/hecks/projections/deploy/preview/yaml_text.rb +2 -1
  890. data/lib/hecks/projections/deploy/scripts/settings.rb +5 -2
  891. data/lib/hecks/projections/deploy/shared.rb +12 -1
  892. data/lib/hecks/projections/deploy/shared_database_instance.rb +1 -1
  893. data/lib/hecks/projections/deploy/smoke.rb +3 -1
  894. data/lib/hecks/projections/deploy/template_diff/normalizer.rb +4 -1
  895. data/lib/hecks/projections/deploy/templates/fargate/Makefile.tmpl +1 -1
  896. data/lib/hecks/projections/deploy/templates/lambda/Makefile.tmpl +3 -3
  897. data/lib/hecks/projections/deploy/templates/lambda/mint_era_shared.tmpl +2 -2
  898. data/lib/hecks/projections/deploy/templates/lambda/nat_comment_oauth.tmpl +1 -1
  899. data/lib/hecks/projections/deploy/vercel.rb +1 -1
  900. data/lib/hecks/projections/diagrams/dispatch.rb +5 -3
  901. data/lib/hecks/projections/diagrams/statecharts.rb +8 -3
  902. data/lib/hecks/projections/diagrams/structure.rb +9 -6
  903. data/lib/hecks/projections/diagrams.rb +9 -7
  904. data/lib/hecks/projections/glossary/entries.rb +4 -4
  905. data/lib/hecks/projections/glossary/html/page.rb +4 -1
  906. data/lib/hecks/projections/glossary/html/parser.rb +13 -4
  907. data/lib/hecks/projections/glossary/html/sections.rb +4 -1
  908. data/lib/hecks/projections/glossary/html.rb +10 -3
  909. data/lib/hecks/projections/glossary/markdown.rb +4 -3
  910. data/lib/hecks/projections/glossary/mermaid.rb +8 -5
  911. data/lib/hecks/projections/glossary/sections.rb +1 -1
  912. data/lib/hecks/projections/glossary/sensitivity.rb +11 -4
  913. data/lib/hecks/projections/glossary/sentences/actions.rb +5 -2
  914. data/lib/hecks/projections/glossary/sentences/queries.rb +2 -1
  915. data/lib/hecks/projections/glossary/sentences/value_objects.rb +15 -6
  916. data/lib/hecks/projections/glossary/sentences.rb +6 -3
  917. data/lib/hecks/projections/glossary/slugs.rb +8 -1
  918. data/lib/hecks/projections/glossary.rb +3 -3
  919. data/lib/hecks/projections/model.rb +10 -6
  920. data/lib/hecks/projections/oidc.rb +19 -7
  921. data/lib/hecks/projections/parser_table.rb +10 -10
  922. data/lib/hecks/projections/phrase_table.rb +105 -0
  923. data/lib/hecks/projections/plain_english.rb +14 -4
  924. data/lib/hecks/projections/rails_app.rb +77 -0
  925. data/lib/hecks/projections/reference.rb +2 -2
  926. data/lib/hecks/projections/rust_vocabulary/arguments.rb +1 -1
  927. data/lib/hecks/projections/rust_vocabulary/tables.rb +20 -0
  928. data/lib/hecks/projections/rust_vocabulary.rb +14 -17
  929. data/lib/hecks/projections/site/admin.rb +7 -7
  930. data/lib/hecks/projections/site/admin_cms.rb +1 -1
  931. data/lib/hecks/projections/site/cms_editor/blocks.rb +5 -2
  932. data/lib/hecks/projections/site/cms_editor/checks.rb +9 -6
  933. data/lib/hecks/projections/site/cms_editor/color.rb +4 -1
  934. data/lib/hecks/projections/site/cms_editor/composition.rb +20 -18
  935. data/lib/hecks/projections/site/cms_editor/destructive.rb +4 -1
  936. data/lib/hecks/projections/site/cms_editor/drafts.rb +6 -2
  937. data/lib/hecks/projections/site/cms_editor/key_kinds.rb +4 -1
  938. data/lib/hecks/projections/site/cms_editor/limits.rb +1 -1
  939. data/lib/hecks/projections/site/cms_editor/media.rb +1 -1
  940. data/lib/hecks/projections/site/cms_editor/moment.rb +3 -1
  941. data/lib/hecks/projections/site/cms_editor/pickers.rb +1 -1
  942. data/lib/hecks/projections/site/cms_editor/preview.rb +10 -4
  943. data/lib/hecks/projections/site/cms_editor/relations.rb +3 -2
  944. data/lib/hecks/projections/site/cms_editor/scale_checks.rb +32 -25
  945. data/lib/hecks/projections/site/cms_editor/scheduling.rb +1 -1
  946. data/lib/hecks/projections/site/cms_editor/schema.rb +31 -29
  947. data/lib/hecks/projections/site/cms_editor/setting.rb +34 -27
  948. data/lib/hecks/projections/site/cms_editor/targets.rb +9 -6
  949. data/lib/hecks/projections/site/cms_editor/templates/src/app.ts.tmpl +3 -3
  950. data/lib/hecks/projections/site/cms_editor/templates/src/commands.ts.tmpl +2 -2
  951. data/lib/hecks/projections/site/cms_editor/templates/src/host.ts.tmpl +1 -1
  952. data/lib/hecks/projections/site/cms_editor/templates/src/media/handler.ts.tmpl +4 -4
  953. data/lib/hecks/projections/site/cms_editor/templates/src/names.ts.tmpl +14 -14
  954. data/lib/hecks/projections/site/cms_editor/templates/src/schema.ts.tmpl +12 -12
  955. data/lib/hecks/projections/site/cms_editor/templates/src/ui/pages.ts.tmpl +12 -12
  956. data/lib/hecks/projections/site/cms_editor/templates/src/ui/pickers.ts.tmpl +1 -1
  957. data/lib/hecks/projections/site/cms_editor/templates/src/ui/schedule.ts.tmpl +2 -2
  958. data/lib/hecks/projections/site/cms_editor/templates/src/ui/shell.ts.tmpl +11 -11
  959. data/lib/hecks/projections/site/cms_editor/templates/src/ui/world.ts.tmpl +3 -3
  960. data/lib/hecks/projections/site/cms_editor/theme_checks.rb +8 -2
  961. data/lib/hecks/projections/site/cms_editor.rb +19 -16
  962. data/lib/hecks/projections/site/edge/checks.rb +1 -1
  963. data/lib/hecks/projections/site/edge/function_checks.rb +1 -1
  964. data/lib/hecks/projections/site/edge/function_code.rb +4 -1
  965. data/lib/hecks/projections/site/edge/pattern.rb +4 -1
  966. data/lib/hecks/projections/site/edge/route_checks.rb +2 -2
  967. data/lib/hecks/projections/site/edge/rules.rb +1 -1
  968. data/lib/hecks/projections/site/edge.rb +14 -8
  969. data/lib/hecks/projections/site/live_edge.rb +2 -2
  970. data/lib/hecks/projections/site/payload/fields/definitions.rb +1 -1
  971. data/lib/hecks/projections/site/payload/lifecycle/text.rb +1 -1
  972. data/lib/hecks/projections/site/payload/model.rb +16 -12
  973. data/lib/hecks/projections/site/payload/specs.rb +4 -2
  974. data/lib/hecks/projections/site/payload_driver.rb +9 -8
  975. data/lib/hecks/projections/site/probe.rb +12 -3
  976. data/lib/hecks/projections/site/regions.rb +9 -1
  977. data/lib/hecks/projections/site/role_probe.rb +7 -7
  978. data/lib/hecks/projections/site/root_rows.rb +4 -4
  979. data/lib/hecks/projections/site/routes_ts/listings.rb +13 -6
  980. data/lib/hecks/projections/site/routes_ts.rb +6 -3
  981. data/lib/hecks/projections/site/site_admin.rb +1 -1
  982. data/lib/hecks/projections/site/site_cdn.rb +3 -2
  983. data/lib/hecks/projections/site/site_host.rb +1 -1
  984. data/lib/hecks/projections/site/site_root.rb +4 -4
  985. data/lib/hecks/projections/site/table/checks.rb +4 -1
  986. data/lib/hecks/projections/site/table/navigation_checks.rb +2 -2
  987. data/lib/hecks/projections/site/table/row_builder.rb +7 -7
  988. data/lib/hecks/projections/site/table/row_defaults.rb +1 -1
  989. data/lib/hecks/projections/site/table.rb +32 -26
  990. data/lib/hecks/projections/statements/actions.rb +4 -1
  991. data/lib/hecks/projections/statements/relationships.rb +15 -2
  992. data/lib/hecks/projections/statements.rb +2 -2
  993. data/lib/hecks/projections/undo.rb +46 -0
  994. data/lib/hecks/projections/vocabulary.rb +6 -6
  995. data/lib/hecks/projections/world_skeleton.rb +68 -0
  996. data/lib/hecks/projections.rb +7 -0
  997. data/lib/hecks/projector/cli_audience.rb +12 -9
  998. data/lib/hecks/projector/cli_projector/claims.rb +19 -8
  999. data/lib/hecks/projector/cli_projector/command_help.rb +6 -1
  1000. data/lib/hecks/projector/cli_projector/command_specs.rb +20 -6
  1001. data/lib/hecks/projector/cli_projector/completion.rb +87 -0
  1002. data/lib/hecks/projector/cli_projector/everyday.rb +40 -0
  1003. data/lib/hecks/projector/cli_projector/json_listing.rb +77 -0
  1004. data/lib/hecks/projector/cli_projector/listing.rb +20 -8
  1005. data/lib/hecks/projector/cli_projector/modules.rb +39 -0
  1006. data/lib/hecks/projector/cli_projector/option_specs.rb +1 -1
  1007. data/lib/hecks/projector/cli_projector/query_specs.rb +2 -1
  1008. data/lib/hecks/projector/cli_projector/renames.rb +58 -0
  1009. data/lib/hecks/projector/cli_projector/search.rb +74 -0
  1010. data/lib/hecks/projector/cli_projector/usage.rb +33 -12
  1011. data/lib/hecks/projector/cli_projector.rb +26 -3
  1012. data/lib/hecks/projector/docs_projector/behaviour.rb +5 -4
  1013. data/lib/hecks/projector/docs_projector/closing.rb +3 -3
  1014. data/lib/hecks/projector/docs_projector.rb +12 -7
  1015. data/lib/hecks/projector/exporter/adapters.rb +15 -2
  1016. data/lib/hecks/projector/exporter/bindings.rb +39 -134
  1017. data/lib/hecks/projector/exporter/plugins.rb +55 -0
  1018. data/lib/hecks/projector/exporter.rb +2 -0
  1019. data/lib/hecks/projector/narrate_projector/commands.rb +4 -3
  1020. data/lib/hecks/projector/narrate_projector/reactions.rb +2 -2
  1021. data/lib/hecks/projector/narrate_projector.rb +9 -8
  1022. data/lib/hecks/projector/target.rb +8 -8
  1023. data/lib/hecks/projector.rb +9 -9
  1024. data/lib/hecks/quality_control/adapters/agent.rb +2 -1
  1025. data/lib/hecks/quality_control/adapters/ci_head.adapter +8 -0
  1026. data/lib/hecks/quality_control/adapters/github_checks.adapter +1 -1
  1027. data/lib/hecks/quality_control/adapters/github_issues.adapter +1 -1
  1028. data/lib/hecks/quality_control/adapters/github_issues.rb +6 -2
  1029. data/lib/hecks/quality_control/adapters/image_roll.adapter +9 -0
  1030. data/lib/hecks/quality_control/adapters/image_roll.rb +158 -0
  1031. data/lib/hecks/quality_control/adapters/main_maintenance.adapter +8 -0
  1032. data/lib/hecks/quality_control/adapters/main_maintenance.rb +275 -0
  1033. data/lib/hecks/quality_control/adapters/pump_tools.adapter +7 -0
  1034. data/lib/hecks/quality_control/adapters/pump_tools.rb +18 -0
  1035. data/lib/hecks/quality_control/adapters/push_due_reader.adapter +8 -0
  1036. data/lib/hecks/quality_control/adapters/push_due_reader.rb +99 -0
  1037. data/lib/hecks/quality_control/adapters/qa_auto_mint.rb +183 -0
  1038. data/lib/hecks/quality_control/adapters/qa_era_mint.rb +94 -0
  1039. data/lib/hecks/quality_control/adapters/qa_quiesce_marker.rb +126 -0
  1040. data/lib/hecks/quality_control/adapters/run_keys.rb +36 -0
  1041. data/lib/hecks/quality_control/adapters/run_reader.adapter +7 -0
  1042. data/lib/hecks/quality_control/adapters/run_reader.rb +188 -0
  1043. data/lib/hecks/quality_control/adapters/target_tools.rb +9 -3
  1044. data/lib/hecks/quality_control/cli/child.rb +2 -0
  1045. data/lib/hecks/quality_control/cli/qa_discover_external_domains/scanning.rb +1 -1
  1046. data/lib/hecks/quality_control/cli/qa_domain_novelty/verdict.rb +1 -1
  1047. data/lib/hecks/quality_control/cli/qa_domain_novelty.rb +3 -3
  1048. data/lib/hecks/quality_control/cli/qa_event_pump/attached.rb +67 -0
  1049. data/lib/hecks/quality_control/cli/qa_event_pump/consumer.rb +103 -0
  1050. data/lib/hecks/quality_control/cli/qa_event_pump/cursors.rb +60 -0
  1051. data/lib/hecks/quality_control/cli/qa_event_pump/reactions.rb +46 -0
  1052. data/lib/hecks/quality_control/cli/qa_event_pump/reader.rb +30 -0
  1053. data/lib/hecks/quality_control/cli/qa_event_pump.rb +76 -0
  1054. data/lib/hecks/quality_control/cli/qa_fix_main_bug/publishing.rb +79 -0
  1055. data/lib/hecks/quality_control/cli/qa_fix_main_bug.rb +167 -0
  1056. data/lib/hecks/quality_control/cli/qa_generated_domains/evaluation.rb +13 -3
  1057. data/lib/hecks/quality_control/cli/qa_generated_domains/promotion.rb +7 -4
  1058. data/lib/hecks/quality_control/cli/qa_generated_domains.rb +4 -1
  1059. data/lib/hecks/quality_control/cli/qa_log_bug/proof.rb +16 -3
  1060. data/lib/hecks/quality_control/cli/qa_main_gate/gate_run.rb +52 -0
  1061. data/lib/hecks/quality_control/cli/qa_main_gate/logging.rb +70 -0
  1062. data/lib/hecks/quality_control/cli/qa_main_gate/shell.rb +47 -0
  1063. data/lib/hecks/quality_control/cli/qa_main_gate/sweeping.rb +59 -0
  1064. data/lib/hecks/quality_control/cli/qa_main_gate/worktree.rb +62 -0
  1065. data/lib/hecks/quality_control/cli/qa_main_gate.rb +135 -0
  1066. data/lib/hecks/quality_control/cli/qa_mine_combinations/booting.rb +4 -2
  1067. data/lib/hecks/quality_control/cli/qa_mutate.rb +161 -0
  1068. data/lib/hecks/quality_control/cli/qa_postgres_role.rb +1 -1
  1069. data/lib/hecks/quality_control/cli/qa_pr_check/checking.rb +2 -3
  1070. data/lib/hecks/quality_control/cli/qa_push_nudge.rb +48 -0
  1071. data/lib/hecks/quality_control/cli/qa_seed_angles/seed.rb +1 -1
  1072. data/lib/hecks/quality_control/cli/qa_sweep/all_mode/report.rb +4 -1
  1073. data/lib/hecks/quality_control/cli/qa_sweep/parsing.rb +2 -1
  1074. data/lib/hecks/quality_control/cli/qa_sweep/seat.rb +1 -1
  1075. data/lib/hecks/quality_control/cli/qa_sweep.rb +4 -1
  1076. data/lib/hecks/quality_control/cli/qa_tick/event_pump_step.rb +34 -0
  1077. data/lib/hecks/quality_control/cli/qa_tick/output.rb +43 -26
  1078. data/lib/hecks/quality_control/cli/qa_tick/preflight.rb +12 -3
  1079. data/lib/hecks/quality_control/cli/qa_tick/push_nudge_step.rb +28 -0
  1080. data/lib/hecks/quality_control/cli/qa_tick/quiesce_guard.rb +51 -0
  1081. data/lib/hecks/quality_control/cli/qa_tick.rb +52 -8
  1082. data/lib/hecks/quality_control/quality_control.behaviors +65 -0
  1083. data/lib/hecks/quality_control/quality_control.bluebook +1224 -103
  1084. data/lib/hecks/quality_control/quality_control.hecksagon +14 -3
  1085. data/lib/hecks/quality_control/quality_control.ports.hecksagon +141 -2
  1086. data/lib/hecks/query_ir/rules.rb +9 -9
  1087. data/lib/hecks/query_ir/touchpoints.rb +10 -9
  1088. data/lib/hecks/query_ir.rb +3 -3
  1089. data/lib/hecks/query_specification/common/comparison.rb +1 -1
  1090. data/lib/hecks/query_specification/common/dsl.rb +3 -4
  1091. data/lib/hecks/query_specification/hop_path.rb +7 -4
  1092. data/lib/hecks/rails_app/bluebook/rails_app.bluebook +60 -0
  1093. data/lib/hecks/rails_app/bluebook/rails_app.hecksagon +4 -0
  1094. data/lib/hecks/refused.rb +125 -0
  1095. data/lib/hecks/release/approval.rb +15 -5
  1096. data/lib/hecks/release/conditions.rb +46 -0
  1097. data/lib/hecks/release/gem_pin.rb +7 -3
  1098. data/lib/hecks/release/lane.rb +1 -1
  1099. data/lib/hecks/release/runner/clean_tree.rb +4 -1
  1100. data/lib/hecks/release/runner/console.rb +2 -1
  1101. data/lib/hecks/release/runner/gem_publisher.rb +4 -4
  1102. data/lib/hecks/release/version_commit.rb +48 -0
  1103. data/lib/hecks/router/aggregate_reader.rb +3 -4
  1104. data/lib/hecks/router/namespace_installer.rb +31 -17
  1105. data/lib/hecks/router.rb +2 -10
  1106. data/lib/hecks/runtime/adapter_lookup.rb +30 -7
  1107. data/lib/hecks/runtime/adapter_namespace.rb +21 -0
  1108. data/lib/hecks/runtime/asking.rb +30 -0
  1109. data/lib/hecks/runtime/caller.rb +22 -0
  1110. data/lib/hecks/runtime/capability_graph.rb +2 -1
  1111. data/lib/hecks/runtime/collecting.rb +86 -0
  1112. data/lib/hecks/runtime/command_interpreter/argument_gate.rb +13 -8
  1113. data/lib/hecks/runtime/command_interpreter/delegation.rb +46 -17
  1114. data/lib/hecks/runtime/command_interpreter/hydration.rb +22 -25
  1115. data/lib/hecks/runtime/command_interpreter/list_mutations.rb +2 -1
  1116. data/lib/hecks/runtime/command_interpreter/persisting.rb +23 -14
  1117. data/lib/hecks/runtime/command_interpreter.rb +19 -12
  1118. data/lib/hecks/runtime/command_rules/admissibility.rb +17 -12
  1119. data/lib/hecks/runtime/command_rules/authorization.rb +8 -6
  1120. data/lib/hecks/runtime/command_rules/emission.rb +0 -1
  1121. data/lib/hecks/runtime/command_rules/guard_state.rb +10 -10
  1122. data/lib/hecks/runtime/command_rules/invariants.rb +3 -1
  1123. data/lib/hecks/runtime/command_rules/missing_reference.rb +25 -0
  1124. data/lib/hecks/runtime/command_rules/one_of_references.rb +44 -0
  1125. data/lib/hecks/runtime/command_rules/references.rb +14 -14
  1126. data/lib/hecks/runtime/command_rules.rb +2 -0
  1127. data/lib/hecks/runtime/declarations.rb +66 -0
  1128. data/lib/hecks/runtime/dependency_planning/analyzer.rb +2 -1
  1129. data/lib/hecks/runtime/dependency_planning/expression_reads.rb +3 -3
  1130. data/lib/hecks/runtime/dependency_planning/mutation_analysis.rb +2 -1
  1131. data/lib/hecks/runtime/dispatch_claim.rb +72 -0
  1132. data/lib/hecks/runtime/dispatch_context.rb +41 -0
  1133. data/lib/hecks/runtime/dispatcher/planning.rb +24 -0
  1134. data/lib/hecks/runtime/dispatcher/queries.rb +17 -0
  1135. data/lib/hecks/runtime/dispatcher/routing.rb +40 -12
  1136. data/lib/hecks/runtime/dispatcher/validating.rb +73 -0
  1137. data/lib/hecks/runtime/dispatcher/value_routing.rb +54 -0
  1138. data/lib/hecks/runtime/dispatcher.rb +46 -24
  1139. data/lib/hecks/runtime/dry_run_plan.rb +60 -0
  1140. data/lib/hecks/runtime/entity_element/location.rb +15 -8
  1141. data/lib/hecks/runtime/entity_element/mutations.rb +4 -2
  1142. data/lib/hecks/runtime/entity_interpreter/enforcement.rb +1 -1
  1143. data/lib/hecks/runtime/entity_interpreter/locating.rb +6 -1
  1144. data/lib/hecks/runtime/entity_interpreter/saving.rb +5 -5
  1145. data/lib/hecks/runtime/entity_interpreter.rb +11 -5
  1146. data/lib/hecks/runtime/errors.rb +56 -17
  1147. data/lib/hecks/runtime/identity.rb +9 -0
  1148. data/lib/hecks/runtime/instance.rb +3 -3
  1149. data/lib/hecks/runtime/interpreting.rb +63 -6
  1150. data/lib/hecks/runtime/invocation_builder.rb +7 -5
  1151. data/lib/hecks/runtime/invocation_facts.rb +13 -8
  1152. data/lib/hecks/runtime/loader/boot_steps.rb +3 -2
  1153. data/lib/hecks/runtime/loader/described.rb +4 -0
  1154. data/lib/hecks/runtime/loader.rb +52 -62
  1155. data/lib/hecks/runtime/outbox/consumer_runner.rb +9 -1
  1156. data/lib/hecks/runtime/outbox/redrive.rb +105 -0
  1157. data/lib/hecks/runtime/outbox/relay.rb +36 -43
  1158. data/lib/hecks/runtime/outbox/runnable.rb +62 -0
  1159. data/lib/hecks/runtime/outbox.rb +21 -3
  1160. data/lib/hecks/runtime/policy_interpreter/arguments.rb +7 -1
  1161. data/lib/hecks/runtime/policy_interpreter/fan_out.rb +26 -37
  1162. data/lib/hecks/runtime/policy_interpreter.rb +25 -9
  1163. data/lib/hecks/runtime/port_operation_interpreter.rb +47 -19
  1164. data/lib/hecks/runtime/query_interpreter/arguments.rb +6 -5
  1165. data/lib/hecks/runtime/query_interpreter/outside_answer.rb +1 -1
  1166. data/lib/hecks/runtime/query_interpreter/paging.rb +42 -0
  1167. data/lib/hecks/runtime/query_interpreter/plugin_answer.rb +54 -0
  1168. data/lib/hecks/runtime/query_interpreter/store_specification.rb +32 -0
  1169. data/lib/hecks/runtime/query_interpreter.rb +16 -9
  1170. data/lib/hecks/runtime/reaction_invocation/target_resolution.rb +10 -4
  1171. data/lib/hecks/runtime/reaction_invocation.rb +5 -3
  1172. data/lib/hecks/runtime/read_model_interpreter/head_ordering.rb +1 -1
  1173. data/lib/hecks/runtime/read_model_interpreter/reductions.rb +23 -15
  1174. data/lib/hecks/runtime/read_model_interpreter/shaping.rb +18 -7
  1175. data/lib/hecks/runtime/read_model_interpreter.rb +5 -2
  1176. data/lib/hecks/runtime/reference_hop.rb +3 -2
  1177. data/lib/hecks/runtime/refusal_wording.rb +27 -7
  1178. data/lib/hecks/runtime/registry/adapter_capabilities.rb +43 -0
  1179. data/lib/hecks/runtime/registry/ask_verification.rb +15 -4
  1180. data/lib/hecks/runtime/registry/{chapter_verification.rb → bluebook_verification.rb} +23 -23
  1181. data/lib/hecks/runtime/registry/context_maps.rb +26 -0
  1182. data/lib/hecks/runtime/registry/declarations.rb +38 -6
  1183. data/lib/hecks/runtime/registry/durability_warnings.rb +18 -2
  1184. data/lib/hecks/runtime/registry/hecksagon_rules.rb +42 -25
  1185. data/lib/hecks/runtime/registry/plugin_query_verification.rb +45 -0
  1186. data/lib/hecks/runtime/registry/providers.rb +34 -99
  1187. data/lib/hecks/runtime/registry/query_verification.rb +30 -21
  1188. data/lib/hecks/runtime/registry/runtime_state.rb +14 -3
  1189. data/lib/hecks/runtime/registry/saga_persistence.rb +7 -16
  1190. data/lib/hecks/runtime/registry/verification.rb +9 -5
  1191. data/lib/hecks/runtime/registry/world_defaults.rb +31 -6
  1192. data/lib/hecks/runtime/registry/world_names.rb +99 -0
  1193. data/lib/hecks/runtime/registry.rb +84 -53
  1194. data/lib/hecks/runtime/row_sweep.rb +104 -0
  1195. data/lib/hecks/runtime/saga_interpreter/compensation.rb +15 -4
  1196. data/lib/hecks/runtime/saga_interpreter/correlation.rb +29 -3
  1197. data/lib/hecks/runtime/saga_interpreter/delivery.rb +13 -11
  1198. data/lib/hecks/runtime/saga_interpreter/lifecycle.rb +1 -1
  1199. data/lib/hecks/runtime/saga_interpreter/redrive.rb +141 -0
  1200. data/lib/hecks/runtime/saga_interpreter/transitions.rb +35 -6
  1201. data/lib/hecks/runtime/saga_interpreter.rb +82 -6
  1202. data/lib/hecks/runtime/saga_pending_dispatch.rb +4 -2
  1203. data/lib/hecks/runtime/scalar_field.rb +73 -0
  1204. data/lib/hecks/runtime/tenant_scope.rb +2 -1
  1205. data/lib/hecks/runtime/validation.rb +24 -0
  1206. data/lib/hecks/runtime/value/admission.rb +11 -11
  1207. data/lib/hecks/runtime/value/coercion.rb +43 -15
  1208. data/lib/hecks/runtime/value/field_checks.rb +13 -13
  1209. data/lib/hecks/runtime/value/invariant_violation.rb +4 -1
  1210. data/lib/hecks/runtime/value/references.rb +7 -4
  1211. data/lib/hecks/runtime/value/validation.rb +7 -4
  1212. data/lib/hecks/runtime/wasm_plugin.rb +98 -0
  1213. data/lib/hecks/runtime.rb +14 -14
  1214. data/lib/hecks/rust_build/command_schemas.rb +27 -0
  1215. data/lib/hecks/rust_build/conformance/surface.rb +50 -7
  1216. data/lib/hecks/rust_build/conformance.rb +41 -8
  1217. data/lib/hecks/rust_build/conformance_fuzz.rb +2 -2
  1218. data/lib/hecks/rust_build/domain_name.rb +4 -1
  1219. data/lib/hecks/rust_build/host.rb +15 -9
  1220. data/lib/hecks/rust_build/native_build.rb +2 -1
  1221. data/lib/hecks/rust_build/parser.rb +25 -0
  1222. data/lib/hecks/rust_build/prebuilt_binary.rb +25 -5
  1223. data/lib/hecks/rust_build/project_rust/codegen_run.rb +51 -17
  1224. data/lib/hecks/rust_build/project_rust/declared.rb +80 -0
  1225. data/lib/hecks/rust_build/project_rust/domain_loader.rb +15 -2
  1226. data/lib/hecks/rust_build/project_rust/features_header.rb +22 -0
  1227. data/lib/hecks/rust_build/project_rust/manifest.rb +96 -0
  1228. data/lib/hecks/rust_build/project_rust/meta.rb +36 -0
  1229. data/lib/hecks/rust_build/project_rust/root_mod/notes.rb +1 -1
  1230. data/lib/hecks/rust_build/project_rust/target_ir.rb +12 -3
  1231. data/lib/hecks/rust_build/project_rust.rb +31 -73
  1232. data/lib/hecks/rust_build/target_dir.rb +40 -0
  1233. data/lib/hecks/rust_build/wasm.rb +46 -17
  1234. data/lib/hecks/rust_build/wasm_browser.rb +8 -2
  1235. data/lib/hecks/rust_build/write_if_changed.rb +19 -4
  1236. data/lib/hecks/rust_build.rb +31 -3
  1237. data/lib/hecks/rust_format.rb +32 -2
  1238. data/lib/hecks/secrets.rb +111 -0
  1239. data/lib/hecks/sentence_form.rb +212 -0
  1240. data/lib/hecks/served_options.rb +2 -1
  1241. data/lib/hecks/shape_ledger/edge_hygiene.rb +170 -0
  1242. data/lib/hecks/shape_ledger/scope.rb +51 -0
  1243. data/lib/hecks/shape_ledger/status.rb +89 -0
  1244. data/lib/hecks/shape_ledger.rb +194 -0
  1245. data/lib/hecks/site/bluebook/site.bluebook +40 -62
  1246. data/lib/hecks/site/bluebook/site.ports.hecksagon +1 -1
  1247. data/lib/hecks/sme/bluebook/sme.bluebook +7 -1
  1248. data/lib/hecks/storehouse/audit.rb +38 -5
  1249. data/lib/hecks/storehouse/bluebook_words.rb +35 -0
  1250. data/lib/hecks/storehouse/callers.rb +8 -0
  1251. data/lib/hecks/storehouse/dispatching.rb +20 -6
  1252. data/lib/hecks/storehouse/identity.rb +41 -0
  1253. data/lib/hecks/storehouse/introspection.rb +4 -4
  1254. data/lib/hecks/storehouse/querying.rb +9 -9
  1255. data/lib/hecks/storehouse.rb +38 -10
  1256. data/lib/hecks/switches.rb +21 -0
  1257. data/lib/hecks/tenancy/bluebook/tenancy.bluebook +5 -9
  1258. data/lib/hecks/text.rb +57 -0
  1259. data/lib/hecks/tickets/bluebook/adapters/work_areas.adapter +7 -0
  1260. data/lib/hecks/tickets/bluebook/adapters/work_limits.adapter +7 -0
  1261. data/lib/hecks/tickets/bluebook/tickets.behaviors +70 -0
  1262. data/lib/hecks/tickets/bluebook/tickets.bluebook +350 -76
  1263. data/lib/hecks/tickets/bluebook/tickets.hecksagon +8 -1
  1264. data/lib/hecks/tickets/bluebook/tickets.ports.hecksagon +18 -1
  1265. data/lib/hecks/tools/argument_gate_matrix/dispatching.rb +1 -1
  1266. data/lib/hecks/tools/argument_gate_matrix/rows.rb +7 -7
  1267. data/lib/hecks/tools/argument_gate_matrix/violations.rb +1 -1
  1268. data/lib/hecks/tools/argument_gate_matrix.rb +3 -3
  1269. data/lib/hecks/{cli → tools}/behaviors.rb +1 -1
  1270. data/lib/hecks/{cli → tools}/canonicalise.rb +1 -1
  1271. data/lib/hecks/{cli → tools}/check_engine_agreement.rb +1 -1
  1272. data/lib/hecks/{cli → tools}/check_era.rb +7 -7
  1273. data/lib/hecks/tools/ci_gate_decision.rb +5 -2
  1274. data/lib/hecks/tools/ci_gates.rb +9 -3
  1275. data/lib/hecks/tools/ci_workflows.rb +98 -0
  1276. data/lib/hecks/tools/comment_style/caps_words.rb +11 -8
  1277. data/lib/hecks/tools/comment_style/dictionary.rb +7 -2
  1278. data/lib/hecks/tools/comment_style/fixing.rb +10 -5
  1279. data/lib/hecks/tools/comment_style/long_blocks.rb +1 -1
  1280. data/lib/hecks/tools/comment_style/masking.rb +5 -5
  1281. data/lib/hecks/tools/comment_style/run.rb +4 -1
  1282. data/lib/hecks/tools/comment_style/source_file.rb +10 -3
  1283. data/lib/hecks/tools/comment_style/structure_checks.rb +13 -4
  1284. data/lib/hecks/tools/comment_style/text_checks.rb +1 -1
  1285. data/lib/hecks/tools/comment_style.rb +25 -2
  1286. data/lib/hecks/{cli → tools}/console.rb +12 -7
  1287. data/lib/hecks/tools/deploy_recipe/generation.rb +1 -1
  1288. data/lib/hecks/tools/deploy_recipe/targets.rb +1 -1
  1289. data/lib/hecks/tools/deploy_recipe/worlds.rb +15 -9
  1290. data/lib/hecks/tools/deploy_recipe.rb +17 -10
  1291. data/lib/hecks/tools/deploy_recipe_lint/fixtures.rb +1 -1
  1292. data/lib/hecks/tools/deploy_recipe_lint/makefile.rb +7 -1
  1293. data/lib/hecks/{cli → tools}/deploy_template_diff.rb +1 -1
  1294. data/lib/hecks/{cli → tools}/doc_coverage.rb +2 -2
  1295. data/lib/hecks/{cli → tools}/document.rb +15 -10
  1296. data/lib/hecks/{cli → tools}/domain_stub.rb +1 -1
  1297. data/lib/hecks/{cli → tools}/domain_writer.rb +5 -2
  1298. data/lib/hecks/tools/downstream_model_check.rb +122 -0
  1299. data/lib/hecks/tools/drop_implicit_append_fields.rb +4 -1
  1300. data/lib/hecks/tools/era_projection_backfill.rb +11 -6
  1301. data/lib/hecks/tools/era_reattest.rb +11 -6
  1302. data/lib/hecks/tools/evolve_run.rb +2 -2
  1303. data/lib/hecks/tools/expected_era.rb +139 -0
  1304. data/lib/hecks/{cli → tools}/expression_projection.rb +3 -3
  1305. data/lib/hecks/{cli → tools}/follow.rb +4 -4
  1306. data/lib/hecks/tools/fuzz_sweep/findings.rb +18 -2
  1307. data/lib/hecks/tools/fuzz_sweep/options.rb +45 -6
  1308. data/lib/hecks/tools/fuzz_sweep/pool.rb +12 -1
  1309. data/lib/hecks/tools/fuzz_sweep/shards.rb +155 -0
  1310. data/lib/hecks/tools/fuzz_sweep.rb +28 -10
  1311. data/lib/hecks/tools/gate.rb +65 -34
  1312. data/lib/hecks/tools/gate_memo/local_files.rb +33 -0
  1313. data/lib/hecks/tools/gate_memo/rehearsal.rb +54 -0
  1314. data/lib/hecks/tools/gate_memo/ruby_files.rb +152 -0
  1315. data/lib/hecks/tools/gate_memo/session.rb +114 -0
  1316. data/lib/hecks/tools/gate_memo/standalone.rb +67 -0
  1317. data/lib/hecks/tools/gate_memo.rb +196 -0
  1318. data/lib/hecks/tools/gate_report.rb +56 -0
  1319. data/lib/hecks/{cli → tools}/history.rb +5 -2
  1320. data/lib/hecks/tools/hoist_local_givens/rewriting.rb +3 -2
  1321. data/lib/hecks/tools/hoist_local_givens.rb +2 -4
  1322. data/lib/hecks/{cli → tools}/interview_agent.rb +1 -1
  1323. data/lib/hecks/{cli → tools}/interview_aggregate.rb +1 -1
  1324. data/lib/hecks/{cli → tools}/interview_draft.rb +9 -2
  1325. data/lib/hecks/{cli → tools}/interview_record.rb +8 -4
  1326. data/lib/hecks/{cli → tools}/interview_run.rb +9 -7
  1327. data/lib/hecks/{cli → tools}/interview_session/agent_state.rb +1 -1
  1328. data/lib/hecks/{cli → tools}/interview_session/catalog.rb +1 -1
  1329. data/lib/hecks/{cli → tools}/interview_session/manual_findings.rb +1 -1
  1330. data/lib/hecks/{cli → tools}/interview_session/proposals.rb +6 -3
  1331. data/lib/hecks/{cli → tools}/interview_session.rb +5 -4
  1332. data/lib/hecks/tools/interview_shape/lifecycle.rb +92 -0
  1333. data/lib/hecks/{cli → tools}/interview_shape.rb +20 -74
  1334. data/lib/hecks/{cli → tools}/ir.rb +1 -1
  1335. data/lib/hecks/tools/lanes/files.rb +1 -1
  1336. data/lib/hecks/tools/lanes/prebuilt_workflow.rb +1 -1
  1337. data/lib/hecks/tools/lanes/rows.rb +9 -3
  1338. data/lib/hecks/tools/lanes/ruleset.rb +1 -1
  1339. data/lib/hecks/tools/lanes/watch_workflow.rb +7 -9
  1340. data/lib/hecks/tools/lanes/workflow.rb +2 -2
  1341. data/lib/hecks/tools/lanes.rb +2 -2
  1342. data/lib/hecks/{cli → tools}/mcp.rb +1 -1
  1343. data/lib/hecks/tools/model_check/examination.rb +142 -0
  1344. data/lib/hecks/{cli → tools}/model_check/sources.rb +5 -3
  1345. data/lib/hecks/{cli → tools}/model_check.rb +2 -2
  1346. data/lib/hecks/tools/move_disables/reasons.rb +35 -0
  1347. data/lib/hecks/tools/move_disables.rb +211 -0
  1348. data/lib/hecks/tools/move_former_name.rb +105 -0
  1349. data/lib/hecks/tools/oidc_manifests.rb +16 -19
  1350. data/lib/hecks/{cli → tools}/pattern_cases.rb +1 -1
  1351. data/lib/hecks/tools/persistence_notice.rb +45 -0
  1352. data/lib/hecks/{cli → tools}/present.rb +2 -2
  1353. data/lib/hecks/{cli → tools}/project_cli/launcher_source.rb +39 -27
  1354. data/lib/hecks/{cli → tools}/project_cli/templates.rb +42 -14
  1355. data/lib/hecks/{cli → tools}/project_cli.rb +22 -20
  1356. data/lib/hecks/tools/project_diagrams.rb +59 -0
  1357. data/lib/hecks/{cli → tools}/project_glossary.rb +16 -16
  1358. data/lib/hecks/{cli → tools}/reference.rb +3 -3
  1359. data/lib/hecks/{cli → tools}/refresh_projections.rb +17 -12
  1360. data/lib/hecks/{cli → tools}/refresh_rspec_runtime_baseline.rb +1 -1
  1361. data/lib/hecks/tools/regeneration_run/pool.rb +148 -0
  1362. data/lib/hecks/tools/regeneration_run/scratch.rb +76 -0
  1363. data/lib/hecks/tools/regeneration_run.rb +134 -107
  1364. data/lib/hecks/{cli → tools}/release.rb +1 -1
  1365. data/lib/hecks/{cli → tools}/release_gem.rb +1 -1
  1366. data/lib/hecks/tools/release_only.rb +5 -2
  1367. data/lib/hecks/{cli → tools}/rspec_io_parallel_files.rb +1 -1
  1368. data/lib/hecks/{cli → tools}/rspec_shard_files.rb +1 -1
  1369. data/lib/hecks/{cli → tools}/run.rb +36 -7
  1370. data/lib/hecks/{cli → tools}/run_expectations.rb +1 -1
  1371. data/lib/hecks/tools/rust_comment_style/caps_words.rb +5 -5
  1372. data/lib/hecks/tools/rust_comment_style/fixing.rb +1 -1
  1373. data/lib/hecks/tools/rust_comment_style/masking.rb +7 -4
  1374. data/lib/hecks/tools/rust_comment_style/source_file.rb +7 -2
  1375. data/lib/hecks/tools/rust_comment_style/text_checks.rb +1 -1
  1376. data/lib/hecks/tools/rust_comment_style/tokenizer.rb +4 -1
  1377. data/lib/hecks/{cli → tools}/seed_semantics_corpus.rb +18 -8
  1378. data/lib/hecks/{cli → tools}/serve_query_ir_mcp.rb +1 -1
  1379. data/lib/hecks/{cli → tools}/shape.rb +6 -6
  1380. data/lib/hecks/tools/site_routes/editor_files.rb +16 -13
  1381. data/lib/hecks/tools/site_routes/root_files.rb +14 -13
  1382. data/lib/hecks/tools/site_routes/templates.rb +5 -4
  1383. data/lib/hecks/tools/site_routes.rb +18 -15
  1384. data/lib/hecks/{cli → tools}/smoke_http/checks.rb +1 -1
  1385. data/lib/hecks/{cli → tools}/smoke_http/settings.rb +1 -1
  1386. data/lib/hecks/{cli → tools}/smoke_http/transport.rb +4 -3
  1387. data/lib/hecks/{cli → tools}/smoke_http.rb +1 -1
  1388. data/lib/hecks/{cli → tools}/smoke_test.rb +1 -1
  1389. data/lib/hecks/{cli → tools}/spec_example.rb +1 -1
  1390. data/lib/hecks/tools/stage_progress.rb +54 -0
  1391. data/lib/hecks/{cli → tools}/statements.rb +8 -8
  1392. data/lib/hecks/tools/stores.rb +123 -0
  1393. data/lib/hecks/{cli → tools}/stress_concurrency_specs/reporting.rb +5 -2
  1394. data/lib/hecks/{cli → tools}/stress_concurrency_specs/usage.rb +4 -4
  1395. data/lib/hecks/{cli → tools}/stress_concurrency_specs.rb +3 -3
  1396. data/lib/hecks/tools/tail_merge.rb +3 -3
  1397. data/lib/hecks/tools/tenant_provisioning.rb +29 -6
  1398. data/lib/hecks/tools/tools_doc.rb +22 -20
  1399. data/lib/hecks/tools/translation_audit/domain_loading.rb +3 -3
  1400. data/lib/hecks/tools/translation_audit/edges.rb +21 -16
  1401. data/lib/hecks/tools/translation_audit/verdicts.rb +1 -1
  1402. data/lib/hecks/tools/translation_audit.rb +16 -5
  1403. data/lib/hecks/tools/translation_scaffold/reporting.rb +4 -1
  1404. data/lib/hecks/tools/translation_scaffold.rb +5 -15
  1405. data/lib/hecks/tools.rb +4 -1
  1406. data/lib/hecks/vendoring/git_source.rb +7 -4
  1407. data/lib/hecks/version.rb +1 -1
  1408. data/lib/hecks/vocabulary.rb +147 -10
  1409. data/lib/hecks/workflow_pagination/judge.rb +48 -0
  1410. data/lib/hecks/workflow_pagination/statement.rb +50 -0
  1411. data/lib/hecks/workflow_pagination.rb +58 -0
  1412. data/lib/hecks.rb +39 -18
  1413. data/lib/rubocop/cop/hecks/bare_event_and_query_names.rb +58 -0
  1414. data/lib/rubocop/cop/hecks/correlates_by_aggregate.rb +39 -0
  1415. data/lib/rubocop/cop/hecks/creating_command_sets.rb +75 -0
  1416. data/lib/rubocop/cop/hecks/inline_regexp.rb +29 -0
  1417. data/lib/rubocop/cop/hecks/invariant_expression_language.rb +47 -0
  1418. data/lib/rubocop/cop/hecks/lifecycle_needs_attribute.rb +58 -0
  1419. data/lib/rubocop/cop/hecks/no_id_string_attribute.rb +49 -0
  1420. data/lib/rubocop/cop/hecks/no_transport_in_runtime.rb +78 -0
  1421. data/lib/rubocop/cop/hecks/one_terminal_mark_per_lifecycle.rb +47 -0
  1422. data/lib/rubocop/cop/hecks/rails_model_rules.rb +46 -0
  1423. data/lib/rubocop/cop/hecks/thread_shared_ivar_mutation.rb +1 -1
  1424. data/lib/rubocop/cop/hecks/train_wreck.rb +69 -0
  1425. data/lib/rubocop/cop/hecks/unnamed_pipeline.rb +51 -0
  1426. data/lib/rubocop/cop/hecks/value_object_shorthand.rb +56 -0
  1427. data/prebuilt/13c04bdc5970295b310f0a980d397ba722232c8da99cc1a0cdb383249921e871.marshal +0 -0
  1428. data/prebuilt/e3857b77f47d9ecc1787b2e1f5136364f3cb3444ef4aea5479f3b98167affea2.marshal +0 -0
  1429. data/qa/settings.yml +32 -0
  1430. data/rust/.gitignore +0 -6
  1431. data/rust/Cargo.lock +8 -1
  1432. data/rust/Cargo.toml +8 -8
  1433. data/rust/build/Cargo.toml +1 -1
  1434. data/rust/build/src/binding_pass.rs +68 -19
  1435. data/rust/build/src/cargo_sync.rs +1 -1
  1436. data/rust/build/src/lineage_pass.rs +4 -71
  1437. data/rust/build/src/pipeline.rs +104 -73
  1438. data/rust/build/src/resolve.rs +86 -29
  1439. data/rust/build/src/seams_pass.rs +117 -99
  1440. data/rust/build/src/world_pass.rs +21 -12
  1441. data/rust/codegen/Cargo.toml +1 -1
  1442. data/rust/codegen/src/domain_generator.rs +27 -2
  1443. data/rust/codegen/src/expr_emitter.rs +6 -0
  1444. data/rust/codegen/src/json_codec.rs +230 -33
  1445. data/rust/codegen/src/main.rs +35 -34
  1446. data/rust/codegen/src/manifest.rs +1 -1
  1447. data/rust/codegen/src/naming.rs +5 -5
  1448. data/rust/codegen/src/one_of_references.rs +125 -0
  1449. data/rust/codegen/src/presenters.rs +3 -3
  1450. data/rust/codegen/src/queries.rs +76 -9
  1451. data/rust/codegen/src/reactions.rs +19 -14
  1452. data/rust/codegen/src/read_models.rs +19 -14
  1453. data/rust/codegen/src/registry.rs +110 -20
  1454. data/rust/codegen/src/sidecars.rs +1 -1
  1455. data/rust/expr/Cargo.lock +54 -0
  1456. data/rust/expr/Cargo.toml +52 -0
  1457. data/rust/{src/kernel → expr/src}/attribute_shapes/composite.rs +45 -14
  1458. data/rust/{src/kernel → expr/src}/attribute_shapes/list.rs +1 -1
  1459. data/rust/{src/kernel → expr/src}/attribute_shapes/mod.rs +2 -2
  1460. data/rust/{src/kernel → expr/src}/attribute_shapes/optional.rs +1 -1
  1461. data/rust/{src/kernel → expr/src}/attribute_shapes/scalar.rs +3 -3
  1462. data/rust/{src/kernel → expr/src}/expr.rs +30 -8
  1463. data/rust/{src/kernel → expr/src}/expression_operators/arithmetic.rs +41 -18
  1464. data/rust/{src/kernel → expr/src}/expression_operators/comparison.rs +54 -8
  1465. data/rust/{src/kernel → expr/src}/expression_operators/enumeration.rs +73 -6
  1466. data/rust/{src/kernel → expr/src}/expression_operators/logical.rs +2 -2
  1467. data/rust/expr/src/expression_operators/membership.rs +33 -0
  1468. data/rust/{src/kernel → expr/src}/expression_operators/mod.rs +2 -2
  1469. data/rust/expr/src/expression_operators/pattern_match.rs +179 -0
  1470. data/rust/{src/kernel → expr/src}/expression_operators/positional.rs +8 -6
  1471. data/rust/{src/kernel → expr/src}/expression_operators/presence.rs +7 -6
  1472. data/rust/{src/kernel → expr/src}/expression_operators/sign_test.rs +14 -4
  1473. data/rust/{src/kernel → expr/src}/expression_operators/sized.rs +16 -9
  1474. data/rust/{src/kernel → expr/src}/expression_operators/text.rs +30 -17
  1475. data/rust/{src/kernel → expr/src}/expression_operators/to_string.rs +8 -6
  1476. data/rust/expr/src/lib.rs +17 -0
  1477. data/rust/expr/src/refusal.rs +62 -0
  1478. data/rust/expr/src/rendering.rs +135 -0
  1479. data/rust/{src/kernel → expr/src}/ruby_float.rs +7 -6
  1480. data/rust/host/Cargo.lock +137 -123
  1481. data/rust/host/Cargo.toml +8 -4
  1482. data/rust/host/HECKS_RELEASE +1 -1
  1483. data/rust/host/core/Cargo.toml +64 -0
  1484. data/rust/host/core/clippy.toml +4 -0
  1485. data/rust/host/core/src/arg_limits.rs +48 -0
  1486. data/rust/host/core/src/clock.rs +146 -0
  1487. data/rust/host/core/src/dispatch.rs +920 -0
  1488. data/rust/host/core/src/expr_json.rs +1137 -0
  1489. data/rust/host/{src → core/src}/host.rs +13 -14
  1490. data/rust/host/{src → core/src}/ir.rs +227 -18
  1491. data/rust/host/core/src/journal.rs +126 -0
  1492. data/rust/host/{src → core/src}/lambda_client.rs +27 -96
  1493. data/rust/host/core/src/lib.rs +37 -0
  1494. data/rust/host/{src → core/src}/needs.rs +66 -20
  1495. data/rust/host/core/src/plugins.rs +269 -0
  1496. data/rust/host/core/src/presentation.rs +471 -0
  1497. data/rust/host/{src → core/src}/presentation_write.rs +75 -43
  1498. data/rust/host/{src → core/src}/query_step.rs +54 -16
  1499. data/rust/host/{src → core/src}/reference_validate.rs +6 -6
  1500. data/rust/host/{src → core/src}/storage_shape.rs +2 -2
  1501. data/rust/host/core/src/store/memory.rs +635 -0
  1502. data/rust/host/core/src/store.rs +418 -0
  1503. data/rust/host/{src → core/src}/ui_schema.rs +8 -8
  1504. data/rust/host/core/src/validation.rs +129 -0
  1505. data/rust/host/core/src/wasm_runner.rs +410 -0
  1506. data/rust/host/fuzz/.gitignore +4 -0
  1507. data/rust/host/fuzz/Cargo.lock +4479 -0
  1508. data/rust/host/fuzz/Cargo.toml +42 -0
  1509. data/rust/host/fuzz/README.md +55 -0
  1510. data/rust/host/fuzz/fuzz_targets/postgres_equivalence.rs +24 -0
  1511. data/rust/host/fuzz/src/backend.rs +273 -0
  1512. data/rust/host/fuzz/src/equivalence.rs +195 -0
  1513. data/rust/host/fuzz/src/footprint.rs +182 -0
  1514. data/rust/host/fuzz/src/lib.rs +17 -0
  1515. data/rust/host/fuzz/src/ops.rs +345 -0
  1516. data/rust/host/fuzz/tests/smoke.rs +50 -0
  1517. data/rust/host/src/api.rs +316 -105
  1518. data/rust/host/src/auth/google_signin.rs +183 -0
  1519. data/rust/host/src/auth.rs +527 -370
  1520. data/rust/host/src/aws_lambda_invoker.rs +61 -0
  1521. data/rust/host/src/bin/expr_harness.rs +9 -4
  1522. data/rust/host/src/bin/ledger.rs +84 -0
  1523. data/rust/host/src/bin/lineage_harness.rs +17 -21
  1524. data/rust/host/src/bin/mint_harness.rs +12 -36
  1525. data/rust/host/src/bin/validate_harness.rs +1 -6
  1526. data/rust/host/src/boot.rs +466 -174
  1527. data/rust/host/src/boundary_fuzz/ir.rs +10 -5
  1528. data/rust/host/src/boundary_fuzz/server.rs +6 -5
  1529. data/rust/host/src/checkout.rs +4 -1
  1530. data/rust/host/src/commerce_ir.rs +126 -105
  1531. data/rust/host/src/{dispatch.rs → dispatch_tests.rs} +367 -847
  1532. data/rust/host/src/extension.rs +3 -4
  1533. data/rust/host/src/hecksagon_boundary_tests.rs +149 -0
  1534. data/rust/host/src/ledger.rs +683 -0
  1535. data/rust/host/src/lib.rs +21 -28
  1536. data/rust/host/src/payments/tests.rs +136 -38
  1537. data/rust/host/src/payments.rs +36 -32
  1538. data/rust/host/src/platform_signin/extension.rs +1 -1
  1539. data/rust/host/src/platform_signin/mapping_tests.rs +12 -9
  1540. data/rust/host/src/platform_signin/session.rs +7 -14
  1541. data/rust/host/src/platform_signin/verify.rs +0 -2
  1542. data/rust/host/src/presentation_tests.rs +382 -0
  1543. data/rust/host/src/rate_limit.rs +18 -2
  1544. data/rust/host/src/server.rs +222 -43
  1545. data/rust/host/src/{journal.rs → store/journal_sql.rs} +21 -127
  1546. data/rust/host/src/{mint.rs → store/mint.rs} +52 -18
  1547. data/rust/host/src/store/postgres.rs +493 -0
  1548. data/rust/host/src/store.rs +97 -0
  1549. data/rust/host/src/store_conformance.rs +1265 -0
  1550. data/rust/host/src/web/commerce.rs +10 -18
  1551. data/rust/host/src/web/newsletter/cooldown.rs +107 -22
  1552. data/rust/host/src/web/newsletter/naming.rs +104 -0
  1553. data/rust/host/src/web/newsletter/tests.rs +53 -0
  1554. data/rust/host/src/web/newsletter.rs +73 -50
  1555. data/rust/host/src/web/newsletter_send.rs +12 -13
  1556. data/rust/host/src/web/registration_receipt.rs +2 -2
  1557. data/rust/host/src/web/registrations.rs +754 -375
  1558. data/rust/host/src/web/resend_webhook.rs +3 -3
  1559. data/rust/host/src/web/signin_tests.rs +131 -0
  1560. data/rust/host/src/web.rs +1479 -149
  1561. data/rust/lsp/Cargo.toml +1 -1
  1562. data/rust/lsp/README.md +27 -27
  1563. data/rust/lsp/src/diagnostics.rs +75 -15
  1564. data/rust/lsp/src/main.rs +101 -5
  1565. data/rust/parser/Cargo.toml +1 -1
  1566. data/rust/parser/fuzz/Cargo.toml +2 -2
  1567. data/rust/parser/fuzz/README.md +3 -3
  1568. data/rust/parser/fuzz/fuzz_targets/{chapter.rs → bluebook.rs} +4 -4
  1569. data/rust/parser/fuzz/fuzz_targets/resolve.rs +2 -2
  1570. data/rust/parser/src/build/correlation_keys.rs +125 -0
  1571. data/rust/parser/src/build/mod.rs +1 -0
  1572. data/rust/parser/src/build/named_pattern.rs +22 -0
  1573. data/rust/parser/src/build/references.rs +52 -0
  1574. data/rust/parser/src/diag.rs +22 -1
  1575. data/rust/parser/src/emit.rs +122 -6
  1576. data/rust/parser/src/expr/ast_json.rs +10 -0
  1577. data/rust/parser/src/expr/resolver.rs +49 -9
  1578. data/rust/parser/src/ir.rs +66 -7
  1579. data/rust/parser/src/keywords.rs +704 -419
  1580. data/rust/parser/src/lex.rs +115 -87
  1581. data/rust/parser/src/main.rs +182 -32
  1582. data/rust/parser/src/parse/adapter.rs +28 -0
  1583. data/rust/parser/src/parse/aggregate.rs +64 -35
  1584. data/rust/parser/src/parse/audience.rs +65 -0
  1585. data/rust/parser/src/parse/command.rs +114 -15
  1586. data/rust/parser/src/parse/{chapter.rs → declaration.rs} +182 -54
  1587. data/rust/parser/src/parse/domain_port.rs +66 -9
  1588. data/rust/parser/src/parse/entity.rs +35 -32
  1589. data/rust/parser/src/parse/file.rs +1 -1
  1590. data/rust/parser/src/parse/hecksagon.rs +15 -5
  1591. data/rust/parser/src/parse/mod.rs +85 -2
  1592. data/rust/parser/src/parse/process_manager.rs +18 -11
  1593. data/rust/parser/src/parse/query.rs +13 -3
  1594. data/rust/parser/src/parse/read_model.rs +2 -1
  1595. data/rust/parser/src/parse/world.rs +12 -8
  1596. data/rust/parser/src/phrases.rs +1258 -0
  1597. data/rust/parser/src/render_ruby.rs +549 -0
  1598. data/rust/parser/src/sentence/changes.rs +437 -0
  1599. data/rust/parser/src/sentence/command_step.rs +206 -0
  1600. data/rust/parser/src/sentence/complete.rs +276 -0
  1601. data/rust/parser/src/sentence/entity.rs +41 -0
  1602. data/rust/parser/src/sentence/examples.rs +1012 -0
  1603. data/rust/parser/src/sentence/format.rs +885 -0
  1604. data/rust/parser/src/sentence/lower.rs +1366 -0
  1605. data/rust/parser/src/sentence/mod.rs +444 -0
  1606. data/rust/parser/src/sentence/names.rs +69 -0
  1607. data/rust/parser/src/sentence/options.rs +154 -0
  1608. data/rust/parser/src/sentence/pattern.rs +433 -0
  1609. data/rust/parser/src/sentence/process.rs +200 -0
  1610. data/rust/parser/src/sentence/queries.rs +431 -0
  1611. data/rust/parser/src/sentence/report.rs +283 -0
  1612. data/rust/parser/src/sentence/token.rs +106 -0
  1613. data/rust/parser/src/sentence/values.rs +498 -0
  1614. data/rust/src/exemplar/json.rs +17 -0
  1615. data/rust/src/exemplar/queries.rs +1 -0
  1616. data/rust/src/exemplar/reactions.rs +1 -1
  1617. data/rust/src/exemplar/registry.rs +30 -0
  1618. data/rust/src/kernel/cli.rs +239 -15
  1619. data/rust/src/kernel/collecting.rs +174 -0
  1620. data/rust/src/kernel/dispatch.rs +59 -29
  1621. data/rust/src/kernel/json.rs +62 -0
  1622. data/rust/src/kernel/mod.rs +7 -67
  1623. data/rust/src/kernel/named_query.rs +225 -11
  1624. data/rust/src/kernel/orchestrate.rs +241 -28
  1625. data/rust/src/kernel/orchestrate_guard_tests.rs +15 -12
  1626. data/rust/src/kernel/query_cursor.rs +251 -0
  1627. data/rust/src/kernel/query_ordering.rs +6 -6
  1628. data/rust/src/kernel/read_model.rs +162 -17
  1629. data/rust/src/kernel/repository.rs +107 -17
  1630. data/rust/src/kernel/vocab/mod.rs +4 -0
  1631. data/rust/src/kernel/vocab/reducer.rs +109 -0
  1632. data/rust/src/kernel/vocab/refusal_class.rs +124 -0
  1633. data/rust/src/kernel/vocab/refusal_template.rs +2 -2
  1634. data/rust/src/lib.rs +1 -1
  1635. data/rust/web/Cargo.lock +47 -0
  1636. data/rust/web/Cargo.toml +1 -1
  1637. metadata +689 -161
  1638. data/lib/hecks/chapters.rb +0 -147
  1639. data/lib/hecks/cli/command_table.rb +0 -72
  1640. data/lib/hecks/cli/launcher_words.rb +0 -168
  1641. data/lib/hecks/cli/model_check/examination.rb +0 -93
  1642. data/lib/hecks/cli/project_diagrams.rb +0 -59
  1643. data/lib/hecks/cli/stores.rb +0 -55
  1644. data/lib/hecks/cli.rb +0 -133
  1645. data/lib/hecks/gate/stages.yml +0 -234
  1646. data/lib/hecks/hecks/codebase.bluebook +0 -3241
  1647. data/lib/hecks/hecks/custodian.bluebook +0 -904
  1648. data/lib/hecks/hecks/governance.world +0 -7
  1649. data/lib/hecks/hecks/rehearsal.bluebook +0 -471
  1650. data/lib/hecks/hecks/tooling.bluebook +0 -1238
  1651. data/lib/hecks/ports/persistence/plugins/era/expected_era.rb +0 -137
  1652. data/lib/hecks/ports/persistence/plugins/era/postgres_era/boot.rb +0 -43
  1653. data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage/domain_rename.rb +0 -91
  1654. data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage/era_store.rb +0 -67
  1655. data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage_manager/context.rb +0 -38
  1656. data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage_manager/era_resolver.rb +0 -100
  1657. data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage_manager/minter.rb +0 -102
  1658. data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage_manager/refusals.rb +0 -51
  1659. data/lib/hecks/ports/persistence/postgres_dump/connection.rb +0 -59
  1660. data/lib/hecks/ports/persistence/postgres_dump.rb +0 -100
  1661. data/lib/hecks/projections/deploy/box/templates/tunnel-egress.yaml.tmpl +0 -11
  1662. data/lib/hecks/projector/exporter/capability_values.rb +0 -55
  1663. data/lib/hecks/quality_control/adapters/clearance_recorder.rb +0 -36
  1664. data/lib/hecks/quality_control/adapters/github_ci_webhook.rb +0 -56
  1665. data/lib/hecks/runtime/remote_dispatcher.rb +0 -176
  1666. data/prebuilt/ad68f9e06c8068c2a4176b57abf3083d591d5d8980c2b3e897b97331f965b643.marshal +0 -0
  1667. data/prebuilt/ee22ec8642c4006717ba2b80f46e5efb81de459eef9dfec043e838c0ad4fd720.marshal +0 -0
  1668. data/prebuilt/verdicts-b69f5dcbba79c20daa0493476fa7c317004a30aa2bc3d3dc6a722ea70ae2b43b.json +0 -1
  1669. data/rust/host/src/clock.rs +0 -8
  1670. data/rust/host/src/expr_json.rs +0 -1983
  1671. data/rust/host/src/presentation.rs +0 -842
  1672. data/rust/host/src/wasm_runner.rs +0 -206
  1673. data/rust/src/kernel/expression_operators/membership.rs +0 -20
  1674. data/rust/src/kernel/expression_operators/pattern_match.rs +0 -108
  1675. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/events.rb +0 -0
  1676. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/head_writes.rb +0 -0
  1677. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/base_sql.rb +0 -0
  1678. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/field_cache.rb +0 -0
  1679. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/head_compiler.rb +0 -0
  1680. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/merge_writes.rb +0 -0
  1681. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/resumable_backfill.rb +0 -0
  1682. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/transform_installer.rb +0 -0
  1683. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/transform_sql.rb +0 -0
  1684. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/sagas.rb +0 -0
  1685. /data/rust/host/{src → core/src}/field_hints.rs +0 -0
  1686. /data/rust/host/{src → core/src}/log.rs +0 -0
  1687. /data/rust/host/{src → core/src}/reference_transform.rs +0 -0
@@ -1,3241 +0,0 @@
1
- Hecks.bluebook "Hecks" do
2
- # Codebase: working on this repository. Each aggregate here is a concern only a maintainer of
3
- # Hecks runs, and every one of them needs a hecks checkout (ADR 0080, section 2). A request
4
- # follows the journaled-command shape of Custodian: it is recorded, the SourceTree port is asked
5
- # to examine the tree, `Accept` holds the one rule every Codebase change shares (the working tree
6
- # is a hecks checkout, hecks.gemspec beside lib/), and only an accepted request is carried out.
7
- # A command that rewrites tracked files reports drift and writes only when it is confirmed.
8
- #
9
- # The records are named for the run, as ModelCheckRun is, because several of the table's
10
- # concerns share a name with a module the gem already owns.
11
-
12
- # The language: the tables the Bluebook chapter declares and everything projected from them. A
13
- # projection reports drift from the committed files and writes only when it is confirmed; an
14
- # evolution edits the syntax tables, regenerates the golden and holds the gates, and only when
15
- # confirmed (without it, the edit is rehearsed in memory and nothing is written).
16
- aggregate "LanguageRun" do
17
- description "One change to the language's own tables, or one reading of where its words stand."
18
-
19
- attribute :run, RunKey
20
- attribute :operation, Operation, optional: true
21
- attribute :confirm, Switch, optional: true
22
- attribute :stdout, Switch, optional: true
23
- attribute :word, Word, optional: true
24
- attribute :context, Context, optional: true
25
- attribute :body, Body, optional: true
26
- attribute :inner, Fill, optional: true
27
- attribute :opens, Fill, optional: true
28
- attribute :fills, Fill, optional: true
29
- attribute :new_name, Word, optional: true
30
- attribute :kind, Kind, optional: true
31
- attribute :required, Flag, optional: true
32
- attribute :at, Position, optional: true
33
- attribute :named, Fill, optional: true
34
- attribute :pairs_shape, Shape, optional: true
35
- attribute :checkout, Switch, optional: true
36
- attribute :report, Report, optional: true
37
- attribute :refusal, Report, optional: true
38
- identified_by :run
39
-
40
- value_object "RunKey" do
41
- attribute :value, String, matches: :present
42
-
43
- invariant("a run is named") { !value.to_s.empty? }
44
- end
45
-
46
- value_object "Operation" do
47
- attribute :value, String, matches: :present
48
- end
49
-
50
- value_object "Switch" do
51
- attribute :value, Boolean
52
- end
53
-
54
- value_object "Report" do
55
- attribute :value, String
56
- end
57
-
58
- # A keyword of the language, or the keyword an argument belongs to.
59
- value_object "Word" do
60
- attribute :value, String, matches: :present
61
-
62
- invariant("a word is named") { !value.to_s.empty? }
63
- end
64
-
65
- # The part of the language a word is a word in.
66
- value_object "Context" do
67
- attribute :value, String, pattern: '^[A-Za-z][A-Za-z0-9_]*$'
68
- end
69
-
70
- # What a word's block holds.
71
- value_object "Body" do
72
- attribute :value, String, pattern: '^(none|keywords|source|rows)$'
73
- end
74
-
75
- # A cell of a table row; empty when the row leaves it blank.
76
- value_object "Fill" do
77
- attribute :value, String, pattern: '^[^\t\n\r]*$'
78
- end
79
-
80
- # What an argument is.
81
- value_object "Kind" do
82
- attribute :value, String, pattern: '^(text|symbol|number|flag|literal|constant|pairs|list)$'
83
- end
84
-
85
- # Whether an argument is required.
86
- value_object "Flag" do
87
- attribute :value, String, pattern: '^(true|false)$'
88
- end
89
-
90
- # An argument's place, counted from zero.
91
- value_object "Position" do
92
- attribute :value, String, pattern: '^[0-9]*$'
93
- end
94
-
95
- # How a pairs argument is read, such as verbatim.
96
- value_object "Shape" do
97
- attribute :value, String, matches: :present
98
- end
99
-
100
- lifecycle :status, default: "requested" do
101
- mark :failure, "faulted"
102
- transition "Accept" => "accepted", from: "requested"
103
- transition "Complete" => "completed", from: "accepted"
104
- transition "Fault" => "faulted", from: %w[requested accepted]
105
- end
106
-
107
- command "ProjectModel" do
108
- role "Maintainer"
109
- goal "Project the model's holding half from the language that declares it"
110
-
111
- attribute :run, RunKey
112
- attribute :confirm, Switch, optional: true
113
-
114
- sets :run
115
- sets :confirm
116
- sets :operation, to: "project_model"
117
-
118
- emits ProjectModelRequested
119
- end
120
-
121
- command "ProjectVocabulary" do
122
- role "Maintainer"
123
- goal "Project the language's closed sets into the vocabulary"
124
-
125
- attribute :run, RunKey
126
- attribute :confirm, Switch, optional: true
127
-
128
- sets :run
129
- sets :confirm
130
- sets :operation, to: "project_vocabulary"
131
-
132
- emits ProjectVocabularyRequested
133
- end
134
-
135
- command "ProjectRustVocabulary" do
136
- role "Maintainer"
137
- goal "Project the vocabulary tables into the Rust kernel, one enum a table"
138
-
139
- attribute :run, RunKey
140
- attribute :confirm, Switch, optional: true
141
-
142
- sets :run
143
- sets :confirm
144
- sets :operation, to: "project_rust_vocabulary"
145
-
146
- emits ProjectRustVocabularyRequested
147
- end
148
-
149
- command "ProjectRefusalWording" do
150
- role "Maintainer"
151
- goal "Project the refusal template table, a second name of ProjectRustVocabulary"
152
-
153
- attribute :run, RunKey
154
- attribute :confirm, Switch, optional: true
155
-
156
- sets :run
157
- sets :confirm
158
- sets :operation, to: "project_rust_vocabulary"
159
-
160
- emits ProjectRefusalWordingRequested
161
- end
162
-
163
- command "ProjectReservedNames" do
164
- role "Maintainer"
165
- goal "Project the Rust and Cargo reserved words into the codegen and build crates"
166
-
167
- attribute :run, RunKey
168
- attribute :confirm, Switch, optional: true
169
-
170
- sets :run
171
- sets :confirm
172
- sets :operation, to: "project_reserved_names"
173
-
174
- emits ProjectReservedNamesRequested
175
- end
176
-
177
- command "ProjectParserTable" do
178
- role "Maintainer"
179
- goal "Project the Rust parser's keyword table"
180
-
181
- attribute :run, RunKey
182
- attribute :confirm, Switch, optional: true
183
-
184
- sets :run
185
- sets :confirm
186
- sets :operation, to: "project_parser_table"
187
-
188
- emits ProjectParserTableRequested
189
- end
190
-
191
- command "ProjectBootstrapTable" do
192
- role "Maintainer"
193
- goal "Project the DSL's bootstrap-window fallbacks from the keyword rows"
194
-
195
- attribute :run, RunKey
196
- attribute :confirm, Switch, optional: true
197
-
198
- sets :run
199
- sets :confirm
200
- sets :operation, to: "project_bootstrap_table"
201
-
202
- emits ProjectBootstrapTableRequested
203
- end
204
-
205
- command "ProjectFieldHints" do
206
- role "Maintainer"
207
- goal "Project the host's form-field hints"
208
-
209
- attribute :run, RunKey
210
- attribute :confirm, Switch, optional: true
211
-
212
- sets :run
213
- sets :confirm
214
- sets :operation, to: "project_field_hints"
215
-
216
- emits ProjectFieldHintsRequested
217
- end
218
-
219
- command "ProjectExpressionTables" do
220
- role "Maintainer"
221
- goal "Project the expression machinery's operator and normalisation tables"
222
-
223
- attribute :stdout, Switch, optional: true
224
- attribute :run, RunKey
225
- attribute :confirm, Switch, optional: true
226
-
227
- sets :stdout
228
- sets :run
229
- sets :confirm
230
- sets :operation, to: "project_expression_tables"
231
-
232
- emits ProjectExpressionTablesRequested
233
- end
234
-
235
- command "ProjectReference" do
236
- role "Maintainer"
237
- goal "Regenerate the DSL reference from the Syntax chapter, keeping the committed prose"
238
-
239
- attribute :run, RunKey
240
- attribute :confirm, Switch, optional: true
241
-
242
- sets :run
243
- sets :confirm
244
- sets :operation, to: "project_reference"
245
-
246
- emits ProjectReferenceRequested
247
- end
248
-
249
- command "Propose" do
250
- role "Maintainer"
251
- goal "Enter a keyword row, proposed: it reaches no projection until admitted"
252
-
253
- attribute :word, Word
254
- attribute :context, Context
255
- attribute :body, Body, optional: true
256
- attribute :inner, Fill, optional: true
257
- attribute :opens, Fill, optional: true
258
- attribute :fills, Fill, optional: true
259
- attribute :run, RunKey
260
- attribute :confirm, Switch, optional: true
261
-
262
- sets :word
263
- sets :context
264
- sets :body
265
- sets :inner
266
- sets :opens
267
- sets :fills
268
- sets :run
269
- sets :confirm
270
- sets :operation, to: "propose"
271
-
272
- emits ProposeRequested
273
- end
274
-
275
- command "Admit" do
276
- role "Maintainer"
277
- goal "Move a proposed keyword row to admitted"
278
-
279
- attribute :word, Word
280
- attribute :context, Context
281
- attribute :run, RunKey
282
- attribute :confirm, Switch, optional: true
283
-
284
- sets :word
285
- sets :context
286
- sets :run
287
- sets :confirm
288
- sets :operation, to: "admit"
289
-
290
- emits AdmitRequested
291
- end
292
-
293
- command "Deprecate" do
294
- role "Maintainer"
295
- goal "Move an admitted keyword row to deprecated"
296
-
297
- attribute :word, Word
298
- attribute :context, Context
299
- attribute :run, RunKey
300
- attribute :confirm, Switch, optional: true
301
-
302
- sets :word
303
- sets :context
304
- sets :run
305
- sets :confirm
306
- sets :operation, to: "deprecate"
307
-
308
- emits DeprecateRequested
309
- end
310
-
311
- command "Retire" do
312
- role "Maintainer"
313
- goal "Move a deprecated or admitted keyword row to retired"
314
-
315
- attribute :word, Word
316
- attribute :context, Context
317
- attribute :run, RunKey
318
- attribute :confirm, Switch, optional: true
319
-
320
- sets :word
321
- sets :context
322
- sets :run
323
- sets :confirm
324
- sets :operation, to: "retire"
325
-
326
- emits RetireRequested
327
- end
328
-
329
- command "Rename" do
330
- role "Maintainer"
331
- goal "Respell a keyword row; the old spelling keeps parsing"
332
-
333
- attribute :word, Word
334
- attribute :context, Context
335
- attribute :new_name, Word
336
- attribute :run, RunKey
337
- attribute :confirm, Switch, optional: true
338
-
339
- sets :word
340
- sets :context
341
- sets :new_name
342
- sets :run
343
- sets :confirm
344
- sets :operation, to: "rename"
345
-
346
- emits RenameRequested
347
- end
348
-
349
- command "ProposeArgument" do
350
- role "Maintainer"
351
- goal "Enter an argument row of a keyword, proposed"
352
-
353
- attribute :word, Word
354
- attribute :context, Context
355
- attribute :kind, Kind
356
- attribute :required, Flag, optional: true
357
- attribute :at, Position, optional: true
358
- attribute :named, Fill, optional: true
359
- attribute :fills, Fill, optional: true
360
- attribute :pairs_shape, Shape, optional: true
361
- attribute :run, RunKey
362
- attribute :confirm, Switch, optional: true
363
-
364
- sets :word
365
- sets :context
366
- sets :kind
367
- sets :required
368
- sets :at
369
- sets :named
370
- sets :fills
371
- sets :pairs_shape
372
- sets :run
373
- sets :confirm
374
- sets :operation, to: "propose_argument"
375
-
376
- emits ProposeArgumentRequested
377
- end
378
-
379
- command "AdmitArgument" do
380
- role "Maintainer"
381
- goal "Move a proposed argument row to admitted"
382
-
383
- attribute :word, Word
384
- attribute :context, Context
385
- attribute :at, Position, optional: true
386
- attribute :named, Fill, optional: true
387
- attribute :run, RunKey
388
- attribute :confirm, Switch, optional: true
389
-
390
- sets :word
391
- sets :context
392
- sets :at
393
- sets :named
394
- sets :run
395
- sets :confirm
396
- sets :operation, to: "admit_argument"
397
-
398
- emits AdmitArgumentRequested
399
- end
400
-
401
- command "DeprecateArgument" do
402
- role "Maintainer"
403
- goal "Move an admitted argument row to deprecated"
404
-
405
- attribute :word, Word
406
- attribute :context, Context
407
- attribute :at, Position, optional: true
408
- attribute :named, Fill, optional: true
409
- attribute :run, RunKey
410
- attribute :confirm, Switch, optional: true
411
-
412
- sets :word
413
- sets :context
414
- sets :at
415
- sets :named
416
- sets :run
417
- sets :confirm
418
- sets :operation, to: "deprecate_argument"
419
-
420
- emits DeprecateArgumentRequested
421
- end
422
-
423
- command "RetireArgument" do
424
- role "Maintainer"
425
- goal "Move a deprecated or admitted argument row to retired"
426
-
427
- attribute :word, Word
428
- attribute :context, Context
429
- attribute :at, Position, optional: true
430
- attribute :named, Fill, optional: true
431
- attribute :run, RunKey
432
- attribute :confirm, Switch, optional: true
433
-
434
- sets :word
435
- sets :context
436
- sets :at
437
- sets :named
438
- sets :run
439
- sets :confirm
440
- sets :operation, to: "retire_argument"
441
-
442
- emits RetireArgumentRequested
443
- end
444
-
445
- # What the tree reported about itself, held against every request: nothing here runs
446
- # outside a hecks checkout (hecks.gemspec beside lib/).
447
- command "Accept" do
448
- role "System"
449
- goal "Let a request through only when the working tree is a hecks checkout"
450
-
451
- reference_to LanguageRun
452
- attribute :checkout, Switch
453
-
454
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
455
-
456
- sets :checkout
457
-
458
- emits LanguageAccepted
459
- end
460
-
461
- command "Complete" do
462
- role "System"
463
- goal "Record that the request was carried out, and what it reported"
464
-
465
- reference_to LanguageRun
466
- attribute :report, Report
467
-
468
- sets :report
469
-
470
- emits LanguageCompleted
471
- end
472
-
473
- command "Fault" do
474
- role "System"
475
- goal "Record that the request was refused or could not be carried out, and why"
476
-
477
- reference_to LanguageRun
478
- attribute :refusal, Report
479
-
480
- sets :refusal
481
-
482
- emits LanguageFaulted
483
- end
484
-
485
- query "LanguageOutcome" do
486
- description "How one request ended: its status, and what it reported or why it failed."
487
- attribute :run, RunKey
488
- where(run: :run)
489
- order_by :run
490
- end
491
-
492
- query "LanguageFaulted" do
493
- description "Every request that was refused or could not be carried out."
494
- where(status: "faulted")
495
- order_by :run
496
- end
497
-
498
- # An answer that is one document of text, exactly as the tool that produced it wrote it.
499
- value_object "Document" do
500
- attribute :text, String
501
- end
502
-
503
- query "WordStatus" do
504
- description "Where every word of the language stands: the ones not simply admitted, and the renamed."
505
- returns Document
506
- end
507
- end
508
-
509
- policy "ExamineWhenProjectModelRequested" do
510
- on "LanguageRun.ProjectModelRequested"
511
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
512
- end
513
-
514
- policy "ExamineWhenProjectVocabularyRequested" do
515
- on "LanguageRun.ProjectVocabularyRequested"
516
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
517
- end
518
-
519
- policy "ExamineWhenProjectRustVocabularyRequested" do
520
- on "LanguageRun.ProjectRustVocabularyRequested"
521
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
522
- end
523
-
524
- policy "ExamineWhenProjectRefusalWordingRequested" do
525
- on "LanguageRun.ProjectRefusalWordingRequested"
526
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
527
- end
528
-
529
- policy "ExamineWhenProjectReservedNamesRequested" do
530
- on "LanguageRun.ProjectReservedNamesRequested"
531
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
532
- end
533
-
534
- policy "ExamineWhenProjectParserTableRequested" do
535
- on "LanguageRun.ProjectParserTableRequested"
536
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
537
- end
538
-
539
- policy "ExamineWhenProjectBootstrapTableRequested" do
540
- on "LanguageRun.ProjectBootstrapTableRequested"
541
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
542
- end
543
-
544
- policy "ExamineWhenProjectFieldHintsRequested" do
545
- on "LanguageRun.ProjectFieldHintsRequested"
546
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
547
- end
548
-
549
- policy "ExamineWhenProjectExpressionTablesRequested" do
550
- on "LanguageRun.ProjectExpressionTablesRequested"
551
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
552
- end
553
-
554
- policy "ExamineWhenProjectReferenceRequested" do
555
- on "LanguageRun.ProjectReferenceRequested"
556
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
557
- end
558
-
559
- policy "ExamineWhenProposeRequested" do
560
- on "LanguageRun.ProposeRequested"
561
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
562
- end
563
-
564
- policy "ExamineWhenAdmitRequested" do
565
- on "LanguageRun.AdmitRequested"
566
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
567
- end
568
-
569
- policy "ExamineWhenDeprecateRequested" do
570
- on "LanguageRun.DeprecateRequested"
571
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
572
- end
573
-
574
- policy "ExamineWhenRetireRequested" do
575
- on "LanguageRun.RetireRequested"
576
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
577
- end
578
-
579
- policy "ExamineWhenRenameRequested" do
580
- on "LanguageRun.RenameRequested"
581
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
582
- end
583
-
584
- policy "ExamineWhenProposeArgumentRequested" do
585
- on "LanguageRun.ProposeArgumentRequested"
586
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
587
- end
588
-
589
- policy "ExamineWhenAdmitArgumentRequested" do
590
- on "LanguageRun.AdmitArgumentRequested"
591
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
592
- end
593
-
594
- policy "ExamineWhenDeprecateArgumentRequested" do
595
- on "LanguageRun.DeprecateArgumentRequested"
596
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
597
- end
598
-
599
- policy "ExamineWhenRetireArgumentRequested" do
600
- on "LanguageRun.RetireArgumentRequested"
601
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
602
- end
603
-
604
- policy "AcceptLanguageWhenExamined" do
605
- on "LanguageRun.LanguageExamined"
606
- trigger LanguageRun::Accept, with: { checkout: :checkout }
607
- end
608
-
609
- policy "FaultLanguageWhenNotAccepted" do
610
- on "LanguageRun.LanguageExamined"
611
- where { !checkout.value }
612
- trigger LanguageRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
613
- end
614
-
615
- policy "PerformLanguageWhenAccepted" do
616
- on "LanguageRun.LanguageAccepted"
617
- trigger LanguageRun::SourceTree::Perform, with: { run: :run }
618
- end
619
-
620
- policy "RecordLanguageOutcome" do
621
- on "LanguageRun.LanguageAnswered"
622
- trigger LanguageRun::Complete, with: { report: :report }
623
- end
624
-
625
- policy "RecordLanguageFault" do
626
- on "LanguageRun.LanguageRefused"
627
- trigger LanguageRun::Fault, with: { refusal: :refusal }
628
- end
629
-
630
- # The Rust kernel: the capability enums the hand-written kernel is matched against, and the check
631
- # that every attribute shape and expression-operator category the grammar admits has its file.
632
- aggregate "KernelRun" do
633
- description "One projection of the Rust kernel's capability enums, or one measure of their coverage."
634
-
635
- attribute :run, RunKey
636
- attribute :operation, Operation, optional: true
637
- attribute :confirm, Switch, optional: true
638
- attribute :checkout, Switch, optional: true
639
- attribute :report, Report, optional: true
640
- attribute :refusal, Report, optional: true
641
- identified_by :run
642
-
643
- value_object "RunKey" do
644
- attribute :value, String, matches: :present
645
-
646
- invariant("a run is named") { !value.to_s.empty? }
647
- end
648
-
649
- value_object "Operation" do
650
- attribute :value, String, matches: :present
651
- end
652
-
653
- value_object "Switch" do
654
- attribute :value, Boolean
655
- end
656
-
657
- value_object "Report" do
658
- attribute :value, String
659
- end
660
-
661
- lifecycle :status, default: "requested" do
662
- mark :failure, "faulted"
663
- transition "Accept" => "accepted", from: "requested"
664
- transition "Complete" => "completed", from: "accepted"
665
- transition "Fault" => "faulted", from: %w[requested accepted]
666
- end
667
-
668
- command "ProjectKernelCapabilities" do
669
- role "Maintainer"
670
- goal "Project the capability enums the hand-written Rust kernel is matched against"
671
-
672
- attribute :run, RunKey
673
- attribute :confirm, Switch, optional: true
674
-
675
- sets :run
676
- sets :confirm
677
- sets :operation, to: "project_kernel_capabilities"
678
-
679
- emits ProjectKernelCapabilitiesRequested
680
- end
681
-
682
- command "MeasureKernelCoverage" do
683
- role "Maintainer"
684
- goal "Check that every capability the grammar admits has its hand-written kernel file"
685
-
686
- attribute :run, RunKey
687
-
688
- sets :run
689
- sets :operation, to: "measure_kernel_coverage"
690
-
691
- emits MeasureKernelCoverageRequested
692
- end
693
-
694
- # What the tree reported about itself, held against every request: nothing here runs
695
- # outside a hecks checkout (hecks.gemspec beside lib/).
696
- command "Accept" do
697
- role "System"
698
- goal "Let a request through only when the working tree is a hecks checkout"
699
-
700
- reference_to KernelRun
701
- attribute :checkout, Switch
702
-
703
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
704
-
705
- sets :checkout
706
-
707
- emits KernelAccepted
708
- end
709
-
710
- command "Complete" do
711
- role "System"
712
- goal "Record that the request was carried out, and what it reported"
713
-
714
- reference_to KernelRun
715
- attribute :report, Report
716
-
717
- sets :report
718
-
719
- emits KernelCompleted
720
- end
721
-
722
- command "Fault" do
723
- role "System"
724
- goal "Record that the request was refused or could not be carried out, and why"
725
-
726
- reference_to KernelRun
727
- attribute :refusal, Report
728
-
729
- sets :refusal
730
-
731
- emits KernelFaulted
732
- end
733
-
734
- query "KernelOutcome" do
735
- description "How one request ended: its status, and what it reported or why it failed."
736
- attribute :run, RunKey
737
- where(run: :run)
738
- order_by :run
739
- end
740
-
741
- query "KernelFaulted" do
742
- description "Every request that was refused or could not be carried out."
743
- where(status: "faulted")
744
- order_by :run
745
- end
746
- end
747
-
748
- policy "ExamineWhenProjectKernelCapabilitiesRequested" do
749
- on "KernelRun.ProjectKernelCapabilitiesRequested"
750
- trigger KernelRun::SourceTree::Examine, with: { run: :run }
751
- end
752
-
753
- policy "ExamineWhenMeasureKernelCoverageRequested" do
754
- on "KernelRun.MeasureKernelCoverageRequested"
755
- trigger KernelRun::SourceTree::Examine, with: { run: :run }
756
- end
757
-
758
- policy "AcceptKernelWhenExamined" do
759
- on "KernelRun.KernelExamined"
760
- trigger KernelRun::Accept, with: { checkout: :checkout }
761
- end
762
-
763
- policy "FaultKernelWhenNotAccepted" do
764
- on "KernelRun.KernelExamined"
765
- where { !checkout.value }
766
- trigger KernelRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
767
- end
768
-
769
- policy "PerformKernelWhenAccepted" do
770
- on "KernelRun.KernelAccepted"
771
- trigger KernelRun::SourceTree::Perform, with: { run: :run }
772
- end
773
-
774
- policy "RecordKernelOutcome" do
775
- on "KernelRun.KernelAnswered"
776
- trigger KernelRun::Complete, with: { report: :report }
777
- end
778
-
779
- policy "RecordKernelFault" do
780
- on "KernelRun.KernelRefused"
781
- trigger KernelRun::Fault, with: { refusal: :refusal }
782
- end
783
-
784
- # Conformance: the checks on the language itself. Each finds every disagreement and refuses with
785
- # them all, so a check that fails is recorded as faulted with what it found. The argument-gate
786
- # matrix rewrites a committed matrix and its fixtures, so it only reports unless it is confirmed.
787
- aggregate "ConformanceRun" do
788
- description "One check that the engines, the reference docs and the argument gates agree with the language."
789
-
790
- attribute :run, RunKey
791
- attribute :operation, Operation, optional: true
792
- attribute :confirm, Switch, optional: true
793
- attribute :checkout, Switch, optional: true
794
- attribute :report, Report, optional: true
795
- attribute :refusal, Report, optional: true
796
- identified_by :run
797
-
798
- value_object "RunKey" do
799
- attribute :value, String, matches: :present
800
-
801
- invariant("a run is named") { !value.to_s.empty? }
802
- end
803
-
804
- value_object "Operation" do
805
- attribute :value, String, matches: :present
806
- end
807
-
808
- value_object "Switch" do
809
- attribute :value, Boolean
810
- end
811
-
812
- value_object "Report" do
813
- attribute :value, String
814
- end
815
-
816
- lifecycle :status, default: "requested" do
817
- mark :failure, "faulted"
818
- transition "Accept" => "accepted", from: "requested"
819
- transition "Complete" => "completed", from: "accepted"
820
- transition "Fault" => "faulted", from: %w[requested accepted]
821
- end
822
-
823
- command "CheckEngineAgreement" do
824
- role "Maintainer"
825
- goal "Check that the query engines route every comparator through the one shared implementation"
826
-
827
- attribute :run, RunKey
828
-
829
- sets :run
830
- sets :operation, to: "check_engine_agreement"
831
-
832
- emits CheckEngineAgreementRequested
833
- end
834
-
835
- command "MeasureDocCoverage" do
836
- role "Maintainer"
837
- goal "Check that every live word of the language has prose and a running example in the reference"
838
-
839
- attribute :run, RunKey
840
-
841
- sets :run
842
- sets :operation, to: "measure_doc_coverage"
843
-
844
- emits MeasureDocCoverageRequested
845
- end
846
-
847
- command "ArgumentGateMatrix" do
848
- role "Maintainer"
849
- goal "Generate the argument-gate ordering matrix; rewrite it and its fixtures only when confirmed"
850
-
851
- attribute :run, RunKey
852
- attribute :confirm, Switch, optional: true
853
-
854
- sets :run
855
- sets :confirm
856
- sets :operation, to: "argument_gate_matrix"
857
-
858
- emits ArgumentGateMatrixRequested
859
- end
860
-
861
- # What the tree reported about itself, held against every request: nothing here runs
862
- # outside a hecks checkout (hecks.gemspec beside lib/).
863
- command "Accept" do
864
- role "System"
865
- goal "Let a request through only when the working tree is a hecks checkout"
866
-
867
- reference_to ConformanceRun
868
- attribute :checkout, Switch
869
-
870
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
871
-
872
- sets :checkout
873
-
874
- emits ConformanceAccepted
875
- end
876
-
877
- command "Complete" do
878
- role "System"
879
- goal "Record that the request was carried out, and what it reported"
880
-
881
- reference_to ConformanceRun
882
- attribute :report, Report
883
-
884
- sets :report
885
-
886
- emits ConformanceCompleted
887
- end
888
-
889
- command "Fault" do
890
- role "System"
891
- goal "Record that the request was refused or could not be carried out, and why"
892
-
893
- reference_to ConformanceRun
894
- attribute :refusal, Report
895
-
896
- sets :refusal
897
-
898
- emits ConformanceFaulted
899
- end
900
-
901
- query "ConformanceOutcome" do
902
- description "How one request ended: its status, and what it reported or why it failed."
903
- attribute :run, RunKey
904
- where(run: :run)
905
- order_by :run
906
- end
907
-
908
- query "ConformanceFaulted" do
909
- description "Every request that was refused or could not be carried out."
910
- where(status: "faulted")
911
- order_by :run
912
- end
913
- end
914
-
915
- policy "ExamineWhenCheckEngineAgreementRequested" do
916
- on "ConformanceRun.CheckEngineAgreementRequested"
917
- trigger ConformanceRun::SourceTree::Examine, with: { run: :run }
918
- end
919
-
920
- policy "ExamineWhenMeasureDocCoverageRequested" do
921
- on "ConformanceRun.MeasureDocCoverageRequested"
922
- trigger ConformanceRun::SourceTree::Examine, with: { run: :run }
923
- end
924
-
925
- policy "ExamineWhenArgumentGateMatrixRequested" do
926
- on "ConformanceRun.ArgumentGateMatrixRequested"
927
- trigger ConformanceRun::SourceTree::Examine, with: { run: :run }
928
- end
929
-
930
- policy "AcceptConformanceWhenExamined" do
931
- on "ConformanceRun.ConformanceExamined"
932
- trigger ConformanceRun::Accept, with: { checkout: :checkout }
933
- end
934
-
935
- policy "FaultConformanceWhenNotAccepted" do
936
- on "ConformanceRun.ConformanceExamined"
937
- where { !checkout.value }
938
- trigger ConformanceRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
939
- end
940
-
941
- policy "PerformConformanceWhenAccepted" do
942
- on "ConformanceRun.ConformanceAccepted"
943
- trigger ConformanceRun::SourceTree::Perform, with: { run: :run }
944
- end
945
-
946
- policy "RecordConformanceOutcome" do
947
- on "ConformanceRun.ConformanceAnswered"
948
- trigger ConformanceRun::Complete, with: { report: :report }
949
- end
950
-
951
- policy "RecordConformanceFault" do
952
- on "ConformanceRun.ConformanceRefused"
953
- trigger ConformanceRun::Fault, with: { refusal: :refusal }
954
- end
955
-
956
- # Regeneration: rebuilding every corpus domain's committed output, which only this repository has.
957
- # A check projects into a scratch crate and never writes the tree; without --confirm the run is
958
- # that check, so the tracked generated files change only when the regeneration is confirmed.
959
- aggregate "RegenerationRun" do
960
- description "One regeneration of every corpus domain's committed Rust output, or the check that it is current."
961
-
962
- attribute :run, RunKey
963
- attribute :operation, Operation, optional: true
964
- attribute :confirm, Switch, optional: true
965
- attribute :check, Switch, optional: true
966
- attribute :live, Switch, optional: true
967
- attribute :gate, GateName, optional: true
968
- attribute :checkout, Switch, optional: true
969
- attribute :report, Report, optional: true
970
- attribute :refusal, Report, optional: true
971
- identified_by :run
972
-
973
- value_object "RunKey" do
974
- attribute :value, String, matches: :present
975
-
976
- invariant("a run is named") { !value.to_s.empty? }
977
- end
978
-
979
- value_object "Operation" do
980
- attribute :value, String, matches: :present
981
- end
982
-
983
- value_object "Switch" do
984
- attribute :value, Boolean
985
- end
986
-
987
- value_object "Report" do
988
- attribute :value, String
989
- end
990
-
991
- # A `CiGate` row of the Vocabulary chapter, by name.
992
- value_object "GateName" do
993
- attribute :value, String, matches: :present
994
- end
995
-
996
- lifecycle :status, default: "requested" do
997
- mark :failure, "faulted"
998
- transition "Accept" => "accepted", from: "requested"
999
- transition "Complete" => "completed", from: "accepted"
1000
- transition "Fault" => "faulted", from: %w[requested accepted]
1001
- end
1002
-
1003
- command "RegenerateCorpus" do
1004
- role "Maintainer"
1005
- goal "Regenerate every corpus domain's Rust output, or with check only compare it with the tree"
1006
-
1007
- attribute :check, Switch, optional: true
1008
- attribute :run, RunKey
1009
- attribute :confirm, Switch, optional: true
1010
-
1011
- sets :check
1012
- sets :run
1013
- sets :confirm
1014
- sets :operation, to: "regenerate_corpus"
1015
-
1016
- emits RegenerateCorpusRequested
1017
- end
1018
-
1019
- command "ProjectCiGates" do
1020
- role "Maintainer"
1021
- goal "Project the CiGate rows into the workflows' marked detector jobs, or with check only compare them"
1022
-
1023
- attribute :check, Switch, optional: true
1024
- attribute :run, RunKey
1025
- attribute :confirm, Switch, optional: true
1026
-
1027
- sets :check
1028
- sets :run
1029
- sets :confirm
1030
- sets :operation, to: "project_ci_gates"
1031
-
1032
- emits ProjectCiGatesRequested
1033
- end
1034
-
1035
- command "ProjectLanes" do
1036
- role "Maintainer"
1037
- goal "Project the Lane rows into the rulesets and the promotion workflow, or with live compare GitHub's rulesets"
1038
-
1039
- attribute :check, Switch, optional: true
1040
- attribute :live, Switch, optional: true
1041
- attribute :run, RunKey
1042
- attribute :confirm, Switch, optional: true
1043
-
1044
- sets :check
1045
- sets :live
1046
- sets :run
1047
- sets :confirm
1048
- sets :operation, to: "project_lanes"
1049
-
1050
- emits ProjectLanesRequested
1051
- end
1052
-
1053
- command "ProjectToolsDoc" do
1054
- role "Maintainer"
1055
- goal "Write the launcher forms of docs/tools.md from the RetiredScript rows, or with check only compare them"
1056
-
1057
- attribute :check, Switch, optional: true
1058
- attribute :run, RunKey
1059
- attribute :confirm, Switch, optional: true
1060
-
1061
- sets :check
1062
- sets :run
1063
- sets :confirm
1064
- sets :operation, to: "project_tools_doc"
1065
-
1066
- emits ProjectToolsDocRequested
1067
- end
1068
-
1069
- command "DecideCiGate" do
1070
- role "Maintainer"
1071
- goal "Say whether this run's change touches what a CiGate row guards, as the gated job's detector"
1072
-
1073
- attribute :gate, GateName
1074
- attribute :run, RunKey
1075
-
1076
- sets :gate
1077
- sets :run
1078
- sets :operation, to: "decide_ci_gate"
1079
-
1080
- emits DecideCiGateRequested
1081
- end
1082
-
1083
- # What the tree reported about itself, held against every request: nothing here runs
1084
- # outside a hecks checkout (hecks.gemspec beside lib/).
1085
- command "Accept" do
1086
- role "System"
1087
- goal "Let a request through only when the working tree is a hecks checkout"
1088
-
1089
- reference_to RegenerationRun
1090
- attribute :checkout, Switch
1091
-
1092
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1093
-
1094
- sets :checkout
1095
-
1096
- emits RegenerationAccepted
1097
- end
1098
-
1099
- command "Complete" do
1100
- role "System"
1101
- goal "Record that the request was carried out, and what it reported"
1102
-
1103
- reference_to RegenerationRun
1104
- attribute :report, Report
1105
-
1106
- sets :report
1107
-
1108
- emits RegenerationCompleted
1109
- end
1110
-
1111
- command "Fault" do
1112
- role "System"
1113
- goal "Record that the request was refused or could not be carried out, and why"
1114
-
1115
- reference_to RegenerationRun
1116
- attribute :refusal, Report
1117
-
1118
- sets :refusal
1119
-
1120
- emits RegenerationFaulted
1121
- end
1122
-
1123
- query "RegenerationOutcome" do
1124
- description "How one request ended: its status, and what it reported or why it failed."
1125
- attribute :run, RunKey
1126
- where(run: :run)
1127
- order_by :run
1128
- end
1129
-
1130
- query "RegenerationFaulted" do
1131
- description "Every request that was refused or could not be carried out."
1132
- where(status: "faulted")
1133
- order_by :run
1134
- end
1135
- end
1136
-
1137
- policy "ExamineWhenRegenerateCorpusRequested" do
1138
- on "RegenerationRun.RegenerateCorpusRequested"
1139
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1140
- end
1141
-
1142
- policy "ExamineWhenProjectCiGatesRequested" do
1143
- on "RegenerationRun.ProjectCiGatesRequested"
1144
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1145
- end
1146
-
1147
- policy "ExamineWhenProjectLanesRequested" do
1148
- on "RegenerationRun.ProjectLanesRequested"
1149
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1150
- end
1151
-
1152
- policy "ExamineWhenProjectToolsDocRequested" do
1153
- on "RegenerationRun.ProjectToolsDocRequested"
1154
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1155
- end
1156
-
1157
- policy "ExamineWhenDecideCiGateRequested" do
1158
- on "RegenerationRun.DecideCiGateRequested"
1159
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1160
- end
1161
-
1162
- policy "AcceptRegenerationWhenExamined" do
1163
- on "RegenerationRun.RegenerationExamined"
1164
- trigger RegenerationRun::Accept, with: { checkout: :checkout }
1165
- end
1166
-
1167
- policy "FaultRegenerationWhenNotAccepted" do
1168
- on "RegenerationRun.RegenerationExamined"
1169
- where { !checkout.value }
1170
- trigger RegenerationRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
1171
- end
1172
-
1173
- policy "PerformRegenerationWhenAccepted" do
1174
- on "RegenerationRun.RegenerationAccepted"
1175
- trigger RegenerationRun::SourceTree::Perform, with: { run: :run }
1176
- end
1177
-
1178
- policy "RecordRegenerationOutcome" do
1179
- on "RegenerationRun.RegenerationAnswered"
1180
- trigger RegenerationRun::Complete, with: { report: :report }
1181
- end
1182
-
1183
- policy "RecordRegenerationFault" do
1184
- on "RegenerationRun.RegenerationRefused"
1185
- trigger RegenerationRun::Fault, with: { refusal: :refusal }
1186
- end
1187
-
1188
- # Gate: the checks a stage holds a change against before it is let through. The checks are data
1189
- # (lib/hecks/gate/stages.yml), run together, and a red one faults the run, so `--wait` fails the
1190
- # push or the build that asked, and the journal keeps when the gate went red.
1191
- aggregate "GateRun" do
1192
- description "One run of a stage's checks: every check of the stage, or the ones named."
1193
-
1194
- attribute :run, RunKey
1195
- attribute :operation, Operation, optional: true
1196
- attribute :stage, Stage
1197
- attribute :only, CheckList, optional: true
1198
- attribute :checkout, Switch, optional: true
1199
- attribute :report, Report, optional: true
1200
- attribute :refusal, Report, optional: true
1201
- identified_by :run
1202
-
1203
- value_object "RunKey" do
1204
- attribute :value, String, matches: :present
1205
-
1206
- invariant("a run is named") { !value.to_s.empty? }
1207
- end
1208
-
1209
- value_object "Operation" do
1210
- attribute :value, String, matches: :present
1211
- end
1212
-
1213
- value_object "Stage" do
1214
- attribute :value, String, matches: :snake_name
1215
-
1216
- invariant("a stage is named") { !value.to_s.empty? }
1217
- end
1218
-
1219
- value_object "CheckList" do
1220
- attribute :value, String, pattern: '^[a-z][a-z0-9_]*(,[a-z][a-z0-9_]*)*$'
1221
- end
1222
-
1223
- value_object "Switch" do
1224
- attribute :value, Boolean
1225
- end
1226
-
1227
- value_object "Report" do
1228
- attribute :value, String
1229
- end
1230
-
1231
- lifecycle :status, default: "requested" do
1232
- mark :failure, "faulted"
1233
- transition "Accept" => "accepted", from: "requested"
1234
- transition "Complete" => "completed", from: "accepted"
1235
- transition "Fault" => "faulted", from: %w[requested accepted]
1236
- end
1237
-
1238
- command "Gate" do
1239
- role "Maintainer"
1240
- goal "Run every check of a stage, or the ones named, and keep whether the gate is green"
1241
-
1242
- attribute :stage, Stage
1243
- attribute :only, CheckList, optional: true
1244
- attribute :run, RunKey
1245
-
1246
- sets :stage
1247
- sets :only
1248
- sets :run
1249
- sets :operation, to: "gate"
1250
-
1251
- emits GateRequested
1252
- end
1253
-
1254
- command "Accept" do
1255
- role "System"
1256
- goal "Let a request through only when the working tree is a hecks checkout"
1257
-
1258
- reference_to GateRun
1259
- attribute :checkout, Switch
1260
-
1261
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1262
-
1263
- sets :checkout
1264
-
1265
- emits GateAccepted
1266
- end
1267
-
1268
- command "Complete" do
1269
- role "System"
1270
- goal "Record that every check passed, and which"
1271
-
1272
- reference_to GateRun
1273
- attribute :report, Report
1274
-
1275
- sets :report
1276
-
1277
- emits GateCompleted
1278
- end
1279
-
1280
- command "Fault" do
1281
- role "System"
1282
- goal "Record that a check was red or the run could not be made, and why"
1283
-
1284
- reference_to GateRun
1285
- attribute :refusal, Report
1286
-
1287
- sets :refusal
1288
-
1289
- emits GateFaulted
1290
- end
1291
-
1292
- query "GateOutcome" do
1293
- description "How one run ended: its status, and what it reported or why it failed."
1294
- attribute :run, RunKey
1295
- where(run: :run)
1296
- order_by :run
1297
- end
1298
-
1299
- query "GateFaulted" do
1300
- description "Every run that went red or could not be made."
1301
- where(status: "faulted")
1302
- order_by :run
1303
- end
1304
- end
1305
-
1306
- policy "ExamineWhenGateRequested" do
1307
- on "GateRun.GateRequested"
1308
- trigger GateRun::SourceTree::Examine, with: { run: :run }
1309
- end
1310
-
1311
- policy "AcceptGateWhenExamined" do
1312
- on "GateRun.GateExamined"
1313
- trigger GateRun::Accept, with: { checkout: :checkout }
1314
- end
1315
-
1316
- policy "FaultGateWhenNotAccepted" do
1317
- on "GateRun.GateExamined"
1318
- where { !checkout.value }
1319
- trigger GateRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
1320
- end
1321
-
1322
- policy "PerformGateWhenAccepted" do
1323
- on "GateRun.GateAccepted"
1324
- trigger GateRun::SourceTree::Perform, with: { run: :run }
1325
- end
1326
-
1327
- policy "RecordGateOutcome" do
1328
- on "GateRun.GateAnswered"
1329
- trigger GateRun::Complete, with: { report: :report }
1330
- end
1331
-
1332
- policy "RecordGateFault" do
1333
- on "GateRun.GateRefused"
1334
- trigger GateRun::Fault, with: { refusal: :refusal }
1335
- end
1336
-
1337
- # Style: the comment style guides (Ruby and Rust) and the canonical form of a JSON document. A
1338
- # check finds every violation; a fix rewrites files, so it lists what it would rewrite unless
1339
- # it is confirmed. The baseline of tolerated long blocks is written only when confirmed.
1340
- aggregate "StyleRun" do
1341
- description "One check or fix of comment style, or one document written with its keys in order."
1342
-
1343
- attribute :run, RunKey
1344
- attribute :operation, Operation, optional: true
1345
- attribute :confirm, Switch, optional: true
1346
- attribute :paths, PathList, optional: true
1347
- attribute :only, CategoryList, optional: true
1348
- attribute :json, Switch, optional: true
1349
- attribute :top, Top, optional: true
1350
- attribute :ref, Ref, optional: true
1351
- attribute :file, FilePath, optional: true
1352
- attribute :checkout, Switch, optional: true
1353
- attribute :report, Report, optional: true
1354
- attribute :refusal, Report, optional: true
1355
- identified_by :run
1356
-
1357
- value_object "RunKey" do
1358
- attribute :value, String, matches: :present
1359
-
1360
- invariant("a run is named") { !value.to_s.empty? }
1361
- end
1362
-
1363
- value_object "Operation" do
1364
- attribute :value, String, matches: :present
1365
- end
1366
-
1367
- value_object "Switch" do
1368
- attribute :value, Boolean
1369
- end
1370
-
1371
- value_object "Report" do
1372
- attribute :value, String
1373
- end
1374
-
1375
- # Files or directories, comma separated.
1376
- value_object "PathList" do
1377
- attribute :value, String, pattern: '^[^ \t\n\r,]+(,[^ \t\n\r,]+)*$'
1378
- end
1379
-
1380
- # Violation categories, comma separated.
1381
- value_object "CategoryList" do
1382
- attribute :value, String, pattern: '^[a-z_]+(,[a-z_]+)*$'
1383
- end
1384
-
1385
- # How many rows a report lists.
1386
- value_object "Top" do
1387
- attribute :value, Integer
1388
-
1389
- invariant("a count is positive") { value > 0 }
1390
- end
1391
-
1392
- # A revision a code comparison is made against.
1393
- value_object "Ref" do
1394
- attribute :value, String, matches: :no_whitespace
1395
- end
1396
-
1397
- # A JSON file.
1398
- value_object "FilePath" do
1399
- attribute :value, String, matches: :not_empty
1400
-
1401
- invariant("a file is named") { !value.to_s.empty? }
1402
- end
1403
-
1404
- lifecycle :status, default: "requested" do
1405
- mark :failure, "faulted"
1406
- transition "Accept" => "accepted", from: "requested"
1407
- transition "Complete" => "completed", from: "accepted"
1408
- transition "Fault" => "faulted", from: %w[requested accepted]
1409
- end
1410
-
1411
- command "CheckComments" do
1412
- role "Maintainer"
1413
- goal "List every comment that breaks the Ruby style guide"
1414
-
1415
- attribute :paths, PathList
1416
- attribute :only, CategoryList, optional: true
1417
- attribute :run, RunKey
1418
-
1419
- sets :paths
1420
- sets :only
1421
- sets :run
1422
- sets :operation, to: "check_comments"
1423
-
1424
- emits CheckCommentsRequested
1425
- end
1426
-
1427
- command "FixComments" do
1428
- role "Maintainer"
1429
- goal "Rewrite the mechanical Ruby comment violations"
1430
-
1431
- attribute :paths, PathList
1432
- attribute :only, CategoryList, optional: true
1433
- attribute :run, RunKey
1434
- attribute :confirm, Switch, optional: true
1435
-
1436
- sets :paths
1437
- sets :only
1438
- sets :run
1439
- sets :confirm
1440
- sets :operation, to: "fix_comments"
1441
-
1442
- emits FixCommentsRequested
1443
- end
1444
-
1445
- command "WriteCommentBaseline" do
1446
- role "Maintainer"
1447
- goal "Record every long comment block as tolerated, for lib/hecks unless paths are named"
1448
-
1449
- attribute :paths, PathList, optional: true
1450
- attribute :run, RunKey
1451
- attribute :confirm, Switch, optional: true
1452
-
1453
- sets :paths
1454
- sets :run
1455
- sets :confirm
1456
- sets :operation, to: "write_comment_baseline"
1457
-
1458
- emits WriteCommentBaselineRequested
1459
- end
1460
-
1461
- command "CheckCommentsUnchanged" do
1462
- role "Maintainer"
1463
- goal "Prove an edit was comment-only: no file's code differs from the ref"
1464
-
1465
- attribute :ref, Ref
1466
- attribute :paths, PathList, optional: true
1467
- attribute :run, RunKey
1468
-
1469
- sets :ref
1470
- sets :paths
1471
- sets :run
1472
- sets :operation, to: "check_comments_unchanged"
1473
-
1474
- emits CheckCommentsUnchangedRequested
1475
- end
1476
-
1477
- command "CheckRustComments" do
1478
- role "Maintainer"
1479
- goal "List every comment that breaks the Rust style guide"
1480
-
1481
- attribute :paths, PathList
1482
- attribute :only, CategoryList, optional: true
1483
- attribute :run, RunKey
1484
-
1485
- sets :paths
1486
- sets :only
1487
- sets :run
1488
- sets :operation, to: "check_rust_comments"
1489
-
1490
- emits CheckRustCommentsRequested
1491
- end
1492
-
1493
- command "FixRustComments" do
1494
- role "Maintainer"
1495
- goal "Rewrite the mechanical Rust comment violations"
1496
-
1497
- attribute :paths, PathList
1498
- attribute :only, CategoryList, optional: true
1499
- attribute :run, RunKey
1500
- attribute :confirm, Switch, optional: true
1501
-
1502
- sets :paths
1503
- sets :only
1504
- sets :run
1505
- sets :confirm
1506
- sets :operation, to: "fix_rust_comments"
1507
-
1508
- emits FixRustCommentsRequested
1509
- end
1510
-
1511
- command "Canonicalise" do
1512
- role "Maintainer"
1513
- goal "Write a JSON document with every object's keys sorted"
1514
-
1515
- attribute :file, FilePath
1516
- attribute :run, RunKey
1517
-
1518
- sets :file
1519
- sets :run
1520
- sets :operation, to: "canonicalise"
1521
-
1522
- emits CanonicaliseRequested
1523
- end
1524
-
1525
- # What the tree reported about itself, held against every request: nothing here runs
1526
- # outside a hecks checkout (hecks.gemspec beside lib/).
1527
- command "Accept" do
1528
- role "System"
1529
- goal "Let a request through only when the working tree is a hecks checkout"
1530
-
1531
- reference_to StyleRun
1532
- attribute :checkout, Switch
1533
-
1534
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1535
-
1536
- sets :checkout
1537
-
1538
- emits StyleAccepted
1539
- end
1540
-
1541
- command "Complete" do
1542
- role "System"
1543
- goal "Record that the request was carried out, and what it reported"
1544
-
1545
- reference_to StyleRun
1546
- attribute :report, Report
1547
-
1548
- sets :report
1549
-
1550
- emits StyleCompleted
1551
- end
1552
-
1553
- command "Fault" do
1554
- role "System"
1555
- goal "Record that the request was refused or could not be carried out, and why"
1556
-
1557
- reference_to StyleRun
1558
- attribute :refusal, Report
1559
-
1560
- sets :refusal
1561
-
1562
- emits StyleFaulted
1563
- end
1564
-
1565
- query "StyleOutcome" do
1566
- description "How one request ended: its status, and what it reported or why it failed."
1567
- attribute :run, RunKey
1568
- where(run: :run)
1569
- order_by :run
1570
- end
1571
-
1572
- query "StyleFaulted" do
1573
- description "Every request that was refused or could not be carried out."
1574
- where(status: "faulted")
1575
- order_by :run
1576
- end
1577
-
1578
- # An answer that is one document of text, exactly as the tool that produced it wrote it.
1579
- value_object "Document" do
1580
- attribute :text, String
1581
- end
1582
-
1583
- query "ReportComments" do
1584
- description "The Ruby comment violations, as summary tables, a list or JSON."
1585
- attribute :paths, PathList
1586
- attribute :only, CategoryList, optional: true
1587
- attribute :json, Switch, optional: true
1588
- attribute :top, Top, optional: true
1589
- returns Document
1590
- end
1591
-
1592
- query "ReportRustComments" do
1593
- description "The Rust comment violations, as summary tables, a list or JSON."
1594
- attribute :paths, PathList
1595
- attribute :only, CategoryList, optional: true
1596
- attribute :json, Switch, optional: true
1597
- attribute :top, Top, optional: true
1598
- returns Document
1599
- end
1600
- end
1601
-
1602
- policy "ExamineWhenCheckCommentsRequested" do
1603
- on "StyleRun.CheckCommentsRequested"
1604
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1605
- end
1606
-
1607
- policy "ExamineWhenFixCommentsRequested" do
1608
- on "StyleRun.FixCommentsRequested"
1609
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1610
- end
1611
-
1612
- policy "ExamineWhenWriteCommentBaselineRequested" do
1613
- on "StyleRun.WriteCommentBaselineRequested"
1614
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1615
- end
1616
-
1617
- policy "ExamineWhenCheckCommentsUnchangedRequested" do
1618
- on "StyleRun.CheckCommentsUnchangedRequested"
1619
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1620
- end
1621
-
1622
- policy "ExamineWhenCheckRustCommentsRequested" do
1623
- on "StyleRun.CheckRustCommentsRequested"
1624
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1625
- end
1626
-
1627
- policy "ExamineWhenFixRustCommentsRequested" do
1628
- on "StyleRun.FixRustCommentsRequested"
1629
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1630
- end
1631
-
1632
- policy "ExamineWhenCanonicaliseRequested" do
1633
- on "StyleRun.CanonicaliseRequested"
1634
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1635
- end
1636
-
1637
- policy "AcceptStyleWhenExamined" do
1638
- on "StyleRun.StyleExamined"
1639
- trigger StyleRun::Accept, with: { checkout: :checkout }
1640
- end
1641
-
1642
- policy "FaultStyleWhenNotAccepted" do
1643
- on "StyleRun.StyleExamined"
1644
- where { !checkout.value }
1645
- trigger StyleRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
1646
- end
1647
-
1648
- policy "PerformStyleWhenAccepted" do
1649
- on "StyleRun.StyleAccepted"
1650
- trigger StyleRun::SourceTree::Perform, with: { run: :run }
1651
- end
1652
-
1653
- policy "RecordStyleOutcome" do
1654
- on "StyleRun.StyleAnswered"
1655
- trigger StyleRun::Complete, with: { report: :report }
1656
- end
1657
-
1658
- policy "RecordStyleFault" do
1659
- on "StyleRun.StyleRefused"
1660
- trigger StyleRun::Fault, with: { refusal: :refusal }
1661
- end
1662
-
1663
- # Inspection: ranking the Ruby by complexity, finding copied code, listing design smells and
1664
- # writing the combined report. A read of the tree: nothing is rewritten. The files the style
1665
- # config excludes (generated output, vendored code) are left out of every tool.
1666
- aggregate "InspectionRun" do
1667
- description "One inspection of the Ruby by flog, flay, reek or rubycritic."
1668
-
1669
- attribute :run, RunKey
1670
- attribute :operation, Operation, optional: true
1671
- attribute :paths, PathList, optional: true
1672
- attribute :top, Top, optional: true
1673
- attribute :checkout, Switch, optional: true
1674
- attribute :report, Report, optional: true
1675
- attribute :refusal, Report, optional: true
1676
- identified_by :run
1677
-
1678
- value_object "RunKey" do
1679
- attribute :value, String, matches: :present
1680
-
1681
- invariant("a run is named") { !value.to_s.empty? }
1682
- end
1683
-
1684
- value_object "Operation" do
1685
- attribute :value, String, matches: :present
1686
- end
1687
-
1688
- value_object "Switch" do
1689
- attribute :value, Boolean
1690
- end
1691
-
1692
- value_object "Report" do
1693
- attribute :value, String
1694
- end
1695
-
1696
- # Files or directories, comma separated; lib when none is named.
1697
- value_object "PathList" do
1698
- attribute :value, String, pattern: '^[^ \t\n\r,]+(,[^ \t\n\r,]+)*$'
1699
- end
1700
-
1701
- # How many lines of the report are kept.
1702
- value_object "Top" do
1703
- attribute :value, Integer
1704
-
1705
- invariant("a count is positive") { value > 0 }
1706
- end
1707
-
1708
- lifecycle :status, default: "requested" do
1709
- mark :failure, "faulted"
1710
- transition "Accept" => "accepted", from: "requested"
1711
- transition "Complete" => "completed", from: "accepted"
1712
- transition "Fault" => "faulted", from: %w[requested accepted]
1713
- end
1714
-
1715
- command "Flog" do
1716
- role "Maintainer"
1717
- goal "Rank the Ruby methods by complexity, worst first"
1718
-
1719
- attribute :paths, PathList, optional: true
1720
- attribute :top, Top, optional: true
1721
- attribute :run, RunKey
1722
-
1723
- sets :paths
1724
- sets :top
1725
- sets :run
1726
- sets :operation, to: "flog"
1727
-
1728
- emits FlogRequested
1729
- end
1730
-
1731
- command "Flay" do
1732
- role "Maintainer"
1733
- goal "Find Ruby code that is copied or nearly copied"
1734
-
1735
- attribute :paths, PathList, optional: true
1736
- attribute :top, Top, optional: true
1737
- attribute :run, RunKey
1738
-
1739
- sets :paths
1740
- sets :top
1741
- sets :run
1742
- sets :operation, to: "flay"
1743
-
1744
- emits FlayRequested
1745
- end
1746
-
1747
- command "Reek" do
1748
- role "Maintainer"
1749
- goal "List the design smells in the Ruby"
1750
-
1751
- attribute :paths, PathList, optional: true
1752
- attribute :top, Top, optional: true
1753
- attribute :run, RunKey
1754
-
1755
- sets :paths
1756
- sets :top
1757
- sets :run
1758
- sets :operation, to: "reek"
1759
-
1760
- emits ReekRequested
1761
- end
1762
-
1763
- command "Rubycritic" do
1764
- role "Maintainer"
1765
- goal "Write the combined quality report, with git churn"
1766
-
1767
- attribute :paths, PathList, optional: true
1768
- attribute :top, Top, optional: true
1769
- attribute :run, RunKey
1770
-
1771
- sets :paths
1772
- sets :top
1773
- sets :run
1774
- sets :operation, to: "rubycritic"
1775
-
1776
- emits RubycriticRequested
1777
- end
1778
-
1779
- # What the tree reported about itself, held against every request: nothing here runs
1780
- # outside a hecks checkout (hecks.gemspec beside lib/).
1781
- command "Accept" do
1782
- role "System"
1783
- goal "Let a request through only when the working tree is a hecks checkout"
1784
-
1785
- reference_to InspectionRun
1786
- attribute :checkout, Switch
1787
-
1788
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1789
-
1790
- sets :checkout
1791
-
1792
- emits InspectionAccepted
1793
- end
1794
-
1795
- command "Complete" do
1796
- role "System"
1797
- goal "Record that the inspection was carried out, and what it reported"
1798
-
1799
- reference_to InspectionRun
1800
- attribute :report, Report
1801
-
1802
- sets :report
1803
-
1804
- emits InspectionCompleted
1805
- end
1806
-
1807
- command "Fault" do
1808
- role "System"
1809
- goal "Record that the inspection was refused or could not be carried out, and why"
1810
-
1811
- reference_to InspectionRun
1812
- attribute :refusal, Report
1813
-
1814
- sets :refusal
1815
-
1816
- emits InspectionFaulted
1817
- end
1818
-
1819
- query "InspectionOutcome" do
1820
- description "How one inspection ended: its status, and what it reported or why it failed."
1821
- attribute :run, RunKey
1822
- where(run: :run)
1823
- order_by :run
1824
- end
1825
-
1826
- query "InspectionsFaulted" do
1827
- description "Every inspection that was refused or could not be carried out."
1828
- where(status: "faulted")
1829
- order_by :run
1830
- end
1831
- end
1832
-
1833
- policy "ExamineWhenFlogRequested" do
1834
- on "InspectionRun.FlogRequested"
1835
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1836
- end
1837
-
1838
- policy "ExamineWhenFlayRequested" do
1839
- on "InspectionRun.FlayRequested"
1840
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1841
- end
1842
-
1843
- policy "ExamineWhenReekRequested" do
1844
- on "InspectionRun.ReekRequested"
1845
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1846
- end
1847
-
1848
- policy "ExamineWhenRubycriticRequested" do
1849
- on "InspectionRun.RubycriticRequested"
1850
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1851
- end
1852
-
1853
- policy "AcceptInspectionWhenExamined" do
1854
- on "InspectionRun.InspectionExamined"
1855
- trigger InspectionRun::Accept, with: { checkout: :checkout }
1856
- end
1857
-
1858
- policy "FaultInspectionWhenNotAccepted" do
1859
- on "InspectionRun.InspectionExamined"
1860
- where { !checkout.value }
1861
- trigger InspectionRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
1862
- end
1863
-
1864
- policy "PerformInspectionWhenAccepted" do
1865
- on "InspectionRun.InspectionAccepted"
1866
- trigger InspectionRun::SourceTree::Perform, with: { run: :run }
1867
- end
1868
-
1869
- policy "RecordInspectionOutcome" do
1870
- on "InspectionRun.InspectionAnswered"
1871
- trigger InspectionRun::Complete, with: { report: :report }
1872
- end
1873
-
1874
- policy "RecordInspectionFault" do
1875
- on "InspectionRun.InspectionRefused"
1876
- trigger InspectionRun::Fault, with: { refusal: :refusal }
1877
- end
1878
-
1879
- # Codemod: the mechanical rewrites of the example bluebooks. Each one edits tracked files, so
1880
- # unconfirmed it rehearses the edit (the script reboots every bluebook and puts the files back)
1881
- # and reports what it would change; the files stay changed only when it is confirmed.
1882
- aggregate "CodemodRun" do
1883
- description "One rewrite of the example bluebooks by a codemod, or the rehearsal of it."
1884
-
1885
- attribute :run, RunKey
1886
- attribute :operation, Operation, optional: true
1887
- attribute :confirm, Switch, optional: true
1888
- attribute :checkout, Switch, optional: true
1889
- attribute :report, Report, optional: true
1890
- attribute :refusal, Report, optional: true
1891
- identified_by :run
1892
-
1893
- value_object "RunKey" do
1894
- attribute :value, String, matches: :present
1895
-
1896
- invariant("a run is named") { !value.to_s.empty? }
1897
- end
1898
-
1899
- value_object "Operation" do
1900
- attribute :value, String, matches: :present
1901
- end
1902
-
1903
- value_object "Switch" do
1904
- attribute :value, Boolean
1905
- end
1906
-
1907
- value_object "Report" do
1908
- attribute :value, String
1909
- end
1910
-
1911
- lifecycle :status, default: "requested" do
1912
- mark :failure, "faulted"
1913
- transition "Accept" => "accepted", from: "requested"
1914
- transition "Complete" => "completed", from: "accepted"
1915
- transition "Fault" => "faulted", from: %w[requested accepted]
1916
- end
1917
-
1918
- command "HoistLocalGivens" do
1919
- role "Maintainer"
1920
- goal "Hoist a given that several commands of one owner repeat into one owner-level given"
1921
-
1922
- attribute :run, RunKey
1923
- attribute :confirm, Switch, optional: true
1924
-
1925
- sets :run
1926
- sets :confirm
1927
- sets :operation, to: "hoist_local_givens"
1928
-
1929
- emits HoistLocalGivensRequested
1930
- end
1931
-
1932
- command "DropImplicitAppendFields" do
1933
- role "Maintainer"
1934
- goal "Drop an attribute line that only repeats what an append target element declares"
1935
-
1936
- attribute :run, RunKey
1937
- attribute :confirm, Switch, optional: true
1938
-
1939
- sets :run
1940
- sets :confirm
1941
- sets :operation, to: "drop_implicit_append_fields"
1942
-
1943
- emits DropImplicitAppendFieldsRequested
1944
- end
1945
-
1946
- # What the tree reported about itself, held against every request: nothing here runs
1947
- # outside a hecks checkout (hecks.gemspec beside lib/).
1948
- command "Accept" do
1949
- role "System"
1950
- goal "Let a request through only when the working tree is a hecks checkout"
1951
-
1952
- reference_to CodemodRun
1953
- attribute :checkout, Switch
1954
-
1955
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1956
-
1957
- sets :checkout
1958
-
1959
- emits CodemodAccepted
1960
- end
1961
-
1962
- command "Complete" do
1963
- role "System"
1964
- goal "Record that the request was carried out, and what it reported"
1965
-
1966
- reference_to CodemodRun
1967
- attribute :report, Report
1968
-
1969
- sets :report
1970
-
1971
- emits CodemodCompleted
1972
- end
1973
-
1974
- command "Fault" do
1975
- role "System"
1976
- goal "Record that the request was refused or could not be carried out, and why"
1977
-
1978
- reference_to CodemodRun
1979
- attribute :refusal, Report
1980
-
1981
- sets :refusal
1982
-
1983
- emits CodemodFaulted
1984
- end
1985
-
1986
- query "CodemodOutcome" do
1987
- description "How one request ended: its status, and what it reported or why it failed."
1988
- attribute :run, RunKey
1989
- where(run: :run)
1990
- order_by :run
1991
- end
1992
-
1993
- query "CodemodFaulted" do
1994
- description "Every request that was refused or could not be carried out."
1995
- where(status: "faulted")
1996
- order_by :run
1997
- end
1998
- end
1999
-
2000
- policy "ExamineWhenHoistLocalGivensRequested" do
2001
- on "CodemodRun.HoistLocalGivensRequested"
2002
- trigger CodemodRun::SourceTree::Examine, with: { run: :run }
2003
- end
2004
-
2005
- policy "ExamineWhenDropImplicitAppendFieldsRequested" do
2006
- on "CodemodRun.DropImplicitAppendFieldsRequested"
2007
- trigger CodemodRun::SourceTree::Examine, with: { run: :run }
2008
- end
2009
-
2010
- policy "AcceptCodemodWhenExamined" do
2011
- on "CodemodRun.CodemodExamined"
2012
- trigger CodemodRun::Accept, with: { checkout: :checkout }
2013
- end
2014
-
2015
- policy "FaultCodemodWhenNotAccepted" do
2016
- on "CodemodRun.CodemodExamined"
2017
- where { !checkout.value }
2018
- trigger CodemodRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
2019
- end
2020
-
2021
- policy "PerformCodemodWhenAccepted" do
2022
- on "CodemodRun.CodemodAccepted"
2023
- trigger CodemodRun::SourceTree::Perform, with: { run: :run }
2024
- end
2025
-
2026
- policy "RecordCodemodOutcome" do
2027
- on "CodemodRun.CodemodAnswered"
2028
- trigger CodemodRun::Complete, with: { report: :report }
2029
- end
2030
-
2031
- policy "RecordCodemodFault" do
2032
- on "CodemodRun.CodemodRefused"
2033
- trigger CodemodRun::Fault, with: { refusal: :refusal }
2034
- end
2035
-
2036
- # TestSuite: the tooling around this repository's specs. Listings of which files a shard or a
2037
- # job runs are pure reads; refreshing the committed timings, rewriting the persistence fixtures
2038
- # and writing the committed spec list change tracked files and need --confirm; a stress run
2039
- # and a single example only run specs and write nothing tracked.
2040
- aggregate "TestSuiteRun" do
2041
- description "One piece of work on the test suite: a listing, a baseline, a run or a fixture rewrite."
2042
-
2043
- attribute :run, RunKey
2044
- attribute :operation, Operation, optional: true
2045
- attribute :confirm, Switch, optional: true
2046
- attribute :workers, Count, optional: true
2047
- attribute :from_run, RunId, optional: true
2048
- attribute :file, FilePath, optional: true
2049
- attribute :example, ExampleText, optional: true
2050
- attribute :runs, Count, optional: true
2051
- attribute :parallel, Count, optional: true
2052
- attribute :seed_start, Count, optional: true
2053
- attribute :fixture, FixtureName, optional: true
2054
- attribute :exclude, ExcludePattern, optional: true
2055
- attribute :tags, TagArguments, optional: true
2056
- attribute :write, FilePath, optional: true
2057
- attribute :group, Count, optional: true
2058
- attribute :groups, Count, optional: true
2059
- attribute :runtime_log, FilePath, optional: true
2060
- attribute :check, FilePath, optional: true
2061
- attribute :checkout, Switch, optional: true
2062
- attribute :report, Report, optional: true
2063
- attribute :refusal, Report, optional: true
2064
- identified_by :run
2065
-
2066
- value_object "RunKey" do
2067
- attribute :value, String, matches: :present
2068
-
2069
- invariant("a run is named") { !value.to_s.empty? }
2070
- end
2071
-
2072
- value_object "Operation" do
2073
- attribute :value, String, matches: :present
2074
- end
2075
-
2076
- value_object "Switch" do
2077
- attribute :value, Boolean
2078
- end
2079
-
2080
- value_object "Report" do
2081
- attribute :value, String
2082
- end
2083
-
2084
- # How many, always at least one.
2085
- value_object "Count" do
2086
- attribute :value, Integer
2087
-
2088
- invariant("a count is positive") { value > 0 }
2089
- end
2090
-
2091
- # A CI run's number.
2092
- value_object "RunId" do
2093
- attribute :value, String, matches: :digits
2094
- end
2095
-
2096
- # A file, relative to the checkout or absolute.
2097
- value_object "FilePath" do
2098
- attribute :value, String, matches: :not_empty
2099
-
2100
- invariant("a file is named") { !value.to_s.empty? }
2101
- end
2102
-
2103
- # Part of an example's description.
2104
- value_object "ExampleText" do
2105
- attribute :value, String, matches: :not_empty
2106
-
2107
- invariant("an example is named") { !value.to_s.empty? }
2108
- end
2109
-
2110
- # The name of a semantics-corpus fixture.
2111
- value_object "FixtureName" do
2112
- attribute :value, String, pattern: '^[a-z0-9_]+$'
2113
- end
2114
-
2115
- # A regular expression naming the specs to leave out.
2116
- value_object "ExcludePattern" do
2117
- attribute :value, String, matches: :not_empty
2118
- end
2119
-
2120
- # The tag filter, as the test runner spells it.
2121
- value_object "TagArguments" do
2122
- attribute :value, String, pattern: '^[^\t\n\r]+$'
2123
- end
2124
-
2125
- lifecycle :status, default: "requested" do
2126
- mark :failure, "faulted"
2127
- transition "Accept" => "accepted", from: "requested"
2128
- transition "Complete" => "completed", from: "accepted"
2129
- transition "Fault" => "faulted", from: %w[requested accepted]
2130
- end
2131
-
2132
- command "RefreshRuntimeBaseline" do
2133
- role "Maintainer"
2134
- goal "Regenerate the committed runtime baselines the sharded jobs group from"
2135
-
2136
- attribute :workers, Count, default: 6
2137
- attribute :from_run, RunId, optional: true
2138
- attribute :run, RunKey
2139
- attribute :confirm, Switch, optional: true
2140
-
2141
- sets :workers
2142
- sets :from_run
2143
- sets :run
2144
- sets :confirm
2145
- sets :operation, to: "refresh_runtime_baseline"
2146
-
2147
- emits RefreshRuntimeBaselineRequested
2148
- end
2149
-
2150
- command "RunSpecExample" do
2151
- role "Maintainer"
2152
- goal "Run one spec file filtered to one example, through the test runner in this process"
2153
-
2154
- attribute :file, FilePath
2155
- attribute :example, ExampleText
2156
- attribute :run, RunKey
2157
-
2158
- sets :file
2159
- sets :example
2160
- sets :run
2161
- sets :operation, to: "run_spec_example"
2162
-
2163
- emits RunSpecExampleRequested
2164
- end
2165
-
2166
- command "StressConcurrency" do
2167
- role "Maintainer"
2168
- goal "Rerun the thread-safety specs under many seeds, several processes at a time"
2169
-
2170
- attribute :runs, Count, default: 30
2171
- # The machine's own core count when none is named, which no fixed default can say.
2172
- attribute :parallel, Count, optional: true
2173
- attribute :seed_start, Count, default: 1
2174
- attribute :run, RunKey
2175
-
2176
- sets :runs
2177
- sets :parallel
2178
- sets :seed_start
2179
- sets :run
2180
- sets :operation, to: "stress_concurrency"
2181
-
2182
- emits StressConcurrencyRequested
2183
- end
2184
-
2185
- command "RegenerateLegacyFixtures" do
2186
- role "Maintainer"
2187
- goal "Regenerate the persistence legacy fixtures through the real adapters"
2188
-
2189
- attribute :run, RunKey
2190
- attribute :confirm, Switch, optional: true
2191
-
2192
- sets :run
2193
- sets :confirm
2194
- sets :operation, to: "regenerate_legacy_fixtures"
2195
-
2196
- emits RegenerateLegacyFixturesRequested
2197
- end
2198
-
2199
- command "SeedSemanticsCorpus" do
2200
- role "Maintainer"
2201
- goal "Fill the expected outcome of every semantics fixture that lacks one, or re-seed one"
2202
-
2203
- attribute :fixture, FixtureName, optional: true
2204
- attribute :run, RunKey
2205
-
2206
- sets :fixture
2207
- sets :run
2208
- sets :operation, to: "seed_semantics_corpus"
2209
-
2210
- emits SeedSemanticsCorpusRequested
2211
- end
2212
-
2213
- command "WriteIoParallelSpecList" do
2214
- role "Maintainer"
2215
- goal "Write the committed list of the spec files a tag filter selects"
2216
-
2217
- attribute :exclude, ExcludePattern
2218
- attribute :tags, TagArguments, optional: true
2219
- attribute :write, FilePath
2220
- attribute :run, RunKey
2221
- attribute :confirm, Switch, optional: true
2222
-
2223
- sets :exclude
2224
- sets :tags
2225
- sets :write
2226
- sets :run
2227
- sets :confirm
2228
- sets :operation, to: "write_io_parallel_spec_list"
2229
-
2230
- emits WriteIoParallelSpecListRequested
2231
- end
2232
-
2233
- # What the tree reported about itself, held against every request: nothing here runs
2234
- # outside a hecks checkout (hecks.gemspec beside lib/).
2235
- command "Accept" do
2236
- role "System"
2237
- goal "Let a request through only when the working tree is a hecks checkout"
2238
-
2239
- reference_to TestSuiteRun
2240
- attribute :checkout, Switch
2241
-
2242
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2243
-
2244
- sets :checkout
2245
-
2246
- emits TestSuiteAccepted
2247
- end
2248
-
2249
- command "Complete" do
2250
- role "System"
2251
- goal "Record that the request was carried out, and what it reported"
2252
-
2253
- reference_to TestSuiteRun
2254
- attribute :report, Report
2255
-
2256
- sets :report
2257
-
2258
- emits TestSuiteCompleted
2259
- end
2260
-
2261
- command "Fault" do
2262
- role "System"
2263
- goal "Record that the request was refused or could not be carried out, and why"
2264
-
2265
- reference_to TestSuiteRun
2266
- attribute :refusal, Report
2267
-
2268
- sets :refusal
2269
-
2270
- emits TestSuiteFaulted
2271
- end
2272
-
2273
- query "TestSuiteOutcome" do
2274
- description "How one request ended: its status, and what it reported or why it failed."
2275
- attribute :run, RunKey
2276
- where(run: :run)
2277
- order_by :run
2278
- end
2279
-
2280
- query "TestSuiteFaulted" do
2281
- description "Every request that was refused or could not be carried out."
2282
- where(status: "faulted")
2283
- order_by :run
2284
- end
2285
-
2286
- # An answer that is one document of text, exactly as the tool that produced it wrote it.
2287
- value_object "Document" do
2288
- attribute :text, String
2289
- end
2290
-
2291
- query "ShardSpecs" do
2292
- description "The spec files one group of a runtime-balanced split runs."
2293
- attribute :group, Count
2294
- attribute :groups, Count
2295
- attribute :runtime_log, FilePath, optional: true
2296
- returns Document
2297
- end
2298
-
2299
- query "ListIoParallelSpecs" do
2300
- description "The spec files with an example a tag filter selects."
2301
- attribute :exclude, ExcludePattern
2302
- attribute :tags, TagArguments, optional: true
2303
- attribute :check, FilePath, optional: true
2304
- returns Document
2305
- end
2306
-
2307
- query "RecordPatternCases" do
2308
- description "The expected match results of the pattern cases, as JSON."
2309
- returns Document
2310
- end
2311
- end
2312
-
2313
- policy "ExamineWhenRefreshRuntimeBaselineRequested" do
2314
- on "TestSuiteRun.RefreshRuntimeBaselineRequested"
2315
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2316
- end
2317
-
2318
- policy "ExamineWhenRunSpecExampleRequested" do
2319
- on "TestSuiteRun.RunSpecExampleRequested"
2320
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2321
- end
2322
-
2323
- policy "ExamineWhenStressConcurrencyRequested" do
2324
- on "TestSuiteRun.StressConcurrencyRequested"
2325
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2326
- end
2327
-
2328
- policy "ExamineWhenRegenerateLegacyFixturesRequested" do
2329
- on "TestSuiteRun.RegenerateLegacyFixturesRequested"
2330
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2331
- end
2332
-
2333
- policy "ExamineWhenSeedSemanticsCorpusRequested" do
2334
- on "TestSuiteRun.SeedSemanticsCorpusRequested"
2335
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2336
- end
2337
-
2338
- policy "ExamineWhenWriteIoParallelSpecListRequested" do
2339
- on "TestSuiteRun.WriteIoParallelSpecListRequested"
2340
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2341
- end
2342
-
2343
- policy "AcceptTestSuiteWhenExamined" do
2344
- on "TestSuiteRun.TestSuiteExamined"
2345
- trigger TestSuiteRun::Accept, with: { checkout: :checkout }
2346
- end
2347
-
2348
- policy "FaultTestSuiteWhenNotAccepted" do
2349
- on "TestSuiteRun.TestSuiteExamined"
2350
- where { !checkout.value }
2351
- trigger TestSuiteRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
2352
- end
2353
-
2354
- policy "PerformTestSuiteWhenAccepted" do
2355
- on "TestSuiteRun.TestSuiteAccepted"
2356
- trigger TestSuiteRun::SourceTree::Perform, with: { run: :run }
2357
- end
2358
-
2359
- policy "RecordTestSuiteOutcome" do
2360
- on "TestSuiteRun.TestSuiteAnswered"
2361
- trigger TestSuiteRun::Complete, with: { report: :report }
2362
- end
2363
-
2364
- policy "RecordTestSuiteFault" do
2365
- on "TestSuiteRun.TestSuiteRefused"
2366
- trigger TestSuiteRun::Fault, with: { refusal: :refusal }
2367
- end
2368
-
2369
- # Corpus: what this repository's committed domains are, and what the language's own IR holds.
2370
- # Every question about them is a pure read, answered by the SourceTree port: which domains carry
2371
- # a Rust feature, the order they regenerate in, whether each generated module is covered, and the
2372
- # structural queries over the IR. Two commands open a long-running server: the query MCP server
2373
- # on stdio and the forms app on a local port; each is recorded, runs until it is closed, and
2374
- # answers when it ends.
2375
- aggregate "CorpusRun" do
2376
- description "One look at the corpus and the language's IR, or one server opened on them."
2377
-
2378
- attribute :run, RunKey
2379
- attribute :operation, Operation, optional: true
2380
- attribute :confirm, Switch, optional: true
2381
- attribute :names, NameList, optional: true
2382
- attribute :domains, PathList, optional: true
2383
- attribute :meta, Switch, optional: true
2384
- attribute :name, ConstructName, optional: true
2385
- attribute :field, FieldName, optional: true
2386
- attribute :port, Port, optional: true
2387
- attribute :checkout, Switch, optional: true
2388
- attribute :report, Report, optional: true
2389
- attribute :refusal, Report, optional: true
2390
- identified_by :run
2391
-
2392
- value_object "RunKey" do
2393
- attribute :value, String, matches: :present
2394
-
2395
- invariant("a run is named") { !value.to_s.empty? }
2396
- end
2397
-
2398
- value_object "Operation" do
2399
- attribute :value, String, matches: :present
2400
- end
2401
-
2402
- value_object "Switch" do
2403
- attribute :value, Boolean
2404
- end
2405
-
2406
- value_object "Report" do
2407
- attribute :value, String
2408
- end
2409
-
2410
- # Construct names, comma separated.
2411
- value_object "NameList" do
2412
- attribute :value, String, pattern: '^[A-Za-z][A-Za-z0-9_]*(,[A-Za-z][A-Za-z0-9_]*)*$'
2413
- end
2414
-
2415
- # Domain directories, comma separated.
2416
- value_object "PathList" do
2417
- attribute :value, String, pattern: '^[^ \t\n\r,]+(,[^ \t\n\r,]+)*$'
2418
- end
2419
-
2420
- # The name of one IR construct.
2421
- value_object "ConstructName" do
2422
- attribute :value, String, pattern: '^[A-Za-z][A-Za-z0-9_]*$'
2423
- end
2424
-
2425
- # The name of one field of a construct.
2426
- value_object "FieldName" do
2427
- attribute :value, String, matches: :snake_name
2428
- end
2429
-
2430
- # A local port a server listens on.
2431
- value_object "Port" do
2432
- attribute :value, Integer
2433
-
2434
- invariant("a port is 1 to 65535") { value >= 1 && value <= 65535 }
2435
- end
2436
-
2437
- lifecycle :status, default: "requested" do
2438
- mark :failure, "faulted"
2439
- transition "Accept" => "accepted", from: "requested"
2440
- transition "Complete" => "completed", from: "accepted"
2441
- transition "Fault" => "faulted", from: %w[requested accepted]
2442
- end
2443
-
2444
- command "ServeQueryIrMcp" do
2445
- role "Maintainer"
2446
- goal "Serve the IR queries to an MCP client over stdio until it closes"
2447
-
2448
- attribute :run, RunKey
2449
-
2450
- sets :run
2451
- sets :operation, to: "serve_query_ir_mcp"
2452
-
2453
- emits ServeQueryIrMcpRequested
2454
- end
2455
-
2456
- command "Present" do
2457
- role "Maintainer"
2458
- goal "Serve the banking example's rendered forms and views on a local port until stopped"
2459
-
2460
- attribute :port, Port, optional: true
2461
- attribute :run, RunKey
2462
-
2463
- sets :port
2464
- sets :run
2465
- sets :operation, to: "present"
2466
-
2467
- emits PresentRequested
2468
- end
2469
-
2470
- command "Compose" do
2471
- role "Maintainer"
2472
- goal "Serve the Composer, a live bluebook editor over one domain directory, on a local port until stopped"
2473
-
2474
- attribute :port, Port, optional: true
2475
- attribute :domains, PathList, optional: true
2476
- attribute :run, RunKey
2477
-
2478
- sets :port
2479
- sets :domains
2480
- sets :run
2481
- sets :operation, to: "compose"
2482
-
2483
- emits ComposeRequested
2484
- end
2485
-
2486
- # What the tree reported about itself, held against every request: nothing here runs
2487
- # outside a hecks checkout (hecks.gemspec beside lib/).
2488
- command "Accept" do
2489
- role "System"
2490
- goal "Let a request through only when the working tree is a hecks checkout"
2491
-
2492
- reference_to CorpusRun
2493
- attribute :checkout, Switch
2494
-
2495
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2496
-
2497
- sets :checkout
2498
-
2499
- emits CorpusAccepted
2500
- end
2501
-
2502
- command "Complete" do
2503
- role "System"
2504
- goal "Record that the request was carried out, and what it reported"
2505
-
2506
- reference_to CorpusRun
2507
- attribute :report, Report
2508
-
2509
- sets :report
2510
-
2511
- emits CorpusCompleted
2512
- end
2513
-
2514
- command "Fault" do
2515
- role "System"
2516
- goal "Record that the request was refused or could not be carried out, and why"
2517
-
2518
- reference_to CorpusRun
2519
- attribute :refusal, Report
2520
-
2521
- sets :refusal
2522
-
2523
- emits CorpusFaulted
2524
- end
2525
-
2526
- query "CorpusOutcome" do
2527
- description "How one request ended: its status, and what it reported or why it failed."
2528
- attribute :run, RunKey
2529
- where(run: :run)
2530
- order_by :run
2531
- end
2532
-
2533
- query "CorpusFaulted" do
2534
- description "Every request that was refused or could not be carried out."
2535
- where(status: "faulted")
2536
- order_by :run
2537
- end
2538
-
2539
- # An answer that is one document of text, exactly as the tool that produced it wrote it.
2540
- value_object "Document" do
2541
- attribute :text, String
2542
- end
2543
-
2544
- query "RustDomains" do
2545
- description "The feature and directory of every domain with a Rust feature."
2546
- returns Document
2547
- end
2548
-
2549
- query "RegenOrder" do
2550
- description "The directories regeneration walks, in the order it walks them."
2551
- returns Document
2552
- end
2553
-
2554
- query "CorpusRustCoverage" do
2555
- description "Whether every generated Rust module is routed by its domain."
2556
- returns Document
2557
- end
2558
-
2559
- query "IrConstructs" do
2560
- description "The structural diff of each IR construct from its meta-domain."
2561
- attribute :names, NameList, optional: true
2562
- returns Document
2563
- end
2564
-
2565
- query "IrDuplicates" do
2566
- description "The rules declared more than once across the corpus."
2567
- attribute :domains, PathList, optional: true
2568
- attribute :meta, Switch, optional: true
2569
- returns Document
2570
- end
2571
-
2572
- query "IrImpact" do
2573
- description "Which propagation touchpoints of a construct's field already show it."
2574
- attribute :name, ConstructName
2575
- attribute :field, FieldName
2576
- returns Document
2577
- end
2578
- end
2579
-
2580
- policy "ExamineWhenServeQueryIrMcpRequested" do
2581
- on "CorpusRun.ServeQueryIrMcpRequested"
2582
- trigger CorpusRun::SourceTree::Examine, with: { run: :run }
2583
- end
2584
-
2585
- policy "ExamineWhenPresentRequested" do
2586
- on "CorpusRun.PresentRequested"
2587
- trigger CorpusRun::SourceTree::Examine, with: { run: :run }
2588
- end
2589
-
2590
- policy "ExamineWhenComposeRequested" do
2591
- on "CorpusRun.ComposeRequested"
2592
- trigger CorpusRun::SourceTree::Examine, with: { run: :run }
2593
- end
2594
-
2595
- policy "AcceptCorpusWhenExamined" do
2596
- on "CorpusRun.CorpusExamined"
2597
- trigger CorpusRun::Accept, with: { checkout: :checkout }
2598
- end
2599
-
2600
- policy "FaultCorpusWhenNotAccepted" do
2601
- on "CorpusRun.CorpusExamined"
2602
- where { !checkout.value }
2603
- trigger CorpusRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
2604
- end
2605
-
2606
- policy "PerformCorpusWhenAccepted" do
2607
- on "CorpusRun.CorpusAccepted"
2608
- trigger CorpusRun::SourceTree::Perform, with: { run: :run }
2609
- end
2610
-
2611
- policy "RecordCorpusOutcome" do
2612
- on "CorpusRun.CorpusAnswered"
2613
- trigger CorpusRun::Complete, with: { report: :report }
2614
- end
2615
-
2616
- policy "RecordCorpusFault" do
2617
- on "CorpusRun.CorpusRefused"
2618
- trigger CorpusRun::Fault, with: { refusal: :refusal }
2619
- end
2620
-
2621
- # Publishing: cutting a release of this gem. The run holds the facts the Git adapter surveyed
2622
- # (branch, tree, versions, changelog, tag), and `Accept` holds the rules that let a release go
2623
- # ahead: the adapter supplies the facts and the givens decide. Only an accepted run is carried
2624
- # out, and without --confirm it is the old dry run: every check and build, nothing tagged,
2625
- # pushed or published. A real run advances the root Release: tagged, published, verified.
2626
- aggregate "PublishingRun" do
2627
- description "One release of the gem, or the rehearsal of it: judged by the facts, then carried out."
2628
-
2629
- attribute :run, RunKey
2630
- attribute :operation, Operation, optional: true
2631
- attribute :confirm, Switch, optional: true
2632
- attribute :gem_only, Switch, optional: true
2633
- attribute :npm_only, Switch, optional: true
2634
- attribute :npm_local, Switch, optional: true
2635
- attribute :no_wait, Switch, optional: true
2636
- attribute :checkout, Switch, optional: true
2637
- attribute :branch, Word, optional: true
2638
- attribute :release_lane, Word, optional: true
2639
- attribute :on_origin, Switch, optional: true
2640
- attribute :clean, Switch, optional: true
2641
- attribute :version, Version, optional: true
2642
- attribute :client_version, Version, optional: true
2643
- attribute :changelog, Switch, optional: true
2644
- attribute :approved, Switch, optional: true
2645
- attribute :tag_state, Word, optional: true
2646
- attribute :head, Word, optional: true
2647
- attribute :ir_version, Version, optional: true
2648
- attribute :ships_from, Checkout, optional: true
2649
- attribute :tagged, Switch, optional: true
2650
- attribute :published, Switch, optional: true
2651
- attribute :verified, Switch, optional: true
2652
- attribute :report, Report, optional: true
2653
- attribute :refusal, Report, optional: true
2654
- identified_by :run
2655
-
2656
- value_object "RunKey" do
2657
- attribute :value, String, matches: :present
2658
-
2659
- invariant("a run is named") { !value.to_s.empty? }
2660
- end
2661
-
2662
- value_object "Operation" do
2663
- attribute :value, String, matches: :present
2664
- end
2665
-
2666
- value_object "Switch" do
2667
- attribute :value, Boolean
2668
- end
2669
-
2670
- value_object "Report" do
2671
- attribute :value, String
2672
- end
2673
-
2674
- # One word of a fact: a branch, a commit, whether a tag stands.
2675
- value_object "Word" do
2676
- attribute :value, String, matches: :present
2677
- end
2678
-
2679
- value_object "Version" do
2680
- attribute :value, String, pattern: '^[0-9]+[.][0-9]+[.][0-9]+'
2681
- end
2682
-
2683
- # The working tree the release is cut from.
2684
- value_object "Checkout" do
2685
- attribute :path, String
2686
- end
2687
-
2688
- lifecycle :status, default: "requested" do
2689
- mark :failure, "faulted"
2690
- transition "Accept" => "accepted", from: "requested"
2691
- transition "AcceptGem" => "accepted", from: "requested"
2692
- transition "Complete" => "completed", from: "accepted"
2693
- transition "Fault" => "faulted", from: %w[requested accepted]
2694
- end
2695
-
2696
- command "Publish" do
2697
- role "Maintainer"
2698
- goal "Tag the merged release commit, publish the gem, and get the client package published"
2699
-
2700
- attribute :gem_only, Switch, optional: true
2701
- attribute :npm_only, Switch, optional: true
2702
- attribute :npm_local, Switch, optional: true
2703
- attribute :no_wait, Switch, optional: true
2704
- attribute :run, RunKey
2705
- attribute :confirm, Switch, optional: true
2706
-
2707
- sets :gem_only
2708
- sets :npm_only
2709
- sets :npm_local
2710
- sets :no_wait
2711
- sets :run
2712
- sets :confirm
2713
- sets :operation, to: "publish"
2714
-
2715
- emits PublishRequested
2716
- end
2717
-
2718
- command "PublishGem" do
2719
- role "Maintainer"
2720
- goal "Build the gem and push it to the gem registry, with the key the vault holds"
2721
-
2722
- attribute :run, RunKey
2723
- attribute :confirm, Switch, optional: true
2724
-
2725
- sets :run
2726
- sets :confirm
2727
- sets :operation, to: "publish_gem"
2728
-
2729
- emits PublishGemRequested
2730
- end
2731
-
2732
- # What the tree reported about itself, and the facts the Git adapter surveyed, held against the
2733
- # rules of a release. Nothing here runs outside a hecks checkout (hecks.gemspec beside lib/).
2734
- command "Accept" do
2735
- role "System"
2736
- goal "Let a release go ahead only in a hecks checkout, and only when the facts satisfy every rule"
2737
-
2738
- reference_to PublishingRun
2739
- attribute :checkout, Switch
2740
- attribute :branch, Word
2741
- attribute :release_lane, Word
2742
- attribute :on_origin, Switch
2743
- attribute :clean, Switch
2744
- attribute :version, Version
2745
- attribute :client_version, Version
2746
- attribute :changelog, Switch
2747
- attribute :approved, Switch
2748
- attribute :tag_state, Word
2749
- attribute :head, Word
2750
- attribute :ir_version, Version
2751
- attribute :ships_from, Checkout
2752
-
2753
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2754
- given("a release is cut from the release lane (the Lane row that feeds a tag): switch to it first") do
2755
- branch.value == release_lane.value
2756
- end
2757
- given("the release lane is its origin: wait for the release commit to be promoted, then pull") { on_origin.value }
2758
- given("the working tree is clean: commit or discard changes first") { clean.value }
2759
- given("the client package is at the gem's version: bump the package first") do
2760
- client_version.value == version.value
2761
- end
2762
- given("CHANGELOG.md has a heading for the version: add the release entry") { changelog.value }
2763
- given("the commit that set the version carries a Release-Approved-By line: the owner decides when a release happens") do
2764
- approved.value || tag_state.value == "at_release_commit"
2765
- end
2766
- given("a tag for the version points at the release commit, not elsewhere") do
2767
- tag_state.value != "elsewhere"
2768
- end
2769
-
2770
- sets :checkout
2771
- sets :branch
2772
- sets :release_lane
2773
- sets :on_origin
2774
- sets :clean
2775
- sets :version
2776
- sets :client_version
2777
- sets :changelog
2778
- sets :approved
2779
- sets :tag_state
2780
- sets :head
2781
- sets :ir_version
2782
- sets :ships_from
2783
-
2784
- emits PublishingAccepted
2785
- end
2786
-
2787
- # release_gem's one rule: the client package is released beside the gem at the same version.
2788
- command "AcceptGem" do
2789
- role "System"
2790
- goal "Let a gem push go ahead only in a hecks checkout, with the client package at the gem's version"
2791
-
2792
- reference_to PublishingRun
2793
- attribute :checkout, Switch
2794
- attribute :version, Version
2795
- attribute :client_version, Version
2796
- attribute :ir_version, Version
2797
- attribute :ships_from, Checkout
2798
-
2799
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2800
- given("the client package is at the gem's version: bump the package first") do
2801
- client_version.value == version.value
2802
- end
2803
-
2804
- sets :checkout
2805
- sets :version
2806
- sets :client_version
2807
- sets :ir_version
2808
- sets :ships_from
2809
-
2810
- emits GemAccepted
2811
- end
2812
-
2813
- command "Complete" do
2814
- role "System"
2815
- goal "Record that the release was carried out, what it did, and what it reported"
2816
-
2817
- reference_to PublishingRun
2818
- attribute :report, Report
2819
- attribute :tagged, Switch
2820
- attribute :published, Switch
2821
- attribute :verified, Switch
2822
-
2823
- sets :report
2824
- sets :tagged
2825
- sets :published
2826
- sets :verified
2827
-
2828
- emits PublishingCompleted
2829
- end
2830
-
2831
- command "Fault" do
2832
- role "System"
2833
- goal "Record that the request was refused or could not be carried out, and why"
2834
-
2835
- reference_to PublishingRun
2836
- attribute :refusal, Report
2837
-
2838
- sets :refusal
2839
-
2840
- emits PublishingFaulted
2841
- end
2842
-
2843
- query "PublishingOutcome" do
2844
- description "How one request ended: its status, and what it reported or why it failed."
2845
- attribute :run, RunKey
2846
- where(run: :run)
2847
- order_by :run
2848
- end
2849
-
2850
- query "PublishingFaulted" do
2851
- description "Every request that was refused or could not be carried out."
2852
- where(status: "faulted")
2853
- order_by :run
2854
- end
2855
- end
2856
-
2857
- policy "ExaminePublishingWhenPublishRequested" do
2858
- on "PublishingRun.PublishRequested"
2859
- trigger PublishingRun::SourceTree::Examine, with: { run: :run }
2860
- end
2861
-
2862
- policy "ExaminePublishingWhenPublishGemRequested" do
2863
- on "PublishingRun.PublishGemRequested"
2864
- trigger PublishingRun::SourceTree::Examine, with: { run: :run }
2865
- end
2866
-
2867
- policy "AcceptTheReleaseWhenExamined" do
2868
- on "PublishingRun.PublishingExamined"
2869
- where { operation.value == "publish" }
2870
- trigger PublishingRun::Accept, with: { checkout: :checkout, branch: :branch, release_lane: :release_lane,
2871
- on_origin: :on_origin, clean: :clean, version: :version,
2872
- client_version: :client_version,
2873
- changelog: :changelog, approved: :approved, tag_state: :tag_state,
2874
- head: :head, ir_version: :ir_version, ships_from: :ships_from }
2875
- end
2876
-
2877
- policy "AcceptTheGemWhenExamined" do
2878
- on "PublishingRun.PublishingExamined"
2879
- where { operation.value == "publish_gem" }
2880
- trigger PublishingRun::AcceptGem, with: { checkout: :checkout, version: :version,
2881
- client_version: :client_version, ir_version: :ir_version,
2882
- ships_from: :ships_from }
2883
- end
2884
-
2885
- policy "FaultTheReleaseWhenNotAccepted" do
2886
- on "PublishingRun.PublishingExamined"
2887
- where do
2888
- operation.value == "publish" &&
2889
- (!checkout.value || branch.value != release_lane.value || !on_origin.value || !clean.value ||
2890
- client_version.value != version.value || !changelog.value || tag_state.value == "elsewhere" ||
2891
- (!approved.value && tag_state.value != "at_release_commit"))
2892
- end
2893
- trigger PublishingRun::Fault, with: { refusal: "a release rule is not met: check the branch, tree, versions, CHANGELOG, tag and the Release-Approved-By line" }
2894
- end
2895
-
2896
- policy "FaultTheGemWhenNotAccepted" do
2897
- on "PublishingRun.PublishingExamined"
2898
- where do
2899
- operation.value == "publish_gem" && (!checkout.value || client_version.value != version.value)
2900
- end
2901
- trigger PublishingRun::Fault, with: { refusal: "a gem push rule is not met: needs a checkout and the client at the gem's version" }
2902
- end
2903
-
2904
- policy "PerformPublishingWhenAccepted" do
2905
- on "PublishingRun.PublishingAccepted"
2906
- trigger PublishingRun::SourceTree::Perform, with: { run: :run }
2907
- end
2908
-
2909
- policy "PerformPublishingWhenGemAccepted" do
2910
- on "PublishingRun.GemAccepted"
2911
- trigger PublishingRun::SourceTree::Perform, with: { run: :run }
2912
- end
2913
-
2914
- # A real run advances the root Release: tagged when the tag was made, published when a registry
2915
- # took the gem, verified when every registry in scope lists the version.
2916
- policy "RecordTheTagWhenPublished" do
2917
- on "PublishingRun.PublishingAnswered"
2918
- where { tagged.value }
2919
- trigger Release::Tag, with: { version: :version, ir_version: :ir_version, ships_from: :ships_from }
2920
- end
2921
-
2922
- policy "RecordThePublishingWhenPublished" do
2923
- on "PublishingRun.PublishingAnswered"
2924
- where { published.value }
2925
- trigger Release::MarkPublished, with: { version: :version }
2926
- end
2927
-
2928
- policy "RecordTheVerificationWhenPublished" do
2929
- on "PublishingRun.PublishingAnswered"
2930
- where { verified.value }
2931
- trigger Release::Verify, with: { version: :version }
2932
- end
2933
-
2934
- # A release that stopped after a real step (the tag pushed, the gem published) still records the
2935
- # steps it took on the root Release, then ends as a fault carrying what the release said.
2936
- policy "RecordPublishingOutcome" do
2937
- on "PublishingRun.PublishingAnswered"
2938
- where { succeeded.value }
2939
- trigger PublishingRun::Complete, with: { report: :report, tagged: :tagged, published: :published,
2940
- verified: :verified }
2941
- end
2942
-
2943
- policy "RecordPublishingShortfall" do
2944
- on "PublishingRun.PublishingAnswered"
2945
- where { succeeded.value == false }
2946
- trigger PublishingRun::Fault, with: { refusal: :report }
2947
- end
2948
-
2949
- policy "RecordPublishingFault" do
2950
- on "PublishingRun.PublishingRefused"
2951
- trigger PublishingRun::Fault, with: { refusal: :refusal }
2952
- end
2953
-
2954
- # Promotion: moving a lane forward onto a commit that has passed every `RequiredCheck`. The
2955
- # adapter reads the facts (does the lane exist, where its head stands, where each check stands
2956
- # against the commit) and `Accept` holds the rules, so what makes a commit fit for the lane is
2957
- # decided here and in the Lane and RequiredCheck rows, never by the workflow that runs
2958
- # `hecks promotion_run.promote`. Without --confirm the run is a rehearsal: it names the move it
2959
- # would make and makes none. A real run fast-forwards the lane (never forces it) and moves the
2960
- # tag the lane `feeds`, forward only; a lane that already holds the commit still has its tag
2961
- # brought up to the lane's head, so a half-finished run is finished by the next.
2962
- #
2963
- # A commit is certified by the checks of that exact commit. With `commit` named, that commit is
2964
- # the one judged, and no other is ever put in its place. Without it, the commit is the newest
2965
- # one of the followed lane (first-parent, a bounded way back) that every `RequiredCheck` passed
2966
- # on and that fast-forwards the lane, so the outcome never depends on which push's CI run
2967
- # started the promotion; when none qualifies the refusal names what the lane's head is
2968
- # waiting on.
2969
- aggregate "PromotionRun" do
2970
- description "One move of a lane onto a commit, or the rehearsal of it: judged by the facts, then carried out."
2971
-
2972
- attribute :run, RunKey
2973
- attribute :operation, Operation, optional: true
2974
- attribute :confirm, Switch, optional: true
2975
- attribute :lane, Word
2976
- attribute :commit, Word, optional: true
2977
- attribute :checkout, Switch, optional: true
2978
- attribute :lane_known, Switch, optional: true
2979
- attribute :green, Switch, optional: true
2980
- attribute :descends, Switch, optional: true
2981
- attribute :head, Word, optional: true
2982
- attribute :behind_hours, Hours, optional: true
2983
- attribute :limit_hours, Hours, optional: true
2984
- attribute :alert_key, Word, optional: true
2985
- attribute :promoted, Switch, optional: true
2986
- attribute :reason, Report, optional: true
2987
- attribute :report, Report, optional: true
2988
- attribute :refusal, Report, optional: true
2989
- identified_by :run
2990
-
2991
- value_object "RunKey" do
2992
- attribute :value, String, matches: :present
2993
-
2994
- invariant("a run is named") { !value.to_s.empty? }
2995
- end
2996
-
2997
- value_object "Operation" do
2998
- attribute :value, String, matches: :present
2999
- end
3000
-
3001
- value_object "Switch" do
3002
- attribute :value, Boolean
3003
- end
3004
-
3005
- value_object "Report" do
3006
- attribute :value, String
3007
- end
3008
-
3009
- # A branch name, or a commit.
3010
- value_object "Word" do
3011
- attribute :value, String, matches: :present
3012
- end
3013
-
3014
- # How long a lane has stood behind the lane it follows, or how long its row lets it.
3015
- value_object "Hours" do
3016
- attribute :value, Integer
3017
- end
3018
-
3019
- lifecycle :status, default: "requested" do
3020
- mark :failure, "faulted"
3021
- transition "Accept" => "accepted", from: "requested"
3022
- transition "Observe" => "observed", from: "requested"
3023
- transition "Complete" => "completed", from: %w[accepted observed]
3024
- transition "Fault" => "faulted", from: %w[requested accepted]
3025
- transition "Lag" => "faulted", from: "observed"
3026
- end
3027
-
3028
- # Looks at a lane and moves nothing: faults when it has stood behind the lane it follows for
3029
- # longer than its `Lane` row allows, which files a finding. A lane whose row allows no lag is
3030
- # never late.
3031
- command "Watch" do
3032
- role "Maintainer"
3033
- goal "Fault when a lane has stood behind the lane it follows for longer than its Lane row allows"
3034
-
3035
- attribute :lane, Word
3036
- attribute :run, RunKey
3037
- attribute :alert_key, Word
3038
-
3039
- sets :lane
3040
- sets :run
3041
- sets :alert_key
3042
- sets :operation, to: "watch"
3043
-
3044
- emits WatchRequested
3045
- end
3046
-
3047
- command "Promote" do
3048
- role "Maintainer"
3049
- goal "Move a lane onto a commit that has passed every required check, or with no --confirm rehearse the move"
3050
-
3051
- attribute :lane, Word
3052
- attribute :commit, Word, optional: true
3053
- attribute :run, RunKey
3054
- attribute :confirm, Switch, optional: true
3055
-
3056
- sets :lane
3057
- sets :commit
3058
- sets :run
3059
- sets :confirm
3060
- sets :operation, to: "promote"
3061
-
3062
- emits PromoteRequested
3063
- end
3064
-
3065
- # What the tree and the remote reported, held against the rules of a promotion: the adapter
3066
- # supplies the facts and the givens decide.
3067
- command "Accept" do
3068
- role "System"
3069
- goal "Let a lane move only in a hecks checkout, onto a commit that is green on every required check and contains the lane's head"
3070
-
3071
- reference_to PromotionRun
3072
- attribute :checkout, Switch
3073
- attribute :lane_known, Switch
3074
- attribute :green, Switch
3075
- attribute :descends, Switch
3076
- attribute :commit, Word
3077
- attribute :head, Word, optional: true
3078
-
3079
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
3080
- given("the lane is one of the Lane rows, and follows another lane") { lane_known.value }
3081
- given("every RequiredCheck is green on the commit: wait for the checks, or fix the red one") { green.value }
3082
- given("the commit is on the lane it follows and contains the lane's head: a lane only moves forward") { descends.value }
3083
-
3084
- sets :checkout
3085
- sets :lane_known
3086
- sets :green
3087
- sets :descends
3088
- sets :commit
3089
- sets :head
3090
-
3091
- emits PromotionAccepted
3092
- end
3093
-
3094
- # What the tree and the remote reported about a watched lane, held against the rules of a
3095
- # watch: it needs a hecks checkout and a lane that follows another.
3096
- command "Observe" do
3097
- role "System"
3098
- goal "Let a lane be judged late or on time only in a hecks checkout, for a lane that follows another"
3099
-
3100
- reference_to PromotionRun
3101
- attribute :checkout, Switch
3102
- attribute :lane_known, Switch
3103
- attribute :behind_hours, Hours
3104
- attribute :limit_hours, Hours
3105
- attribute :alert_key, Word
3106
- attribute :promoted, Switch
3107
- attribute :reason, Report
3108
-
3109
- given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
3110
- given("the lane is one of the Lane rows, and follows another lane") { lane_known.value }
3111
-
3112
- sets :checkout
3113
- sets :lane_known
3114
- sets :behind_hours
3115
- sets :limit_hours
3116
- sets :alert_key
3117
- sets :promoted
3118
- sets :reason
3119
-
3120
- emits LaneObserved
3121
- end
3122
-
3123
- command "Complete" do
3124
- role "System"
3125
- goal "Record that the promotion was carried out or rehearsed, or the lane was on time, and what it reported"
3126
-
3127
- reference_to PromotionRun
3128
- attribute :report, Report
3129
- attribute :promoted, Switch
3130
-
3131
- sets :report
3132
- sets :promoted
3133
-
3134
- emits PromotionCompleted
3135
- end
3136
-
3137
- # A lane that has stood behind the lane it follows for longer than its Lane row allows.
3138
- command "Lag" do
3139
- role "System"
3140
- goal "Record that a lane is late, and what it is waiting on, under the alert key that names its finding"
3141
-
3142
- reference_to PromotionRun
3143
- attribute :refusal, Report
3144
- attribute :alert_key, Word
3145
-
3146
- sets :refusal
3147
- sets :alert_key
3148
-
3149
- emits LaneLagged
3150
- end
3151
-
3152
- command "Fault" do
3153
- role "System"
3154
- goal "Record that the promotion was refused or could not be carried out, and why"
3155
-
3156
- reference_to PromotionRun
3157
- attribute :refusal, Report
3158
-
3159
- sets :refusal
3160
-
3161
- emits PromotionFaulted
3162
- end
3163
-
3164
- query "PromotionOutcome" do
3165
- description "How one promotion ended: its status, and what it reported or why it failed."
3166
- attribute :run, RunKey
3167
- where(run: :run)
3168
- order_by :run
3169
- end
3170
-
3171
- query "PromotionFaulted" do
3172
- description "Every promotion that was refused or could not be carried out."
3173
- where(status: "faulted")
3174
- order_by :run
3175
- end
3176
- end
3177
-
3178
- policy "ExamineWhenPromoteRequested" do
3179
- on "PromotionRun.PromoteRequested"
3180
- trigger PromotionRun::SourceTree::Examine, with: { run: :run }
3181
- end
3182
-
3183
- policy "ExamineWhenWatchRequested" do
3184
- on "PromotionRun.WatchRequested"
3185
- trigger PromotionRun::SourceTree::Examine, with: { run: :run }
3186
- end
3187
-
3188
- policy "ObserveWhenWatchExamined" do
3189
- on "PromotionRun.PromotionExamined"
3190
- where { operation.value == "watch" }
3191
- trigger PromotionRun::Observe, with: { checkout: :checkout, lane_known: :lane_known, behind_hours: :behind_hours,
3192
- limit_hours: :limit_hours, alert_key: :alert_key, promoted: :promoted,
3193
- reason: :reason }
3194
- end
3195
-
3196
- policy "FaultWhenWatchCannotBeJudged" do
3197
- on "PromotionRun.PromotionExamined"
3198
- where { operation.value == "watch" && (!checkout.value || !lane_known.value) }
3199
- trigger PromotionRun::Fault, with: { refusal: :reason }
3200
- end
3201
-
3202
- policy "LagWhenLaneLate" do
3203
- on "PromotionRun.LaneObserved"
3204
- where { behind_hours.value > limit_hours.value }
3205
- trigger PromotionRun::Lag, with: { refusal: :reason, alert_key: :alert_key }
3206
- end
3207
-
3208
- policy "CompleteWhenLaneOnTime" do
3209
- on "PromotionRun.LaneObserved"
3210
- where { behind_hours.value <= limit_hours.value }
3211
- trigger PromotionRun::Complete, with: { report: :reason, promoted: :promoted }
3212
- end
3213
-
3214
- policy "AcceptPromotionWhenExamined" do
3215
- on "PromotionRun.PromotionExamined"
3216
- where { operation.value == "promote" }
3217
- trigger PromotionRun::Accept, with: { checkout: :checkout, lane_known: :lane_known, green: :green,
3218
- descends: :descends, commit: :commit, head: :head }
3219
- end
3220
-
3221
- policy "FaultPromotionWhenNotAccepted" do
3222
- on "PromotionRun.PromotionExamined"
3223
- where { operation.value == "promote" && (!checkout.value || !lane_known.value || !green.value || !descends.value) }
3224
- trigger PromotionRun::Fault, with: { refusal: :reason }
3225
- end
3226
-
3227
- policy "PerformPromotionWhenAccepted" do
3228
- on "PromotionRun.PromotionAccepted"
3229
- trigger PromotionRun::SourceTree::Perform, with: { run: :run }
3230
- end
3231
-
3232
- policy "RecordPromotionOutcome" do
3233
- on "PromotionRun.PromotionAnswered"
3234
- trigger PromotionRun::Complete, with: { report: :report, promoted: :promoted }
3235
- end
3236
-
3237
- policy "RecordPromotionFault" do
3238
- on "PromotionRun.PromotionRefused"
3239
- trigger PromotionRun::Fault, with: { refusal: :refusal }
3240
- end
3241
- end