hecks 4.0.0 → 6.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 (1281) hide show
  1. checksums.yaml +4 -4
  2. data/examples/pizzas/bluebook/pizzas.bluebook +1 -0
  3. data/exe/hecks +15 -3
  4. data/lib/hecks/adapters/driven/claude_code.rb +1 -1
  5. data/lib/hecks/adapters/driven/d1.rb +2 -1
  6. data/lib/hecks/adapters/driven/folder.rb +35 -28
  7. data/lib/hecks/adapters/driven/folder_overlay.rb +51 -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/identity_registry.rb +1 -1
  13. data/lib/hecks/adapters/driven/in_memory_ordering.rb +3 -2
  14. data/lib/hecks/adapters/driven/key_keeper.rb +42 -0
  15. data/lib/hecks/adapters/driven/lambda/client.rb +8 -2
  16. data/lib/hecks/adapters/driven/lambda/remote_dispatcher.rb +185 -0
  17. data/lib/hecks/adapters/driven/lambda.rb +14 -2
  18. data/lib/hecks/adapters/driven/memory/dispatch_claims.rb +25 -0
  19. data/lib/hecks/adapters/driven/memory.rb +15 -4
  20. data/lib/hecks/adapters/driven/postgres/codec.rb +1 -1
  21. data/lib/hecks/adapters/driven/postgres/journal.rb +46 -0
  22. data/lib/hecks/adapters/driven/postgres/outbox.rb +31 -5
  23. data/lib/hecks/adapters/driven/postgres/projection.rb +43 -0
  24. data/lib/hecks/adapters/driven/postgres/repository.rb +1 -1
  25. data/lib/hecks/adapters/driven/postgres/schema_builder.rb +2 -1
  26. data/lib/hecks/adapters/driven/postgres/set_dialect.rb +44 -0
  27. data/lib/hecks/adapters/driven/postgres.adapter +8 -0
  28. data/lib/hecks/adapters/driven/postgres.rb +8 -3
  29. data/lib/hecks/adapters/driven/postgres_dump/connection.rb +57 -0
  30. data/lib/hecks/adapters/driven/postgres_dump.rb +117 -0
  31. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/boot.rb +6 -3
  32. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/class_methods.rb +1 -1
  33. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/dialect.rb +1 -1
  34. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/chain_sql.rb +8 -4
  35. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/domain_rename.rb +2 -2
  36. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/era_integrity.rb +2 -2
  37. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/era_store.rb +3 -3
  38. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/mint_transaction.rb +2 -2
  39. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/sql_templates.rb +6 -2
  40. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/tail_merge.rb +1 -1
  41. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage.rb +1 -1
  42. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/context.rb +15 -5
  43. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/coverage_check.rb +13 -11
  44. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/era_resolver.rb +23 -6
  45. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/merge_coordinator.rb +2 -2
  46. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/minter.rb +12 -9
  47. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager/refusals.rb +13 -1
  48. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage_manager.rb +6 -6
  49. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/query_phases.rb +8 -2
  50. data/lib/hecks/adapters/driven/postgres_era.adapter +7 -1
  51. data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era.rb +14 -13
  52. data/lib/hecks/adapters/driven/prism.rb +4 -3
  53. data/lib/hecks/adapters/driven/projection/read_model_walk.rb +126 -0
  54. data/lib/hecks/adapters/driven/projection/row_decoding.rb +57 -0
  55. data/lib/hecks/adapters/driven/set_transform/assignments.rb +101 -0
  56. data/lib/hecks/adapters/driven/set_transform/expressions.rb +138 -0
  57. data/lib/hecks/adapters/driven/set_transform.rb +81 -0
  58. data/lib/hecks/adapters/driven/sql_keyset.rb +61 -0
  59. data/lib/hecks/adapters/driven/sql_query_builder.rb +28 -9
  60. data/lib/hecks/adapters/driven/sqlite/codec.rb +1 -1
  61. data/lib/hecks/adapters/driven/sqlite/ddl.rb +7 -0
  62. data/lib/hecks/adapters/driven/sqlite/dialect.rb +2 -1
  63. data/lib/hecks/adapters/driven/sqlite/dispatch_claims.rb +28 -0
  64. data/lib/hecks/adapters/driven/sqlite/journal.rb +46 -0
  65. data/lib/hecks/adapters/driven/sqlite/outbox.rb +3 -2
  66. data/lib/hecks/adapters/driven/sqlite/projection.rb +9 -135
  67. data/lib/hecks/adapters/driven/sqlite/repository.rb +1 -1
  68. data/lib/hecks/adapters/driven/sqlite/schema_builder.rb +16 -4
  69. data/lib/hecks/adapters/driven/sqlite/set_dialect.rb +39 -0
  70. data/lib/hecks/adapters/driven/sqlite.adapter +2 -0
  71. data/lib/hecks/adapters/driven/sqlite.rb +11 -2
  72. data/lib/hecks/adapters/driven.rb +8 -3
  73. data/lib/hecks/adapters/driving/cli.rb +1 -1
  74. data/lib/hecks/adapters/driving/cli_runner/answers.rb +23 -16
  75. data/lib/hecks/adapters/driving/cli_runner/resolution.rb +25 -24
  76. data/lib/hecks/adapters/driving/cli_runner/settling.rb +9 -5
  77. data/lib/hecks/adapters/driving/cli_runner/streaming.rb +1 -1
  78. data/lib/hecks/adapters/driving/cli_runner/suggestions.rb +15 -7
  79. data/lib/hecks/adapters/driving/cli_runner/verb_names.rb +49 -0
  80. data/lib/hecks/adapters/driving/cli_runner.rb +4 -2
  81. data/lib/hecks/adapters/driving/github_webhook.rb +2 -1
  82. data/lib/hecks/adapters/driving/handle/verb_methods.rb +46 -0
  83. data/lib/hecks/adapters/driving/handle.rb +9 -17
  84. data/lib/hecks/adapters/driving/json.rb +19 -17
  85. data/lib/hecks/adapters/driving/launcher_options.rb +37 -32
  86. data/lib/hecks/adapters/driving/mcp_scope/env_problems.rb +3 -1
  87. data/lib/hecks/adapters/driving/mcp_scope.rb +8 -7
  88. data/lib/hecks/adapters/driving/newcomer.rb +6 -5
  89. data/lib/hecks/adapters/driving/ruby/aggregate_module.rb +13 -12
  90. data/lib/hecks/adapters/driving/ruby/bulk_verbs.rb +127 -0
  91. data/lib/hecks/adapters/driving/ruby/{chapter.rb → declaration.rb} +27 -27
  92. data/lib/hecks/adapters/driving/ruby/query_rows.rb +27 -0
  93. data/lib/hecks/adapters/driving/ruby.rb +25 -24
  94. data/lib/hecks/adapters/driving/usage_cache.rb +14 -3
  95. data/lib/hecks/assembly.rb +101 -0
  96. data/lib/hecks/behaviors/dsl.rb +13 -3
  97. data/lib/hecks/behaviors/expectations/boot.rb +7 -6
  98. data/lib/hecks/behaviors/expectations/checks.rb +1 -1
  99. data/lib/hecks/behaviors/expectations/dispatching.rb +10 -9
  100. data/lib/hecks/behaviors/expectations/qualify.rb +9 -9
  101. data/lib/hecks/behaviors/expectations.rb +24 -10
  102. data/lib/hecks/behaviors/ir.rb +4 -2
  103. data/lib/hecks/behaviors/rspec.rb +1 -1
  104. data/lib/hecks/behaviors/runner.rb +31 -4
  105. data/lib/hecks/bench/environment.rb +6 -2
  106. data/lib/hecks/bench/postgres_probe.rb +3 -1
  107. data/lib/hecks/bench/report.rb +4 -1
  108. data/lib/hecks/bench/suite.rb +9 -3
  109. data/lib/hecks/bluebook/acknowledgements.rb +81 -0
  110. data/lib/hecks/bluebook/aggregate.rb +13 -4
  111. data/lib/hecks/bluebook/ask_resolution.rb +17 -17
  112. data/lib/hecks/bluebook/assembly/aggregate_assembly.rb +8 -5
  113. data/lib/hecks/bluebook/assembly/contracts/structure.rb +11 -7
  114. data/lib/hecks/bluebook/assembly/marks.rb +10 -1
  115. data/lib/hecks/bluebook/assembly/scalars.rb +8 -2
  116. data/lib/hecks/bluebook/assembly/specializer.rb +2 -2
  117. data/lib/hecks/bluebook/assembly.rb +10 -10
  118. data/lib/hecks/bluebook/behaviour/aggregate.rb +2 -1
  119. data/lib/hecks/bluebook/behaviour/attribute.rb +12 -0
  120. data/lib/hecks/bluebook/behaviour/command.rb +1 -1
  121. data/lib/hecks/bluebook/behaviour/{chapter.rb → declaration.rb} +17 -17
  122. data/lib/hecks/bluebook/behaviour/domain_port.rb +1 -1
  123. data/lib/hecks/bluebook/behaviour/entity.rb +1 -0
  124. data/lib/hecks/bluebook/behaviour/hecksagon.rb +8 -1
  125. data/lib/hecks/bluebook/behaviour/process_manager.rb +4 -1
  126. data/lib/hecks/bluebook/behaviour/query.rb +5 -0
  127. data/lib/hecks/bluebook/behaviour/read_model.rb +4 -1
  128. data/lib/hecks/bluebook/behaviour/traits.rb +13 -0
  129. data/lib/hecks/bluebook/capabilities/attribute_values.rb +17 -16
  130. data/lib/hecks/bluebook/capabilities/package_declared.rb +65 -0
  131. data/lib/hecks/bluebook/capabilities.rb +32 -132
  132. data/lib/hecks/bluebook/command.rb +22 -7
  133. data/lib/hecks/bluebook/context_map.rb +104 -0
  134. data/lib/hecks/bluebook/{chapter.rb → declaration.rb} +13 -13
  135. data/lib/hecks/bluebook/dsl/adapter_builder.rb +28 -4
  136. data/lib/hecks/bluebook/dsl/aggregate_builder/draining.rb +2 -2
  137. data/lib/hecks/bluebook/dsl/aggregate_builder/one_of_reference.rb +54 -0
  138. data/lib/hecks/bluebook/dsl/aggregate_builder/query_field_sealing.rb +11 -2
  139. data/lib/hecks/bluebook/dsl/aggregate_builder/query_sealing.rb +15 -5
  140. data/lib/hecks/bluebook/dsl/aggregate_builder/relationships.rb +21 -3
  141. data/lib/hecks/bluebook/dsl/aggregate_builder/rules.rb +22 -22
  142. data/lib/hecks/bluebook/dsl/aggregate_builder/sealing.rb +2 -2
  143. data/lib/hecks/bluebook/dsl/aggregate_builder.rb +27 -22
  144. data/lib/hecks/bluebook/dsl/bluebook_builder/pending_givens.rb +22 -22
  145. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/computed_sources.rb +27 -21
  146. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/correlation_keys.rb +3 -5
  147. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/event_shapes.rb +5 -4
  148. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/fan_out_rows.rb +3 -3
  149. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/hop_tails.rb +13 -5
  150. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/projected_fields.rb +4 -4
  151. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/provisions.rb +38 -84
  152. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/query_hops.rb +5 -5
  153. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/references.rb +6 -6
  154. data/lib/hecks/bluebook/dsl/bluebook_builder/validation/with_projections.rb +6 -6
  155. data/lib/hecks/bluebook/dsl/bluebook_builder/validation.rb +3 -3
  156. data/lib/hecks/bluebook/dsl/bluebook_builder.rb +67 -67
  157. data/lib/hecks/bluebook/dsl/bootstrap_table.rb +2 -0
  158. data/lib/hecks/bluebook/dsl/command_builder/folded_sets.rb +48 -0
  159. data/lib/hecks/bluebook/dsl/command_builder.rb +28 -15
  160. data/lib/hecks/bluebook/dsl/context_map_builder.rb +73 -0
  161. data/lib/hecks/bluebook/dsl/entity_builder/rules.rb +17 -17
  162. data/lib/hecks/bluebook/dsl/entity_builder/scope.rb +3 -3
  163. data/lib/hecks/bluebook/dsl/entity_builder/sealing.rb +2 -2
  164. data/lib/hecks/bluebook/dsl/entity_builder.rb +3 -3
  165. data/lib/hecks/bluebook/dsl/hecksagon_builder/{chapter_scope.rb → bluebook_scope.rb} +14 -14
  166. data/lib/hecks/bluebook/dsl/hecksagon_builder.rb +33 -27
  167. data/lib/hecks/bluebook/dsl/identity_declaration.rb +6 -2
  168. data/lib/hecks/bluebook/dsl/lifecycle_builder.rb +4 -1
  169. data/lib/hecks/bluebook/dsl/query_builder.rb +14 -8
  170. data/lib/hecks/bluebook/dsl/read_model_builder/sealing.rb +6 -11
  171. data/lib/hecks/bluebook/dsl/read_model_builder.rb +1 -2
  172. data/lib/hecks/bluebook/dsl/word_gate.rb +2 -1
  173. data/lib/hecks/bluebook/dsl/world_builder.rb +2 -2
  174. data/lib/hecks/bluebook/dsl.rb +3 -2
  175. data/lib/hecks/bluebook/expression/ast_json/emitters.rb +4 -0
  176. data/lib/hecks/bluebook/expression/ast_json.rb +5 -3
  177. data/lib/hecks/bluebook/expression/ast_reader/blocks.rb +41 -0
  178. data/lib/hecks/bluebook/expression/ast_reader.rb +2 -10
  179. data/lib/hecks/bluebook/expression/canonical_form.rb +9 -4
  180. data/lib/hecks/bluebook/expression/evaluator/parser.rb +4 -1
  181. data/lib/hecks/bluebook/expression/evaluator.rb +13 -9
  182. data/lib/hecks/bluebook/expression/projection.json +6 -0
  183. data/lib/hecks/bluebook/expression/resolver/block_predicates.rb +50 -2
  184. data/lib/hecks/bluebook/expression/resolver/lookups.rb +2 -1
  185. data/lib/hecks/bluebook/expression/resolver/operations.rb +1 -0
  186. data/lib/hecks/bluebook/expression/resolver/parsing.rb +21 -15
  187. data/lib/hecks/bluebook/expression/resolver/scanning.rb +4 -1
  188. data/lib/hecks/bluebook/expression.rb +1 -1
  189. data/lib/hecks/bluebook/hecksagon.rb +48 -23
  190. data/lib/hecks/bluebook/meta_validator/adapter_judge.rb +4 -1
  191. data/lib/hecks/bluebook/meta_validator/judge/cells.rb +1 -1
  192. data/lib/hecks/bluebook/meta_validator/judge/identity.rb +2 -1
  193. data/lib/hecks/bluebook/meta_validator/modes.rb +27 -27
  194. data/lib/hecks/bluebook/meta_validator/plan.rb +5 -5
  195. data/lib/hecks/bluebook/meta_validator/readings/fields.rb +3 -3
  196. data/lib/hecks/bluebook/meta_validator/reconstruction/heads.rb +11 -3
  197. data/lib/hecks/bluebook/meta_validator/reconstruction/reading.rb +1 -1
  198. data/lib/hecks/bluebook/meta_validator/reconstruction.rb +19 -19
  199. data/lib/hecks/bluebook/meta_validator/shapes.rb +6 -1
  200. data/lib/hecks/bluebook/meta_validator/syntax_boot/disk_cache.rb +18 -15
  201. data/lib/hecks/bluebook/meta_validator/syntax_boot.rb +21 -15
  202. data/lib/hecks/bluebook/meta_validator/verdict_cache/prebuilt.rb +4 -1
  203. data/lib/hecks/bluebook/meta_validator/verdict_cache.rb +11 -10
  204. data/lib/hecks/bluebook/meta_validator.rb +25 -22
  205. data/lib/hecks/bluebook/model_check/aggregate_checks.rb +68 -0
  206. data/lib/hecks/bluebook/model_check/ask_checks.rb +6 -5
  207. data/lib/hecks/bluebook/model_check/client_profile.rb +8 -42
  208. data/lib/hecks/bluebook/model_check/context_checks.rb +97 -0
  209. data/lib/hecks/bluebook/model_check/context_map_checks.rb +158 -0
  210. data/lib/hecks/bluebook/model_check/lifecycle_checks.rb +27 -5
  211. data/lib/hecks/bluebook/model_check/one_of_checks.rb +106 -0
  212. data/lib/hecks/bluebook/model_check/orphan_checks.rb +129 -0
  213. data/lib/hecks/bluebook/model_check/redundant_relationships.rb +38 -0
  214. data/lib/hecks/bluebook/model_check/reference_checks.rb +11 -1
  215. data/lib/hecks/bluebook/model_check/saga_checks.rb +8 -3
  216. data/lib/hecks/bluebook/model_check/verbs.rb +4 -4
  217. data/lib/hecks/bluebook/model_check.rb +32 -12
  218. data/lib/hecks/bluebook/named_pattern.rb +12 -1
  219. data/lib/hecks/bluebook/one_of_union.rb +35 -0
  220. data/lib/hecks/bluebook/pattern_subset.rb +12 -3
  221. data/lib/hecks/bluebook/project_loader.rb +3 -2
  222. data/lib/hecks/bluebook/project_register.rb +21 -5
  223. data/lib/hecks/bluebook/query.rb +4 -1
  224. data/lib/hecks/bluebook/read_model.rb +5 -5
  225. data/lib/hecks/bluebook/reference.rb +3 -3
  226. data/lib/hecks/bluebook/smoke_test.rb +15 -13
  227. data/lib/hecks/bluebook/synthesizer.rb +48 -13
  228. data/lib/hecks/bluebook/translation_expression/parser.rb +14 -5
  229. data/lib/hecks/bluebook.rb +6 -3
  230. data/lib/hecks/bulk/bluebook/adapters/row_sweeper.adapter +7 -0
  231. data/lib/hecks/bulk/bluebook/bulk.behaviors +18 -0
  232. data/lib/hecks/bulk/bluebook/bulk.bluebook +126 -0
  233. data/lib/hecks/bulk/bluebook/bulk.hecksagon +11 -0
  234. data/lib/hecks/bulk/bluebook/bulk.ports.hecksagon +13 -0
  235. data/lib/hecks/bulk/plan.rb +60 -0
  236. data/lib/hecks/bulk/row_sweeper.rb +34 -0
  237. data/lib/hecks/bulk/set_arguments.rb +68 -0
  238. data/lib/hecks/bulk/set_eligibility.rb +50 -0
  239. data/lib/hecks/bulk/set_planner.rb +100 -0
  240. data/lib/hecks/bulk/set_sweep.rb +78 -0
  241. data/lib/hecks/bulk/sweep.rb +67 -0
  242. data/lib/hecks/cli/check_era.rb +6 -6
  243. data/lib/hecks/cli/command_table.rb +2 -2
  244. data/lib/hecks/cli/console.rb +11 -6
  245. data/lib/hecks/cli/document.rb +14 -9
  246. data/lib/hecks/cli/domain_writer.rb +4 -1
  247. data/lib/hecks/cli/expected_era.rb +139 -0
  248. data/lib/hecks/cli/expression_projection.rb +2 -2
  249. data/lib/hecks/cli/follow.rb +3 -3
  250. data/lib/hecks/cli/history.rb +4 -1
  251. data/lib/hecks/cli/interview_draft.rb +8 -1
  252. data/lib/hecks/cli/interview_record.rb +7 -3
  253. data/lib/hecks/cli/interview_run.rb +7 -5
  254. data/lib/hecks/cli/interview_session/proposals.rb +5 -2
  255. data/lib/hecks/cli/interview_session.rb +3 -2
  256. data/lib/hecks/cli/interview_shape/lifecycle.rb +92 -0
  257. data/lib/hecks/cli/interview_shape.rb +19 -73
  258. data/lib/hecks/cli/model_check/examination.rb +63 -14
  259. data/lib/hecks/cli/model_check/sources.rb +4 -2
  260. data/lib/hecks/cli/model_check.rb +1 -1
  261. data/lib/hecks/cli/persistence_notice.rb +45 -0
  262. data/lib/hecks/cli/present.rb +1 -1
  263. data/lib/hecks/cli/project_cli/launcher_source.rb +12 -10
  264. data/lib/hecks/cli/project_cli/templates.rb +24 -3
  265. data/lib/hecks/cli/project_cli.rb +11 -13
  266. data/lib/hecks/cli/project_diagrams.rb +20 -20
  267. data/lib/hecks/cli/project_glossary.rb +14 -14
  268. data/lib/hecks/cli/reference.rb +1 -1
  269. data/lib/hecks/cli/refresh_projections.rb +16 -11
  270. data/lib/hecks/cli/run.rb +27 -5
  271. data/lib/hecks/cli/seed_semantics_corpus.rb +14 -4
  272. data/lib/hecks/cli/shape.rb +3 -4
  273. data/lib/hecks/cli/smoke_http/transport.rb +3 -2
  274. data/lib/hecks/cli/statements.rb +7 -7
  275. data/lib/hecks/cli/stores.rb +70 -2
  276. data/lib/hecks/cli/stress_concurrency_specs/reporting.rb +4 -1
  277. data/lib/hecks/codemod.rb +3 -3
  278. data/lib/hecks/composer/adapters/claude_composer.rb +3 -2
  279. data/lib/hecks/composer/agent.rb +1 -1
  280. data/lib/hecks/composer/assistant.rb +2 -2
  281. data/lib/hecks/composer/behavior_run.rb +7 -1
  282. data/lib/hecks/composer/bluebook/composer.bluebook +18 -25
  283. data/lib/hecks/composer/bluebook/composer.hecksagon +1 -1
  284. data/lib/hecks/composer/board.rb +6 -6
  285. data/lib/hecks/composer/board_edit/command_text.rb +4 -1
  286. data/lib/hecks/composer/board_edit/source.rb +18 -9
  287. data/lib/hecks/composer/board_edit.rb +2 -2
  288. data/lib/hecks/composer/check.rb +22 -22
  289. data/lib/hecks/composer/domains.rb +1 -1
  290. data/lib/hecks/composer/live.rb +19 -13
  291. data/lib/hecks/composer/outline.rb +4 -1
  292. data/lib/hecks/composer/page.html +1 -1
  293. data/lib/hecks/composer/panels.rb +6 -3
  294. data/lib/hecks/composer/parse.rb +53 -36
  295. data/lib/hecks/composer/session.rb +22 -16
  296. data/lib/hecks/composer/toolbox.rb +9 -6
  297. data/lib/hecks/composer/web.rb +3 -2
  298. data/lib/hecks/composer/workbench.rb +12 -9
  299. data/lib/hecks/composer.rb +1 -1
  300. data/lib/hecks/construct.rb +7 -7
  301. data/lib/hecks/corpus/adapters.rb +2 -1
  302. data/lib/hecks/corpus/routes.rb +25 -5
  303. data/lib/hecks/corpus/rust.rb +59 -24
  304. data/lib/hecks/corpus/sources.rb +12 -11
  305. data/lib/hecks/corpus/worlds.rb +2 -1
  306. data/lib/hecks/corpus.rb +30 -22
  307. data/lib/hecks/deploy/bluebook/deploy.bluebook +304 -518
  308. data/lib/hecks/doc/reference/harvester.rb +4 -1
  309. data/lib/hecks/doc/reference/readme.rb +11 -6
  310. data/lib/hecks/doc/reference/rendering.rb +11 -5
  311. data/lib/hecks/doc/reference.rb +7 -5
  312. data/lib/hecks/embryonaut_bluebook/lock.rb +5 -1
  313. data/lib/hecks/embryonaut_bluebook/manifest.rb +7 -1
  314. data/lib/hecks/embryonaut_bluebook/registry/changelog.rb +4 -1
  315. data/lib/hecks/embryonaut_bluebook/registry/versions.rb +13 -2
  316. data/lib/hecks/embryonaut_bluebook/registry.rb +5 -2
  317. data/lib/hecks/embryonaut_bluebook/shape.rb +1 -1
  318. data/lib/hecks/embryonaut_bluebook/vendor.rb +5 -2
  319. data/lib/hecks/embryonaut_bluebook/vendor_cli.rb +15 -1
  320. data/lib/hecks/embryonaut_bluebook.rb +26 -12
  321. data/lib/hecks/engine_agreement.rb +4 -1
  322. data/lib/hecks/forms/app/commands.rb +35 -2
  323. data/lib/hecks/forms/app/records.rb +12 -12
  324. data/lib/hecks/forms/app/responses.rb +4 -2
  325. data/lib/hecks/forms/app.rb +22 -19
  326. data/lib/hecks/forms/command_form_renderer.rb +2 -2
  327. data/lib/hecks/forms/field_controls.rb +6 -1
  328. data/lib/hecks/forms/field_shape.rb +14 -6
  329. data/lib/hecks/forms/html.rb +8 -7
  330. data/lib/hecks/forms/html_pattern.rb +80 -0
  331. data/lib/hecks/forms/index_renderer.rb +11 -11
  332. data/lib/hecks/forms/params.rb +2 -1
  333. data/lib/hecks/forms/port_argument.rb +4 -1
  334. data/lib/hecks/forms/query_form_renderer.rb +1 -1
  335. data/lib/hecks/forms/record_renderer.rb +2 -2
  336. data/lib/hecks/forms/record_table.rb +1 -1
  337. data/lib/hecks/forms/reference_options.rb +2 -1
  338. data/lib/hecks/forms/text_shape.rb +4 -1
  339. data/lib/hecks/forms/value_object_shape.rb +1 -1
  340. data/lib/hecks/forms.rb +7 -7
  341. data/lib/hecks/fqn.rb +8 -2
  342. data/lib/hecks/framework/bluebook/change.bluebook +10 -15
  343. data/lib/hecks/framework/bluebook/change.hecksagon +1 -1
  344. data/lib/hecks/framework/bluebook/compliance.bluebook +27 -126
  345. data/lib/hecks/framework/bluebook/console_settings.bluebook +199 -114
  346. data/lib/hecks/framework/bluebook/framework.hecksagon +7 -0
  347. data/lib/hecks/framework/bluebook/governance.bluebook +36 -14
  348. data/lib/hecks/framework/bluebook/identity.bluebook +1 -1
  349. data/lib/hecks/framework/bluebook/privacy.bluebook +123 -19
  350. data/lib/hecks/framework/bluebook/privacy.key_keeper.adapter +7 -0
  351. data/lib/hecks/framework/bluebook/privacy.ports.hecksagon +19 -0
  352. data/lib/hecks/framework/compliance.oidc.json +6 -36
  353. data/lib/hecks/framework/console_settings.oidc.json +39 -24
  354. data/lib/hecks/framework/privacy.oidc.json +25 -0
  355. data/lib/hecks/framework.rb +24 -8
  356. data/lib/hecks/framework_bluebooks.rb +156 -0
  357. data/lib/hecks/freezer.rb +7 -1
  358. data/lib/hecks/fuzzing/combination_miner.rb +9 -6
  359. data/lib/hecks/fuzzing/concurrent_dispatch/world_copy.rb +3 -1
  360. data/lib/hecks/fuzzing/concurrent_dispatch.rb +2 -2
  361. data/lib/hecks/fuzzing/domain_generator.rb +8 -3
  362. data/lib/hecks/fuzzing/era_boundary.rb +1 -1
  363. data/lib/hecks/fuzzing/failure_triage.rb +13 -6
  364. data/lib/hecks/fuzzing/form_census/{chapter_forms.rb → bluebook_forms.rb} +12 -12
  365. data/lib/hecks/fuzzing/form_census.rb +14 -12
  366. data/lib/hecks/fuzzing/generated_domain_check.rb +2 -1
  367. data/lib/hecks/fuzzing/isolated_boot/postgres_scratch.rb +5 -5
  368. data/lib/hecks/fuzzing/isolated_boot/scratch_schema.rb +19 -9
  369. data/lib/hecks/fuzzing/isolated_boot/worlds.rb +13 -8
  370. data/lib/hecks/fuzzing/isolated_boot.rb +4 -5
  371. data/lib/hecks/fuzzing/mutation/checks.rb +2 -1
  372. data/lib/hecks/fuzzing/mutation/finders.rb +25 -8
  373. data/lib/hecks/fuzzing/mutation/observation.rb +3 -1
  374. data/lib/hecks/fuzzing/mutation/source_map.rb +3 -1
  375. data/lib/hecks/fuzzing/nondeterministic.rb +10 -4
  376. data/lib/hecks/fuzzing/outside_world.rb +1 -1
  377. data/lib/hecks/fuzzing/projection_agreement/binding.rb +63 -0
  378. data/lib/hecks/fuzzing/projection_agreement/comparison.rb +104 -0
  379. data/lib/hecks/fuzzing/projection_agreement.rb +68 -0
  380. data/lib/hecks/fuzzing/properties/aggregation_recompute.rb +1 -1
  381. data/lib/hecks/fuzzing/properties/bulk_parity.rb +118 -0
  382. data/lib/hecks/fuzzing/properties/catalog.rb +7 -0
  383. data/lib/hecks/fuzzing/properties/cursor_walks.rb +56 -0
  384. data/lib/hecks/fuzzing/properties/dispatch_and_mutations.rb +39 -1
  385. data/lib/hecks/fuzzing/properties/group_by_recompute.rb +6 -2
  386. data/lib/hecks/fuzzing/properties/grouped_reduction_recompute.rb +88 -0
  387. data/lib/hecks/fuzzing/properties/guards.rb +4 -1
  388. data/lib/hecks/fuzzing/properties/invariants_and_aggregation.rb +12 -2
  389. data/lib/hecks/fuzzing/properties/lifecycle_and_replay.rb +2 -1
  390. data/lib/hecks/fuzzing/properties/mutation_recompute.rb +3 -2
  391. data/lib/hecks/fuzzing/properties/piece_invariants.rb +3 -2
  392. data/lib/hecks/fuzzing/properties/query_rows.rb +5 -3
  393. data/lib/hecks/fuzzing/properties/querying.rb +6 -3
  394. data/lib/hecks/fuzzing/properties/read_model_names.rb +8 -2
  395. data/lib/hecks/fuzzing/properties/read_models.rb +2 -1
  396. data/lib/hecks/fuzzing/properties/refusals.rb +35 -0
  397. data/lib/hecks/fuzzing/properties/role_checks.rb +3 -2
  398. data/lib/hecks/fuzzing/properties/set_transform_parity.rb +73 -0
  399. data/lib/hecks/fuzzing/properties/tenant_scope.rb +3 -2
  400. data/lib/hecks/fuzzing/properties.rb +6 -0
  401. data/lib/hecks/fuzzing/qa_settings.rb +4 -4
  402. data/lib/hecks/fuzzing/replay/fan_out.rb +4 -3
  403. data/lib/hecks/fuzzing/replay/filters.rb +2 -2
  404. data/lib/hecks/fuzzing/replay/guard_check.rb +2 -2
  405. data/lib/hecks/fuzzing/replay/mutation_trace.rb +23 -10
  406. data/lib/hecks/fuzzing/replay/observation.rb +11 -7
  407. data/lib/hecks/fuzzing/replay/read_only_steps.rb +40 -3
  408. data/lib/hecks/fuzzing/replay/refusal_trace.rb +44 -0
  409. data/lib/hecks/fuzzing/replay/role_check.rb +2 -2
  410. data/lib/hecks/fuzzing/replay/session.rb +38 -18
  411. data/lib/hecks/fuzzing/replay/validation_reports.rb +61 -0
  412. data/lib/hecks/fuzzing/replay.rb +2 -2
  413. data/lib/hecks/fuzzing/rust_gap_manifest.rb +3 -3
  414. data/lib/hecks/fuzzing/self_consistency/saga_redelivery.rb +18 -8
  415. data/lib/hecks/fuzzing/self_consistency/sagas.rb +2 -2
  416. data/lib/hecks/fuzzing/self_consistency/value_objects.rb +9 -2
  417. data/lib/hecks/fuzzing/self_consistency.rb +4 -8
  418. data/lib/hecks/fuzzing/sequence_generator/adversary/argument_mutations.rb +15 -5
  419. data/lib/hecks/fuzzing/sequence_generator/adversary/caller_draw.rb +14 -10
  420. data/lib/hecks/fuzzing/sequence_generator/adversary/precedence_mutations.rb +1 -1
  421. data/lib/hecks/fuzzing/sequence_generator/argument_drawing.rb +2 -1
  422. data/lib/hecks/fuzzing/sequence_generator/catalog.rb +21 -13
  423. data/lib/hecks/fuzzing/sequence_generator/picker.rb +1 -1
  424. data/lib/hecks/fuzzing/sequence_generator/query_binding.rb +3 -3
  425. data/lib/hecks/fuzzing/sequence_generator/step_builder.rb +2 -2
  426. data/lib/hecks/fuzzing/sequence_generator.rb +1 -2
  427. data/lib/hecks/fuzzing/shrinker.rb +4 -1
  428. data/lib/hecks/fuzzing/value_generator.rb +14 -8
  429. data/lib/hecks/fuzzing.rb +1 -0
  430. data/lib/hecks/grammar/dialects.rb +56 -0
  431. data/lib/hecks/grammar/evolve/arguments.rb +1 -1
  432. data/lib/hecks/grammar/evolve/keywords.rb +1 -1
  433. data/lib/hecks/grammar/evolve/seeds.rb +34 -8
  434. data/lib/hecks/grammar/expression.bluebook +3 -0
  435. data/lib/hecks/grammar/expression_operators.json +1071 -1
  436. data/lib/hecks/grammar/operators.rb +45 -22
  437. data/lib/hecks/grammar/translation.bluebook +2 -0
  438. data/lib/hecks/grammar/translation_ledger.rb +45 -0
  439. data/lib/hecks/grammar/translation_rules.json +646 -0
  440. data/lib/hecks/grammar.rb +27 -23
  441. data/lib/hecks/hecks/adapters/claude_agents.adapter +7 -0
  442. data/lib/hecks/hecks/adapters/claude_agents.rb +119 -0
  443. data/lib/hecks/hecks/adapters/claude_transcript.rb +71 -0
  444. data/lib/hecks/hecks/adapters/codebase/cache_clearing.rb +32 -0
  445. data/lib/hecks/hecks/adapters/codebase/cargo_tests.rb +50 -0
  446. data/lib/hecks/hecks/adapters/codebase/composing.rb +3 -2
  447. data/lib/hecks/hecks/adapters/codebase/conformance.rb +17 -1
  448. data/lib/hecks/hecks/adapters/codebase/corpus_tasks.rb +1 -1
  449. data/lib/hecks/hecks/adapters/codebase/declarations.rb +144 -0
  450. data/lib/hecks/hecks/adapters/codebase/inspection.rb +5 -4
  451. data/lib/hecks/hecks/adapters/codebase/language.rb +1 -0
  452. data/lib/hecks/hecks/adapters/codebase/npm_registry.rb +7 -1
  453. data/lib/hecks/hecks/adapters/codebase/previewing.rb +62 -0
  454. data/lib/hecks/hecks/adapters/codebase/promotion/gate.rb +1 -1
  455. data/lib/hecks/hecks/adapters/codebase/reading.rb +94 -0
  456. data/lib/hecks/hecks/adapters/codebase/regeneration.rb +6 -2
  457. data/lib/hecks/hecks/adapters/codebase/release_facts.rb +1 -1
  458. data/lib/hecks/hecks/adapters/codebase/ruby_child.rb +5 -2
  459. data/lib/hecks/hecks/adapters/codebase/search.rb +91 -0
  460. data/lib/hecks/hecks/adapters/codebase/source_tree.rb +37 -2
  461. data/lib/hecks/hecks/adapters/codebase/static_directory.rb +59 -0
  462. data/lib/hecks/hecks/adapters/codebase/style.rb +2 -2
  463. data/lib/hecks/hecks/adapters/codebase/test_runner.rb +30 -11
  464. data/lib/hecks/hecks/adapters/codebase/test_suite.rb +41 -3
  465. data/lib/hecks/hecks/adapters/console_capture.rb +27 -0
  466. data/lib/hecks/hecks/adapters/deploy_plans.rb +12 -3
  467. data/lib/hecks/hecks/adapters/deploy_toolchain/answers.rb +14 -5
  468. data/lib/hecks/hecks/adapters/deploy_toolchain/scripts.rb +6 -3
  469. data/lib/hecks/hecks/adapters/deploy_toolchain.rb +3 -3
  470. data/lib/hecks/hecks/adapters/desktop_alert/alert.rb +50 -0
  471. data/lib/hecks/hecks/adapters/desktop_alert.adapter +7 -0
  472. data/lib/hecks/hecks/adapters/desktop_alert.rb +99 -0
  473. data/lib/hecks/hecks/adapters/finding_github.rb +4 -1
  474. data/lib/hecks/hecks/adapters/first_admin.rb +19 -12
  475. data/lib/hecks/hecks/adapters/git.rb +5 -5
  476. data/lib/hecks/hecks/adapters/git_checkout.adapter +7 -0
  477. data/lib/hecks/hecks/adapters/git_checkout.rb +99 -0
  478. data/lib/hecks/hecks/adapters/git_landing/merger.rb +85 -0
  479. data/lib/hecks/hecks/adapters/git_landing.adapter +7 -0
  480. data/lib/hecks/hecks/adapters/git_landing.rb +103 -0
  481. data/lib/hecks/hecks/adapters/git_launcher.adapter +7 -0
  482. data/lib/hecks/hecks/adapters/git_launcher.rb +82 -0
  483. data/lib/hecks/hecks/adapters/git_refs.rb +8 -4
  484. data/lib/hecks/hecks/adapters/git_train/bench.rb +76 -0
  485. data/lib/hecks/hecks/adapters/git_train/carriage.rb +116 -0
  486. data/lib/hecks/hecks/adapters/git_train/local_branch.rb +69 -0
  487. data/lib/hecks/hecks/adapters/git_train/reading.rb +26 -0
  488. data/lib/hecks/hecks/adapters/git_train/survey.rb +60 -0
  489. data/lib/hecks/hecks/adapters/git_train.adapter +7 -0
  490. data/lib/hecks/hecks/adapters/git_train.rb +88 -0
  491. data/lib/hecks/hecks/adapters/git_worktrees.rb +81 -0
  492. data/lib/hecks/hecks/adapters/host_http.rb +5 -4
  493. data/lib/hecks/hecks/adapters/in_process_access.rb +3 -2
  494. data/lib/hecks/hecks/adapters/in_process_boot.rb +62 -35
  495. data/lib/hecks/hecks/adapters/in_process_operations.rb +30 -4
  496. data/lib/hecks/hecks/adapters/journal_store/changes.rb +7 -7
  497. data/lib/hecks/hecks/adapters/journal_store/compaction.rb +14 -7
  498. data/lib/hecks/hecks/adapters/journal_store/edge_audit.rb +9 -7
  499. data/lib/hecks/hecks/adapters/journal_store/examination.rb +3 -3
  500. data/lib/hecks/hecks/adapters/journal_store/held_domain.rb +17 -5
  501. data/lib/hecks/hecks/adapters/journal_store/readings/attestation.rb +3 -3
  502. data/lib/hecks/hecks/adapters/journal_store/readings/scaffolding.rb +7 -4
  503. data/lib/hecks/hecks/adapters/journal_store/readings.rb +2 -2
  504. data/lib/hecks/hecks/adapters/journal_store.rb +2 -2
  505. data/lib/hecks/hecks/adapters/ledger/chain.rb +63 -0
  506. data/lib/hecks/hecks/adapters/ledger/journal.rb +105 -0
  507. data/lib/hecks/hecks/adapters/ledger.adapter +7 -0
  508. data/lib/hecks/hecks/adapters/ledger.rb +89 -0
  509. data/lib/hecks/hecks/adapters/local_files.rb +15 -1
  510. data/lib/hecks/hecks/adapters/pg_admin.rb +7 -1
  511. data/lib/hecks/hecks/adapters/rails_app_files.rb +64 -0
  512. data/lib/hecks/hecks/adapters/rehearsal/audit_report.rb +4 -1
  513. data/lib/hecks/hecks/adapters/rehearsal/inquiry.rb +9 -9
  514. data/lib/hecks/hecks/adapters/rehearsal/memory_store.rb +2 -2
  515. data/lib/hecks/hecks/adapters/rehearsal/postgres_census.rb +4 -4
  516. data/lib/hecks/hecks/adapters/rehearsal/postgres_reading.rb +3 -3
  517. data/lib/hecks/hecks/adapters/rehearsal/postgres_store.rb +4 -1
  518. data/lib/hecks/hecks/adapters/rehearsal/rust_audit.rb +1 -1
  519. data/lib/hecks/hecks/adapters/rehearsal/subject.rb +34 -5
  520. data/lib/hecks/hecks/adapters/rust_toolchain.rb +5 -3
  521. data/lib/hecks/hecks/adapters/settings_reading.adapter +7 -0
  522. data/lib/hecks/hecks/adapters/settings_reading.rb +142 -0
  523. data/lib/hecks/hecks/adapters/shell.rb +3 -0
  524. data/lib/hecks/hecks/adapters/site_toolchain.rb +8 -8
  525. data/lib/hecks/hecks/adapters/world_clearing.rb +2 -1
  526. data/lib/hecks/hecks/agents.bluebook +246 -0
  527. data/lib/hecks/hecks/codebase.behaviors +13 -1
  528. data/lib/hecks/hecks/codebase.bluebook +554 -586
  529. data/lib/hecks/hecks/composer.behaviors +10 -10
  530. data/lib/hecks/hecks/context_map.hecksagon +7 -6
  531. data/lib/hecks/hecks/custodian.behaviors +96 -1
  532. data/lib/hecks/hecks/custodian.bluebook +553 -157
  533. data/lib/hecks/hecks/deploy.behaviors +1 -1
  534. data/lib/hecks/hecks/deploy.world +3 -4
  535. data/lib/hecks/hecks/hecks.behaviors +2 -2
  536. data/lib/hecks/hecks/hecks.bluebook +9 -14
  537. data/lib/hecks/hecks/hecks.contextmap +25 -0
  538. data/lib/hecks/hecks/hecks.hecksagon +139 -6
  539. data/lib/hecks/hecks/hecks.world +22 -21
  540. data/lib/hecks/hecks/ledger.bluebook +190 -0
  541. data/lib/hecks/hecks/rehearsal.bluebook +43 -77
  542. data/lib/hecks/hecks/shapes.json +17 -0
  543. data/lib/hecks/hecks/site.behaviors +1 -1
  544. data/lib/hecks/hecks/site.world +3 -3
  545. data/lib/hecks/hecks/tooling.bluebook +170 -174
  546. data/lib/hecks/hecks/translations/2-148748.bluebook +2 -0
  547. data/lib/hecks/hecks/translations/2-15a2e4.bluebook +2 -0
  548. data/lib/hecks/hecks/translations/2-1b447c.bluebook +5 -0
  549. data/lib/hecks/hecks/translations/2-240474.bluebook +2 -0
  550. data/lib/hecks/hecks/translations/2-44446d.bluebook +2 -0
  551. data/lib/hecks/hecks/translations/2-46ca26.bluebook +2 -0
  552. data/lib/hecks/hecks/translations/2-473eab.bluebook +2 -0
  553. data/lib/hecks/hecks/translations/2-75cc28.bluebook +2 -0
  554. data/lib/hecks/hecks/translations/2-781c07.bluebook +2 -0
  555. data/lib/hecks/hecks/translations/2-84c18b.bluebook +2 -0
  556. data/lib/hecks/hecks/translations/2-aa5fff.bluebook +2 -0
  557. data/lib/hecks/hecks/translations/2-bfdb48.bluebook +2 -0
  558. data/lib/hecks/hecks/translations/2-cd96d8.bluebook +10 -0
  559. data/lib/hecks/hecks/translations/2-d43f71.bluebook +2 -0
  560. data/lib/hecks/hecks/translations/2-eea577.bluebook +2 -0
  561. data/lib/hecks/hecks/translations/2-f53248.bluebook +2 -0
  562. data/lib/hecks/hecks/translations/2-fbb677.bluebook +2 -0
  563. data/lib/hecks/hecks/translations/2-ffdf12.bluebook +6 -0
  564. data/lib/hecks/ir.rb +8 -1
  565. data/lib/hecks/kernel_capabilities/templates.rb +4 -3
  566. data/lib/hecks/kernel_capabilities.rb +6 -6
  567. data/lib/hecks/language/adapter.bluebook +61 -0
  568. data/lib/hecks/language/bluebook/aggregate.bluebook +36 -6
  569. data/lib/hecks/language/bluebook/attaches/paging.bluebook +1 -1
  570. data/lib/hecks/language/bluebook/bluebook.behaviors +6 -6
  571. data/lib/hecks/language/bluebook/bluebook.bluebook +28 -51
  572. data/lib/hecks/language/bluebook/bluebook.hecksagon +1 -1
  573. data/lib/hecks/language/bluebook/command.bluebook +34 -2
  574. data/lib/hecks/language/bluebook/entity.bluebook +2 -2
  575. data/lib/hecks/language/bluebook/policy.behaviors +2 -2
  576. data/lib/hecks/language/bluebook/policy.bluebook +3 -3
  577. data/lib/hecks/language/bluebook/process_manager.bluebook +3 -3
  578. data/lib/hecks/language/bluebook/projection.bluebook +11 -10
  579. data/lib/hecks/language/bluebook/query.bluebook +1 -0
  580. data/lib/hecks/language/bluebook/shape.bluebook +1 -1
  581. data/lib/hecks/language/bluebook/syntax.bluebook +3 -1
  582. data/lib/hecks/language/bluebook/vocabulary.bluebook +287 -6
  583. data/lib/hecks/language/context_map/context_map.bluebook +90 -0
  584. data/lib/hecks/language/hecksagon/domain_port.bluebook +2 -2
  585. data/lib/hecks/language/hecksagon/hecksagon.bluebook +8 -8
  586. data/lib/hecks/language/oidc.json +10 -0
  587. data/lib/hecks/language/port.bluebook +1 -1
  588. data/lib/hecks/language/sentence/sentence.bluebook +210 -0
  589. data/lib/hecks/language/world/world.bluebook +6 -6
  590. data/lib/hecks/literal.rb +8 -2
  591. data/lib/hecks/naming.rb +44 -14
  592. data/lib/hecks/persistence_legacy_fixture/postgres_stores.rb +7 -6
  593. data/lib/hecks/persistence_legacy_fixture/regenerate.rb +6 -2
  594. data/lib/hecks/ports/access_control.rb +2 -2
  595. data/lib/hecks/ports/agent/answers.rb +2 -2
  596. data/lib/hecks/ports/agent.rb +2 -2
  597. data/lib/hecks/ports/authentication.port +6 -0
  598. data/lib/hecks/ports/authentication.rb +67 -0
  599. data/lib/hecks/ports/authorization.rb +3 -3
  600. data/lib/hecks/ports/dispatch.port +5 -0
  601. data/lib/hecks/ports/dispatch.rb +28 -0
  602. data/lib/hecks/ports/key_vault.rb +9 -6
  603. data/lib/hecks/ports/loading.rb +23 -7
  604. data/lib/hecks/ports/persistence/append_only.rb +18 -1
  605. data/lib/hecks/ports/persistence/binding_policy.rb +70 -11
  606. data/lib/hecks/ports/persistence/codec_boundary.rb +3 -2
  607. data/lib/hecks/ports/persistence/plugins/era/era_check.rb +10 -10
  608. data/lib/hecks/ports/persistence/plugins/era/era_guard/shape_diff.rb +4 -5
  609. data/lib/hecks/ports/persistence/plugins/era/era_guard.rb +11 -11
  610. data/lib/hecks/ports/persistence/plugins/era/era_tamper.rb +1 -1
  611. data/lib/hecks/ports/persistence/plugins/era/storage_shape.rb +6 -6
  612. data/lib/hecks/ports/persistence/plugins/era/translation/audit.rb +9 -3
  613. data/lib/hecks/ports/persistence/plugins/era/translation/reattest.rb +1 -1
  614. data/lib/hecks/ports/persistence/plugins/era/translation/rule_compiler.rb +32 -19
  615. data/lib/hecks/ports/persistence/plugins/era/translation/scaffold/differ.rb +2 -2
  616. data/lib/hecks/ports/persistence/plugins/era.rb +0 -1
  617. data/lib/hecks/ports/persistence/remote_runtime.rb +3 -2
  618. data/lib/hecks/ports/persistence/set_statement.rb +29 -0
  619. data/lib/hecks/ports/persistence/set_transforming.rb +30 -0
  620. data/lib/hecks/ports/persistence/state_codec.rb +3 -3
  621. data/lib/hecks/ports/persistence.rb +0 -4
  622. data/lib/hecks/ports/projection.rb +4 -1
  623. data/lib/hecks/ports/query/cursor.rb +131 -0
  624. data/lib/hecks/ports/query/in_memory.rb +17 -10
  625. data/lib/hecks/ports/query.rb +4 -2
  626. data/lib/hecks/ports.rb +1 -0
  627. data/lib/hecks/projection_files/expression_tables.rb +3 -3
  628. data/lib/hecks/projection_files/sentence_table.rb +17 -0
  629. data/lib/hecks/projection_files.rb +16 -13
  630. data/lib/hecks/projections/bootstrap_table.rb +3 -3
  631. data/lib/hecks/projections/command_schema/shape.rb +95 -0
  632. data/lib/hecks/projections/command_schema.rb +74 -0
  633. data/lib/hecks/projections/context_map_diagram.rb +135 -0
  634. data/lib/hecks/projections/context_relationships.rb +125 -0
  635. data/lib/hecks/projections/deploy/box/access.rb +7 -4
  636. data/lib/hecks/projections/deploy/box/caddy.rb +2 -1
  637. data/lib/hecks/projections/deploy/box/compose.rb +4 -8
  638. data/lib/hecks/projections/deploy/box/edge.rb +2 -1
  639. data/lib/hecks/projections/deploy/box/hosting.rb +4 -2
  640. data/lib/hecks/projections/deploy/box/hosting_parts.rb +27 -12
  641. data/lib/hecks/projections/deploy/box/logging.rb +2 -3
  642. data/lib/hecks/projections/deploy/box/roll_recipe.rb +1 -3
  643. data/lib/hecks/projections/deploy/box/roll_scripts.rb +1 -16
  644. data/lib/hecks/projections/deploy/box/settings/containers.rb +29 -15
  645. data/lib/hecks/projections/deploy/box/settings/patterns.rb +5 -6
  646. data/lib/hecks/projections/deploy/box/settings/types.rb +5 -10
  647. data/lib/hecks/projections/deploy/box/settings.rb +9 -8
  648. data/lib/hecks/projections/deploy/box/stack_yaml.rb +10 -14
  649. data/lib/hecks/projections/deploy/box/templates/box.yaml.tmpl +0 -1
  650. data/lib/hecks/projections/deploy/box/templates/deploy-service.sh.tmpl +16 -3
  651. data/lib/hecks/projections/deploy/box/templates/hosting.mk.tmpl +7 -6
  652. data/lib/hecks/projections/deploy/box/templates/render-compose-taskdef.sh.tmpl +2 -6
  653. data/lib/hecks/projections/deploy/box/templates/render-compose.sh.tmpl +2 -6
  654. data/lib/hecks/projections/deploy/box.rb +16 -9
  655. data/lib/hecks/projections/deploy/fargate/assembly.rb +7 -2
  656. data/lib/hecks/projections/deploy/fargate/cdn/options.rb +4 -1
  657. data/lib/hecks/projections/deploy/fargate/check.rb +3 -1
  658. data/lib/hecks/projections/deploy/fargate/containers/rendering.rb +8 -5
  659. data/lib/hecks/projections/deploy/fargate/containers/routing.rb +2 -1
  660. data/lib/hecks/projections/deploy/fargate/monitoring/reading.rb +4 -1
  661. data/lib/hecks/projections/deploy/fargate/sections.rb +7 -4
  662. data/lib/hecks/projections/deploy/fargate/settings/ids.rb +4 -1
  663. data/lib/hecks/projections/deploy/fargate/settings/tuning.rb +13 -4
  664. data/lib/hecks/projections/deploy/fargate/stack/blocks.rb +6 -1
  665. data/lib/hecks/projections/deploy/fargate/stack/readers.rb +2 -1
  666. data/lib/hecks/projections/deploy/fargate/stack.rb +11 -6
  667. data/lib/hecks/projections/deploy/fargate/yaml.rb +10 -3
  668. data/lib/hecks/projections/deploy/fargate.rb +8 -3
  669. data/lib/hecks/projections/deploy/lambda/stack/blocks.rb +4 -2
  670. data/lib/hecks/projections/deploy/lambda/stack/deploy_chain.rb +2 -1
  671. data/lib/hecks/projections/deploy/lambda/stack/reading.rb +12 -9
  672. data/lib/hecks/projections/deploy/lambda/stack/reading_web.rb +7 -2
  673. data/lib/hecks/projections/deploy/lambda/stack/web.rb +2 -1
  674. data/lib/hecks/projections/deploy/lambda.rb +8 -3
  675. data/lib/hecks/projections/deploy/preview/containers.rb +14 -1
  676. data/lib/hecks/projections/deploy/preview/preview.sh.erb +2 -2
  677. data/lib/hecks/projections/deploy/preview/routing_yaml.rb +8 -6
  678. data/lib/hecks/projections/deploy/preview/settings.rb +23 -5
  679. data/lib/hecks/projections/deploy/preview/task_yaml.rb +1 -1
  680. data/lib/hecks/projections/deploy/preview/yaml_text.rb +2 -1
  681. data/lib/hecks/projections/deploy/scripts/settings.rb +5 -2
  682. data/lib/hecks/projections/deploy/shared.rb +12 -1
  683. data/lib/hecks/projections/deploy/shared_database_instance.rb +1 -1
  684. data/lib/hecks/projections/deploy/smoke.rb +3 -1
  685. data/lib/hecks/projections/deploy/template_diff/normalizer.rb +4 -1
  686. data/lib/hecks/projections/deploy/templates/lambda/mint_era_shared.tmpl +2 -2
  687. data/lib/hecks/projections/deploy/templates/lambda/nat_comment_oauth.tmpl +1 -1
  688. data/lib/hecks/projections/deploy/vercel.rb +1 -1
  689. data/lib/hecks/projections/diagrams/dispatch.rb +5 -3
  690. data/lib/hecks/projections/diagrams/statecharts.rb +8 -3
  691. data/lib/hecks/projections/diagrams/structure.rb +9 -6
  692. data/lib/hecks/projections/diagrams.rb +9 -7
  693. data/lib/hecks/projections/glossary/entries.rb +4 -4
  694. data/lib/hecks/projections/glossary/html/page.rb +4 -1
  695. data/lib/hecks/projections/glossary/html/parser.rb +13 -4
  696. data/lib/hecks/projections/glossary/html/sections.rb +4 -1
  697. data/lib/hecks/projections/glossary/html.rb +10 -3
  698. data/lib/hecks/projections/glossary/markdown.rb +4 -3
  699. data/lib/hecks/projections/glossary/mermaid.rb +8 -5
  700. data/lib/hecks/projections/glossary/sections.rb +1 -1
  701. data/lib/hecks/projections/glossary/sensitivity.rb +11 -4
  702. data/lib/hecks/projections/glossary/sentences/actions.rb +5 -2
  703. data/lib/hecks/projections/glossary/sentences/queries.rb +2 -1
  704. data/lib/hecks/projections/glossary/sentences/value_objects.rb +15 -6
  705. data/lib/hecks/projections/glossary/sentences.rb +6 -3
  706. data/lib/hecks/projections/glossary/slugs.rb +8 -1
  707. data/lib/hecks/projections/glossary.rb +3 -3
  708. data/lib/hecks/projections/model.rb +10 -6
  709. data/lib/hecks/projections/oidc.rb +19 -7
  710. data/lib/hecks/projections/parser_table.rb +10 -10
  711. data/lib/hecks/projections/phrase_table.rb +105 -0
  712. data/lib/hecks/projections/plain_english.rb +14 -4
  713. data/lib/hecks/projections/rails_app.rb +77 -0
  714. data/lib/hecks/projections/reference.rb +2 -2
  715. data/lib/hecks/projections/rust_vocabulary/arguments.rb +1 -1
  716. data/lib/hecks/projections/rust_vocabulary/tables.rb +20 -0
  717. data/lib/hecks/projections/rust_vocabulary.rb +14 -17
  718. data/lib/hecks/projections/site/admin.rb +7 -7
  719. data/lib/hecks/projections/site/admin_cms.rb +1 -1
  720. data/lib/hecks/projections/site/cms_editor/blocks.rb +5 -2
  721. data/lib/hecks/projections/site/cms_editor/checks.rb +9 -6
  722. data/lib/hecks/projections/site/cms_editor/color.rb +4 -1
  723. data/lib/hecks/projections/site/cms_editor/composition.rb +20 -18
  724. data/lib/hecks/projections/site/cms_editor/destructive.rb +4 -1
  725. data/lib/hecks/projections/site/cms_editor/drafts.rb +6 -2
  726. data/lib/hecks/projections/site/cms_editor/key_kinds.rb +4 -1
  727. data/lib/hecks/projections/site/cms_editor/limits.rb +1 -1
  728. data/lib/hecks/projections/site/cms_editor/media.rb +1 -1
  729. data/lib/hecks/projections/site/cms_editor/moment.rb +3 -1
  730. data/lib/hecks/projections/site/cms_editor/pickers.rb +1 -1
  731. data/lib/hecks/projections/site/cms_editor/preview.rb +10 -4
  732. data/lib/hecks/projections/site/cms_editor/relations.rb +3 -2
  733. data/lib/hecks/projections/site/cms_editor/scale_checks.rb +32 -25
  734. data/lib/hecks/projections/site/cms_editor/scheduling.rb +1 -1
  735. data/lib/hecks/projections/site/cms_editor/schema.rb +31 -29
  736. data/lib/hecks/projections/site/cms_editor/setting.rb +34 -27
  737. data/lib/hecks/projections/site/cms_editor/targets.rb +9 -6
  738. data/lib/hecks/projections/site/cms_editor/templates/src/app.ts.tmpl +3 -3
  739. data/lib/hecks/projections/site/cms_editor/templates/src/commands.ts.tmpl +2 -2
  740. data/lib/hecks/projections/site/cms_editor/templates/src/host.ts.tmpl +8 -3
  741. data/lib/hecks/projections/site/cms_editor/templates/src/media/handler.ts.tmpl +4 -4
  742. data/lib/hecks/projections/site/cms_editor/templates/src/names.ts.tmpl +14 -14
  743. data/lib/hecks/projections/site/cms_editor/templates/src/schema.ts.tmpl +12 -12
  744. data/lib/hecks/projections/site/cms_editor/templates/src/ui/pages.ts.tmpl +12 -12
  745. data/lib/hecks/projections/site/cms_editor/templates/src/ui/pickers.ts.tmpl +1 -1
  746. data/lib/hecks/projections/site/cms_editor/templates/src/ui/schedule.ts.tmpl +2 -2
  747. data/lib/hecks/projections/site/cms_editor/templates/src/ui/shell.ts.tmpl +11 -11
  748. data/lib/hecks/projections/site/cms_editor/templates/src/ui/world.ts.tmpl +3 -3
  749. data/lib/hecks/projections/site/cms_editor/theme_checks.rb +8 -2
  750. data/lib/hecks/projections/site/cms_editor.rb +19 -16
  751. data/lib/hecks/projections/site/edge/checks.rb +1 -1
  752. data/lib/hecks/projections/site/edge/function_checks.rb +1 -1
  753. data/lib/hecks/projections/site/edge/function_code.rb +4 -1
  754. data/lib/hecks/projections/site/edge/pattern.rb +4 -1
  755. data/lib/hecks/projections/site/edge/route_checks.rb +2 -2
  756. data/lib/hecks/projections/site/edge/rules.rb +1 -1
  757. data/lib/hecks/projections/site/edge.rb +14 -8
  758. data/lib/hecks/projections/site/live_edge.rb +2 -2
  759. data/lib/hecks/projections/site/payload/fields/definitions.rb +1 -1
  760. data/lib/hecks/projections/site/payload/lifecycle/text.rb +1 -1
  761. data/lib/hecks/projections/site/payload/model.rb +16 -12
  762. data/lib/hecks/projections/site/payload/specs.rb +4 -2
  763. data/lib/hecks/projections/site/payload_driver.rb +9 -8
  764. data/lib/hecks/projections/site/probe.rb +12 -3
  765. data/lib/hecks/projections/site/regions.rb +9 -1
  766. data/lib/hecks/projections/site/role_probe.rb +7 -7
  767. data/lib/hecks/projections/site/root_rows.rb +4 -4
  768. data/lib/hecks/projections/site/routes_ts/listings.rb +13 -6
  769. data/lib/hecks/projections/site/routes_ts.rb +6 -3
  770. data/lib/hecks/projections/site/site_admin.rb +1 -1
  771. data/lib/hecks/projections/site/site_cdn.rb +3 -2
  772. data/lib/hecks/projections/site/site_host.rb +1 -1
  773. data/lib/hecks/projections/site/site_root.rb +4 -4
  774. data/lib/hecks/projections/site/table/checks.rb +4 -1
  775. data/lib/hecks/projections/site/table/navigation_checks.rb +2 -2
  776. data/lib/hecks/projections/site/table/row_builder.rb +7 -7
  777. data/lib/hecks/projections/site/table/row_defaults.rb +1 -1
  778. data/lib/hecks/projections/site/table.rb +32 -26
  779. data/lib/hecks/projections/statements/actions.rb +4 -1
  780. data/lib/hecks/projections/statements/relationships.rb +15 -2
  781. data/lib/hecks/projections/statements.rb +2 -2
  782. data/lib/hecks/projections/vocabulary.rb +6 -6
  783. data/lib/hecks/projections/world_skeleton.rb +68 -0
  784. data/lib/hecks/projections.rb +5 -0
  785. data/lib/hecks/projector/cli_audience.rb +12 -9
  786. data/lib/hecks/projector/cli_projector/claims.rb +8 -8
  787. data/lib/hecks/projector/cli_projector/command_specs.rb +9 -5
  788. data/lib/hecks/projector/cli_projector/listing.rb +20 -8
  789. data/lib/hecks/projector/cli_projector/option_specs.rb +1 -1
  790. data/lib/hecks/projector/cli_projector/query_specs.rb +1 -1
  791. data/lib/hecks/projector/cli_projector/usage.rb +12 -8
  792. data/lib/hecks/projector/cli_projector.rb +2 -2
  793. data/lib/hecks/projector/docs_projector/behaviour.rb +5 -4
  794. data/lib/hecks/projector/docs_projector/closing.rb +3 -3
  795. data/lib/hecks/projector/docs_projector.rb +12 -7
  796. data/lib/hecks/projector/exporter/adapters.rb +15 -2
  797. data/lib/hecks/projector/exporter/bindings.rb +39 -134
  798. data/lib/hecks/projector/exporter/plugins.rb +55 -0
  799. data/lib/hecks/projector/exporter.rb +2 -0
  800. data/lib/hecks/projector/narrate_projector/commands.rb +4 -3
  801. data/lib/hecks/projector/narrate_projector/reactions.rb +2 -2
  802. data/lib/hecks/projector/narrate_projector.rb +9 -8
  803. data/lib/hecks/projector/target.rb +8 -8
  804. data/lib/hecks/projector.rb +9 -9
  805. data/lib/hecks/quality_control/adapters/agent.rb +2 -1
  806. data/lib/hecks/quality_control/adapters/github_checks.adapter +1 -1
  807. data/lib/hecks/quality_control/adapters/github_issues.adapter +1 -1
  808. data/lib/hecks/quality_control/adapters/github_issues.rb +6 -2
  809. data/lib/hecks/quality_control/adapters/target_tools.rb +9 -3
  810. data/lib/hecks/quality_control/cli/child.rb +1 -0
  811. data/lib/hecks/quality_control/cli/qa_domain_novelty/verdict.rb +1 -1
  812. data/lib/hecks/quality_control/cli/qa_generated_domains/evaluation.rb +12 -2
  813. data/lib/hecks/quality_control/cli/qa_generated_domains/promotion.rb +4 -1
  814. data/lib/hecks/quality_control/cli/qa_generated_domains.rb +4 -1
  815. data/lib/hecks/quality_control/cli/qa_log_bug/proof.rb +16 -3
  816. data/lib/hecks/quality_control/cli/qa_mine_combinations/booting.rb +4 -2
  817. data/lib/hecks/quality_control/cli/qa_mutate.rb +161 -0
  818. data/lib/hecks/quality_control/cli/qa_sweep/all_mode/report.rb +4 -1
  819. data/lib/hecks/quality_control/cli/qa_sweep/parsing.rb +2 -1
  820. data/lib/hecks/quality_control/cli/qa_sweep.rb +4 -1
  821. data/lib/hecks/quality_control/cli/qa_tick/output.rb +28 -26
  822. data/lib/hecks/quality_control/cli/qa_tick/preflight.rb +12 -3
  823. data/lib/hecks/quality_control/cli/qa_tick.rb +24 -8
  824. data/lib/hecks/quality_control/quality_control.bluebook +93 -92
  825. data/lib/hecks/quality_control/quality_control.hecksagon +3 -3
  826. data/lib/hecks/quality_control/quality_control.ports.hecksagon +3 -2
  827. data/lib/hecks/query_ir/rules.rb +9 -9
  828. data/lib/hecks/query_ir/touchpoints.rb +5 -2
  829. data/lib/hecks/query_ir.rb +3 -3
  830. data/lib/hecks/query_specification/common/comparison.rb +1 -1
  831. data/lib/hecks/query_specification/common/dsl.rb +3 -4
  832. data/lib/hecks/query_specification/hop_path.rb +7 -4
  833. data/lib/hecks/rails_app/bluebook/rails_app.bluebook +60 -0
  834. data/lib/hecks/rails_app/bluebook/rails_app.hecksagon +4 -0
  835. data/lib/hecks/refused.rb +104 -0
  836. data/lib/hecks/release/approval.rb +9 -2
  837. data/lib/hecks/release/gem_pin.rb +7 -3
  838. data/lib/hecks/release/lane.rb +1 -1
  839. data/lib/hecks/release/runner/clean_tree.rb +4 -1
  840. data/lib/hecks/release/runner/console.rb +2 -1
  841. data/lib/hecks/router/aggregate_reader.rb +3 -4
  842. data/lib/hecks/router/namespace_installer.rb +31 -17
  843. data/lib/hecks/router.rb +2 -10
  844. data/lib/hecks/runtime/adapter_lookup.rb +30 -7
  845. data/lib/hecks/runtime/adapter_namespace.rb +21 -0
  846. data/lib/hecks/runtime/asking.rb +30 -0
  847. data/lib/hecks/runtime/caller.rb +22 -0
  848. data/lib/hecks/runtime/capability_graph.rb +2 -1
  849. data/lib/hecks/runtime/collecting.rb +86 -0
  850. data/lib/hecks/runtime/command_interpreter/argument_gate.rb +13 -8
  851. data/lib/hecks/runtime/command_interpreter/delegation.rb +46 -17
  852. data/lib/hecks/runtime/command_interpreter/hydration.rb +17 -21
  853. data/lib/hecks/runtime/command_interpreter/list_mutations.rb +2 -1
  854. data/lib/hecks/runtime/command_interpreter/persisting.rb +13 -12
  855. data/lib/hecks/runtime/command_interpreter.rb +17 -10
  856. data/lib/hecks/runtime/command_rules/admissibility.rb +17 -10
  857. data/lib/hecks/runtime/command_rules/authorization.rb +8 -6
  858. data/lib/hecks/runtime/command_rules/guard_state.rb +10 -10
  859. data/lib/hecks/runtime/command_rules/invariants.rb +3 -1
  860. data/lib/hecks/runtime/command_rules/missing_reference.rb +25 -0
  861. data/lib/hecks/runtime/command_rules/one_of_references.rb +44 -0
  862. data/lib/hecks/runtime/command_rules/references.rb +14 -14
  863. data/lib/hecks/runtime/command_rules.rb +2 -0
  864. data/lib/hecks/runtime/declarations.rb +66 -0
  865. data/lib/hecks/runtime/dependency_planning/analyzer.rb +2 -1
  866. data/lib/hecks/runtime/dependency_planning/expression_reads.rb +3 -2
  867. data/lib/hecks/runtime/dependency_planning/mutation_analysis.rb +2 -1
  868. data/lib/hecks/runtime/dispatch_claim.rb +72 -0
  869. data/lib/hecks/runtime/dispatch_context.rb +41 -0
  870. data/lib/hecks/runtime/dispatcher/queries.rb +17 -0
  871. data/lib/hecks/runtime/dispatcher/routing.rb +34 -12
  872. data/lib/hecks/runtime/dispatcher/validating.rb +73 -0
  873. data/lib/hecks/runtime/dispatcher.rb +39 -23
  874. data/lib/hecks/runtime/entity_element/location.rb +15 -7
  875. data/lib/hecks/runtime/entity_element/mutations.rb +4 -1
  876. data/lib/hecks/runtime/entity_interpreter/enforcement.rb +1 -1
  877. data/lib/hecks/runtime/entity_interpreter/locating.rb +1 -1
  878. data/lib/hecks/runtime/entity_interpreter/saving.rb +5 -5
  879. data/lib/hecks/runtime/entity_interpreter.rb +11 -4
  880. data/lib/hecks/runtime/errors.rb +30 -17
  881. data/lib/hecks/runtime/identity.rb +9 -0
  882. data/lib/hecks/runtime/instance.rb +3 -2
  883. data/lib/hecks/runtime/interpreting.rb +63 -6
  884. data/lib/hecks/runtime/invocation_builder.rb +7 -4
  885. data/lib/hecks/runtime/invocation_facts.rb +13 -8
  886. data/lib/hecks/runtime/loader/boot_steps.rb +3 -2
  887. data/lib/hecks/runtime/loader/described.rb +4 -0
  888. data/lib/hecks/runtime/loader.rb +52 -62
  889. data/lib/hecks/runtime/outbox/redrive.rb +105 -0
  890. data/lib/hecks/runtime/outbox/relay.rb +11 -39
  891. data/lib/hecks/runtime/outbox/runnable.rb +60 -0
  892. data/lib/hecks/runtime/outbox.rb +15 -1
  893. data/lib/hecks/runtime/policy_interpreter/arguments.rb +7 -1
  894. data/lib/hecks/runtime/policy_interpreter/fan_out.rb +8 -35
  895. data/lib/hecks/runtime/policy_interpreter.rb +8 -0
  896. data/lib/hecks/runtime/port_operation_interpreter.rb +27 -13
  897. data/lib/hecks/runtime/query_interpreter/outside_answer.rb +1 -1
  898. data/lib/hecks/runtime/query_interpreter/paging.rb +42 -0
  899. data/lib/hecks/runtime/query_interpreter/plugin_answer.rb +54 -0
  900. data/lib/hecks/runtime/query_interpreter/store_specification.rb +32 -0
  901. data/lib/hecks/runtime/query_interpreter.rb +16 -9
  902. data/lib/hecks/runtime/reaction_invocation/target_resolution.rb +10 -4
  903. data/lib/hecks/runtime/reaction_invocation.rb +5 -2
  904. data/lib/hecks/runtime/read_model_interpreter/head_ordering.rb +1 -1
  905. data/lib/hecks/runtime/read_model_interpreter/reductions.rb +23 -15
  906. data/lib/hecks/runtime/read_model_interpreter/shaping.rb +18 -7
  907. data/lib/hecks/runtime/read_model_interpreter.rb +5 -2
  908. data/lib/hecks/runtime/reference_hop.rb +3 -2
  909. data/lib/hecks/runtime/refusal_wording.rb +15 -6
  910. data/lib/hecks/runtime/registry/adapter_capabilities.rb +43 -0
  911. data/lib/hecks/runtime/registry/ask_verification.rb +15 -4
  912. data/lib/hecks/runtime/registry/{chapter_verification.rb → bluebook_verification.rb} +23 -23
  913. data/lib/hecks/runtime/registry/context_maps.rb +30 -0
  914. data/lib/hecks/runtime/registry/declarations.rb +8 -6
  915. data/lib/hecks/runtime/registry/durability_warnings.rb +18 -2
  916. data/lib/hecks/runtime/registry/hecksagon_rules.rb +27 -24
  917. data/lib/hecks/runtime/registry/plugin_query_verification.rb +45 -0
  918. data/lib/hecks/runtime/registry/providers.rb +34 -99
  919. data/lib/hecks/runtime/registry/query_verification.rb +30 -21
  920. data/lib/hecks/runtime/registry/runtime_state.rb +4 -3
  921. data/lib/hecks/runtime/registry/saga_persistence.rb +7 -16
  922. data/lib/hecks/runtime/registry/verification.rb +9 -5
  923. data/lib/hecks/runtime/registry/world_defaults.rb +8 -5
  924. data/lib/hecks/runtime/registry.rb +52 -27
  925. data/lib/hecks/runtime/row_sweep.rb +104 -0
  926. data/lib/hecks/runtime/saga_interpreter/compensation.rb +5 -4
  927. data/lib/hecks/runtime/saga_interpreter/delivery.rb +13 -10
  928. data/lib/hecks/runtime/saga_interpreter/redrive.rb +141 -0
  929. data/lib/hecks/runtime/saga_interpreter/transitions.rb +35 -6
  930. data/lib/hecks/runtime/saga_interpreter.rb +36 -4
  931. data/lib/hecks/runtime/saga_pending_dispatch.rb +4 -2
  932. data/lib/hecks/runtime/scalar_field.rb +73 -0
  933. data/lib/hecks/runtime/tenant_scope.rb +2 -1
  934. data/lib/hecks/runtime/validation.rb +24 -0
  935. data/lib/hecks/runtime/value/admission.rb +11 -11
  936. data/lib/hecks/runtime/value/coercion.rb +7 -7
  937. data/lib/hecks/runtime/value/field_checks.rb +13 -13
  938. data/lib/hecks/runtime/value/invariant_violation.rb +4 -1
  939. data/lib/hecks/runtime/value/references.rb +7 -4
  940. data/lib/hecks/runtime/value/unwrapping.rb +60 -0
  941. data/lib/hecks/runtime/value/validation.rb +7 -4
  942. data/lib/hecks/runtime/value.rb +3 -27
  943. data/lib/hecks/runtime/wasm_plugin.rb +98 -0
  944. data/lib/hecks/runtime.rb +14 -14
  945. data/lib/hecks/rust_build/command_schemas.rb +27 -0
  946. data/lib/hecks/rust_build/conformance/surface.rb +50 -7
  947. data/lib/hecks/rust_build/conformance.rb +25 -3
  948. data/lib/hecks/rust_build/conformance_fuzz.rb +2 -2
  949. data/lib/hecks/rust_build/domain_name.rb +4 -1
  950. data/lib/hecks/rust_build/host.rb +15 -9
  951. data/lib/hecks/rust_build/native_build.rb +2 -1
  952. data/lib/hecks/rust_build/prebuilt_binary.rb +25 -5
  953. data/lib/hecks/rust_build/project_rust/codegen_run.rb +11 -10
  954. data/lib/hecks/rust_build/project_rust/domain_loader.rb +15 -2
  955. data/lib/hecks/rust_build/project_rust/root_mod/notes.rb +1 -1
  956. data/lib/hecks/rust_build/project_rust/target_ir.rb +12 -3
  957. data/lib/hecks/rust_build/project_rust.rb +39 -19
  958. data/lib/hecks/rust_build/target_dir.rb +40 -0
  959. data/lib/hecks/rust_build/wasm.rb +46 -17
  960. data/lib/hecks/rust_build/wasm_browser.rb +8 -2
  961. data/lib/hecks/rust_build.rb +29 -2
  962. data/lib/hecks/sentence_form.rb +212 -0
  963. data/lib/hecks/served_options.rb +2 -1
  964. data/lib/hecks/shape_ledger.rb +149 -0
  965. data/lib/hecks/site/bluebook/site.bluebook +39 -62
  966. data/lib/hecks/site/bluebook/site.ports.hecksagon +1 -1
  967. data/lib/hecks/sme/bluebook/sme.bluebook +7 -1
  968. data/lib/hecks/storehouse/audit.rb +4 -1
  969. data/lib/hecks/storehouse/bluebook_words.rb +35 -0
  970. data/lib/hecks/storehouse/dispatching.rb +6 -3
  971. data/lib/hecks/storehouse/introspection.rb +4 -4
  972. data/lib/hecks/storehouse/querying.rb +2 -2
  973. data/lib/hecks/storehouse.rb +14 -4
  974. data/lib/hecks/switches.rb +21 -0
  975. data/lib/hecks/tenancy/bluebook/tenancy.bluebook +5 -9
  976. data/lib/hecks/text.rb +57 -0
  977. data/lib/hecks/tickets/bluebook/tickets.bluebook +30 -51
  978. data/lib/hecks/tickets/bluebook/tickets.hecksagon +1 -1
  979. data/lib/hecks/tickets/bluebook/tickets.ports.hecksagon +1 -1
  980. data/lib/hecks/tools/argument_gate_matrix/dispatching.rb +1 -1
  981. data/lib/hecks/tools/argument_gate_matrix/rows.rb +7 -7
  982. data/lib/hecks/tools/argument_gate_matrix/violations.rb +1 -1
  983. data/lib/hecks/tools/argument_gate_matrix.rb +3 -3
  984. data/lib/hecks/tools/ci_gate_decision.rb +5 -2
  985. data/lib/hecks/tools/ci_gates.rb +1 -1
  986. data/lib/hecks/tools/comment_style/caps_words.rb +11 -8
  987. data/lib/hecks/tools/comment_style/dictionary.rb +7 -2
  988. data/lib/hecks/tools/comment_style/fixing.rb +10 -5
  989. data/lib/hecks/tools/comment_style/long_blocks.rb +1 -1
  990. data/lib/hecks/tools/comment_style/masking.rb +5 -5
  991. data/lib/hecks/tools/comment_style/run.rb +4 -1
  992. data/lib/hecks/tools/comment_style/source_file.rb +10 -3
  993. data/lib/hecks/tools/comment_style/structure_checks.rb +13 -4
  994. data/lib/hecks/tools/comment_style/text_checks.rb +1 -1
  995. data/lib/hecks/tools/comment_style.rb +25 -2
  996. data/lib/hecks/tools/deploy_recipe/generation.rb +1 -1
  997. data/lib/hecks/tools/deploy_recipe/targets.rb +1 -1
  998. data/lib/hecks/tools/deploy_recipe/worlds.rb +15 -9
  999. data/lib/hecks/tools/deploy_recipe.rb +17 -10
  1000. data/lib/hecks/tools/deploy_recipe_lint/fixtures.rb +1 -1
  1001. data/lib/hecks/tools/deploy_recipe_lint/makefile.rb +7 -1
  1002. data/lib/hecks/tools/drop_implicit_append_fields.rb +4 -1
  1003. data/lib/hecks/tools/era_projection_backfill.rb +11 -6
  1004. data/lib/hecks/tools/era_reattest.rb +11 -6
  1005. data/lib/hecks/tools/fuzz_sweep/findings.rb +18 -2
  1006. data/lib/hecks/tools/fuzz_sweep/options.rb +5 -1
  1007. data/lib/hecks/tools/fuzz_sweep.rb +17 -5
  1008. data/lib/hecks/tools/gate.rb +27 -5
  1009. data/lib/hecks/tools/hoist_local_givens/rewriting.rb +3 -2
  1010. data/lib/hecks/tools/hoist_local_givens.rb +2 -4
  1011. data/lib/hecks/tools/lanes/prebuilt_workflow.rb +1 -1
  1012. data/lib/hecks/tools/lanes/rows.rb +9 -3
  1013. data/lib/hecks/tools/lanes/ruleset.rb +1 -1
  1014. data/lib/hecks/tools/lanes/watch_workflow.rb +1 -1
  1015. data/lib/hecks/tools/lanes/workflow.rb +1 -1
  1016. data/lib/hecks/tools/lanes.rb +1 -1
  1017. data/lib/hecks/tools/oidc_manifests.rb +16 -19
  1018. data/lib/hecks/tools/regeneration_run.rb +22 -17
  1019. data/lib/hecks/tools/release_only.rb +5 -2
  1020. data/lib/hecks/tools/rust_comment_style/caps_words.rb +5 -5
  1021. data/lib/hecks/tools/rust_comment_style/fixing.rb +1 -1
  1022. data/lib/hecks/tools/rust_comment_style/masking.rb +7 -4
  1023. data/lib/hecks/tools/rust_comment_style/source_file.rb +7 -2
  1024. data/lib/hecks/tools/rust_comment_style/text_checks.rb +1 -1
  1025. data/lib/hecks/tools/rust_comment_style/tokenizer.rb +4 -1
  1026. data/lib/hecks/tools/site_routes/editor_files.rb +16 -13
  1027. data/lib/hecks/tools/site_routes/root_files.rb +14 -13
  1028. data/lib/hecks/tools/site_routes/templates.rb +5 -4
  1029. data/lib/hecks/tools/site_routes.rb +18 -15
  1030. data/lib/hecks/tools/tail_merge.rb +3 -3
  1031. data/lib/hecks/tools/tenant_provisioning.rb +6 -6
  1032. data/lib/hecks/tools/tools_doc.rb +16 -16
  1033. data/lib/hecks/tools/translation_audit/domain_loading.rb +3 -3
  1034. data/lib/hecks/tools/translation_audit.rb +15 -4
  1035. data/lib/hecks/tools/translation_scaffold/reporting.rb +4 -1
  1036. data/lib/hecks/tools/translation_scaffold.rb +4 -14
  1037. data/lib/hecks/vendoring/git_source.rb +7 -4
  1038. data/lib/hecks/version.rb +1 -1
  1039. data/lib/hecks/vocabulary.rb +110 -3
  1040. data/lib/hecks.rb +37 -18
  1041. data/lib/rubocop/cop/hecks/inline_regexp.rb +29 -0
  1042. data/lib/rubocop/cop/hecks/no_transport_in_runtime.rb +78 -0
  1043. data/lib/rubocop/cop/hecks/rails_model_rules.rb +46 -0
  1044. data/lib/rubocop/cop/hecks/thread_shared_ivar_mutation.rb +1 -1
  1045. data/lib/rubocop/cop/hecks/train_wreck.rb +69 -0
  1046. data/lib/rubocop/cop/hecks/unnamed_pipeline.rb +51 -0
  1047. data/prebuilt/31cf81e12f16236ad26249be590cfea3799c9db67432e6a4ef54b801c355b6ae.marshal +0 -0
  1048. data/prebuilt/68ecb2bd3abb1a221007db4f2b0375834c13aaccac8f2b99778e8517f11aa113.marshal +0 -0
  1049. data/prebuilt/verdicts-0328c2403383837d780ad5ed81d1da351c56436b894cf9015b5d56b8f1f1bf10.json +1 -0
  1050. data/qa/settings.yml +9 -0
  1051. data/rust/Cargo.lock +8 -1
  1052. data/rust/Cargo.toml +6 -7
  1053. data/rust/build/src/binding_pass.rs +13 -17
  1054. data/rust/build/src/cargo_sync.rs +1 -1
  1055. data/rust/build/src/lineage_pass.rs +4 -71
  1056. data/rust/build/src/pipeline.rs +99 -70
  1057. data/rust/build/src/resolve.rs +85 -29
  1058. data/rust/build/src/seams_pass.rs +117 -99
  1059. data/rust/build/src/world_pass.rs +21 -12
  1060. data/rust/codegen/src/domain_generator.rs +30 -2
  1061. data/rust/codegen/src/expr_emitter.rs +6 -0
  1062. data/rust/codegen/src/json_codec.rs +48 -10
  1063. data/rust/codegen/src/main.rs +41 -34
  1064. data/rust/codegen/src/manifest.rs +1 -1
  1065. data/rust/codegen/src/naming.rs +5 -5
  1066. data/rust/codegen/src/one_of_references.rs +124 -0
  1067. data/rust/codegen/src/presenters.rs +335 -0
  1068. data/rust/codegen/src/queries.rs +56 -7
  1069. data/rust/codegen/src/reactions.rs +19 -14
  1070. data/rust/codegen/src/read_models.rs +20 -71
  1071. data/rust/codegen/src/registry.rs +89 -15
  1072. data/rust/codegen/src/sidecars.rs +1 -1
  1073. data/rust/expr/Cargo.lock +54 -0
  1074. data/rust/expr/Cargo.toml +52 -0
  1075. data/rust/{src/kernel → expr/src}/attribute_shapes/composite.rs +45 -14
  1076. data/rust/{src/kernel → expr/src}/attribute_shapes/list.rs +1 -1
  1077. data/rust/{src/kernel → expr/src}/attribute_shapes/mod.rs +2 -2
  1078. data/rust/{src/kernel → expr/src}/attribute_shapes/optional.rs +1 -1
  1079. data/rust/{src/kernel → expr/src}/attribute_shapes/scalar.rs +3 -3
  1080. data/rust/{src/kernel → expr/src}/expr.rs +30 -8
  1081. data/rust/{src/kernel → expr/src}/expression_operators/arithmetic.rs +41 -18
  1082. data/rust/{src/kernel → expr/src}/expression_operators/comparison.rs +54 -8
  1083. data/rust/{src/kernel → expr/src}/expression_operators/enumeration.rs +73 -6
  1084. data/rust/{src/kernel → expr/src}/expression_operators/logical.rs +2 -2
  1085. data/rust/expr/src/expression_operators/membership.rs +33 -0
  1086. data/rust/{src/kernel → expr/src}/expression_operators/mod.rs +2 -2
  1087. data/rust/expr/src/expression_operators/pattern_match.rs +179 -0
  1088. data/rust/{src/kernel → expr/src}/expression_operators/positional.rs +8 -6
  1089. data/rust/{src/kernel → expr/src}/expression_operators/presence.rs +7 -6
  1090. data/rust/{src/kernel → expr/src}/expression_operators/sign_test.rs +14 -4
  1091. data/rust/{src/kernel → expr/src}/expression_operators/sized.rs +16 -9
  1092. data/rust/{src/kernel → expr/src}/expression_operators/text.rs +30 -17
  1093. data/rust/{src/kernel → expr/src}/expression_operators/to_string.rs +8 -6
  1094. data/rust/expr/src/lib.rs +17 -0
  1095. data/rust/expr/src/refusal.rs +62 -0
  1096. data/rust/expr/src/rendering.rs +135 -0
  1097. data/rust/{src/kernel → expr/src}/ruby_float.rs +7 -6
  1098. data/rust/host/Cargo.lock +137 -123
  1099. data/rust/host/Cargo.toml +7 -3
  1100. data/rust/host/HECKS_RELEASE +1 -1
  1101. data/rust/host/core/Cargo.toml +64 -0
  1102. data/rust/host/core/clippy.toml +4 -0
  1103. data/rust/host/core/src/arg_limits.rs +48 -0
  1104. data/rust/host/core/src/clock.rs +146 -0
  1105. data/rust/host/core/src/dispatch.rs +920 -0
  1106. data/rust/host/core/src/expr_json.rs +1137 -0
  1107. data/rust/host/{src → core/src}/host.rs +13 -14
  1108. data/rust/host/{src → core/src}/ir.rs +227 -18
  1109. data/rust/host/core/src/journal.rs +126 -0
  1110. data/rust/host/{src → core/src}/lambda_client.rs +27 -96
  1111. data/rust/host/core/src/lib.rs +37 -0
  1112. data/rust/host/{src → core/src}/needs.rs +66 -20
  1113. data/rust/host/core/src/plugins.rs +269 -0
  1114. data/rust/host/core/src/presentation.rs +471 -0
  1115. data/rust/host/{src → core/src}/presentation_write.rs +75 -43
  1116. data/rust/host/{src → core/src}/query_step.rs +54 -16
  1117. data/rust/host/{src → core/src}/reference_validate.rs +6 -6
  1118. data/rust/host/{src → core/src}/storage_shape.rs +2 -2
  1119. data/rust/host/core/src/store/memory.rs +635 -0
  1120. data/rust/host/core/src/store.rs +418 -0
  1121. data/rust/host/{src → core/src}/ui_schema.rs +8 -8
  1122. data/rust/host/core/src/validation.rs +129 -0
  1123. data/rust/host/core/src/wasm_runner.rs +410 -0
  1124. data/rust/host/fuzz/.gitignore +4 -0
  1125. data/rust/host/fuzz/Cargo.lock +4479 -0
  1126. data/rust/host/fuzz/Cargo.toml +42 -0
  1127. data/rust/host/fuzz/README.md +55 -0
  1128. data/rust/host/fuzz/fuzz_targets/postgres_equivalence.rs +24 -0
  1129. data/rust/host/fuzz/src/backend.rs +273 -0
  1130. data/rust/host/fuzz/src/equivalence.rs +195 -0
  1131. data/rust/host/fuzz/src/footprint.rs +182 -0
  1132. data/rust/host/fuzz/src/lib.rs +17 -0
  1133. data/rust/host/fuzz/src/ops.rs +345 -0
  1134. data/rust/host/fuzz/tests/smoke.rs +50 -0
  1135. data/rust/host/src/api.rs +316 -105
  1136. data/rust/host/src/auth/google_signin.rs +183 -0
  1137. data/rust/host/src/auth.rs +527 -370
  1138. data/rust/host/src/aws_lambda_invoker.rs +61 -0
  1139. data/rust/host/src/bin/expr_harness.rs +9 -4
  1140. data/rust/host/src/bin/ledger.rs +84 -0
  1141. data/rust/host/src/bin/lineage_harness.rs +17 -21
  1142. data/rust/host/src/bin/mint_harness.rs +11 -36
  1143. data/rust/host/src/bin/validate_harness.rs +1 -6
  1144. data/rust/host/src/boot.rs +465 -174
  1145. data/rust/host/src/boundary_fuzz/ir.rs +10 -5
  1146. data/rust/host/src/boundary_fuzz/server.rs +6 -5
  1147. data/rust/host/src/checkout.rs +4 -1
  1148. data/rust/host/src/commerce_ir.rs +126 -105
  1149. data/rust/host/src/{dispatch.rs → dispatch_tests.rs} +391 -824
  1150. data/rust/host/src/extension.rs +3 -4
  1151. data/rust/host/src/hecksagon_boundary_tests.rs +149 -0
  1152. data/rust/host/src/ledger.rs +683 -0
  1153. data/rust/host/src/lib.rs +21 -28
  1154. data/rust/host/src/payments/tests.rs +136 -38
  1155. data/rust/host/src/payments.rs +36 -32
  1156. data/rust/host/src/platform_signin/extension.rs +1 -1
  1157. data/rust/host/src/platform_signin/mapping_tests.rs +12 -9
  1158. data/rust/host/src/platform_signin/session.rs +7 -14
  1159. data/rust/host/src/platform_signin/verify.rs +0 -2
  1160. data/rust/host/src/presentation_tests.rs +382 -0
  1161. data/rust/host/src/rate_limit.rs +18 -2
  1162. data/rust/host/src/server.rs +287 -36
  1163. data/rust/host/src/{journal.rs → store/journal_sql.rs} +21 -127
  1164. data/rust/host/src/{mint.rs → store/mint.rs} +12 -12
  1165. data/rust/host/src/store/postgres.rs +493 -0
  1166. data/rust/host/src/store.rs +97 -0
  1167. data/rust/host/src/store_conformance.rs +1265 -0
  1168. data/rust/host/src/web/commerce.rs +10 -18
  1169. data/rust/host/src/web/newsletter/cooldown.rs +107 -22
  1170. data/rust/host/src/web/newsletter/naming.rs +104 -0
  1171. data/rust/host/src/web/newsletter/tests.rs +53 -0
  1172. data/rust/host/src/web/newsletter.rs +73 -50
  1173. data/rust/host/src/web/newsletter_send.rs +12 -13
  1174. data/rust/host/src/web/registration_receipt.rs +2 -2
  1175. data/rust/host/src/web/registrations.rs +754 -375
  1176. data/rust/host/src/web/resend_webhook.rs +3 -3
  1177. data/rust/host/src/web/signin_tests.rs +131 -0
  1178. data/rust/host/src/web.rs +1479 -149
  1179. data/rust/lsp/README.md +27 -27
  1180. data/rust/lsp/src/diagnostics.rs +75 -15
  1181. data/rust/lsp/src/main.rs +101 -5
  1182. data/rust/parser/fuzz/Cargo.toml +2 -2
  1183. data/rust/parser/fuzz/README.md +3 -3
  1184. data/rust/parser/fuzz/fuzz_targets/{chapter.rs → bluebook.rs} +4 -4
  1185. data/rust/parser/fuzz/fuzz_targets/resolve.rs +2 -2
  1186. data/rust/parser/src/build/named_pattern.rs +22 -0
  1187. data/rust/parser/src/build/references.rs +52 -0
  1188. data/rust/parser/src/diag.rs +22 -1
  1189. data/rust/parser/src/emit.rs +68 -4
  1190. data/rust/parser/src/expr/ast_json.rs +10 -0
  1191. data/rust/parser/src/expr/resolver.rs +49 -9
  1192. data/rust/parser/src/ir.rs +34 -7
  1193. data/rust/parser/src/keywords.rs +454 -457
  1194. data/rust/parser/src/lex.rs +115 -87
  1195. data/rust/parser/src/main.rs +180 -32
  1196. data/rust/parser/src/parse/adapter.rs +28 -0
  1197. data/rust/parser/src/parse/aggregate.rs +55 -35
  1198. data/rust/parser/src/parse/command.rs +100 -15
  1199. data/rust/parser/src/parse/{chapter.rs → declaration.rs} +85 -54
  1200. data/rust/parser/src/parse/domain_port.rs +60 -9
  1201. data/rust/parser/src/parse/entity.rs +35 -32
  1202. data/rust/parser/src/parse/file.rs +1 -1
  1203. data/rust/parser/src/parse/hecksagon.rs +15 -5
  1204. data/rust/parser/src/parse/mod.rs +84 -2
  1205. data/rust/parser/src/parse/process_manager.rs +1 -1
  1206. data/rust/parser/src/parse/query.rs +13 -3
  1207. data/rust/parser/src/parse/read_model.rs +2 -1
  1208. data/rust/parser/src/phrases.rs +1258 -0
  1209. data/rust/parser/src/render_ruby.rs +540 -0
  1210. data/rust/parser/src/sentence/changes.rs +437 -0
  1211. data/rust/parser/src/sentence/command_step.rs +206 -0
  1212. data/rust/parser/src/sentence/complete.rs +276 -0
  1213. data/rust/parser/src/sentence/entity.rs +41 -0
  1214. data/rust/parser/src/sentence/examples.rs +1012 -0
  1215. data/rust/parser/src/sentence/format.rs +882 -0
  1216. data/rust/parser/src/sentence/lower.rs +1366 -0
  1217. data/rust/parser/src/sentence/mod.rs +444 -0
  1218. data/rust/parser/src/sentence/names.rs +69 -0
  1219. data/rust/parser/src/sentence/options.rs +154 -0
  1220. data/rust/parser/src/sentence/pattern.rs +433 -0
  1221. data/rust/parser/src/sentence/process.rs +196 -0
  1222. data/rust/parser/src/sentence/queries.rs +431 -0
  1223. data/rust/parser/src/sentence/report.rs +283 -0
  1224. data/rust/parser/src/sentence/token.rs +106 -0
  1225. data/rust/parser/src/sentence/values.rs +498 -0
  1226. data/rust/src/exemplar/queries.rs +1 -0
  1227. data/rust/src/exemplar/reactions.rs +1 -1
  1228. data/rust/src/exemplar/registry.rs +30 -0
  1229. data/rust/src/kernel/cli.rs +233 -20
  1230. data/rust/src/kernel/collecting.rs +174 -0
  1231. data/rust/src/kernel/dispatch.rs +55 -27
  1232. data/rust/src/kernel/json.rs +15 -1
  1233. data/rust/src/kernel/mod.rs +8 -67
  1234. data/rust/src/kernel/named_query.rs +225 -11
  1235. data/rust/src/kernel/orchestrate.rs +213 -25
  1236. data/rust/src/kernel/orchestrate_guard_tests.rs +3 -0
  1237. data/rust/src/kernel/present.rs +261 -0
  1238. data/rust/src/kernel/query_cursor.rs +251 -0
  1239. data/rust/src/kernel/query_ordering.rs +6 -6
  1240. data/rust/src/kernel/read_model.rs +162 -17
  1241. data/rust/src/kernel/repository.rs +107 -17
  1242. data/rust/src/kernel/vocab/mod.rs +4 -0
  1243. data/rust/src/kernel/vocab/reducer.rs +109 -0
  1244. data/rust/src/kernel/vocab/refusal_class.rs +124 -0
  1245. data/rust/src/kernel/vocab/refusal_template.rs +2 -2
  1246. data/rust/src/lib.rs +1 -1
  1247. data/rust/web/Cargo.lock +47 -0
  1248. metadata +331 -93
  1249. data/lib/hecks/chapters.rb +0 -147
  1250. data/lib/hecks/gate/stages.yml +0 -234
  1251. data/lib/hecks/hecks/governance.world +0 -7
  1252. data/lib/hecks/ports/persistence/plugins/era/expected_era.rb +0 -137
  1253. data/lib/hecks/ports/persistence/postgres_dump/connection.rb +0 -59
  1254. data/lib/hecks/ports/persistence/postgres_dump.rb +0 -100
  1255. data/lib/hecks/projections/deploy/box/templates/tunnel-egress.yaml.tmpl +0 -11
  1256. data/lib/hecks/projector/exporter/capability_values.rb +0 -55
  1257. data/lib/hecks/runtime/remote_dispatcher.rb +0 -176
  1258. data/prebuilt/02c09c73b272c1fb5a9ae6d87bb5e5e529208e00f6b4b597dc2c0fd70a9c0964.marshal +0 -0
  1259. data/prebuilt/bb84a835cf6a15136bad5ca03aa5bf93a5b92f5f72444618d3ef2412b987fb32.marshal +0 -0
  1260. data/prebuilt/verdicts-f1f10da14c8e8f01b4c9b7e3e2d74be8cd2bf4676364ed17fa16975d2a076d75.json +0 -1
  1261. data/rust/host/src/clock.rs +0 -8
  1262. data/rust/host/src/expr_json.rs +0 -1983
  1263. data/rust/host/src/presentation.rs +0 -842
  1264. data/rust/host/src/wasm_runner.rs +0 -206
  1265. data/rust/src/kernel/expression_operators/membership.rs +0 -20
  1266. data/rust/src/kernel/expression_operators/pattern_match.rs +0 -108
  1267. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/events.rb +0 -0
  1268. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/head_writes.rb +0 -0
  1269. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/journal.rb +0 -0
  1270. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/base_sql.rb +0 -0
  1271. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/field_cache.rb +0 -0
  1272. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/head_compiler.rb +0 -0
  1273. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/merge_writes.rb +0 -0
  1274. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/provisioning.rb +0 -0
  1275. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/resumable_backfill.rb +0 -0
  1276. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/transform_installer.rb +0 -0
  1277. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/lineage/transform_sql.rb +0 -0
  1278. /data/lib/hecks/{ports/persistence/plugins/era → adapters/driven}/postgres_era/sagas.rb +0 -0
  1279. /data/rust/host/{src → core/src}/field_hints.rs +0 -0
  1280. /data/rust/host/{src → core/src}/log.rs +0 -0
  1281. /data/rust/host/{src → core/src}/reference_transform.rs +0 -0
@@ -9,7 +9,7 @@ Hecks.bluebook "Hecks" do
9
9
  # The records are named for the run, as ModelCheckRun is, because several of the table's
10
10
  # concerns share a name with a module the gem already owns.
11
11
 
12
- # The language: the tables the Bluebook chapter declares and everything projected from them. A
12
+ # The language: the tables the Bluebook bluebook declares and everything projected from them. A
13
13
  # projection reports drift from the committed files and writes only when it is confirmed; an
14
14
  # evolution edits the syntax tables, regenerates the golden and holds the gates, and only when
15
15
  # confirmed (without it, the edit is rehearsed in memory and nothing is written).
@@ -64,7 +64,7 @@ Hecks.bluebook "Hecks" do
64
64
 
65
65
  # The part of the language a word is a word in.
66
66
  value_object "Context" do
67
- attribute :value, String, pattern: '^[A-Za-z][A-Za-z0-9_]*$'
67
+ attribute :value, String, matches: :identifier
68
68
  end
69
69
 
70
70
  # What a word's block holds.
@@ -102,17 +102,16 @@ Hecks.bluebook "Hecks" do
102
102
  transition "Accept" => "accepted", from: "requested"
103
103
  transition "Complete" => "completed", from: "accepted"
104
104
  transition "Fault" => "faulted", from: %w[requested accepted]
105
+ mark :terminal, "completed", "faulted"
105
106
  end
106
107
 
107
108
  command "ProjectModel" do
108
109
  role "Maintainer"
109
110
  goal "Project the model's holding half from the language that declares it"
110
111
 
111
- attribute :run, RunKey
112
- attribute :confirm, Switch, optional: true
112
+ attribute :run, RunKey, sets: true
113
+ attribute :confirm, Switch, optional: true, sets: true
113
114
 
114
- sets :run
115
- sets :confirm
116
115
  sets :operation, to: "project_model"
117
116
 
118
117
  emits ProjectModelRequested
@@ -122,11 +121,9 @@ Hecks.bluebook "Hecks" do
122
121
  role "Maintainer"
123
122
  goal "Project the language's closed sets into the vocabulary"
124
123
 
125
- attribute :run, RunKey
126
- attribute :confirm, Switch, optional: true
124
+ attribute :run, RunKey, sets: true
125
+ attribute :confirm, Switch, optional: true, sets: true
127
126
 
128
- sets :run
129
- sets :confirm
130
127
  sets :operation, to: "project_vocabulary"
131
128
 
132
129
  emits ProjectVocabularyRequested
@@ -136,11 +133,9 @@ Hecks.bluebook "Hecks" do
136
133
  role "Maintainer"
137
134
  goal "Project the vocabulary tables into the Rust kernel, one enum a table"
138
135
 
139
- attribute :run, RunKey
140
- attribute :confirm, Switch, optional: true
136
+ attribute :run, RunKey, sets: true
137
+ attribute :confirm, Switch, optional: true, sets: true
141
138
 
142
- sets :run
143
- sets :confirm
144
139
  sets :operation, to: "project_rust_vocabulary"
145
140
 
146
141
  emits ProjectRustVocabularyRequested
@@ -150,11 +145,9 @@ Hecks.bluebook "Hecks" do
150
145
  role "Maintainer"
151
146
  goal "Project the refusal template table, a second name of ProjectRustVocabulary"
152
147
 
153
- attribute :run, RunKey
154
- attribute :confirm, Switch, optional: true
148
+ attribute :run, RunKey, sets: true
149
+ attribute :confirm, Switch, optional: true, sets: true
155
150
 
156
- sets :run
157
- sets :confirm
158
151
  sets :operation, to: "project_rust_vocabulary"
159
152
 
160
153
  emits ProjectRefusalWordingRequested
@@ -164,11 +157,9 @@ Hecks.bluebook "Hecks" do
164
157
  role "Maintainer"
165
158
  goal "Project the Rust and Cargo reserved words into the codegen and build crates"
166
159
 
167
- attribute :run, RunKey
168
- attribute :confirm, Switch, optional: true
160
+ attribute :run, RunKey, sets: true
161
+ attribute :confirm, Switch, optional: true, sets: true
169
162
 
170
- sets :run
171
- sets :confirm
172
163
  sets :operation, to: "project_reserved_names"
173
164
 
174
165
  emits ProjectReservedNamesRequested
@@ -178,25 +169,33 @@ Hecks.bluebook "Hecks" do
178
169
  role "Maintainer"
179
170
  goal "Project the Rust parser's keyword table"
180
171
 
181
- attribute :run, RunKey
182
- attribute :confirm, Switch, optional: true
172
+ attribute :run, RunKey, sets: true
173
+ attribute :confirm, Switch, optional: true, sets: true
183
174
 
184
- sets :run
185
- sets :confirm
186
175
  sets :operation, to: "project_parser_table"
187
176
 
188
177
  emits ProjectParserTableRequested
189
178
  end
190
179
 
180
+ command "ProjectPhraseTable" do
181
+ role "Maintainer"
182
+ goal "Project the Rust parser's sentence table from the Sentence bluebook's phrase rows"
183
+
184
+ attribute :run, RunKey, sets: true
185
+ attribute :confirm, Switch, optional: true, sets: true
186
+
187
+ sets :operation, to: "project_phrase_table"
188
+
189
+ emits ProjectPhraseTableRequested
190
+ end
191
+
191
192
  command "ProjectBootstrapTable" do
192
193
  role "Maintainer"
193
194
  goal "Project the DSL's bootstrap-window fallbacks from the keyword rows"
194
195
 
195
- attribute :run, RunKey
196
- attribute :confirm, Switch, optional: true
196
+ attribute :run, RunKey, sets: true
197
+ attribute :confirm, Switch, optional: true, sets: true
197
198
 
198
- sets :run
199
- sets :confirm
200
199
  sets :operation, to: "project_bootstrap_table"
201
200
 
202
201
  emits ProjectBootstrapTableRequested
@@ -206,11 +205,9 @@ Hecks.bluebook "Hecks" do
206
205
  role "Maintainer"
207
206
  goal "Project the host's form-field hints"
208
207
 
209
- attribute :run, RunKey
210
- attribute :confirm, Switch, optional: true
208
+ attribute :run, RunKey, sets: true
209
+ attribute :confirm, Switch, optional: true, sets: true
211
210
 
212
- sets :run
213
- sets :confirm
214
211
  sets :operation, to: "project_field_hints"
215
212
 
216
213
  emits ProjectFieldHintsRequested
@@ -220,13 +217,10 @@ Hecks.bluebook "Hecks" do
220
217
  role "Maintainer"
221
218
  goal "Project the expression machinery's operator and normalisation tables"
222
219
 
223
- attribute :stdout, Switch, optional: true
224
- attribute :run, RunKey
225
- attribute :confirm, Switch, optional: true
220
+ attribute :stdout, Switch, optional: true, sets: true
221
+ attribute :run, RunKey, sets: true
222
+ attribute :confirm, Switch, optional: true, sets: true
226
223
 
227
- sets :stdout
228
- sets :run
229
- sets :confirm
230
224
  sets :operation, to: "project_expression_tables"
231
225
 
232
226
  emits ProjectExpressionTablesRequested
@@ -234,13 +228,11 @@ Hecks.bluebook "Hecks" do
234
228
 
235
229
  command "ProjectReference" do
236
230
  role "Maintainer"
237
- goal "Regenerate the DSL reference from the Syntax chapter, keeping the committed prose"
231
+ goal "Regenerate the DSL reference from the Syntax bluebook, keeping the committed prose"
238
232
 
239
- attribute :run, RunKey
240
- attribute :confirm, Switch, optional: true
233
+ attribute :run, RunKey, sets: true
234
+ attribute :confirm, Switch, optional: true, sets: true
241
235
 
242
- sets :run
243
- sets :confirm
244
236
  sets :operation, to: "project_reference"
245
237
 
246
238
  emits ProjectReferenceRequested
@@ -250,23 +242,15 @@ Hecks.bluebook "Hecks" do
250
242
  role "Maintainer"
251
243
  goal "Enter a keyword row, proposed: it reaches no projection until admitted"
252
244
 
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
245
+ attribute :word, Word, sets: true
246
+ attribute :context, Context, sets: true
247
+ attribute :body, Body, optional: true, sets: true
248
+ attribute :inner, Fill, optional: true, sets: true
249
+ attribute :opens, Fill, optional: true, sets: true
250
+ attribute :fills, Fill, optional: true, sets: true
251
+ attribute :run, RunKey, sets: true
252
+ attribute :confirm, Switch, optional: true, sets: true
253
+
270
254
  sets :operation, to: "propose"
271
255
 
272
256
  emits ProposeRequested
@@ -276,15 +260,11 @@ Hecks.bluebook "Hecks" do
276
260
  role "Maintainer"
277
261
  goal "Move a proposed keyword row to admitted"
278
262
 
279
- attribute :word, Word
280
- attribute :context, Context
281
- attribute :run, RunKey
282
- attribute :confirm, Switch, optional: true
263
+ attribute :word, Word, sets: true
264
+ attribute :context, Context, sets: true
265
+ attribute :run, RunKey, sets: true
266
+ attribute :confirm, Switch, optional: true, sets: true
283
267
 
284
- sets :word
285
- sets :context
286
- sets :run
287
- sets :confirm
288
268
  sets :operation, to: "admit"
289
269
 
290
270
  emits AdmitRequested
@@ -294,15 +274,11 @@ Hecks.bluebook "Hecks" do
294
274
  role "Maintainer"
295
275
  goal "Move an admitted keyword row to deprecated"
296
276
 
297
- attribute :word, Word
298
- attribute :context, Context
299
- attribute :run, RunKey
300
- attribute :confirm, Switch, optional: true
277
+ attribute :word, Word, sets: true
278
+ attribute :context, Context, sets: true
279
+ attribute :run, RunKey, sets: true
280
+ attribute :confirm, Switch, optional: true, sets: true
301
281
 
302
- sets :word
303
- sets :context
304
- sets :run
305
- sets :confirm
306
282
  sets :operation, to: "deprecate"
307
283
 
308
284
  emits DeprecateRequested
@@ -312,15 +288,11 @@ Hecks.bluebook "Hecks" do
312
288
  role "Maintainer"
313
289
  goal "Move a deprecated or admitted keyword row to retired"
314
290
 
315
- attribute :word, Word
316
- attribute :context, Context
317
- attribute :run, RunKey
318
- attribute :confirm, Switch, optional: true
291
+ attribute :word, Word, sets: true
292
+ attribute :context, Context, sets: true
293
+ attribute :run, RunKey, sets: true
294
+ attribute :confirm, Switch, optional: true, sets: true
319
295
 
320
- sets :word
321
- sets :context
322
- sets :run
323
- sets :confirm
324
296
  sets :operation, to: "retire"
325
297
 
326
298
  emits RetireRequested
@@ -330,17 +302,12 @@ Hecks.bluebook "Hecks" do
330
302
  role "Maintainer"
331
303
  goal "Respell a keyword row; the old spelling keeps parsing"
332
304
 
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
305
+ attribute :word, Word, sets: true
306
+ attribute :context, Context, sets: true
307
+ attribute :new_name, Word, sets: true
308
+ attribute :run, RunKey, sets: true
309
+ attribute :confirm, Switch, optional: true, sets: true
310
+
344
311
  sets :operation, to: "rename"
345
312
 
346
313
  emits RenameRequested
@@ -350,27 +317,17 @@ Hecks.bluebook "Hecks" do
350
317
  role "Maintainer"
351
318
  goal "Enter an argument row of a keyword, proposed"
352
319
 
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
320
+ attribute :word, Word, sets: true
321
+ attribute :context, Context, sets: true
322
+ attribute :kind, Kind, sets: true
323
+ attribute :required, Flag, optional: true, sets: true
324
+ attribute :at, Position, optional: true, sets: true
325
+ attribute :named, Fill, optional: true, sets: true
326
+ attribute :fills, Fill, optional: true, sets: true
327
+ attribute :pairs_shape, Shape, optional: true, sets: true
328
+ attribute :run, RunKey, sets: true
329
+ attribute :confirm, Switch, optional: true, sets: true
330
+
374
331
  sets :operation, to: "propose_argument"
375
332
 
376
333
  emits ProposeArgumentRequested
@@ -380,19 +337,13 @@ Hecks.bluebook "Hecks" do
380
337
  role "Maintainer"
381
338
  goal "Move a proposed argument row to admitted"
382
339
 
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
340
+ attribute :word, Word, sets: true
341
+ attribute :context, Context, sets: true
342
+ attribute :at, Position, optional: true, sets: true
343
+ attribute :named, Fill, optional: true, sets: true
344
+ attribute :run, RunKey, sets: true
345
+ attribute :confirm, Switch, optional: true, sets: true
346
+
396
347
  sets :operation, to: "admit_argument"
397
348
 
398
349
  emits AdmitArgumentRequested
@@ -402,19 +353,13 @@ Hecks.bluebook "Hecks" do
402
353
  role "Maintainer"
403
354
  goal "Move an admitted argument row to deprecated"
404
355
 
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
356
+ attribute :word, Word, sets: true
357
+ attribute :context, Context, sets: true
358
+ attribute :at, Position, optional: true, sets: true
359
+ attribute :named, Fill, optional: true, sets: true
360
+ attribute :run, RunKey, sets: true
361
+ attribute :confirm, Switch, optional: true, sets: true
362
+
418
363
  sets :operation, to: "deprecate_argument"
419
364
 
420
365
  emits DeprecateArgumentRequested
@@ -424,19 +369,13 @@ Hecks.bluebook "Hecks" do
424
369
  role "Maintainer"
425
370
  goal "Move a deprecated or admitted argument row to retired"
426
371
 
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
372
+ attribute :word, Word, sets: true
373
+ attribute :context, Context, sets: true
374
+ attribute :at, Position, optional: true, sets: true
375
+ attribute :named, Fill, optional: true, sets: true
376
+ attribute :run, RunKey, sets: true
377
+ attribute :confirm, Switch, optional: true, sets: true
378
+
440
379
  sets :operation, to: "retire_argument"
441
380
 
442
381
  emits RetireArgumentRequested
@@ -449,11 +388,10 @@ Hecks.bluebook "Hecks" do
449
388
  goal "Let a request through only when the working tree is a hecks checkout"
450
389
 
451
390
  reference_to LanguageRun
452
- attribute :checkout, Switch
391
+ attribute :checkout, Switch, sets: true
453
392
 
454
393
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
455
394
 
456
- sets :checkout
457
395
 
458
396
  emits LanguageAccepted
459
397
  end
@@ -463,9 +401,8 @@ Hecks.bluebook "Hecks" do
463
401
  goal "Record that the request was carried out, and what it reported"
464
402
 
465
403
  reference_to LanguageRun
466
- attribute :report, Report
404
+ attribute :report, Report, sets: true
467
405
 
468
- sets :report
469
406
 
470
407
  emits LanguageCompleted
471
408
  end
@@ -475,9 +412,8 @@ Hecks.bluebook "Hecks" do
475
412
  goal "Record that the request was refused or could not be carried out, and why"
476
413
 
477
414
  reference_to LanguageRun
478
- attribute :refusal, Report
415
+ attribute :refusal, Report, sets: true
479
416
 
480
- sets :refusal
481
417
 
482
418
  emits LanguageFaulted
483
419
  end
@@ -508,97 +444,102 @@ Hecks.bluebook "Hecks" do
508
444
 
509
445
  policy "ExamineWhenProjectModelRequested" do
510
446
  on "LanguageRun.ProjectModelRequested"
511
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
447
+ ask :examine, with: { run: :run }
512
448
  end
513
449
 
514
450
  policy "ExamineWhenProjectVocabularyRequested" do
515
451
  on "LanguageRun.ProjectVocabularyRequested"
516
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
452
+ ask :examine, with: { run: :run }
517
453
  end
518
454
 
519
455
  policy "ExamineWhenProjectRustVocabularyRequested" do
520
456
  on "LanguageRun.ProjectRustVocabularyRequested"
521
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
457
+ ask :examine, with: { run: :run }
522
458
  end
523
459
 
524
460
  policy "ExamineWhenProjectRefusalWordingRequested" do
525
461
  on "LanguageRun.ProjectRefusalWordingRequested"
526
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
462
+ ask :examine, with: { run: :run }
527
463
  end
528
464
 
529
465
  policy "ExamineWhenProjectReservedNamesRequested" do
530
466
  on "LanguageRun.ProjectReservedNamesRequested"
531
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
467
+ ask :examine, with: { run: :run }
532
468
  end
533
469
 
534
470
  policy "ExamineWhenProjectParserTableRequested" do
535
471
  on "LanguageRun.ProjectParserTableRequested"
536
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
472
+ ask :examine, with: { run: :run }
473
+ end
474
+
475
+ policy "ExamineWhenProjectPhraseTableRequested" do
476
+ on "LanguageRun.ProjectPhraseTableRequested"
477
+ ask :examine, with: { run: :run }
537
478
  end
538
479
 
539
480
  policy "ExamineWhenProjectBootstrapTableRequested" do
540
481
  on "LanguageRun.ProjectBootstrapTableRequested"
541
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
482
+ ask :examine, with: { run: :run }
542
483
  end
543
484
 
544
485
  policy "ExamineWhenProjectFieldHintsRequested" do
545
486
  on "LanguageRun.ProjectFieldHintsRequested"
546
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
487
+ ask :examine, with: { run: :run }
547
488
  end
548
489
 
549
490
  policy "ExamineWhenProjectExpressionTablesRequested" do
550
491
  on "LanguageRun.ProjectExpressionTablesRequested"
551
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
492
+ ask :examine, with: { run: :run }
552
493
  end
553
494
 
554
495
  policy "ExamineWhenProjectReferenceRequested" do
555
496
  on "LanguageRun.ProjectReferenceRequested"
556
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
497
+ ask :examine, with: { run: :run }
557
498
  end
558
499
 
559
500
  policy "ExamineWhenProposeRequested" do
560
501
  on "LanguageRun.ProposeRequested"
561
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
502
+ ask :examine, with: { run: :run }
562
503
  end
563
504
 
564
505
  policy "ExamineWhenAdmitRequested" do
565
506
  on "LanguageRun.AdmitRequested"
566
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
507
+ ask :examine, with: { run: :run }
567
508
  end
568
509
 
569
510
  policy "ExamineWhenDeprecateRequested" do
570
511
  on "LanguageRun.DeprecateRequested"
571
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
512
+ ask :examine, with: { run: :run }
572
513
  end
573
514
 
574
515
  policy "ExamineWhenRetireRequested" do
575
516
  on "LanguageRun.RetireRequested"
576
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
517
+ ask :examine, with: { run: :run }
577
518
  end
578
519
 
579
520
  policy "ExamineWhenRenameRequested" do
580
521
  on "LanguageRun.RenameRequested"
581
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
522
+ ask :examine, with: { run: :run }
582
523
  end
583
524
 
584
525
  policy "ExamineWhenProposeArgumentRequested" do
585
526
  on "LanguageRun.ProposeArgumentRequested"
586
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
527
+ ask :examine, with: { run: :run }
587
528
  end
588
529
 
589
530
  policy "ExamineWhenAdmitArgumentRequested" do
590
531
  on "LanguageRun.AdmitArgumentRequested"
591
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
532
+ ask :examine, with: { run: :run }
592
533
  end
593
534
 
594
535
  policy "ExamineWhenDeprecateArgumentRequested" do
595
536
  on "LanguageRun.DeprecateArgumentRequested"
596
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
537
+ ask :examine, with: { run: :run }
597
538
  end
598
539
 
599
540
  policy "ExamineWhenRetireArgumentRequested" do
600
541
  on "LanguageRun.RetireArgumentRequested"
601
- trigger LanguageRun::SourceTree::Examine, with: { run: :run }
542
+ ask :examine, with: { run: :run }
602
543
  end
603
544
 
604
545
  policy "AcceptLanguageWhenExamined" do
@@ -614,7 +555,7 @@ Hecks.bluebook "Hecks" do
614
555
 
615
556
  policy "PerformLanguageWhenAccepted" do
616
557
  on "LanguageRun.LanguageAccepted"
617
- trigger LanguageRun::SourceTree::Perform, with: { run: :run }
558
+ ask :perform, with: { run: :run }
618
559
  end
619
560
 
620
561
  policy "RecordLanguageOutcome" do
@@ -663,17 +604,16 @@ Hecks.bluebook "Hecks" do
663
604
  transition "Accept" => "accepted", from: "requested"
664
605
  transition "Complete" => "completed", from: "accepted"
665
606
  transition "Fault" => "faulted", from: %w[requested accepted]
607
+ mark :terminal, "completed", "faulted"
666
608
  end
667
609
 
668
610
  command "ProjectKernelCapabilities" do
669
611
  role "Maintainer"
670
612
  goal "Project the capability enums the hand-written Rust kernel is matched against"
671
613
 
672
- attribute :run, RunKey
673
- attribute :confirm, Switch, optional: true
614
+ attribute :run, RunKey, sets: true
615
+ attribute :confirm, Switch, optional: true, sets: true
674
616
 
675
- sets :run
676
- sets :confirm
677
617
  sets :operation, to: "project_kernel_capabilities"
678
618
 
679
619
  emits ProjectKernelCapabilitiesRequested
@@ -683,9 +623,8 @@ Hecks.bluebook "Hecks" do
683
623
  role "Maintainer"
684
624
  goal "Check that every capability the grammar admits has its hand-written kernel file"
685
625
 
686
- attribute :run, RunKey
626
+ attribute :run, RunKey, sets: true
687
627
 
688
- sets :run
689
628
  sets :operation, to: "measure_kernel_coverage"
690
629
 
691
630
  emits MeasureKernelCoverageRequested
@@ -698,11 +637,10 @@ Hecks.bluebook "Hecks" do
698
637
  goal "Let a request through only when the working tree is a hecks checkout"
699
638
 
700
639
  reference_to KernelRun
701
- attribute :checkout, Switch
640
+ attribute :checkout, Switch, sets: true
702
641
 
703
642
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
704
643
 
705
- sets :checkout
706
644
 
707
645
  emits KernelAccepted
708
646
  end
@@ -712,9 +650,8 @@ Hecks.bluebook "Hecks" do
712
650
  goal "Record that the request was carried out, and what it reported"
713
651
 
714
652
  reference_to KernelRun
715
- attribute :report, Report
653
+ attribute :report, Report, sets: true
716
654
 
717
- sets :report
718
655
 
719
656
  emits KernelCompleted
720
657
  end
@@ -724,9 +661,8 @@ Hecks.bluebook "Hecks" do
724
661
  goal "Record that the request was refused or could not be carried out, and why"
725
662
 
726
663
  reference_to KernelRun
727
- attribute :refusal, Report
664
+ attribute :refusal, Report, sets: true
728
665
 
729
- sets :refusal
730
666
 
731
667
  emits KernelFaulted
732
668
  end
@@ -747,12 +683,12 @@ Hecks.bluebook "Hecks" do
747
683
 
748
684
  policy "ExamineWhenProjectKernelCapabilitiesRequested" do
749
685
  on "KernelRun.ProjectKernelCapabilitiesRequested"
750
- trigger KernelRun::SourceTree::Examine, with: { run: :run }
686
+ ask :examine, with: { run: :run }
751
687
  end
752
688
 
753
689
  policy "ExamineWhenMeasureKernelCoverageRequested" do
754
690
  on "KernelRun.MeasureKernelCoverageRequested"
755
- trigger KernelRun::SourceTree::Examine, with: { run: :run }
691
+ ask :examine, with: { run: :run }
756
692
  end
757
693
 
758
694
  policy "AcceptKernelWhenExamined" do
@@ -768,7 +704,7 @@ Hecks.bluebook "Hecks" do
768
704
 
769
705
  policy "PerformKernelWhenAccepted" do
770
706
  on "KernelRun.KernelAccepted"
771
- trigger KernelRun::SourceTree::Perform, with: { run: :run }
707
+ ask :perform, with: { run: :run }
772
708
  end
773
709
 
774
710
  policy "RecordKernelOutcome" do
@@ -790,6 +726,7 @@ Hecks.bluebook "Hecks" do
790
726
  attribute :run, RunKey
791
727
  attribute :operation, Operation, optional: true
792
728
  attribute :confirm, Switch, optional: true
729
+ attribute :additive, Switch, optional: true
793
730
  attribute :checkout, Switch, optional: true
794
731
  attribute :report, Report, optional: true
795
732
  attribute :refusal, Report, optional: true
@@ -818,15 +755,15 @@ Hecks.bluebook "Hecks" do
818
755
  transition "Accept" => "accepted", from: "requested"
819
756
  transition "Complete" => "completed", from: "accepted"
820
757
  transition "Fault" => "faulted", from: %w[requested accepted]
758
+ mark :terminal, "completed", "faulted"
821
759
  end
822
760
 
823
761
  command "CheckEngineAgreement" do
824
762
  role "Maintainer"
825
763
  goal "Check that the query engines route every comparator through the one shared implementation"
826
764
 
827
- attribute :run, RunKey
765
+ attribute :run, RunKey, sets: true
828
766
 
829
- sets :run
830
767
  sets :operation, to: "check_engine_agreement"
831
768
 
832
769
  emits CheckEngineAgreementRequested
@@ -836,23 +773,34 @@ Hecks.bluebook "Hecks" do
836
773
  role "Maintainer"
837
774
  goal "Check that every live word of the language has prose and a running example in the reference"
838
775
 
839
- attribute :run, RunKey
776
+ attribute :run, RunKey, sets: true
840
777
 
841
- sets :run
842
778
  sets :operation, to: "measure_doc_coverage"
843
779
 
844
780
  emits MeasureDocCoverageRequested
845
781
  end
846
782
 
783
+ command "CheckShapeLedger" do
784
+ role "Maintainer"
785
+ goal "Check that no bluebook's storage shape moved without a translation edge, and rewrite the ledger when confirmed"
786
+
787
+ attribute :run, RunKey, sets: true
788
+ attribute :confirm, Switch, optional: true, sets: true
789
+ # With `confirm`: write the empty edge for a shape that moved with none, for a change that only adds.
790
+ attribute :additive, Switch, optional: true, sets: true
791
+
792
+ sets :operation, to: "check_shape_ledger"
793
+
794
+ emits CheckShapeLedgerRequested
795
+ end
796
+
847
797
  command "ArgumentGateMatrix" do
848
798
  role "Maintainer"
849
799
  goal "Generate the argument-gate ordering matrix; rewrite it and its fixtures only when confirmed"
850
800
 
851
- attribute :run, RunKey
852
- attribute :confirm, Switch, optional: true
801
+ attribute :run, RunKey, sets: true
802
+ attribute :confirm, Switch, optional: true, sets: true
853
803
 
854
- sets :run
855
- sets :confirm
856
804
  sets :operation, to: "argument_gate_matrix"
857
805
 
858
806
  emits ArgumentGateMatrixRequested
@@ -865,11 +813,10 @@ Hecks.bluebook "Hecks" do
865
813
  goal "Let a request through only when the working tree is a hecks checkout"
866
814
 
867
815
  reference_to ConformanceRun
868
- attribute :checkout, Switch
816
+ attribute :checkout, Switch, sets: true
869
817
 
870
818
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
871
819
 
872
- sets :checkout
873
820
 
874
821
  emits ConformanceAccepted
875
822
  end
@@ -879,9 +826,8 @@ Hecks.bluebook "Hecks" do
879
826
  goal "Record that the request was carried out, and what it reported"
880
827
 
881
828
  reference_to ConformanceRun
882
- attribute :report, Report
829
+ attribute :report, Report, sets: true
883
830
 
884
- sets :report
885
831
 
886
832
  emits ConformanceCompleted
887
833
  end
@@ -891,9 +837,8 @@ Hecks.bluebook "Hecks" do
891
837
  goal "Record that the request was refused or could not be carried out, and why"
892
838
 
893
839
  reference_to ConformanceRun
894
- attribute :refusal, Report
840
+ attribute :refusal, Report, sets: true
895
841
 
896
- sets :refusal
897
842
 
898
843
  emits ConformanceFaulted
899
844
  end
@@ -914,17 +859,22 @@ Hecks.bluebook "Hecks" do
914
859
 
915
860
  policy "ExamineWhenCheckEngineAgreementRequested" do
916
861
  on "ConformanceRun.CheckEngineAgreementRequested"
917
- trigger ConformanceRun::SourceTree::Examine, with: { run: :run }
862
+ ask :examine, with: { run: :run }
918
863
  end
919
864
 
920
865
  policy "ExamineWhenMeasureDocCoverageRequested" do
921
866
  on "ConformanceRun.MeasureDocCoverageRequested"
922
- trigger ConformanceRun::SourceTree::Examine, with: { run: :run }
867
+ ask :examine, with: { run: :run }
868
+ end
869
+
870
+ policy "ExamineWhenCheckShapeLedgerRequested" do
871
+ on "ConformanceRun.CheckShapeLedgerRequested"
872
+ ask :examine, with: { run: :run }
923
873
  end
924
874
 
925
875
  policy "ExamineWhenArgumentGateMatrixRequested" do
926
876
  on "ConformanceRun.ArgumentGateMatrixRequested"
927
- trigger ConformanceRun::SourceTree::Examine, with: { run: :run }
877
+ ask :examine, with: { run: :run }
928
878
  end
929
879
 
930
880
  policy "AcceptConformanceWhenExamined" do
@@ -940,7 +890,7 @@ Hecks.bluebook "Hecks" do
940
890
 
941
891
  policy "PerformConformanceWhenAccepted" do
942
892
  on "ConformanceRun.ConformanceAccepted"
943
- trigger ConformanceRun::SourceTree::Perform, with: { run: :run }
893
+ ask :perform, with: { run: :run }
944
894
  end
945
895
 
946
896
  policy "RecordConformanceOutcome" do
@@ -988,7 +938,7 @@ Hecks.bluebook "Hecks" do
988
938
  attribute :value, String
989
939
  end
990
940
 
991
- # A `CiGate` row of the Vocabulary chapter, by name.
941
+ # A `CiGate` row of the Vocabulary bluebook, by name.
992
942
  value_object "GateName" do
993
943
  attribute :value, String, matches: :present
994
944
  end
@@ -998,19 +948,17 @@ Hecks.bluebook "Hecks" do
998
948
  transition "Accept" => "accepted", from: "requested"
999
949
  transition "Complete" => "completed", from: "accepted"
1000
950
  transition "Fault" => "faulted", from: %w[requested accepted]
951
+ mark :terminal, "completed", "faulted"
1001
952
  end
1002
953
 
1003
954
  command "RegenerateCorpus" do
1004
955
  role "Maintainer"
1005
956
  goal "Regenerate every corpus domain's Rust output, or with check only compare it with the tree"
1006
957
 
1007
- attribute :check, Switch, optional: true
1008
- attribute :run, RunKey
1009
- attribute :confirm, Switch, optional: true
958
+ attribute :check, Switch, optional: true, sets: true
959
+ attribute :run, RunKey, sets: true
960
+ attribute :confirm, Switch, optional: true, sets: true
1010
961
 
1011
- sets :check
1012
- sets :run
1013
- sets :confirm
1014
962
  sets :operation, to: "regenerate_corpus"
1015
963
 
1016
964
  emits RegenerateCorpusRequested
@@ -1020,13 +968,10 @@ Hecks.bluebook "Hecks" do
1020
968
  role "Maintainer"
1021
969
  goal "Project the CiGate rows into the workflows' marked detector jobs, or with check only compare them"
1022
970
 
1023
- attribute :check, Switch, optional: true
1024
- attribute :run, RunKey
1025
- attribute :confirm, Switch, optional: true
971
+ attribute :check, Switch, optional: true, sets: true
972
+ attribute :run, RunKey, sets: true
973
+ attribute :confirm, Switch, optional: true, sets: true
1026
974
 
1027
- sets :check
1028
- sets :run
1029
- sets :confirm
1030
975
  sets :operation, to: "project_ci_gates"
1031
976
 
1032
977
  emits ProjectCiGatesRequested
@@ -1036,15 +981,11 @@ Hecks.bluebook "Hecks" do
1036
981
  role "Maintainer"
1037
982
  goal "Project the Lane rows into the rulesets and the promotion workflow, or with live compare GitHub's rulesets"
1038
983
 
1039
- attribute :check, Switch, optional: true
1040
- attribute :live, Switch, optional: true
1041
- attribute :run, RunKey
1042
- attribute :confirm, Switch, optional: true
984
+ attribute :check, Switch, optional: true, sets: true
985
+ attribute :live, Switch, optional: true, sets: true
986
+ attribute :run, RunKey, sets: true
987
+ attribute :confirm, Switch, optional: true, sets: true
1043
988
 
1044
- sets :check
1045
- sets :live
1046
- sets :run
1047
- sets :confirm
1048
989
  sets :operation, to: "project_lanes"
1049
990
 
1050
991
  emits ProjectLanesRequested
@@ -1054,13 +995,10 @@ Hecks.bluebook "Hecks" do
1054
995
  role "Maintainer"
1055
996
  goal "Write the launcher forms of docs/tools.md from the RetiredScript rows, or with check only compare them"
1056
997
 
1057
- attribute :check, Switch, optional: true
1058
- attribute :run, RunKey
1059
- attribute :confirm, Switch, optional: true
998
+ attribute :check, Switch, optional: true, sets: true
999
+ attribute :run, RunKey, sets: true
1000
+ attribute :confirm, Switch, optional: true, sets: true
1060
1001
 
1061
- sets :check
1062
- sets :run
1063
- sets :confirm
1064
1002
  sets :operation, to: "project_tools_doc"
1065
1003
 
1066
1004
  emits ProjectToolsDocRequested
@@ -1070,11 +1008,9 @@ Hecks.bluebook "Hecks" do
1070
1008
  role "Maintainer"
1071
1009
  goal "Say whether this run's change touches what a CiGate row guards, as the gated job's detector"
1072
1010
 
1073
- attribute :gate, GateName
1074
- attribute :run, RunKey
1011
+ attribute :gate, GateName, sets: true
1012
+ attribute :run, RunKey, sets: true
1075
1013
 
1076
- sets :gate
1077
- sets :run
1078
1014
  sets :operation, to: "decide_ci_gate"
1079
1015
 
1080
1016
  emits DecideCiGateRequested
@@ -1087,11 +1023,10 @@ Hecks.bluebook "Hecks" do
1087
1023
  goal "Let a request through only when the working tree is a hecks checkout"
1088
1024
 
1089
1025
  reference_to RegenerationRun
1090
- attribute :checkout, Switch
1026
+ attribute :checkout, Switch, sets: true
1091
1027
 
1092
1028
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1093
1029
 
1094
- sets :checkout
1095
1030
 
1096
1031
  emits RegenerationAccepted
1097
1032
  end
@@ -1101,9 +1036,8 @@ Hecks.bluebook "Hecks" do
1101
1036
  goal "Record that the request was carried out, and what it reported"
1102
1037
 
1103
1038
  reference_to RegenerationRun
1104
- attribute :report, Report
1039
+ attribute :report, Report, sets: true
1105
1040
 
1106
- sets :report
1107
1041
 
1108
1042
  emits RegenerationCompleted
1109
1043
  end
@@ -1113,9 +1047,8 @@ Hecks.bluebook "Hecks" do
1113
1047
  goal "Record that the request was refused or could not be carried out, and why"
1114
1048
 
1115
1049
  reference_to RegenerationRun
1116
- attribute :refusal, Report
1050
+ attribute :refusal, Report, sets: true
1117
1051
 
1118
- sets :refusal
1119
1052
 
1120
1053
  emits RegenerationFaulted
1121
1054
  end
@@ -1136,27 +1069,27 @@ Hecks.bluebook "Hecks" do
1136
1069
 
1137
1070
  policy "ExamineWhenRegenerateCorpusRequested" do
1138
1071
  on "RegenerationRun.RegenerateCorpusRequested"
1139
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1072
+ ask :examine, with: { run: :run }
1140
1073
  end
1141
1074
 
1142
1075
  policy "ExamineWhenProjectCiGatesRequested" do
1143
1076
  on "RegenerationRun.ProjectCiGatesRequested"
1144
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1077
+ ask :examine, with: { run: :run }
1145
1078
  end
1146
1079
 
1147
1080
  policy "ExamineWhenProjectLanesRequested" do
1148
1081
  on "RegenerationRun.ProjectLanesRequested"
1149
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1082
+ ask :examine, with: { run: :run }
1150
1083
  end
1151
1084
 
1152
1085
  policy "ExamineWhenProjectToolsDocRequested" do
1153
1086
  on "RegenerationRun.ProjectToolsDocRequested"
1154
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1087
+ ask :examine, with: { run: :run }
1155
1088
  end
1156
1089
 
1157
1090
  policy "ExamineWhenDecideCiGateRequested" do
1158
1091
  on "RegenerationRun.DecideCiGateRequested"
1159
- trigger RegenerationRun::SourceTree::Examine, with: { run: :run }
1092
+ ask :examine, with: { run: :run }
1160
1093
  end
1161
1094
 
1162
1095
  policy "AcceptRegenerationWhenExamined" do
@@ -1172,7 +1105,7 @@ Hecks.bluebook "Hecks" do
1172
1105
 
1173
1106
  policy "PerformRegenerationWhenAccepted" do
1174
1107
  on "RegenerationRun.RegenerationAccepted"
1175
- trigger RegenerationRun::SourceTree::Perform, with: { run: :run }
1108
+ ask :perform, with: { run: :run }
1176
1109
  end
1177
1110
 
1178
1111
  policy "RecordRegenerationOutcome" do
@@ -1186,7 +1119,7 @@ Hecks.bluebook "Hecks" do
1186
1119
  end
1187
1120
 
1188
1121
  # 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
1122
+ # (the Vocabulary gate rows), run together, and a red one faults the run, so `--wait` fails the
1190
1123
  # push or the build that asked, and the journal keeps when the gate went red.
1191
1124
  aggregate "GateRun" do
1192
1125
  description "One run of a stage's checks: every check of the stage, or the ones named."
@@ -1233,19 +1166,17 @@ Hecks.bluebook "Hecks" do
1233
1166
  transition "Accept" => "accepted", from: "requested"
1234
1167
  transition "Complete" => "completed", from: "accepted"
1235
1168
  transition "Fault" => "faulted", from: %w[requested accepted]
1169
+ mark :terminal, "completed", "faulted"
1236
1170
  end
1237
1171
 
1238
1172
  command "Gate" do
1239
1173
  role "Maintainer"
1240
1174
  goal "Run every check of a stage, or the ones named, and keep whether the gate is green"
1241
1175
 
1242
- attribute :stage, Stage
1243
- attribute :only, CheckList, optional: true
1244
- attribute :run, RunKey
1176
+ attribute :stage, Stage, sets: true
1177
+ attribute :only, CheckList, optional: true, sets: true
1178
+ attribute :run, RunKey, sets: true
1245
1179
 
1246
- sets :stage
1247
- sets :only
1248
- sets :run
1249
1180
  sets :operation, to: "gate"
1250
1181
 
1251
1182
  emits GateRequested
@@ -1256,11 +1187,10 @@ Hecks.bluebook "Hecks" do
1256
1187
  goal "Let a request through only when the working tree is a hecks checkout"
1257
1188
 
1258
1189
  reference_to GateRun
1259
- attribute :checkout, Switch
1190
+ attribute :checkout, Switch, sets: true
1260
1191
 
1261
1192
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1262
1193
 
1263
- sets :checkout
1264
1194
 
1265
1195
  emits GateAccepted
1266
1196
  end
@@ -1270,9 +1200,8 @@ Hecks.bluebook "Hecks" do
1270
1200
  goal "Record that every check passed, and which"
1271
1201
 
1272
1202
  reference_to GateRun
1273
- attribute :report, Report
1203
+ attribute :report, Report, sets: true
1274
1204
 
1275
- sets :report
1276
1205
 
1277
1206
  emits GateCompleted
1278
1207
  end
@@ -1282,9 +1211,8 @@ Hecks.bluebook "Hecks" do
1282
1211
  goal "Record that a check was red or the run could not be made, and why"
1283
1212
 
1284
1213
  reference_to GateRun
1285
- attribute :refusal, Report
1214
+ attribute :refusal, Report, sets: true
1286
1215
 
1287
- sets :refusal
1288
1216
 
1289
1217
  emits GateFaulted
1290
1218
  end
@@ -1305,7 +1233,7 @@ Hecks.bluebook "Hecks" do
1305
1233
 
1306
1234
  policy "ExamineWhenGateRequested" do
1307
1235
  on "GateRun.GateRequested"
1308
- trigger GateRun::SourceTree::Examine, with: { run: :run }
1236
+ ask :examine, with: { run: :run }
1309
1237
  end
1310
1238
 
1311
1239
  policy "AcceptGateWhenExamined" do
@@ -1321,7 +1249,7 @@ Hecks.bluebook "Hecks" do
1321
1249
 
1322
1250
  policy "PerformGateWhenAccepted" do
1323
1251
  on "GateRun.GateAccepted"
1324
- trigger GateRun::SourceTree::Perform, with: { run: :run }
1252
+ ask :perform, with: { run: :run }
1325
1253
  end
1326
1254
 
1327
1255
  policy "RecordGateOutcome" do
@@ -1374,7 +1302,7 @@ Hecks.bluebook "Hecks" do
1374
1302
 
1375
1303
  # Files or directories, comma separated.
1376
1304
  value_object "PathList" do
1377
- attribute :value, String, pattern: '^[^ \t\n\r,]+(,[^ \t\n\r,]+)*$'
1305
+ attribute :value, String, matches: :csv_list
1378
1306
  end
1379
1307
 
1380
1308
  # Violation categories, comma separated.
@@ -1406,19 +1334,17 @@ Hecks.bluebook "Hecks" do
1406
1334
  transition "Accept" => "accepted", from: "requested"
1407
1335
  transition "Complete" => "completed", from: "accepted"
1408
1336
  transition "Fault" => "faulted", from: %w[requested accepted]
1337
+ mark :terminal, "completed", "faulted"
1409
1338
  end
1410
1339
 
1411
1340
  command "CheckComments" do
1412
1341
  role "Maintainer"
1413
1342
  goal "List every comment that breaks the Ruby style guide"
1414
1343
 
1415
- attribute :paths, PathList
1416
- attribute :only, CategoryList, optional: true
1417
- attribute :run, RunKey
1344
+ attribute :paths, PathList, sets: true
1345
+ attribute :only, CategoryList, optional: true, sets: true
1346
+ attribute :run, RunKey, sets: true
1418
1347
 
1419
- sets :paths
1420
- sets :only
1421
- sets :run
1422
1348
  sets :operation, to: "check_comments"
1423
1349
 
1424
1350
  emits CheckCommentsRequested
@@ -1428,15 +1354,11 @@ Hecks.bluebook "Hecks" do
1428
1354
  role "Maintainer"
1429
1355
  goal "Rewrite the mechanical Ruby comment violations"
1430
1356
 
1431
- attribute :paths, PathList
1432
- attribute :only, CategoryList, optional: true
1433
- attribute :run, RunKey
1434
- attribute :confirm, Switch, optional: true
1357
+ attribute :paths, PathList, sets: true
1358
+ attribute :only, CategoryList, optional: true, sets: true
1359
+ attribute :run, RunKey, sets: true
1360
+ attribute :confirm, Switch, optional: true, sets: true
1435
1361
 
1436
- sets :paths
1437
- sets :only
1438
- sets :run
1439
- sets :confirm
1440
1362
  sets :operation, to: "fix_comments"
1441
1363
 
1442
1364
  emits FixCommentsRequested
@@ -1446,13 +1368,10 @@ Hecks.bluebook "Hecks" do
1446
1368
  role "Maintainer"
1447
1369
  goal "Record every long comment block as tolerated, for lib/hecks unless paths are named"
1448
1370
 
1449
- attribute :paths, PathList, optional: true
1450
- attribute :run, RunKey
1451
- attribute :confirm, Switch, optional: true
1371
+ attribute :paths, PathList, optional: true, sets: true
1372
+ attribute :run, RunKey, sets: true
1373
+ attribute :confirm, Switch, optional: true, sets: true
1452
1374
 
1453
- sets :paths
1454
- sets :run
1455
- sets :confirm
1456
1375
  sets :operation, to: "write_comment_baseline"
1457
1376
 
1458
1377
  emits WriteCommentBaselineRequested
@@ -1462,13 +1381,10 @@ Hecks.bluebook "Hecks" do
1462
1381
  role "Maintainer"
1463
1382
  goal "Prove an edit was comment-only: no file's code differs from the ref"
1464
1383
 
1465
- attribute :ref, Ref
1466
- attribute :paths, PathList, optional: true
1467
- attribute :run, RunKey
1384
+ attribute :ref, Ref, sets: true
1385
+ attribute :paths, PathList, optional: true, sets: true
1386
+ attribute :run, RunKey, sets: true
1468
1387
 
1469
- sets :ref
1470
- sets :paths
1471
- sets :run
1472
1388
  sets :operation, to: "check_comments_unchanged"
1473
1389
 
1474
1390
  emits CheckCommentsUnchangedRequested
@@ -1478,13 +1394,10 @@ Hecks.bluebook "Hecks" do
1478
1394
  role "Maintainer"
1479
1395
  goal "List every comment that breaks the Rust style guide"
1480
1396
 
1481
- attribute :paths, PathList
1482
- attribute :only, CategoryList, optional: true
1483
- attribute :run, RunKey
1397
+ attribute :paths, PathList, sets: true
1398
+ attribute :only, CategoryList, optional: true, sets: true
1399
+ attribute :run, RunKey, sets: true
1484
1400
 
1485
- sets :paths
1486
- sets :only
1487
- sets :run
1488
1401
  sets :operation, to: "check_rust_comments"
1489
1402
 
1490
1403
  emits CheckRustCommentsRequested
@@ -1494,15 +1407,11 @@ Hecks.bluebook "Hecks" do
1494
1407
  role "Maintainer"
1495
1408
  goal "Rewrite the mechanical Rust comment violations"
1496
1409
 
1497
- attribute :paths, PathList
1498
- attribute :only, CategoryList, optional: true
1499
- attribute :run, RunKey
1500
- attribute :confirm, Switch, optional: true
1410
+ attribute :paths, PathList, sets: true
1411
+ attribute :only, CategoryList, optional: true, sets: true
1412
+ attribute :run, RunKey, sets: true
1413
+ attribute :confirm, Switch, optional: true, sets: true
1501
1414
 
1502
- sets :paths
1503
- sets :only
1504
- sets :run
1505
- sets :confirm
1506
1415
  sets :operation, to: "fix_rust_comments"
1507
1416
 
1508
1417
  emits FixRustCommentsRequested
@@ -1512,11 +1421,9 @@ Hecks.bluebook "Hecks" do
1512
1421
  role "Maintainer"
1513
1422
  goal "Write a JSON document with every object's keys sorted"
1514
1423
 
1515
- attribute :file, FilePath
1516
- attribute :run, RunKey
1424
+ attribute :file, FilePath, sets: true
1425
+ attribute :run, RunKey, sets: true
1517
1426
 
1518
- sets :file
1519
- sets :run
1520
1427
  sets :operation, to: "canonicalise"
1521
1428
 
1522
1429
  emits CanonicaliseRequested
@@ -1529,11 +1436,10 @@ Hecks.bluebook "Hecks" do
1529
1436
  goal "Let a request through only when the working tree is a hecks checkout"
1530
1437
 
1531
1438
  reference_to StyleRun
1532
- attribute :checkout, Switch
1439
+ attribute :checkout, Switch, sets: true
1533
1440
 
1534
1441
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1535
1442
 
1536
- sets :checkout
1537
1443
 
1538
1444
  emits StyleAccepted
1539
1445
  end
@@ -1543,9 +1449,8 @@ Hecks.bluebook "Hecks" do
1543
1449
  goal "Record that the request was carried out, and what it reported"
1544
1450
 
1545
1451
  reference_to StyleRun
1546
- attribute :report, Report
1452
+ attribute :report, Report, sets: true
1547
1453
 
1548
- sets :report
1549
1454
 
1550
1455
  emits StyleCompleted
1551
1456
  end
@@ -1555,9 +1460,8 @@ Hecks.bluebook "Hecks" do
1555
1460
  goal "Record that the request was refused or could not be carried out, and why"
1556
1461
 
1557
1462
  reference_to StyleRun
1558
- attribute :refusal, Report
1463
+ attribute :refusal, Report, sets: true
1559
1464
 
1560
- sets :refusal
1561
1465
 
1562
1466
  emits StyleFaulted
1563
1467
  end
@@ -1601,37 +1505,37 @@ Hecks.bluebook "Hecks" do
1601
1505
 
1602
1506
  policy "ExamineWhenCheckCommentsRequested" do
1603
1507
  on "StyleRun.CheckCommentsRequested"
1604
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1508
+ ask :examine, with: { run: :run }
1605
1509
  end
1606
1510
 
1607
1511
  policy "ExamineWhenFixCommentsRequested" do
1608
1512
  on "StyleRun.FixCommentsRequested"
1609
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1513
+ ask :examine, with: { run: :run }
1610
1514
  end
1611
1515
 
1612
1516
  policy "ExamineWhenWriteCommentBaselineRequested" do
1613
1517
  on "StyleRun.WriteCommentBaselineRequested"
1614
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1518
+ ask :examine, with: { run: :run }
1615
1519
  end
1616
1520
 
1617
1521
  policy "ExamineWhenCheckCommentsUnchangedRequested" do
1618
1522
  on "StyleRun.CheckCommentsUnchangedRequested"
1619
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1523
+ ask :examine, with: { run: :run }
1620
1524
  end
1621
1525
 
1622
1526
  policy "ExamineWhenCheckRustCommentsRequested" do
1623
1527
  on "StyleRun.CheckRustCommentsRequested"
1624
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1528
+ ask :examine, with: { run: :run }
1625
1529
  end
1626
1530
 
1627
1531
  policy "ExamineWhenFixRustCommentsRequested" do
1628
1532
  on "StyleRun.FixRustCommentsRequested"
1629
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1533
+ ask :examine, with: { run: :run }
1630
1534
  end
1631
1535
 
1632
1536
  policy "ExamineWhenCanonicaliseRequested" do
1633
1537
  on "StyleRun.CanonicaliseRequested"
1634
- trigger StyleRun::SourceTree::Examine, with: { run: :run }
1538
+ ask :examine, with: { run: :run }
1635
1539
  end
1636
1540
 
1637
1541
  policy "AcceptStyleWhenExamined" do
@@ -1647,7 +1551,7 @@ Hecks.bluebook "Hecks" do
1647
1551
 
1648
1552
  policy "PerformStyleWhenAccepted" do
1649
1553
  on "StyleRun.StyleAccepted"
1650
- trigger StyleRun::SourceTree::Perform, with: { run: :run }
1554
+ ask :perform, with: { run: :run }
1651
1555
  end
1652
1556
 
1653
1557
  policy "RecordStyleOutcome" do
@@ -1695,7 +1599,7 @@ Hecks.bluebook "Hecks" do
1695
1599
 
1696
1600
  # Files or directories, comma separated; lib when none is named.
1697
1601
  value_object "PathList" do
1698
- attribute :value, String, pattern: '^[^ \t\n\r,]+(,[^ \t\n\r,]+)*$'
1602
+ attribute :value, String, matches: :csv_list
1699
1603
  end
1700
1604
 
1701
1605
  # How many lines of the report are kept.
@@ -1710,19 +1614,17 @@ Hecks.bluebook "Hecks" do
1710
1614
  transition "Accept" => "accepted", from: "requested"
1711
1615
  transition "Complete" => "completed", from: "accepted"
1712
1616
  transition "Fault" => "faulted", from: %w[requested accepted]
1617
+ mark :terminal, "completed", "faulted"
1713
1618
  end
1714
1619
 
1715
1620
  command "Flog" do
1716
1621
  role "Maintainer"
1717
1622
  goal "Rank the Ruby methods by complexity, worst first"
1718
1623
 
1719
- attribute :paths, PathList, optional: true
1720
- attribute :top, Top, optional: true
1721
- attribute :run, RunKey
1624
+ attribute :paths, PathList, optional: true, sets: true
1625
+ attribute :top, Top, optional: true, sets: true
1626
+ attribute :run, RunKey, sets: true
1722
1627
 
1723
- sets :paths
1724
- sets :top
1725
- sets :run
1726
1628
  sets :operation, to: "flog"
1727
1629
 
1728
1630
  emits FlogRequested
@@ -1732,13 +1634,10 @@ Hecks.bluebook "Hecks" do
1732
1634
  role "Maintainer"
1733
1635
  goal "Find Ruby code that is copied or nearly copied"
1734
1636
 
1735
- attribute :paths, PathList, optional: true
1736
- attribute :top, Top, optional: true
1737
- attribute :run, RunKey
1637
+ attribute :paths, PathList, optional: true, sets: true
1638
+ attribute :top, Top, optional: true, sets: true
1639
+ attribute :run, RunKey, sets: true
1738
1640
 
1739
- sets :paths
1740
- sets :top
1741
- sets :run
1742
1641
  sets :operation, to: "flay"
1743
1642
 
1744
1643
  emits FlayRequested
@@ -1748,13 +1647,10 @@ Hecks.bluebook "Hecks" do
1748
1647
  role "Maintainer"
1749
1648
  goal "List the design smells in the Ruby"
1750
1649
 
1751
- attribute :paths, PathList, optional: true
1752
- attribute :top, Top, optional: true
1753
- attribute :run, RunKey
1650
+ attribute :paths, PathList, optional: true, sets: true
1651
+ attribute :top, Top, optional: true, sets: true
1652
+ attribute :run, RunKey, sets: true
1754
1653
 
1755
- sets :paths
1756
- sets :top
1757
- sets :run
1758
1654
  sets :operation, to: "reek"
1759
1655
 
1760
1656
  emits ReekRequested
@@ -1764,13 +1660,10 @@ Hecks.bluebook "Hecks" do
1764
1660
  role "Maintainer"
1765
1661
  goal "Write the combined quality report, with git churn"
1766
1662
 
1767
- attribute :paths, PathList, optional: true
1768
- attribute :top, Top, optional: true
1769
- attribute :run, RunKey
1663
+ attribute :paths, PathList, optional: true, sets: true
1664
+ attribute :top, Top, optional: true, sets: true
1665
+ attribute :run, RunKey, sets: true
1770
1666
 
1771
- sets :paths
1772
- sets :top
1773
- sets :run
1774
1667
  sets :operation, to: "rubycritic"
1775
1668
 
1776
1669
  emits RubycriticRequested
@@ -1783,11 +1676,10 @@ Hecks.bluebook "Hecks" do
1783
1676
  goal "Let a request through only when the working tree is a hecks checkout"
1784
1677
 
1785
1678
  reference_to InspectionRun
1786
- attribute :checkout, Switch
1679
+ attribute :checkout, Switch, sets: true
1787
1680
 
1788
1681
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1789
1682
 
1790
- sets :checkout
1791
1683
 
1792
1684
  emits InspectionAccepted
1793
1685
  end
@@ -1797,9 +1689,8 @@ Hecks.bluebook "Hecks" do
1797
1689
  goal "Record that the inspection was carried out, and what it reported"
1798
1690
 
1799
1691
  reference_to InspectionRun
1800
- attribute :report, Report
1692
+ attribute :report, Report, sets: true
1801
1693
 
1802
- sets :report
1803
1694
 
1804
1695
  emits InspectionCompleted
1805
1696
  end
@@ -1809,9 +1700,8 @@ Hecks.bluebook "Hecks" do
1809
1700
  goal "Record that the inspection was refused or could not be carried out, and why"
1810
1701
 
1811
1702
  reference_to InspectionRun
1812
- attribute :refusal, Report
1703
+ attribute :refusal, Report, sets: true
1813
1704
 
1814
- sets :refusal
1815
1705
 
1816
1706
  emits InspectionFaulted
1817
1707
  end
@@ -1828,26 +1718,90 @@ Hecks.bluebook "Hecks" do
1828
1718
  where(status: "faulted")
1829
1719
  order_by :run
1830
1720
  end
1721
+
1722
+ # A regular expression, matched against one line of text at a time.
1723
+ value_object "Pattern" do
1724
+ attribute :value, String, matches: :present
1725
+ end
1726
+
1727
+ # An answer that is one document of text, one `path:line: text` row to a match.
1728
+ value_object "Document" do
1729
+ attribute :text, String
1730
+ end
1731
+
1732
+ query "Search" do
1733
+ description "The lines of the checkout's text files that match a pattern, as path:line: text."
1734
+ attribute :pattern, Pattern
1735
+ attribute :paths, PathList, optional: true
1736
+ attribute :top, Top, optional: true
1737
+ returns Document
1738
+ end
1739
+
1740
+ # A file of the checkout, named from its root.
1741
+ value_object "SourcePath" do
1742
+ attribute :value, String, matches: :present
1743
+ end
1744
+
1745
+ # A line of a file, counted from 1.
1746
+ value_object "LineNumber" do
1747
+ attribute :value, Integer
1748
+
1749
+ invariant("a line is counted from 1") { value > 0 }
1750
+ end
1751
+
1752
+ # The name a construct is declared under, as it stands between the quotes.
1753
+ value_object "DeclaredName" do
1754
+ attribute :value, String, matches: :present
1755
+ end
1756
+
1757
+ # What a declaration is: aggregate, command, query, policy and the rest.
1758
+ value_object "DeclaredKind" do
1759
+ attribute :value, String, pattern: '^[a-z_]+$'
1760
+ end
1761
+
1762
+ query "ReadSource" do
1763
+ description "The numbered lines of one file of the checkout, whole or from one line to another."
1764
+ attribute :path, SourcePath
1765
+ attribute :from, LineNumber, optional: true
1766
+ attribute :to, LineNumber, optional: true
1767
+ attribute :top, Top, optional: true
1768
+ returns Document
1769
+ end
1770
+
1771
+ query "Outline" do
1772
+ description "What a file declares, by line: each construct of a bluebook, each definition of Ruby."
1773
+ attribute :path, SourcePath
1774
+ returns Document
1775
+ end
1776
+
1777
+ query "Declaration" do
1778
+ description "Where a named construct is declared across the corpus, as path:from-to, with its text on request."
1779
+ attribute :name, DeclaredName
1780
+ attribute :kind, DeclaredKind, optional: true
1781
+ attribute :paths, PathList, optional: true
1782
+ attribute :show, Switch, optional: true
1783
+ returns Document
1784
+ end
1831
1785
  end
1832
1786
 
1833
1787
  policy "ExamineWhenFlogRequested" do
1834
1788
  on "InspectionRun.FlogRequested"
1835
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1789
+ ask :examine, with: { run: :run }
1836
1790
  end
1837
1791
 
1838
1792
  policy "ExamineWhenFlayRequested" do
1839
1793
  on "InspectionRun.FlayRequested"
1840
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1794
+ ask :examine, with: { run: :run }
1841
1795
  end
1842
1796
 
1843
1797
  policy "ExamineWhenReekRequested" do
1844
1798
  on "InspectionRun.ReekRequested"
1845
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1799
+ ask :examine, with: { run: :run }
1846
1800
  end
1847
1801
 
1848
1802
  policy "ExamineWhenRubycriticRequested" do
1849
1803
  on "InspectionRun.RubycriticRequested"
1850
- trigger InspectionRun::SourceTree::Examine, with: { run: :run }
1804
+ ask :examine, with: { run: :run }
1851
1805
  end
1852
1806
 
1853
1807
  policy "AcceptInspectionWhenExamined" do
@@ -1863,7 +1817,7 @@ Hecks.bluebook "Hecks" do
1863
1817
 
1864
1818
  policy "PerformInspectionWhenAccepted" do
1865
1819
  on "InspectionRun.InspectionAccepted"
1866
- trigger InspectionRun::SourceTree::Perform, with: { run: :run }
1820
+ ask :perform, with: { run: :run }
1867
1821
  end
1868
1822
 
1869
1823
  policy "RecordInspectionOutcome" do
@@ -1913,17 +1867,16 @@ Hecks.bluebook "Hecks" do
1913
1867
  transition "Accept" => "accepted", from: "requested"
1914
1868
  transition "Complete" => "completed", from: "accepted"
1915
1869
  transition "Fault" => "faulted", from: %w[requested accepted]
1870
+ mark :terminal, "completed", "faulted"
1916
1871
  end
1917
1872
 
1918
1873
  command "HoistLocalGivens" do
1919
1874
  role "Maintainer"
1920
1875
  goal "Hoist a given that several commands of one owner repeat into one owner-level given"
1921
1876
 
1922
- attribute :run, RunKey
1923
- attribute :confirm, Switch, optional: true
1877
+ attribute :run, RunKey, sets: true
1878
+ attribute :confirm, Switch, optional: true, sets: true
1924
1879
 
1925
- sets :run
1926
- sets :confirm
1927
1880
  sets :operation, to: "hoist_local_givens"
1928
1881
 
1929
1882
  emits HoistLocalGivensRequested
@@ -1933,11 +1886,9 @@ Hecks.bluebook "Hecks" do
1933
1886
  role "Maintainer"
1934
1887
  goal "Drop an attribute line that only repeats what an append target element declares"
1935
1888
 
1936
- attribute :run, RunKey
1937
- attribute :confirm, Switch, optional: true
1889
+ attribute :run, RunKey, sets: true
1890
+ attribute :confirm, Switch, optional: true, sets: true
1938
1891
 
1939
- sets :run
1940
- sets :confirm
1941
1892
  sets :operation, to: "drop_implicit_append_fields"
1942
1893
 
1943
1894
  emits DropImplicitAppendFieldsRequested
@@ -1950,11 +1901,10 @@ Hecks.bluebook "Hecks" do
1950
1901
  goal "Let a request through only when the working tree is a hecks checkout"
1951
1902
 
1952
1903
  reference_to CodemodRun
1953
- attribute :checkout, Switch
1904
+ attribute :checkout, Switch, sets: true
1954
1905
 
1955
1906
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
1956
1907
 
1957
- sets :checkout
1958
1908
 
1959
1909
  emits CodemodAccepted
1960
1910
  end
@@ -1964,9 +1914,8 @@ Hecks.bluebook "Hecks" do
1964
1914
  goal "Record that the request was carried out, and what it reported"
1965
1915
 
1966
1916
  reference_to CodemodRun
1967
- attribute :report, Report
1917
+ attribute :report, Report, sets: true
1968
1918
 
1969
- sets :report
1970
1919
 
1971
1920
  emits CodemodCompleted
1972
1921
  end
@@ -1976,9 +1925,8 @@ Hecks.bluebook "Hecks" do
1976
1925
  goal "Record that the request was refused or could not be carried out, and why"
1977
1926
 
1978
1927
  reference_to CodemodRun
1979
- attribute :refusal, Report
1928
+ attribute :refusal, Report, sets: true
1980
1929
 
1981
- sets :refusal
1982
1930
 
1983
1931
  emits CodemodFaulted
1984
1932
  end
@@ -1999,12 +1947,12 @@ Hecks.bluebook "Hecks" do
1999
1947
 
2000
1948
  policy "ExamineWhenHoistLocalGivensRequested" do
2001
1949
  on "CodemodRun.HoistLocalGivensRequested"
2002
- trigger CodemodRun::SourceTree::Examine, with: { run: :run }
1950
+ ask :examine, with: { run: :run }
2003
1951
  end
2004
1952
 
2005
1953
  policy "ExamineWhenDropImplicitAppendFieldsRequested" do
2006
1954
  on "CodemodRun.DropImplicitAppendFieldsRequested"
2007
- trigger CodemodRun::SourceTree::Examine, with: { run: :run }
1955
+ ask :examine, with: { run: :run }
2008
1956
  end
2009
1957
 
2010
1958
  policy "AcceptCodemodWhenExamined" do
@@ -2020,7 +1968,7 @@ Hecks.bluebook "Hecks" do
2020
1968
 
2021
1969
  policy "PerformCodemodWhenAccepted" do
2022
1970
  on "CodemodRun.CodemodAccepted"
2023
- trigger CodemodRun::SourceTree::Perform, with: { run: :run }
1971
+ ask :perform, with: { run: :run }
2024
1972
  end
2025
1973
 
2026
1974
  policy "RecordCodemodOutcome" do
@@ -2053,6 +2001,11 @@ Hecks.bluebook "Hecks" do
2053
2001
  attribute :fixture, FixtureName, optional: true
2054
2002
  attribute :exclude, ExcludePattern, optional: true
2055
2003
  attribute :tags, TagArguments, optional: true
2004
+ attribute :strict, Switch, optional: true
2005
+ attribute :seeds, Count, optional: true
2006
+ attribute :environment, EnvironmentName, optional: true
2007
+ attribute :declaration_cache, Switch, optional: true
2008
+ attribute :crate, CrateName, optional: true
2056
2009
  attribute :write, FilePath, optional: true
2057
2010
  attribute :group, Count, optional: true
2058
2011
  attribute :groups, Count, optional: true
@@ -2122,26 +2075,34 @@ Hecks.bluebook "Hecks" do
2122
2075
  attribute :value, String, pattern: '^[^\t\n\r]+$'
2123
2076
  end
2124
2077
 
2078
+ # An environment overlay's name, as `environments/<name>.world` spells it.
2079
+ value_object "EnvironmentName" do
2080
+ attribute :value, String, pattern: '^[a-z][a-z0-9_]*$'
2081
+ end
2082
+
2083
+ # A Rust test target whose fuzzers take their seed counts as arguments: the host, the parser,
2084
+ # or the JSON parse fuzzer of the root crate.
2085
+ value_object "CrateName" do
2086
+ attribute :value, String, pattern: '^(host|parser|json)$'
2087
+ end
2088
+
2125
2089
  lifecycle :status, default: "requested" do
2126
2090
  mark :failure, "faulted"
2127
2091
  transition "Accept" => "accepted", from: "requested"
2128
2092
  transition "Complete" => "completed", from: "accepted"
2129
2093
  transition "Fault" => "faulted", from: %w[requested accepted]
2094
+ mark :terminal, "completed", "faulted"
2130
2095
  end
2131
2096
 
2132
2097
  command "RefreshRuntimeBaseline" do
2133
2098
  role "Maintainer"
2134
2099
  goal "Regenerate the committed runtime baselines the sharded jobs group from"
2135
2100
 
2136
- attribute :workers, Count, default: 6
2137
- attribute :from_run, RunId, optional: true
2138
- attribute :run, RunKey
2139
- attribute :confirm, Switch, optional: true
2101
+ attribute :workers, Count, default: 6, sets: true
2102
+ attribute :from_run, RunId, optional: true, sets: true
2103
+ attribute :run, RunKey, sets: true
2104
+ attribute :confirm, Switch, optional: true, sets: true
2140
2105
 
2141
- sets :workers
2142
- sets :from_run
2143
- sets :run
2144
- sets :confirm
2145
2106
  sets :operation, to: "refresh_runtime_baseline"
2146
2107
 
2147
2108
  emits RefreshRuntimeBaselineRequested
@@ -2151,13 +2112,22 @@ Hecks.bluebook "Hecks" do
2151
2112
  role "Maintainer"
2152
2113
  goal "Run one spec file filtered to one example, through the test runner in this process"
2153
2114
 
2154
- attribute :file, FilePath
2155
- attribute :example, ExampleText
2156
- attribute :run, RunKey
2115
+ attribute :file, FilePath, sets: true
2116
+ attribute :example, ExampleText, sets: true
2117
+ attribute :run, RunKey, sets: true
2118
+ # Run the specs as CI does: the slow io, process and fuzzing groups included, and a Postgres
2119
+ # that is not reachable a failure, not a skip.
2120
+ attribute :strict, Switch, optional: true, sets: true
2121
+ # How many seeds the property specs try, where they default to a few.
2122
+ attribute :seeds, Count, optional: true, sets: true
2123
+ # The environment overlay the example boots its domains on, such as `memory`.
2124
+ attribute :environment, EnvironmentName, optional: true, sets: true
2125
+ # RSpec tag filters, such as `cloudfront` for the examples that call a real AWS account.
2126
+ attribute :tags, TagArguments, optional: true, sets: true
2127
+ # Whether specs share the loaded declarations of an unchanged domain directory; false loads each
2128
+ # boot afresh.
2129
+ attribute :declaration_cache, Switch, default: true, sets: true
2157
2130
 
2158
- sets :file
2159
- sets :example
2160
- sets :run
2161
2131
  sets :operation, to: "run_spec_example"
2162
2132
 
2163
2133
  emits RunSpecExampleRequested
@@ -2167,30 +2137,51 @@ Hecks.bluebook "Hecks" do
2167
2137
  role "Maintainer"
2168
2138
  goal "Rerun the thread-safety specs under many seeds, several processes at a time"
2169
2139
 
2170
- attribute :runs, Count, default: 30
2140
+ attribute :runs, Count, default: 30, sets: true
2171
2141
  # 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
2142
+ attribute :parallel, Count, optional: true, sets: true
2143
+ attribute :seed_start, Count, default: 1, sets: true
2144
+ attribute :run, RunKey, sets: true
2145
+
2180
2146
  sets :operation, to: "stress_concurrency"
2181
2147
 
2182
2148
  emits StressConcurrencyRequested
2183
2149
  end
2184
2150
 
2151
+ command "RunCargoTests" do
2152
+ role "Maintainer"
2153
+ goal "Run the cargo tests of the host, the parser or the JSON fuzzer, with the seed counts their fuzzers take"
2154
+
2155
+ attribute :crate, CrateName, sets: true
2156
+ attribute :seeds, Count, optional: true, sets: true
2157
+ attribute :seed_start, Count, optional: true, sets: true
2158
+ attribute :run, RunKey, sets: true
2159
+
2160
+ sets :operation, to: "run_cargo_tests"
2161
+
2162
+ emits RunCargoTestsRequested
2163
+ end
2164
+
2165
+ # The caches key on a digest of what they were built from, so a stale entry is never read; this
2166
+ # is for ruling a cache out as the cause of a surprise, which turning it off used to do.
2167
+ command "ClearCaches" do
2168
+ role "Maintainer"
2169
+ goal "Delete the on-disk syntax-boot and verdict caches, so the next boot builds and judges afresh"
2170
+
2171
+ attribute :run, RunKey, sets: true
2172
+
2173
+ sets :operation, to: "clear_caches"
2174
+
2175
+ emits ClearCachesRequested
2176
+ end
2177
+
2185
2178
  command "RegenerateLegacyFixtures" do
2186
2179
  role "Maintainer"
2187
2180
  goal "Regenerate the persistence legacy fixtures through the real adapters"
2188
2181
 
2189
- attribute :run, RunKey
2190
- attribute :confirm, Switch, optional: true
2182
+ attribute :run, RunKey, sets: true
2183
+ attribute :confirm, Switch, optional: true, sets: true
2191
2184
 
2192
- sets :run
2193
- sets :confirm
2194
2185
  sets :operation, to: "regenerate_legacy_fixtures"
2195
2186
 
2196
2187
  emits RegenerateLegacyFixturesRequested
@@ -2200,11 +2191,9 @@ Hecks.bluebook "Hecks" do
2200
2191
  role "Maintainer"
2201
2192
  goal "Fill the expected outcome of every semantics fixture that lacks one, or re-seed one"
2202
2193
 
2203
- attribute :fixture, FixtureName, optional: true
2204
- attribute :run, RunKey
2194
+ attribute :fixture, FixtureName, optional: true, sets: true
2195
+ attribute :run, RunKey, sets: true
2205
2196
 
2206
- sets :fixture
2207
- sets :run
2208
2197
  sets :operation, to: "seed_semantics_corpus"
2209
2198
 
2210
2199
  emits SeedSemanticsCorpusRequested
@@ -2214,17 +2203,12 @@ Hecks.bluebook "Hecks" do
2214
2203
  role "Maintainer"
2215
2204
  goal "Write the committed list of the spec files a tag filter selects"
2216
2205
 
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
2206
+ attribute :exclude, ExcludePattern, sets: true
2207
+ attribute :tags, TagArguments, optional: true, sets: true
2208
+ attribute :write, FilePath, sets: true
2209
+ attribute :run, RunKey, sets: true
2210
+ attribute :confirm, Switch, optional: true, sets: true
2211
+
2228
2212
  sets :operation, to: "write_io_parallel_spec_list"
2229
2213
 
2230
2214
  emits WriteIoParallelSpecListRequested
@@ -2237,11 +2221,10 @@ Hecks.bluebook "Hecks" do
2237
2221
  goal "Let a request through only when the working tree is a hecks checkout"
2238
2222
 
2239
2223
  reference_to TestSuiteRun
2240
- attribute :checkout, Switch
2224
+ attribute :checkout, Switch, sets: true
2241
2225
 
2242
2226
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2243
2227
 
2244
- sets :checkout
2245
2228
 
2246
2229
  emits TestSuiteAccepted
2247
2230
  end
@@ -2251,9 +2234,8 @@ Hecks.bluebook "Hecks" do
2251
2234
  goal "Record that the request was carried out, and what it reported"
2252
2235
 
2253
2236
  reference_to TestSuiteRun
2254
- attribute :report, Report
2237
+ attribute :report, Report, sets: true
2255
2238
 
2256
- sets :report
2257
2239
 
2258
2240
  emits TestSuiteCompleted
2259
2241
  end
@@ -2263,9 +2245,8 @@ Hecks.bluebook "Hecks" do
2263
2245
  goal "Record that the request was refused or could not be carried out, and why"
2264
2246
 
2265
2247
  reference_to TestSuiteRun
2266
- attribute :refusal, Report
2248
+ attribute :refusal, Report, sets: true
2267
2249
 
2268
- sets :refusal
2269
2250
 
2270
2251
  emits TestSuiteFaulted
2271
2252
  end
@@ -2312,32 +2293,42 @@ Hecks.bluebook "Hecks" do
2312
2293
 
2313
2294
  policy "ExamineWhenRefreshRuntimeBaselineRequested" do
2314
2295
  on "TestSuiteRun.RefreshRuntimeBaselineRequested"
2315
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2296
+ ask :examine, with: { run: :run }
2316
2297
  end
2317
2298
 
2318
2299
  policy "ExamineWhenRunSpecExampleRequested" do
2319
2300
  on "TestSuiteRun.RunSpecExampleRequested"
2320
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2301
+ ask :examine, with: { run: :run }
2321
2302
  end
2322
2303
 
2323
2304
  policy "ExamineWhenStressConcurrencyRequested" do
2324
2305
  on "TestSuiteRun.StressConcurrencyRequested"
2325
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2306
+ ask :examine, with: { run: :run }
2307
+ end
2308
+
2309
+ policy "ExamineWhenRunCargoTestsRequested" do
2310
+ on "TestSuiteRun.RunCargoTestsRequested"
2311
+ ask :examine, with: { run: :run }
2312
+ end
2313
+
2314
+ policy "ExamineWhenClearCachesRequested" do
2315
+ on "TestSuiteRun.ClearCachesRequested"
2316
+ ask :examine, with: { run: :run }
2326
2317
  end
2327
2318
 
2328
2319
  policy "ExamineWhenRegenerateLegacyFixturesRequested" do
2329
2320
  on "TestSuiteRun.RegenerateLegacyFixturesRequested"
2330
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2321
+ ask :examine, with: { run: :run }
2331
2322
  end
2332
2323
 
2333
2324
  policy "ExamineWhenSeedSemanticsCorpusRequested" do
2334
2325
  on "TestSuiteRun.SeedSemanticsCorpusRequested"
2335
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2326
+ ask :examine, with: { run: :run }
2336
2327
  end
2337
2328
 
2338
2329
  policy "ExamineWhenWriteIoParallelSpecListRequested" do
2339
2330
  on "TestSuiteRun.WriteIoParallelSpecListRequested"
2340
- trigger TestSuiteRun::SourceTree::Examine, with: { run: :run }
2331
+ ask :examine, with: { run: :run }
2341
2332
  end
2342
2333
 
2343
2334
  policy "AcceptTestSuiteWhenExamined" do
@@ -2353,7 +2344,7 @@ Hecks.bluebook "Hecks" do
2353
2344
 
2354
2345
  policy "PerformTestSuiteWhenAccepted" do
2355
2346
  on "TestSuiteRun.TestSuiteAccepted"
2356
- trigger TestSuiteRun::SourceTree::Perform, with: { run: :run }
2347
+ ask :perform, with: { run: :run }
2357
2348
  end
2358
2349
 
2359
2350
  policy "RecordTestSuiteOutcome" do
@@ -2384,17 +2375,30 @@ Hecks.bluebook "Hecks" do
2384
2375
  attribute :name, ConstructName, optional: true
2385
2376
  attribute :field, FieldName, optional: true
2386
2377
  attribute :port, Port, optional: true
2378
+ attribute :agent, AgentName, optional: true
2379
+ attribute :directory, Directory, optional: true
2387
2380
  attribute :checkout, Switch, optional: true
2388
2381
  attribute :report, Report, optional: true
2389
2382
  attribute :refusal, Report, optional: true
2390
2383
  identified_by :run
2391
2384
 
2385
+ # One directory of files, named by a path.
2386
+ value_object "Directory" do
2387
+ attribute :value, String, matches: :present
2388
+ end
2389
+
2392
2390
  value_object "RunKey" do
2393
2391
  attribute :value, String, matches: :present
2394
2392
 
2395
2393
  invariant("a run is named") { !value.to_s.empty? }
2396
2394
  end
2397
2395
 
2396
+ # Which agent drives the Composer's assistant: the real `claude`, or a scripted `fake` for
2397
+ # trying the editor without a model.
2398
+ value_object "AgentName" do
2399
+ attribute :value, String, pattern: '^(claude|fake)$'
2400
+ end
2401
+
2398
2402
  value_object "Operation" do
2399
2403
  attribute :value, String, matches: :present
2400
2404
  end
@@ -2414,12 +2418,12 @@ Hecks.bluebook "Hecks" do
2414
2418
 
2415
2419
  # Domain directories, comma separated.
2416
2420
  value_object "PathList" do
2417
- attribute :value, String, pattern: '^[^ \t\n\r,]+(,[^ \t\n\r,]+)*$'
2421
+ attribute :value, String, matches: :csv_list
2418
2422
  end
2419
2423
 
2420
2424
  # The name of one IR construct.
2421
2425
  value_object "ConstructName" do
2422
- attribute :value, String, pattern: '^[A-Za-z][A-Za-z0-9_]*$'
2426
+ attribute :value, String, matches: :identifier
2423
2427
  end
2424
2428
 
2425
2429
  # The name of one field of a construct.
@@ -2439,15 +2443,15 @@ Hecks.bluebook "Hecks" do
2439
2443
  transition "Accept" => "accepted", from: "requested"
2440
2444
  transition "Complete" => "completed", from: "accepted"
2441
2445
  transition "Fault" => "faulted", from: %w[requested accepted]
2446
+ mark :terminal, "completed", "faulted"
2442
2447
  end
2443
2448
 
2444
2449
  command "ServeQueryIrMcp" do
2445
2450
  role "Maintainer"
2446
2451
  goal "Serve the IR queries to an MCP client over stdio until it closes"
2447
2452
 
2448
- attribute :run, RunKey
2453
+ attribute :run, RunKey, sets: true
2449
2454
 
2450
- sets :run
2451
2455
  sets :operation, to: "serve_query_ir_mcp"
2452
2456
 
2453
2457
  emits ServeQueryIrMcpRequested
@@ -2457,11 +2461,9 @@ Hecks.bluebook "Hecks" do
2457
2461
  role "Maintainer"
2458
2462
  goal "Serve the banking example's rendered forms and views on a local port until stopped"
2459
2463
 
2460
- attribute :port, Port, optional: true
2461
- attribute :run, RunKey
2464
+ attribute :port, Port, optional: true, sets: true
2465
+ attribute :run, RunKey, sets: true
2462
2466
 
2463
- sets :port
2464
- sets :run
2465
2467
  sets :operation, to: "present"
2466
2468
 
2467
2469
  emits PresentRequested
@@ -2471,18 +2473,29 @@ Hecks.bluebook "Hecks" do
2471
2473
  role "Maintainer"
2472
2474
  goal "Serve the Composer, a live bluebook editor over one domain directory, on a local port until stopped"
2473
2475
 
2474
- attribute :port, Port, optional: true
2475
- attribute :domains, PathList, optional: true
2476
- attribute :run, RunKey
2476
+ attribute :port, Port, optional: true, sets: true
2477
+ attribute :domains, PathList, optional: true, sets: true
2478
+ attribute :agent, AgentName, default: "claude", sets: true
2479
+ attribute :run, RunKey, sets: true
2477
2480
 
2478
- sets :port
2479
- sets :domains
2480
- sets :run
2481
2481
  sets :operation, to: "compose"
2482
2482
 
2483
2483
  emits ComposeRequested
2484
2484
  end
2485
2485
 
2486
+ command "Preview" do
2487
+ role "Maintainer"
2488
+ goal "Serve one directory of static files, such as a website, on a local port until stopped"
2489
+
2490
+ attribute :directory, Directory, sets: true
2491
+ attribute :port, Port, optional: true, sets: true
2492
+ attribute :run, RunKey, sets: true
2493
+
2494
+ sets :operation, to: "preview"
2495
+
2496
+ emits PreviewRequested
2497
+ end
2498
+
2486
2499
  # What the tree reported about itself, held against every request: nothing here runs
2487
2500
  # outside a hecks checkout (hecks.gemspec beside lib/).
2488
2501
  command "Accept" do
@@ -2490,11 +2503,10 @@ Hecks.bluebook "Hecks" do
2490
2503
  goal "Let a request through only when the working tree is a hecks checkout"
2491
2504
 
2492
2505
  reference_to CorpusRun
2493
- attribute :checkout, Switch
2506
+ attribute :checkout, Switch, sets: true
2494
2507
 
2495
2508
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2496
2509
 
2497
- sets :checkout
2498
2510
 
2499
2511
  emits CorpusAccepted
2500
2512
  end
@@ -2504,9 +2516,8 @@ Hecks.bluebook "Hecks" do
2504
2516
  goal "Record that the request was carried out, and what it reported"
2505
2517
 
2506
2518
  reference_to CorpusRun
2507
- attribute :report, Report
2519
+ attribute :report, Report, sets: true
2508
2520
 
2509
- sets :report
2510
2521
 
2511
2522
  emits CorpusCompleted
2512
2523
  end
@@ -2516,9 +2527,8 @@ Hecks.bluebook "Hecks" do
2516
2527
  goal "Record that the request was refused or could not be carried out, and why"
2517
2528
 
2518
2529
  reference_to CorpusRun
2519
- attribute :refusal, Report
2530
+ attribute :refusal, Report, sets: true
2520
2531
 
2521
- sets :refusal
2522
2532
 
2523
2533
  emits CorpusFaulted
2524
2534
  end
@@ -2579,17 +2589,22 @@ Hecks.bluebook "Hecks" do
2579
2589
 
2580
2590
  policy "ExamineWhenServeQueryIrMcpRequested" do
2581
2591
  on "CorpusRun.ServeQueryIrMcpRequested"
2582
- trigger CorpusRun::SourceTree::Examine, with: { run: :run }
2592
+ ask :examine, with: { run: :run }
2583
2593
  end
2584
2594
 
2585
2595
  policy "ExamineWhenPresentRequested" do
2586
2596
  on "CorpusRun.PresentRequested"
2587
- trigger CorpusRun::SourceTree::Examine, with: { run: :run }
2597
+ ask :examine, with: { run: :run }
2588
2598
  end
2589
2599
 
2590
2600
  policy "ExamineWhenComposeRequested" do
2591
2601
  on "CorpusRun.ComposeRequested"
2592
- trigger CorpusRun::SourceTree::Examine, with: { run: :run }
2602
+ ask :examine, with: { run: :run }
2603
+ end
2604
+
2605
+ policy "ExamineWhenPreviewRequested" do
2606
+ on "CorpusRun.PreviewRequested"
2607
+ ask :examine, with: { run: :run }
2593
2608
  end
2594
2609
 
2595
2610
  policy "AcceptCorpusWhenExamined" do
@@ -2605,7 +2620,7 @@ Hecks.bluebook "Hecks" do
2605
2620
 
2606
2621
  policy "PerformCorpusWhenAccepted" do
2607
2622
  on "CorpusRun.CorpusAccepted"
2608
- trigger CorpusRun::SourceTree::Perform, with: { run: :run }
2623
+ ask :perform, with: { run: :run }
2609
2624
  end
2610
2625
 
2611
2626
  policy "RecordCorpusOutcome" do
@@ -2626,6 +2641,13 @@ Hecks.bluebook "Hecks" do
2626
2641
  aggregate "PublishingRun" do
2627
2642
  description "One release of the gem, or the rehearsal of it: judged by the facts, then carried out."
2628
2643
 
2644
+ acknowledges :key_by_value, "the version this run tags; its Release is made by the run's own Tag, so a reference would require the record the command exists to make",
2645
+ of: :version
2646
+ acknowledges :key_by_value, "the client package's version, not a gem Release",
2647
+ of: :client_version
2648
+ acknowledges :key_by_value, "the IR format's version, not a gem Release",
2649
+ of: :ir_version
2650
+
2629
2651
  attribute :run, RunKey
2630
2652
  attribute :operation, Operation, optional: true
2631
2653
  attribute :confirm, Switch, optional: true
@@ -2677,7 +2699,7 @@ Hecks.bluebook "Hecks" do
2677
2699
  end
2678
2700
 
2679
2701
  value_object "Version" do
2680
- attribute :value, String, pattern: '^[0-9]+[.][0-9]+[.][0-9]+'
2702
+ attribute :value, String, matches: :version
2681
2703
  end
2682
2704
 
2683
2705
  # The working tree the release is cut from.
@@ -2691,25 +2713,20 @@ Hecks.bluebook "Hecks" do
2691
2713
  transition "AcceptGem" => "accepted", from: "requested"
2692
2714
  transition "Complete" => "completed", from: "accepted"
2693
2715
  transition "Fault" => "faulted", from: %w[requested accepted]
2716
+ mark :terminal, "completed", "faulted"
2694
2717
  end
2695
2718
 
2696
2719
  command "Publish" do
2697
2720
  role "Maintainer"
2698
2721
  goal "Tag the merged release commit, publish the gem, and get the client package published"
2699
2722
 
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
2723
+ attribute :gem_only, Switch, optional: true, sets: true
2724
+ attribute :npm_only, Switch, optional: true, sets: true
2725
+ attribute :npm_local, Switch, optional: true, sets: true
2726
+ attribute :no_wait, Switch, optional: true, sets: true
2727
+ attribute :run, RunKey, sets: true
2728
+ attribute :confirm, Switch, optional: true, sets: true
2729
+
2713
2730
  sets :operation, to: "publish"
2714
2731
 
2715
2732
  emits PublishRequested
@@ -2719,11 +2736,9 @@ Hecks.bluebook "Hecks" do
2719
2736
  role "Maintainer"
2720
2737
  goal "Build the gem and push it to the gem registry, with the key the vault holds"
2721
2738
 
2722
- attribute :run, RunKey
2723
- attribute :confirm, Switch, optional: true
2739
+ attribute :run, RunKey, sets: true
2740
+ attribute :confirm, Switch, optional: true, sets: true
2724
2741
 
2725
- sets :run
2726
- sets :confirm
2727
2742
  sets :operation, to: "publish_gem"
2728
2743
 
2729
2744
  emits PublishGemRequested
@@ -2736,19 +2751,19 @@ Hecks.bluebook "Hecks" do
2736
2751
  goal "Let a release go ahead only in a hecks checkout, and only when the facts satisfy every rule"
2737
2752
 
2738
2753
  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
2754
+ attribute :checkout, Switch, sets: true
2755
+ attribute :branch, Word, sets: true
2756
+ attribute :release_lane, Word, sets: true
2757
+ attribute :on_origin, Switch, sets: true
2758
+ attribute :clean, Switch, sets: true
2759
+ attribute :version, Version, sets: true
2760
+ attribute :client_version, Version, sets: true
2761
+ attribute :changelog, Switch, sets: true
2762
+ attribute :approved, Switch, sets: true
2763
+ attribute :tag_state, Word, sets: true
2764
+ attribute :head, Word, sets: true
2765
+ attribute :ir_version, Version, sets: true
2766
+ attribute :ships_from, Checkout, sets: true
2752
2767
 
2753
2768
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2754
2769
  given("a release is cut from the release lane (the Lane row that feeds a tag): switch to it first") do
@@ -2767,19 +2782,6 @@ Hecks.bluebook "Hecks" do
2767
2782
  tag_state.value != "elsewhere"
2768
2783
  end
2769
2784
 
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
2785
 
2784
2786
  emits PublishingAccepted
2785
2787
  end
@@ -2790,22 +2792,17 @@ Hecks.bluebook "Hecks" do
2790
2792
  goal "Let a gem push go ahead only in a hecks checkout, with the client package at the gem's version"
2791
2793
 
2792
2794
  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
2795
+ attribute :checkout, Switch, sets: true
2796
+ attribute :version, Version, sets: true
2797
+ attribute :client_version, Version, sets: true
2798
+ attribute :ir_version, Version, sets: true
2799
+ attribute :ships_from, Checkout, sets: true
2798
2800
 
2799
2801
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
2800
2802
  given("the client package is at the gem's version: bump the package first") do
2801
2803
  client_version.value == version.value
2802
2804
  end
2803
2805
 
2804
- sets :checkout
2805
- sets :version
2806
- sets :client_version
2807
- sets :ir_version
2808
- sets :ships_from
2809
2806
 
2810
2807
  emits GemAccepted
2811
2808
  end
@@ -2815,15 +2812,11 @@ Hecks.bluebook "Hecks" do
2815
2812
  goal "Record that the release was carried out, what it did, and what it reported"
2816
2813
 
2817
2814
  reference_to PublishingRun
2818
- attribute :report, Report
2819
- attribute :tagged, Switch
2820
- attribute :published, Switch
2821
- attribute :verified, Switch
2815
+ attribute :report, Report, sets: true
2816
+ attribute :tagged, Switch, sets: true
2817
+ attribute :published, Switch, sets: true
2818
+ attribute :verified, Switch, sets: true
2822
2819
 
2823
- sets :report
2824
- sets :tagged
2825
- sets :published
2826
- sets :verified
2827
2820
 
2828
2821
  emits PublishingCompleted
2829
2822
  end
@@ -2833,9 +2826,8 @@ Hecks.bluebook "Hecks" do
2833
2826
  goal "Record that the request was refused or could not be carried out, and why"
2834
2827
 
2835
2828
  reference_to PublishingRun
2836
- attribute :refusal, Report
2829
+ attribute :refusal, Report, sets: true
2837
2830
 
2838
- sets :refusal
2839
2831
 
2840
2832
  emits PublishingFaulted
2841
2833
  end
@@ -2856,12 +2848,12 @@ Hecks.bluebook "Hecks" do
2856
2848
 
2857
2849
  policy "ExaminePublishingWhenPublishRequested" do
2858
2850
  on "PublishingRun.PublishRequested"
2859
- trigger PublishingRun::SourceTree::Examine, with: { run: :run }
2851
+ ask :examine, with: { run: :run }
2860
2852
  end
2861
2853
 
2862
2854
  policy "ExaminePublishingWhenPublishGemRequested" do
2863
2855
  on "PublishingRun.PublishGemRequested"
2864
- trigger PublishingRun::SourceTree::Examine, with: { run: :run }
2856
+ ask :examine, with: { run: :run }
2865
2857
  end
2866
2858
 
2867
2859
  policy "AcceptTheReleaseWhenExamined" do
@@ -2903,12 +2895,12 @@ Hecks.bluebook "Hecks" do
2903
2895
 
2904
2896
  policy "PerformPublishingWhenAccepted" do
2905
2897
  on "PublishingRun.PublishingAccepted"
2906
- trigger PublishingRun::SourceTree::Perform, with: { run: :run }
2898
+ ask :perform, with: { run: :run }
2907
2899
  end
2908
2900
 
2909
2901
  policy "PerformPublishingWhenGemAccepted" do
2910
2902
  on "PublishingRun.GemAccepted"
2911
- trigger PublishingRun::SourceTree::Perform, with: { run: :run }
2903
+ ask :perform, with: { run: :run }
2912
2904
  end
2913
2905
 
2914
2906
  # A real run advances the root Release: tagged when the tag was made, published when a registry
@@ -3023,6 +3015,7 @@ Hecks.bluebook "Hecks" do
3023
3015
  transition "Complete" => "completed", from: %w[accepted observed]
3024
3016
  transition "Fault" => "faulted", from: %w[requested accepted]
3025
3017
  transition "Lag" => "faulted", from: "observed"
3018
+ mark :terminal, "completed", "faulted"
3026
3019
  end
3027
3020
 
3028
3021
  # Looks at a lane and moves nothing: faults when it has stood behind the lane it follows for
@@ -3032,13 +3025,10 @@ Hecks.bluebook "Hecks" do
3032
3025
  role "Maintainer"
3033
3026
  goal "Fault when a lane has stood behind the lane it follows for longer than its Lane row allows"
3034
3027
 
3035
- attribute :lane, Word
3036
- attribute :run, RunKey
3037
- attribute :alert_key, Word
3028
+ attribute :lane, Word, sets: true
3029
+ attribute :run, RunKey, sets: true
3030
+ attribute :alert_key, Word, sets: true
3038
3031
 
3039
- sets :lane
3040
- sets :run
3041
- sets :alert_key
3042
3032
  sets :operation, to: "watch"
3043
3033
 
3044
3034
  emits WatchRequested
@@ -3048,15 +3038,11 @@ Hecks.bluebook "Hecks" do
3048
3038
  role "Maintainer"
3049
3039
  goal "Move a lane onto a commit that has passed every required check, or with no --confirm rehearse the move"
3050
3040
 
3051
- attribute :lane, Word
3052
- attribute :commit, Word, optional: true
3053
- attribute :run, RunKey
3054
- attribute :confirm, Switch, optional: true
3041
+ attribute :lane, Word, sets: true
3042
+ attribute :commit, Word, optional: true, sets: true
3043
+ attribute :run, RunKey, sets: true
3044
+ attribute :confirm, Switch, optional: true, sets: true
3055
3045
 
3056
- sets :lane
3057
- sets :commit
3058
- sets :run
3059
- sets :confirm
3060
3046
  sets :operation, to: "promote"
3061
3047
 
3062
3048
  emits PromoteRequested
@@ -3069,24 +3055,18 @@ Hecks.bluebook "Hecks" do
3069
3055
  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
3056
 
3071
3057
  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
3058
+ attribute :checkout, Switch, sets: true
3059
+ attribute :lane_known, Switch, sets: true
3060
+ attribute :green, Switch, sets: true
3061
+ attribute :descends, Switch, sets: true
3062
+ attribute :commit, Word, sets: true
3063
+ attribute :head, Word, optional: true, sets: true
3078
3064
 
3079
3065
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
3080
3066
  given("the lane is one of the Lane rows, and follows another lane") { lane_known.value }
3081
3067
  given("every RequiredCheck is green on the commit: wait for the checks, or fix the red one") { green.value }
3082
3068
  given("the commit is on the lane it follows and contains the lane's head: a lane only moves forward") { descends.value }
3083
3069
 
3084
- sets :checkout
3085
- sets :lane_known
3086
- sets :green
3087
- sets :descends
3088
- sets :commit
3089
- sets :head
3090
3070
 
3091
3071
  emits PromotionAccepted
3092
3072
  end
@@ -3098,24 +3078,17 @@ Hecks.bluebook "Hecks" do
3098
3078
  goal "Let a lane be judged late or on time only in a hecks checkout, for a lane that follows another"
3099
3079
 
3100
3080
  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
3081
+ attribute :checkout, Switch, sets: true
3082
+ attribute :lane_known, Switch, sets: true
3083
+ attribute :behind_hours, Hours, sets: true
3084
+ attribute :limit_hours, Hours, sets: true
3085
+ attribute :alert_key, Word, sets: true
3086
+ attribute :promoted, Switch, sets: true
3087
+ attribute :reason, Report, sets: true
3108
3088
 
3109
3089
  given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
3110
3090
  given("the lane is one of the Lane rows, and follows another lane") { lane_known.value }
3111
3091
 
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
3092
 
3120
3093
  emits LaneObserved
3121
3094
  end
@@ -3125,11 +3098,9 @@ Hecks.bluebook "Hecks" do
3125
3098
  goal "Record that the promotion was carried out or rehearsed, or the lane was on time, and what it reported"
3126
3099
 
3127
3100
  reference_to PromotionRun
3128
- attribute :report, Report
3129
- attribute :promoted, Switch
3101
+ attribute :report, Report, sets: true
3102
+ attribute :promoted, Switch, sets: true
3130
3103
 
3131
- sets :report
3132
- sets :promoted
3133
3104
 
3134
3105
  emits PromotionCompleted
3135
3106
  end
@@ -3140,11 +3111,9 @@ Hecks.bluebook "Hecks" do
3140
3111
  goal "Record that a lane is late, and what it is waiting on, under the alert key that names its finding"
3141
3112
 
3142
3113
  reference_to PromotionRun
3143
- attribute :refusal, Report
3144
- attribute :alert_key, Word
3114
+ attribute :refusal, Report, sets: true
3115
+ attribute :alert_key, Word, sets: true
3145
3116
 
3146
- sets :refusal
3147
- sets :alert_key
3148
3117
 
3149
3118
  emits LaneLagged
3150
3119
  end
@@ -3154,9 +3123,8 @@ Hecks.bluebook "Hecks" do
3154
3123
  goal "Record that the promotion was refused or could not be carried out, and why"
3155
3124
 
3156
3125
  reference_to PromotionRun
3157
- attribute :refusal, Report
3126
+ attribute :refusal, Report, sets: true
3158
3127
 
3159
- sets :refusal
3160
3128
 
3161
3129
  emits PromotionFaulted
3162
3130
  end
@@ -3177,12 +3145,12 @@ Hecks.bluebook "Hecks" do
3177
3145
 
3178
3146
  policy "ExamineWhenPromoteRequested" do
3179
3147
  on "PromotionRun.PromoteRequested"
3180
- trigger PromotionRun::SourceTree::Examine, with: { run: :run }
3148
+ ask :examine, with: { run: :run }
3181
3149
  end
3182
3150
 
3183
3151
  policy "ExamineWhenWatchRequested" do
3184
3152
  on "PromotionRun.WatchRequested"
3185
- trigger PromotionRun::SourceTree::Examine, with: { run: :run }
3153
+ ask :examine, with: { run: :run }
3186
3154
  end
3187
3155
 
3188
3156
  policy "ObserveWhenWatchExamined" do
@@ -3226,7 +3194,7 @@ Hecks.bluebook "Hecks" do
3226
3194
 
3227
3195
  policy "PerformPromotionWhenAccepted" do
3228
3196
  on "PromotionRun.PromotionAccepted"
3229
- trigger PromotionRun::SourceTree::Perform, with: { run: :run }
3197
+ ask :perform, with: { run: :run }
3230
3198
  end
3231
3199
 
3232
3200
  policy "RecordPromotionOutcome" do