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
@@ -1,11 +1,11 @@
1
- # The Deploy chapter: what `deployed_to(...)` may declare, and the commands that generate, check and
1
+ # The Deploy bluebook: what `deployed_to(...)` may declare, and the commands that generate, check and
2
2
  # compare a deploy recipe, project the OIDC manifests and provision a tenant.
3
3
  #
4
4
  # `hecks deploy recipe.project` and `hecks deploy tenant.provision` boot it directly; the Hecks domain attaches it, so
5
5
  # each command below is also `hecks deploy <verb>`. The targets validate the `deployed_to` shape
6
6
  # that `world.bluebook`'s untyped `Setting` map leaves open. Each run below records that it was
7
7
  # requested before its DeployToolchain port is asked, and what came of it after. No command
8
- # declares a role: the chapter boots standing alone, without Governance to check one against.
8
+ # declares a role: the bluebook boots standing alone, without Governance to check one against.
9
9
  Hecks.bluebook "Deploy" do
10
10
  vision "Generate, check and compare deploy recipes, project OIDC manifests and provision tenants."
11
11
 
@@ -91,29 +91,20 @@ Hecks.bluebook "Deploy" do
91
91
  command "Declare" do
92
92
  goal "Validate one domain's AwsLambda deploy target before anything is generated from it"
93
93
 
94
- attribute :domain, DomainName
95
- attribute :region, Region
96
- attribute :memory, Memory
97
- attribute :timeout, Timeout
98
- attribute :database, Database
99
- attribute :web, Web
100
- attribute :dispatch, Dispatch, optional: true
101
- attribute :handler_module, HandlerModule, optional: true
102
- attribute :secret_env, SecretEnv, optional: true
94
+ attribute :domain, DomainName, sets: true
95
+ attribute :region, Region, sets: true
96
+ attribute :memory, Memory, sets: true
97
+ attribute :timeout, Timeout, sets: true
98
+ attribute :database, Database, sets: true
99
+ attribute :web, Web, sets: true
100
+ attribute :dispatch, Dispatch, optional: true, sets: true
101
+ attribute :handler_module, HandlerModule, optional: true, sets: true
102
+ attribute :secret_env, SecretEnv, optional: true, sets: true
103
103
 
104
104
  given('dispatch "None" names its handler_module: add handler_module "YourModuleName" for the module lambda_handler.rb defines') do
105
105
  dispatch.unset? || dispatch.value != "None" || handler_module.set?
106
106
  end
107
107
 
108
- sets :domain
109
- sets :region
110
- sets :memory
111
- sets :timeout
112
- sets :database
113
- sets :web
114
- sets :dispatch
115
- sets :handler_module
116
- sets :secret_env
117
108
 
118
109
  emits "LambdaTargetDeclared"
119
110
  end
@@ -181,28 +172,21 @@ Hecks.bluebook "Deploy" do
181
172
  command "Declare" do
182
173
  goal "Validate one domain's AwsFargate deploy target before anything is generated from it"
183
174
 
184
- attribute :domain, DomainName
185
- attribute :region, Region
186
- attribute :cpu, Cpu
187
- attribute :memory, Memory
188
- attribute :database, Database
189
- attribute :web, Web
190
- attribute :port, Port
191
-
192
- sets :domain
193
- sets :region
194
- sets :cpu
195
- sets :memory
196
- sets :database
197
- sets :web
198
- sets :port
175
+ attribute :domain, DomainName, sets: true
176
+ attribute :region, Region, sets: true
177
+ attribute :cpu, Cpu, sets: true
178
+ attribute :memory, Memory, sets: true
179
+ attribute :database, Database, sets: true
180
+ attribute :web, Web, sets: true
181
+ attribute :port, Port, sets: true
182
+
199
183
 
200
184
  emits "FargateTargetDeclared"
201
185
  end
202
186
  end
203
187
 
204
188
  aggregate "BoxTarget" do
205
- description "One domain's validated single-box deploy target — what deployed_to(\"AwsBox\") must resolve to before hecks deploy project generates a box and an RDS instance from it"
189
+ description "One domain's validated single-box deploy target — what deployed_to(\"AwsBox\") must resolve to before hecks deploy recipe.project generates a box and an RDS instance from it"
206
190
 
207
191
  identified_by :domain
208
192
 
@@ -263,33 +247,26 @@ Hecks.bluebook "Deploy" do
263
247
  end
264
248
 
265
249
  # The first six are required for the same reason as `FargateTarget.Declare`; this validates a
266
- # target already resolved by `hecks deploy project`'s defaults. `cdn_aliases` is the one
250
+ # target already resolved by `hecks deploy recipe.project`'s defaults. `cdn_aliases` is the one
267
251
  # optional setting: naming at least one asks for the CloudFront edge stack.
268
252
  command "Declare" do
269
253
  goal "Validate one domain's AwsBox deploy target before anything is generated from it"
270
254
 
271
- attribute :domain, DomainName
272
- attribute :region, Region
273
- attribute :instance_type, InstanceType
274
- attribute :volume_gb, VolumeGb
275
- attribute :database_class, DatabaseClass
276
- attribute :storage_gb, StorageGb
277
- attribute :cdn_aliases, list_of(CdnAlias), optional: true
278
-
279
- sets :domain
280
- sets :region
281
- sets :instance_type
282
- sets :volume_gb
283
- sets :database_class
284
- sets :storage_gb
285
- sets :cdn_aliases
255
+ attribute :domain, DomainName, sets: true
256
+ attribute :region, Region, sets: true
257
+ attribute :instance_type, InstanceType, sets: true
258
+ attribute :volume_gb, VolumeGb, sets: true
259
+ attribute :database_class, DatabaseClass, sets: true
260
+ attribute :storage_gb, StorageGb, sets: true
261
+ attribute :cdn_aliases, list_of(CdnAlias), optional: true, sets: true
262
+
286
263
 
287
264
  emits "BoxTargetDeclared"
288
265
  end
289
266
  end
290
267
 
291
268
  aggregate "VercelTarget" do
292
- description "One domain's validated Vercel deploy target — what deployed_to(\"Vercel\") must resolve to before hecks deploy project generates a Vercel function's configuration from it"
269
+ description "One domain's validated Vercel deploy target — what deployed_to(\"Vercel\") must resolve to before hecks deploy recipe.project generates a Vercel function's configuration from it"
293
270
 
294
271
  identified_by :domain
295
272
 
@@ -326,26 +303,22 @@ Hecks.bluebook "Deploy" do
326
303
  end
327
304
 
328
305
  # All four required for the same reason as `BoxTarget.Declare`; this validates a target
329
- # already resolved by `hecks deploy project`'s defaults.
306
+ # already resolved by `hecks deploy recipe.project`'s defaults.
330
307
  command "Declare" do
331
308
  goal "Validate one domain's Vercel deploy target before anything is generated from it"
332
309
 
333
- attribute :domain, DomainName
334
- attribute :region, Region
335
- attribute :memory, Memory
336
- attribute :max_duration, MaxDuration
310
+ attribute :domain, DomainName, sets: true
311
+ attribute :region, Region, sets: true
312
+ attribute :memory, Memory, sets: true
313
+ attribute :max_duration, MaxDuration, sets: true
337
314
 
338
- sets :domain
339
- sets :region
340
- sets :memory
341
- sets :max_duration
342
315
 
343
316
  emits "VercelTargetDeclared"
344
317
  end
345
318
  end
346
319
 
347
320
  aggregate "SharedDatabaseTarget" do
348
- description "One platform's validated shared database instance — what deployed_to(\"AwsSharedDatabase\") must resolve to before hecks deploy project generates the RDS stack that several client sites each keep a database on."
321
+ description "One platform's validated shared database instance — what deployed_to(\"AwsSharedDatabase\") must resolve to before hecks deploy recipe.project generates the RDS stack that several client sites each keep a database on."
349
322
 
350
323
  identified_by :domain
351
324
 
@@ -379,19 +352,15 @@ Hecks.bluebook "Deploy" do
379
352
  end
380
353
 
381
354
  # All four required for the same reason as `BoxTarget.Declare`; this validates a target
382
- # already resolved by `hecks deploy project`'s defaults.
355
+ # already resolved by `hecks deploy recipe.project`'s defaults.
383
356
  command "Declare" do
384
357
  goal "Validate one platform's shared database target before anything is generated from it"
385
358
 
386
- attribute :domain, DomainName
387
- attribute :region, Region
388
- attribute :database_class, DatabaseClass
389
- attribute :storage_gb, StorageGb
359
+ attribute :domain, DomainName, sets: true
360
+ attribute :region, Region, sets: true
361
+ attribute :database_class, DatabaseClass, sets: true
362
+ attribute :storage_gb, StorageGb, sets: true
390
363
 
391
- sets :domain
392
- sets :region
393
- sets :database_class
394
- sets :storage_gb
395
364
 
396
365
  emits "SharedDatabaseTargetDeclared"
397
366
  end
@@ -402,6 +371,9 @@ Hecks.bluebook "Deploy" do
402
371
  aggregate "Tenant" do
403
372
  description "One tenant's validated identity — which realm and Postgres schema `hecks deploy tenant.provision` provisions before booting a domain directory under Runtime.boot's own `environment:` overlay for it."
404
373
 
374
+ acknowledges :key_by_value, "names a domain that may deploy by a kind other than a Lambda, and LambdaTarget is one kind",
375
+ of: :domain
376
+
405
377
  identified_by :slug
406
378
 
407
379
  attribute :slug, Slug
@@ -473,21 +445,14 @@ Hecks.bluebook "Deploy" do
473
445
  command "Provision" do
474
446
  goal "Validate one tenant, write its environment overlay world, and register it"
475
447
 
476
- attribute :directory, DirectoryPath
477
- attribute :slug, Slug
478
- attribute :domain, DomainName
479
- attribute :realm, Realm
480
- attribute :schema, Schema
481
- attribute :database, DatabaseName
482
- attribute :adapter, AdapterName, optional: true
483
-
484
- sets :directory
485
- sets :slug
486
- sets :domain
487
- sets :realm
488
- sets :schema
489
- sets :database
490
- sets :adapter
448
+ attribute :directory, DirectoryPath, sets: true
449
+ attribute :slug, Slug, sets: true
450
+ attribute :domain, DomainName, sets: true
451
+ attribute :realm, Realm, sets: true
452
+ attribute :schema, Schema, sets: true
453
+ attribute :database, DatabaseName, sets: true
454
+ attribute :adapter, AdapterName, optional: true, sets: true
455
+
491
456
 
492
457
  emits "TenantProvisionRequested"
493
458
  end
@@ -498,13 +463,10 @@ Hecks.bluebook "Deploy" do
498
463
  goal "Write a provisioned or refused tenant's environment overlay world again"
499
464
 
500
465
  reference_to Tenant
501
- attribute :directory, DirectoryPath
502
- attribute :database, DatabaseName
503
- attribute :adapter, AdapterName, optional: true
466
+ attribute :directory, DirectoryPath, sets: true
467
+ attribute :database, DatabaseName, sets: true
468
+ attribute :adapter, AdapterName, optional: true, sets: true
504
469
 
505
- sets :directory
506
- sets :database
507
- sets :adapter
508
470
 
509
471
  emits "TenantReprovisionRequested"
510
472
  end
@@ -513,9 +475,8 @@ Hecks.bluebook "Deploy" do
513
475
  goal "Record that the tenant's overlay was written, and where"
514
476
 
515
477
  reference_to Tenant
516
- attribute :output, Report
478
+ attribute :output, Report, sets: true
517
479
 
518
- sets :output
519
480
 
520
481
  emits "TenantRecorded"
521
482
  end
@@ -524,9 +485,8 @@ Hecks.bluebook "Deploy" do
524
485
  goal "Record that the tenant could not be provisioned, and why"
525
486
 
526
487
  reference_to Tenant
527
- attribute :refusal, Report
488
+ attribute :refusal, Report, sets: true
528
489
 
529
- sets :refusal
530
490
 
531
491
  emits "ProvisioningAbandoned"
532
492
  end
@@ -545,16 +505,16 @@ Hecks.bluebook "Deploy" do
545
505
  end
546
506
  end
547
507
 
548
- # `TenantProvisioned` also reaches Tenancy's `RegisterProvisionedTenant` where that chapter is
508
+ # `TenantProvisioned` also reaches Tenancy's `RegisterProvisionedTenant` where that bluebook is
549
509
  # attached, so a provisioned tenant becomes a fact there.
550
510
  policy "ProvisionWhenRequested" do
551
511
  on "Tenant.TenantProvisionRequested"
552
- trigger Tenant::TenantProvisioning::WriteOverlay, with: { database: :database, directory: :directory }
512
+ ask :write_overlay, with: { database: :database, directory: :directory }
553
513
  end
554
514
 
555
515
  policy "ReprovisionWhenRequested" do
556
516
  on "Tenant.TenantReprovisionRequested"
557
- trigger Tenant::TenantProvisioning::WriteOverlay, with: { database: :database, directory: :directory }
517
+ ask :write_overlay, with: { database: :database, directory: :directory }
558
518
  end
559
519
 
560
520
  policy "RecordTheTenant" do
@@ -620,6 +580,7 @@ Hecks.bluebook "Deploy" do
620
580
  mark :failure, "faulted"
621
581
  transition "Complete" => "projected", from: "requested"
622
582
  transition "Fault" => "faulted", from: "requested"
583
+ mark :terminal, "faulted", "projected"
623
584
  end
624
585
 
625
586
  # `hecks deploy recipe.project <domain> [tenant=] [schema=] [out=] [environment=]`. A schema override
@@ -628,19 +589,13 @@ Hecks.bluebook "Deploy" do
628
589
  command "Project" do
629
590
  goal "Generate a domain's AWS deploy recipe from its declared deployed_to target"
630
591
 
631
- attribute :domain, DomainPath
632
- attribute :run, RunKey
633
- attribute :tenant, TenantSlug, optional: true
634
- attribute :schema, SchemaName, optional: true
635
- attribute :out, Location, optional: true
636
- attribute :environment, EnvironmentName, optional: true
592
+ attribute :domain, DomainPath, sets: true
593
+ attribute :run, RunKey, sets: true
594
+ attribute :tenant, TenantSlug, optional: true, sets: true
595
+ attribute :schema, SchemaName, optional: true, sets: true
596
+ attribute :out, Location, optional: true, sets: true
597
+ attribute :environment, EnvironmentName, optional: true, sets: true
637
598
 
638
- sets :domain
639
- sets :run
640
- sets :tenant
641
- sets :schema
642
- sets :out
643
- sets :environment
644
599
 
645
600
  emits "ProjectionRequested"
646
601
  end
@@ -649,9 +604,8 @@ Hecks.bluebook "Deploy" do
649
604
  goal "Record that the recipe was written, and where"
650
605
 
651
606
  reference_to Recipe
652
- attribute :output, Report
607
+ attribute :output, Report, sets: true
653
608
 
654
- sets :output
655
609
 
656
610
  emits "RecipeProjected"
657
611
  end
@@ -660,9 +614,8 @@ Hecks.bluebook "Deploy" do
660
614
  goal "Record that the recipe could not be generated, and why"
661
615
 
662
616
  reference_to Recipe
663
- attribute :refusal, Report
617
+ attribute :refusal, Report, sets: true
664
618
 
665
- sets :refusal
666
619
 
667
620
  emits "RecipeFaulted"
668
621
  end
@@ -683,7 +636,7 @@ Hecks.bluebook "Deploy" do
683
636
 
684
637
  policy "GenerateWhenRequested" do
685
638
  on "Recipe.ProjectionRequested"
686
- trigger Recipe::DeployToolchain::Generate, with: { run: :run }
639
+ ask :generate, with: { run: :run }
687
640
  end
688
641
 
689
642
  policy "RecordTheRecipe" do
@@ -733,6 +686,7 @@ Hecks.bluebook "Deploy" do
733
686
  mark :failure, "faulted"
734
687
  transition "Complete" => "cleared", from: "requested"
735
688
  transition "Fault" => "faulted", from: "requested"
689
+ mark :terminal, "cleared", "faulted"
736
690
  end
737
691
 
738
692
  # `hecks deploy handover.clear <domain> [out=]`. The rest of the file is left as it was, a world
@@ -741,13 +695,10 @@ Hecks.bluebook "Deploy" do
741
695
  command "Clear" do
742
696
  goal "Empty the body of every deployed_to block in a domain's .world, keeping the settings' names in a comment"
743
697
 
744
- attribute :domain, DomainPath
745
- attribute :run, RunKey
746
- attribute :out, Location, optional: true
698
+ attribute :domain, DomainPath, sets: true
699
+ attribute :run, RunKey, sets: true
700
+ attribute :out, Location, optional: true, sets: true
747
701
 
748
- sets :domain
749
- sets :run
750
- sets :out
751
702
 
752
703
  emits "ClearingRequested"
753
704
  end
@@ -756,9 +707,8 @@ Hecks.bluebook "Deploy" do
756
707
  goal "Record that the deployment settings were cleared, from which file and which settings"
757
708
 
758
709
  reference_to Handover
759
- attribute :output, Report
710
+ attribute :output, Report, sets: true
760
711
 
761
- sets :output
762
712
 
763
713
  emits "DeploymentCleared"
764
714
  end
@@ -767,9 +717,8 @@ Hecks.bluebook "Deploy" do
767
717
  goal "Record that the deployment settings could not be cleared, and why"
768
718
 
769
719
  reference_to Handover
770
- attribute :refusal, Report
720
+ attribute :refusal, Report, sets: true
771
721
 
772
- sets :refusal
773
722
 
774
723
  emits "ClearingFaulted"
775
724
  end
@@ -790,7 +739,7 @@ Hecks.bluebook "Deploy" do
790
739
 
791
740
  policy "ClearWhenRequested" do
792
741
  on "Handover.ClearingRequested"
793
- trigger Handover::DeployToolchain::ClearDeployment, with: { run: :run }
742
+ ask :clear_deployment, with: { run: :run }
794
743
  end
795
744
 
796
745
  policy "RecordTheClearing" do
@@ -831,6 +780,7 @@ Hecks.bluebook "Deploy" do
831
780
  mark :failure, "flagged"
832
781
  transition "Pass" => "clean", from: "requested"
833
782
  transition "Flag" => "flagged", from: "requested"
783
+ mark :terminal, "clean", "flagged"
834
784
  end
835
785
 
836
786
  # A pattern match over Make and shell text, not a static analyzer: the findings are the
@@ -838,11 +788,9 @@ Hecks.bluebook "Deploy" do
838
788
  command "Lint" do
839
789
  goal "Lint generated deploy Makefiles for recipes that hide the failure of a command that touches prod"
840
790
 
841
- attribute :makefiles, PathList, optional: true
842
- attribute :run, RunKey
791
+ attribute :makefiles, PathList, optional: true, sets: true
792
+ attribute :run, RunKey, sets: true
843
793
 
844
- sets :makefiles
845
- sets :run
846
794
 
847
795
  emits "LintRequested"
848
796
  end
@@ -851,9 +799,8 @@ Hecks.bluebook "Deploy" do
851
799
  goal "Record that no recipe hides a failure"
852
800
 
853
801
  reference_to MakefileCheck
854
- attribute :report, Report
802
+ attribute :report, Report, sets: true
855
803
 
856
- sets :report
857
804
 
858
805
  emits "LintPassed"
859
806
  end
@@ -862,9 +809,8 @@ Hecks.bluebook "Deploy" do
862
809
  goal "Record that a recipe hides a failure, or that the lint could not run, and what it said"
863
810
 
864
811
  reference_to MakefileCheck
865
- attribute :refusal, Report
812
+ attribute :refusal, Report, sets: true
866
813
 
867
- sets :refusal
868
814
 
869
815
  emits "LintFlagged"
870
816
  end
@@ -885,7 +831,7 @@ Hecks.bluebook "Deploy" do
885
831
 
886
832
  policy "LintWhenRequested" do
887
833
  on "MakefileCheck.LintRequested"
888
- trigger MakefileCheck::DeployToolchain::Scan, with: { run: :run }
834
+ ask :scan, with: { run: :run }
889
835
  end
890
836
 
891
837
  policy "RecordTheCleanLint" do
@@ -935,6 +881,7 @@ Hecks.bluebook "Deploy" do
935
881
  mark :failure, "flagged"
936
882
  transition "Pass" => "within_budget", from: "requested"
937
883
  transition "Flag" => "flagged", from: "requested"
884
+ mark :terminal, "flagged", "within_budget"
938
885
  end
939
886
 
940
887
  # The reading is the billed daily total from the first complete day since `since` up to
@@ -942,13 +889,10 @@ Hecks.bluebook "Deploy" do
942
889
  command "Check" do
943
890
  goal "Read what hosting has billed since a day and compare its monthly rate to a budget"
944
891
 
945
- attribute :run, RunKey
946
- attribute :budget, Budget
947
- attribute :since, Since
892
+ attribute :run, RunKey, sets: true
893
+ attribute :budget, Budget, sets: true
894
+ attribute :since, Since, sets: true
948
895
 
949
- sets :run
950
- sets :budget
951
- sets :since
952
896
 
953
897
  emits "CostCheckRequested"
954
898
  end
@@ -957,9 +901,8 @@ Hecks.bluebook "Deploy" do
957
901
  goal "Record that the monthly rate is within the budget, and what it was"
958
902
 
959
903
  reference_to CostCheck
960
- attribute :report, Report
904
+ attribute :report, Report, sets: true
961
905
 
962
- sets :report
963
906
 
964
907
  emits "CostWithinBudget"
965
908
  end
@@ -968,9 +911,8 @@ Hecks.bluebook "Deploy" do
968
911
  goal "Record that the monthly rate is over the budget, or that it could not be read, and what was said"
969
912
 
970
913
  reference_to CostCheck
971
- attribute :refusal, Report
914
+ attribute :refusal, Report, sets: true
972
915
 
973
- sets :refusal
974
916
 
975
917
  emits "CostFlagged"
976
918
  end
@@ -991,7 +933,7 @@ Hecks.bluebook "Deploy" do
991
933
 
992
934
  policy "MeasureWhenChecked" do
993
935
  on "CostCheck.CostCheckRequested"
994
- trigger CostCheck::CostExplorer::Measure, with: { run: :run }
936
+ ask :measure, with: { run: :run }
995
937
  end
996
938
 
997
939
  policy "RecordTheCostWithinBudget" do
@@ -1033,7 +975,7 @@ Hecks.bluebook "Deploy" do
1033
975
 
1034
976
  # A task definition family, or family:revision, as the generated script takes it in TASKDEF.
1035
977
  value_object "TaskDefinition" do
1036
- attribute :value, String, pattern: '^[A-Za-z0-9_-]+(:[0-9]+)?$'
978
+ attribute :value, String, matches: :host_port
1037
979
  end
1038
980
 
1039
981
  # What requested the smoke: `alone` for a person, else the roll whose record takes the outcome.
@@ -1053,6 +995,7 @@ Hecks.bluebook "Deploy" do
1053
995
  mark :failure, "flagged"
1054
996
  transition "Pass" => "passed", from: "requested"
1055
997
  transition "Flag" => "flagged", from: "requested"
998
+ mark :terminal, "flagged", "passed"
1056
999
  end
1057
1000
 
1058
1001
  # `hecks deploy smoke_run.run <project> [script=<path>] [taskdef=<family[:rev]>] [skip=true]
@@ -1064,23 +1007,15 @@ Hecks.bluebook "Deploy" do
1064
1007
  command "Run" do
1065
1008
  goal "Run a project's generated post-deploy smoke and record whether the live site passed"
1066
1009
 
1067
- attribute :project, Location
1068
- attribute :script, Location, optional: true
1069
- attribute :run, RunKey
1070
- attribute :taskdef, TaskDefinition, optional: true
1071
- attribute :skip, Switch, optional: true
1072
- attribute :async, Switch, optional: true
1073
- attribute :dry_run, Switch, optional: true
1074
- attribute :after, Origin, default: { value: "alone" }
1075
-
1076
- sets :project
1077
- sets :script
1078
- sets :run
1079
- sets :taskdef
1080
- sets :skip
1081
- sets :async
1082
- sets :dry_run
1083
- sets :after
1010
+ attribute :project, Location, sets: true
1011
+ attribute :script, Location, optional: true, sets: true
1012
+ attribute :run, RunKey, sets: true
1013
+ attribute :taskdef, TaskDefinition, optional: true, sets: true
1014
+ attribute :skip, Switch, optional: true, sets: true
1015
+ attribute :async, Switch, optional: true, sets: true
1016
+ attribute :dry_run, Switch, optional: true, sets: true
1017
+ attribute :after, Origin, default: { value: "alone" }, sets: true
1018
+
1084
1019
 
1085
1020
  emits "SmokeRequested"
1086
1021
  end
@@ -1089,11 +1024,9 @@ Hecks.bluebook "Deploy" do
1089
1024
  goal "Record that the smoke passed, was skipped on purpose, or was left running, and what it said"
1090
1025
 
1091
1026
  reference_to SmokeRun
1092
- attribute :report, Report
1093
- attribute :after, Origin, default: { value: "alone" }
1027
+ attribute :report, Report, sets: true
1028
+ attribute :after, Origin, default: { value: "alone" }, sets: true
1094
1029
 
1095
- sets :report
1096
- sets :after
1097
1030
 
1098
1031
  emits "SmokePassed"
1099
1032
  end
@@ -1102,11 +1035,9 @@ Hecks.bluebook "Deploy" do
1102
1035
  goal "Record that the smoke failed, did not run or could not be read, and what was said"
1103
1036
 
1104
1037
  reference_to SmokeRun
1105
- attribute :refusal, Report
1106
- attribute :after, Origin, default: { value: "alone" }
1038
+ attribute :refusal, Report, sets: true
1039
+ attribute :after, Origin, default: { value: "alone" }, sets: true
1107
1040
 
1108
- sets :refusal
1109
- sets :after
1110
1041
 
1111
1042
  emits "SmokeFlagged"
1112
1043
  end
@@ -1127,7 +1058,7 @@ Hecks.bluebook "Deploy" do
1127
1058
 
1128
1059
  policy "SmokeWhenRequested" do
1129
1060
  on "SmokeRun.SmokeRequested"
1130
- trigger SmokeRun::DeployToolchain::Smoke, with: { run: :run, after: :after }
1061
+ ask :smoke, with: { run: :run, after: :after }
1131
1062
  end
1132
1063
 
1133
1064
  policy "RecordThePassedSmoke" do
@@ -1172,7 +1103,7 @@ Hecks.bluebook "Deploy" do
1172
1103
 
1173
1104
  # A task definition family, or family:revision, as the generated script takes it in TASKDEF.
1174
1105
  value_object "TaskDefinition" do
1175
- attribute :value, String, pattern: '^[A-Za-z0-9_-]+(:[0-9]+)?$'
1106
+ attribute :value, String, matches: :host_port
1176
1107
  end
1177
1108
 
1178
1109
  # A container name from the world: lower case words joined by hyphens or underscores.
@@ -1204,6 +1135,7 @@ Hecks.bluebook "Deploy" do
1204
1135
  transition "Flag" => "flagged", from: "requested"
1205
1136
  transition "Verify" => "verified", from: "rolled"
1206
1137
  transition "FlagSmoke" => "flagged", from: "rolled"
1138
+ mark :terminal, "flagged", "verified"
1207
1139
  end
1208
1140
 
1209
1141
  # `hecks deploy service_roll.run <project> service=<name> [existing_tag=<tag>] [local_image=<ref>]
@@ -1215,21 +1147,14 @@ Hecks.bluebook "Deploy" do
1215
1147
  command "Run" do
1216
1148
  goal "Roll one service's local image onto the box and record whether it took (exit 1 when flagged: 2 unknown service, 30-38 a refused step, 40-42 the box roll)"
1217
1149
 
1218
- attribute :project, Location
1219
- attribute :script, Location, optional: true
1220
- attribute :run, RunKey
1221
- attribute :service, ServiceName
1222
- attribute :existing_tag, ImageTag, optional: true
1223
- attribute :local_image, ImageName, optional: true
1224
- attribute :skip_smoke, Switch, optional: true
1225
-
1226
- sets :project
1227
- sets :script
1228
- sets :run
1229
- sets :service
1230
- sets :existing_tag
1231
- sets :local_image
1232
- sets :skip_smoke
1150
+ attribute :project, Location, sets: true
1151
+ attribute :script, Location, optional: true, sets: true
1152
+ attribute :run, RunKey, sets: true
1153
+ attribute :service, ServiceName, sets: true
1154
+ attribute :existing_tag, ImageTag, optional: true, sets: true
1155
+ attribute :local_image, ImageName, optional: true, sets: true
1156
+ attribute :skip_smoke, Switch, optional: true, sets: true
1157
+
1233
1158
 
1234
1159
  emits "ServiceRollRequested"
1235
1160
  end
@@ -1238,15 +1163,11 @@ Hecks.bluebook "Deploy" do
1238
1163
  goal "Record that the service rolled, with the task definition and tag it rolled"
1239
1164
 
1240
1165
  reference_to ServiceRoll
1241
- attribute :report, Report
1242
- attribute :taskdef, TaskDefinition, optional: true
1243
- attribute :tag, ImageTag, optional: true
1244
- attribute :smoke, Report, optional: true
1166
+ attribute :report, Report, sets: true
1167
+ attribute :taskdef, TaskDefinition, optional: true, sets: true
1168
+ attribute :tag, ImageTag, optional: true, sets: true
1169
+ attribute :smoke, Report, optional: true, sets: true
1245
1170
 
1246
- sets :report
1247
- sets :taskdef
1248
- sets :tag
1249
- sets :smoke
1250
1171
 
1251
1172
  emits "ServiceRollCompleted"
1252
1173
  end
@@ -1255,9 +1176,8 @@ Hecks.bluebook "Deploy" do
1255
1176
  goal "Record that the roll failed or could not start, with the script's status and what it said"
1256
1177
 
1257
1178
  reference_to ServiceRoll
1258
- attribute :refusal, Report
1179
+ attribute :refusal, Report, sets: true
1259
1180
 
1260
- sets :refusal
1261
1181
 
1262
1182
  emits "ServiceRollFlagged"
1263
1183
  end
@@ -1266,9 +1186,8 @@ Hecks.bluebook "Deploy" do
1266
1186
  goal "Record that the smoke the roll requested passed"
1267
1187
 
1268
1188
  reference_to ServiceRoll
1269
- attribute :smoke, Report
1189
+ attribute :smoke, Report, sets: true
1270
1190
 
1271
- sets :smoke
1272
1191
 
1273
1192
  emits "ServiceRollVerified"
1274
1193
  end
@@ -1277,11 +1196,9 @@ Hecks.bluebook "Deploy" do
1277
1196
  goal "Record that the roll took but the smoke it requested did not pass, and why"
1278
1197
 
1279
1198
  reference_to ServiceRoll
1280
- attribute :smoke, Report
1281
- attribute :refusal, Report
1199
+ attribute :smoke, Report, sets: true
1200
+ attribute :refusal, Report, sets: true
1282
1201
 
1283
- sets :smoke
1284
- sets :refusal
1285
1202
 
1286
1203
  emits "ServiceRollSmokeFlagged"
1287
1204
  end
@@ -1302,7 +1219,7 @@ Hecks.bluebook "Deploy" do
1302
1219
 
1303
1220
  policy "RollServiceWhenRequested" do
1304
1221
  on "ServiceRoll.ServiceRollRequested"
1305
- trigger ServiceRoll::DeployToolchain::RollService, with: { run: :run }
1222
+ ask :roll_service, with: { run: :run }
1306
1223
  end
1307
1224
 
1308
1225
  policy "RecordTheRolledService" do
@@ -1365,7 +1282,7 @@ Hecks.bluebook "Deploy" do
1365
1282
 
1366
1283
  # A task definition family, or family:revision, as the generated script takes it in TASKDEF.
1367
1284
  value_object "TaskDefinition" do
1368
- attribute :value, String, pattern: '^[A-Za-z0-9_-]+(:[0-9]+)?$'
1285
+ attribute :value, String, matches: :host_port
1369
1286
  end
1370
1287
 
1371
1288
  # `name=tag` pairs separated by spaces, as a project without a task definition names its images.
@@ -1387,6 +1304,7 @@ Hecks.bluebook "Deploy" do
1387
1304
  transition "Flag" => "flagged", from: "requested"
1388
1305
  transition "Verify" => "verified", from: "rolled"
1389
1306
  transition "FlagSmoke" => "flagged", from: "rolled"
1307
+ mark :terminal, "flagged", "verified"
1390
1308
  end
1391
1309
 
1392
1310
  # `hecks deploy box_roll.run <project> [taskdef=<family[:rev]> | tags="name=tag ..."]
@@ -1400,19 +1318,13 @@ Hecks.bluebook "Deploy" do
1400
1318
  command "Run" do
1401
1319
  goal "Roll the app box and record whether it came up healthy (exit 1 when flagged: 40 no instance, 41 roll failed, 42 box unhealthy, 43 no restore anchor)"
1402
1320
 
1403
- attribute :project, Location
1404
- attribute :script, Location, optional: true
1405
- attribute :run, RunKey
1406
- attribute :taskdef, TaskDefinition, optional: true
1407
- attribute :tags, Tags, optional: true
1408
- attribute :skip_smoke, Switch, optional: true
1321
+ attribute :project, Location, sets: true
1322
+ attribute :script, Location, optional: true, sets: true
1323
+ attribute :run, RunKey, sets: true
1324
+ attribute :taskdef, TaskDefinition, optional: true, sets: true
1325
+ attribute :tags, Tags, optional: true, sets: true
1326
+ attribute :skip_smoke, Switch, optional: true, sets: true
1409
1327
 
1410
- sets :project
1411
- sets :script
1412
- sets :run
1413
- sets :taskdef
1414
- sets :tags
1415
- sets :skip_smoke
1416
1328
 
1417
1329
  emits "BoxRollRequested"
1418
1330
  end
@@ -1421,13 +1333,10 @@ Hecks.bluebook "Deploy" do
1421
1333
  goal "Record that the box rolled and answered healthy, and what the script said"
1422
1334
 
1423
1335
  reference_to BoxRoll
1424
- attribute :report, Report
1425
- attribute :taskdef, TaskDefinition, optional: true
1426
- attribute :smoke, Report, optional: true
1336
+ attribute :report, Report, sets: true
1337
+ attribute :taskdef, TaskDefinition, optional: true, sets: true
1338
+ attribute :smoke, Report, optional: true, sets: true
1427
1339
 
1428
- sets :report
1429
- sets :taskdef
1430
- sets :smoke
1431
1340
 
1432
1341
  emits "BoxRollCompleted"
1433
1342
  end
@@ -1436,9 +1345,8 @@ Hecks.bluebook "Deploy" do
1436
1345
  goal "Record that the roll failed or could not start, with the script's status and what it said"
1437
1346
 
1438
1347
  reference_to BoxRoll
1439
- attribute :refusal, Report
1348
+ attribute :refusal, Report, sets: true
1440
1349
 
1441
- sets :refusal
1442
1350
 
1443
1351
  emits "BoxRollFlagged"
1444
1352
  end
@@ -1447,9 +1355,8 @@ Hecks.bluebook "Deploy" do
1447
1355
  goal "Record that the smoke the roll requested passed"
1448
1356
 
1449
1357
  reference_to BoxRoll
1450
- attribute :smoke, Report
1358
+ attribute :smoke, Report, sets: true
1451
1359
 
1452
- sets :smoke
1453
1360
 
1454
1361
  emits "BoxRollVerified"
1455
1362
  end
@@ -1458,11 +1365,9 @@ Hecks.bluebook "Deploy" do
1458
1365
  goal "Record that the roll took but the smoke it requested did not pass, and why"
1459
1366
 
1460
1367
  reference_to BoxRoll
1461
- attribute :smoke, Report
1462
- attribute :refusal, Report
1368
+ attribute :smoke, Report, sets: true
1369
+ attribute :refusal, Report, sets: true
1463
1370
 
1464
- sets :smoke
1465
- sets :refusal
1466
1371
 
1467
1372
  emits "BoxRollSmokeFlagged"
1468
1373
  end
@@ -1483,7 +1388,7 @@ Hecks.bluebook "Deploy" do
1483
1388
 
1484
1389
  policy "RollBoxWhenRequested" do
1485
1390
  on "BoxRoll.BoxRollRequested"
1486
- trigger BoxRoll::DeployToolchain::RollBox, with: { run: :run }
1391
+ ask :roll_box, with: { run: :run }
1487
1392
  end
1488
1393
 
1489
1394
  policy "RecordTheRolledBox" do
@@ -1551,11 +1456,11 @@ Hecks.bluebook "Deploy" do
1551
1456
 
1552
1457
  # The bastion's EC2 instance id, which both databases are reached through.
1553
1458
  value_object "Bastion" do
1554
- attribute :value, String, pattern: '^i-[0-9a-f]+$'
1459
+ attribute :value, String, matches: :instance_id
1555
1460
  end
1556
1461
 
1557
1462
  value_object "Host" do
1558
- attribute :value, String, pattern: '^[A-Za-z0-9][A-Za-z0-9.-]*$'
1463
+ attribute :value, String, matches: :hostname
1559
1464
  end
1560
1465
 
1561
1466
  # A Secrets Manager id or ARN; the script reads the password from it, so no value travels here.
@@ -1565,7 +1470,7 @@ Hecks.bluebook "Deploy" do
1565
1470
 
1566
1471
  # A database's name; empty leaves it to the generated script's own default.
1567
1472
  value_object "DatabaseName" do
1568
- attribute :value, String, pattern: '^[A-Za-z0-9_]*$'
1473
+ attribute :value, String, matches: :word_chars
1569
1474
  end
1570
1475
 
1571
1476
  value_object "Switch" do
@@ -1584,6 +1489,7 @@ Hecks.bluebook "Deploy" do
1584
1489
  transition "Confirm" => "verified", from: ["requested", "restored"]
1585
1490
  transition "Drift" => "drifted", from: ["requested", "restored"]
1586
1491
  transition "FlagVerification" => "flagged", from: ["requested", "restored"]
1492
+ mark :terminal, "drifted", "flagged", "planned", "verified"
1587
1493
  end
1588
1494
 
1589
1495
  # `hecks deploy data_copy.restore <project> bastion=<i-...> source=<host> source_secret=<id>
@@ -1596,35 +1502,21 @@ Hecks.bluebook "Deploy" do
1596
1502
  command "Restore" do
1597
1503
  goal "Copy a project's schemas into RDS and record whether the copy matches (exit 1 when flagged or drifted: 60 old client, 61 target has the schema, 62 restore errors)"
1598
1504
 
1599
- attribute :project, Location
1600
- attribute :script, Location, optional: true
1601
- attribute :run, RunKey
1602
- attribute :bastion, Bastion
1603
- attribute :source, Host
1604
- attribute :source_secret, Secret
1605
- attribute :target, Host
1606
- attribute :target_secret, Secret
1607
- attribute :source_db, DatabaseName, default: { value: "" }
1608
- attribute :target_db, DatabaseName, default: { value: "" }
1609
- attribute :force, Switch, optional: true
1610
- attribute :confirm, Switch, optional: true
1611
- attribute :dry_run, Switch, optional: true
1612
- attribute :skip_verify, Switch, optional: true
1613
-
1614
- sets :project
1615
- sets :script
1616
- sets :run
1617
- sets :bastion
1618
- sets :source
1619
- sets :source_secret
1620
- sets :target
1621
- sets :target_secret
1622
- sets :source_db
1623
- sets :target_db
1624
- sets :force
1625
- sets :confirm
1626
- sets :dry_run
1627
- sets :skip_verify
1505
+ attribute :project, Location, sets: true
1506
+ attribute :script, Location, optional: true, sets: true
1507
+ attribute :run, RunKey, sets: true
1508
+ attribute :bastion, Bastion, sets: true
1509
+ attribute :source, Host, sets: true
1510
+ attribute :source_secret, Secret, sets: true
1511
+ attribute :target, Host, sets: true
1512
+ attribute :target_secret, Secret, sets: true
1513
+ attribute :source_db, DatabaseName, default: { value: "" }, sets: true
1514
+ attribute :target_db, DatabaseName, default: { value: "" }, sets: true
1515
+ attribute :force, Switch, optional: true, sets: true
1516
+ attribute :confirm, Switch, optional: true, sets: true
1517
+ attribute :dry_run, Switch, optional: true, sets: true
1518
+ attribute :skip_verify, Switch, optional: true, sets: true
1519
+
1628
1520
 
1629
1521
  emits "DataCopyRequested"
1630
1522
  end
@@ -1637,27 +1529,17 @@ Hecks.bluebook "Deploy" do
1637
1529
  command "Verify" do
1638
1530
  goal "Compare two databases without a restore and record whether they match (exit 1 when drifted: 50, or flagged: could not compare)"
1639
1531
 
1640
- attribute :project, Location
1641
- attribute :script, Location, optional: true
1642
- attribute :run, RunKey
1643
- attribute :bastion, Bastion
1644
- attribute :source, Host
1645
- attribute :source_secret, Secret
1646
- attribute :target, Host
1647
- attribute :target_secret, Secret
1648
- attribute :source_db, DatabaseName, default: { value: "" }
1649
- attribute :target_db, DatabaseName, default: { value: "" }
1650
-
1651
- sets :project
1652
- sets :script
1653
- sets :run
1654
- sets :bastion
1655
- sets :source
1656
- sets :source_secret
1657
- sets :target
1658
- sets :target_secret
1659
- sets :source_db
1660
- sets :target_db
1532
+ attribute :project, Location, sets: true
1533
+ attribute :script, Location, optional: true, sets: true
1534
+ attribute :run, RunKey, sets: true
1535
+ attribute :bastion, Bastion, sets: true
1536
+ attribute :source, Host, sets: true
1537
+ attribute :source_secret, Secret, sets: true
1538
+ attribute :target, Host, sets: true
1539
+ attribute :target_secret, Secret, sets: true
1540
+ attribute :source_db, DatabaseName, default: { value: "" }, sets: true
1541
+ attribute :target_db, DatabaseName, default: { value: "" }, sets: true
1542
+
1661
1543
 
1662
1544
  emits "DataCopyVerifyRequested"
1663
1545
  end
@@ -1666,9 +1548,8 @@ Hecks.bluebook "Deploy" do
1666
1548
  goal "Record that the copy ran, and what the script said"
1667
1549
 
1668
1550
  reference_to DataCopy
1669
- attribute :report, Report
1551
+ attribute :report, Report, sets: true
1670
1552
 
1671
- sets :report
1672
1553
 
1673
1554
  emits "DataCopyCompleted"
1674
1555
  end
@@ -1677,9 +1558,8 @@ Hecks.bluebook "Deploy" do
1677
1558
  goal "Record the plan a dry run printed: what would be copied and overwritten, with nothing run"
1678
1559
 
1679
1560
  reference_to DataCopy
1680
- attribute :report, Report
1561
+ attribute :report, Report, sets: true
1681
1562
 
1682
- sets :report
1683
1563
 
1684
1564
  emits "DataCopyPlanned"
1685
1565
  end
@@ -1688,9 +1568,8 @@ Hecks.bluebook "Deploy" do
1688
1568
  goal "Record that the copy was refused or failed, with the script's status and what it said"
1689
1569
 
1690
1570
  reference_to DataCopy
1691
- attribute :refusal, Report
1571
+ attribute :refusal, Report, sets: true
1692
1572
 
1693
- sets :refusal
1694
1573
 
1695
1574
  emits "DataCopyFlagged"
1696
1575
  end
@@ -1699,9 +1578,8 @@ Hecks.bluebook "Deploy" do
1699
1578
  goal "Record that the verification the copy requested found both databases identical"
1700
1579
 
1701
1580
  reference_to DataCopy
1702
- attribute :verification, Report
1581
+ attribute :verification, Report, sets: true
1703
1582
 
1704
- sets :verification
1705
1583
 
1706
1584
  emits "DataCopyVerified"
1707
1585
  end
@@ -1710,11 +1588,9 @@ Hecks.bluebook "Deploy" do
1710
1588
  goal "Record that the verification the copy requested found the databases differ, and where"
1711
1589
 
1712
1590
  reference_to DataCopy
1713
- attribute :verification, Report
1714
- attribute :refusal, Report
1591
+ attribute :verification, Report, sets: true
1592
+ attribute :refusal, Report, sets: true
1715
1593
 
1716
- sets :verification
1717
- sets :refusal
1718
1594
 
1719
1595
  emits "DataCopyDrifted"
1720
1596
  end
@@ -1723,11 +1599,9 @@ Hecks.bluebook "Deploy" do
1723
1599
  goal "Record that the copy ran but its verification could not be made, and why"
1724
1600
 
1725
1601
  reference_to DataCopy
1726
- attribute :verification, Report
1727
- attribute :refusal, Report
1602
+ attribute :verification, Report, sets: true
1603
+ attribute :refusal, Report, sets: true
1728
1604
 
1729
- sets :verification
1730
- sets :refusal
1731
1605
 
1732
1606
  emits "DataCopyVerificationFlagged"
1733
1607
  end
@@ -1754,7 +1628,7 @@ Hecks.bluebook "Deploy" do
1754
1628
 
1755
1629
  policy "CopyDataWhenRequested" do
1756
1630
  on "DataCopy.DataCopyRequested"
1757
- trigger DataCopy::DeployToolchain::CopyData, with: { run: :run }
1631
+ ask :copy_data, with: { run: :run }
1758
1632
  end
1759
1633
 
1760
1634
  policy "RecordTheCopiedData" do
@@ -1838,11 +1712,11 @@ Hecks.bluebook "Deploy" do
1838
1712
  end
1839
1713
 
1840
1714
  value_object "Bastion" do
1841
- attribute :value, String, pattern: '^i-[0-9a-f]+$'
1715
+ attribute :value, String, matches: :instance_id
1842
1716
  end
1843
1717
 
1844
1718
  value_object "Host" do
1845
- attribute :value, String, pattern: '^[A-Za-z0-9][A-Za-z0-9.-]*$'
1719
+ attribute :value, String, matches: :hostname
1846
1720
  end
1847
1721
 
1848
1722
  value_object "Secret" do
@@ -1851,7 +1725,7 @@ Hecks.bluebook "Deploy" do
1851
1725
 
1852
1726
  # A database's name; empty leaves it to the generated script's own default.
1853
1727
  value_object "DatabaseName" do
1854
- attribute :value, String, pattern: '^[A-Za-z0-9_]*$'
1728
+ attribute :value, String, matches: :word_chars
1855
1729
  end
1856
1730
 
1857
1731
  value_object "Report" do
@@ -1863,6 +1737,7 @@ Hecks.bluebook "Deploy" do
1863
1737
  transition "Match" => "verified", from: "requested"
1864
1738
  transition "Differ" => "drifted", from: "requested"
1865
1739
  transition "Flag" => "flagged", from: "requested"
1740
+ mark :terminal, "drifted", "flagged", "verified"
1866
1741
  end
1867
1742
 
1868
1743
  # Runs the project's generated `verify-copy.sh`: structure and exact row counts of every table,
@@ -1871,27 +1746,17 @@ Hecks.bluebook "Deploy" do
1871
1746
  command "Run" do
1872
1747
  goal "Compare two databases and record whether they match (exit 1 when drifted: 50 differ, or flagged: could not compare)"
1873
1748
 
1874
- attribute :project, Location
1875
- attribute :script, Location, optional: true
1876
- attribute :run, RunKey
1877
- attribute :bastion, Bastion
1878
- attribute :source, Host
1879
- attribute :source_secret, Secret
1880
- attribute :target, Host
1881
- attribute :target_secret, Secret
1882
- attribute :source_db, DatabaseName, default: { value: "" }
1883
- attribute :target_db, DatabaseName, default: { value: "" }
1884
-
1885
- sets :project
1886
- sets :script
1887
- sets :run
1888
- sets :bastion
1889
- sets :source
1890
- sets :source_secret
1891
- sets :target
1892
- sets :target_secret
1893
- sets :source_db
1894
- sets :target_db
1749
+ attribute :project, Location, sets: true
1750
+ attribute :script, Location, optional: true, sets: true
1751
+ attribute :run, RunKey, sets: true
1752
+ attribute :bastion, Bastion, sets: true
1753
+ attribute :source, Host, sets: true
1754
+ attribute :source_secret, Secret, sets: true
1755
+ attribute :target, Host, sets: true
1756
+ attribute :target_secret, Secret, sets: true
1757
+ attribute :source_db, DatabaseName, default: { value: "" }, sets: true
1758
+ attribute :target_db, DatabaseName, default: { value: "" }, sets: true
1759
+
1895
1760
 
1896
1761
  emits "CopyVerificationRequested"
1897
1762
  end
@@ -1900,9 +1765,8 @@ Hecks.bluebook "Deploy" do
1900
1765
  goal "Record that both databases hold the same structure and row counts"
1901
1766
 
1902
1767
  reference_to CopyVerification
1903
- attribute :report, Report
1768
+ attribute :report, Report, sets: true
1904
1769
 
1905
- sets :report
1906
1770
 
1907
1771
  emits "CopyMatched"
1908
1772
  end
@@ -1911,9 +1775,8 @@ Hecks.bluebook "Deploy" do
1911
1775
  goal "Record that the databases differ, with what the script printed"
1912
1776
 
1913
1777
  reference_to CopyVerification
1914
- attribute :report, Report
1778
+ attribute :report, Report, sets: true
1915
1779
 
1916
- sets :report
1917
1780
 
1918
1781
  emits "CopyDrifted"
1919
1782
  end
@@ -1922,9 +1785,8 @@ Hecks.bluebook "Deploy" do
1922
1785
  goal "Record that the comparison could not be made, and why"
1923
1786
 
1924
1787
  reference_to CopyVerification
1925
- attribute :refusal, Report
1788
+ attribute :refusal, Report, sets: true
1926
1789
 
1927
- sets :refusal
1928
1790
 
1929
1791
  emits "CopyUnverified"
1930
1792
  end
@@ -1951,7 +1813,7 @@ Hecks.bluebook "Deploy" do
1951
1813
 
1952
1814
  policy "CompareCopyWhenRequested" do
1953
1815
  on "CopyVerification.CopyVerificationRequested"
1954
- trigger CopyVerification::DeployToolchain::CompareCopy, with: { run: :run }
1816
+ ask :compare_copy, with: { run: :run }
1955
1817
  end
1956
1818
 
1957
1819
  policy "RecordTheMatchingCopy" do
@@ -2007,6 +1869,7 @@ Hecks.bluebook "Deploy" do
2007
1869
  transition "Differ" => "changed", from: "requested"
2008
1870
  transition "Withhold" => "unavailable", from: "requested"
2009
1871
  transition "Flag" => "flagged", from: "requested"
1872
+ mark :terminal, "changed", "flagged", "unavailable", "unchanged"
2010
1873
  end
2011
1874
 
2012
1875
  # `hecks deploy bluebook_diff.run <project> [old=<json> new=<json>] [script=<path>]`. With
@@ -2018,17 +1881,12 @@ Hecks.bluebook "Deploy" do
2018
1881
  command "Run" do
2019
1882
  goal "Report which bluebook releases a deploy changes and record it (never a failure: unchanged, changed or unavailable)"
2020
1883
 
2021
- attribute :project, Location
2022
- attribute :script, Location, optional: true
2023
- attribute :run, RunKey
2024
- attribute :old, Location, optional: true
2025
- attribute :new, Location, optional: true
1884
+ attribute :project, Location, sets: true
1885
+ attribute :script, Location, optional: true, sets: true
1886
+ attribute :run, RunKey, sets: true
1887
+ attribute :old, Location, optional: true, sets: true
1888
+ attribute :new, Location, optional: true, sets: true
2026
1889
 
2027
- sets :project
2028
- sets :script
2029
- sets :run
2030
- sets :old
2031
- sets :new
2032
1890
 
2033
1891
  emits "BluebookDiffRequested"
2034
1892
  end
@@ -2037,9 +1895,8 @@ Hecks.bluebook "Deploy" do
2037
1895
  goal "Record that the deploy changes no bluebook"
2038
1896
 
2039
1897
  reference_to BluebookDiff
2040
- attribute :report, Report
1898
+ attribute :report, Report, sets: true
2041
1899
 
2042
- sets :report
2043
1900
 
2044
1901
  emits "BluebooksUnchanged"
2045
1902
  end
@@ -2048,9 +1905,8 @@ Hecks.bluebook "Deploy" do
2048
1905
  goal "Record the bluebooks the deploy adds, removes, re-versions or changes in content"
2049
1906
 
2050
1907
  reference_to BluebookDiff
2051
- attribute :report, Report
1908
+ attribute :report, Report, sets: true
2052
1909
 
2053
- sets :report
2054
1910
 
2055
1911
  emits "BluebooksChanged"
2056
1912
  end
@@ -2059,9 +1915,8 @@ Hecks.bluebook "Deploy" do
2059
1915
  goal "Record that the report could not be made, and why; the deploy carries on"
2060
1916
 
2061
1917
  reference_to BluebookDiff
2062
- attribute :report, Report
1918
+ attribute :report, Report, sets: true
2063
1919
 
2064
- sets :report
2065
1920
 
2066
1921
  emits "BluebookDiffUnavailable"
2067
1922
  end
@@ -2070,9 +1925,8 @@ Hecks.bluebook "Deploy" do
2070
1925
  goal "Record that the request was malformed (only one of old and new), and why"
2071
1926
 
2072
1927
  reference_to BluebookDiff
2073
- attribute :refusal, Report
1928
+ attribute :refusal, Report, sets: true
2074
1929
 
2075
- sets :refusal
2076
1930
 
2077
1931
  emits "BluebookDiffFlagged"
2078
1932
  end
@@ -2093,7 +1947,7 @@ Hecks.bluebook "Deploy" do
2093
1947
 
2094
1948
  policy "DiffWhenRequested" do
2095
1949
  on "BluebookDiff.BluebookDiffRequested"
2096
- trigger BluebookDiff::DeployToolchain::CompareBluebooks, with: { run: :run }
1950
+ ask :compare_bluebooks, with: { run: :run }
2097
1951
  end
2098
1952
 
2099
1953
  policy "RecordTheUnchangedBluebooks" do
@@ -2175,6 +2029,7 @@ Hecks.bluebook "Deploy" do
2175
2029
  transition "RecordLogin" => "signed_in", from: "requested"
2176
2030
  transition "Plan" => "planned", from: "requested"
2177
2031
  transition "Flag" => "flagged", from: "requested"
2032
+ mark :terminal, "deployed", "destroyed", "flagged", "listed", "located", "named", "planned", "signed_in"
2178
2033
  end
2179
2034
 
2180
2035
  # `hecks deploy preview_run.<name|url|list|deploy|destroy|login> <project> [branch=<name>]
@@ -2187,21 +2042,14 @@ Hecks.bluebook "Deploy" do
2187
2042
  command "Name" do
2188
2043
  goal "Print the names a branch's preview would have, from the project's preview script (no AWS call)"
2189
2044
 
2190
- attribute :project, Location
2191
- attribute :script, Location, optional: true
2192
- attribute :run, RunKey
2193
- attribute :action, Action, default: { value: "name" }
2194
- attribute :branch, Branch, optional: true
2195
- attribute :confirm, Switch, optional: true
2196
- attribute :dry_run, Switch, optional: true
2197
-
2198
- sets :project
2199
- sets :script
2200
- sets :run
2201
- sets :action
2202
- sets :branch
2203
- sets :confirm
2204
- sets :dry_run
2045
+ attribute :project, Location, sets: true
2046
+ attribute :script, Location, optional: true, sets: true
2047
+ attribute :run, RunKey, sets: true
2048
+ attribute :action, Action, default: { value: "name" }, sets: true
2049
+ attribute :branch, Branch, optional: true, sets: true
2050
+ attribute :confirm, Switch, optional: true, sets: true
2051
+ attribute :dry_run, Switch, optional: true, sets: true
2052
+
2205
2053
 
2206
2054
  emits "PreviewNameRequested"
2207
2055
  end
@@ -2209,21 +2057,14 @@ Hecks.bluebook "Deploy" do
2209
2057
  command "Url" do
2210
2058
  goal "Print a branch's preview URL, read from its stack"
2211
2059
 
2212
- attribute :project, Location
2213
- attribute :script, Location, optional: true
2214
- attribute :run, RunKey
2215
- attribute :action, Action, default: { value: "url" }
2216
- attribute :branch, Branch, optional: true
2217
- attribute :confirm, Switch, optional: true
2218
- attribute :dry_run, Switch, optional: true
2219
-
2220
- sets :project
2221
- sets :script
2222
- sets :run
2223
- sets :action
2224
- sets :branch
2225
- sets :confirm
2226
- sets :dry_run
2060
+ attribute :project, Location, sets: true
2061
+ attribute :script, Location, optional: true, sets: true
2062
+ attribute :run, RunKey, sets: true
2063
+ attribute :action, Action, default: { value: "url" }, sets: true
2064
+ attribute :branch, Branch, optional: true, sets: true
2065
+ attribute :confirm, Switch, optional: true, sets: true
2066
+ attribute :dry_run, Switch, optional: true, sets: true
2067
+
2227
2068
 
2228
2069
  emits "PreviewUrlRequested"
2229
2070
  end
@@ -2231,21 +2072,14 @@ Hecks.bluebook "Deploy" do
2231
2072
  command "List" do
2232
2073
  goal "List every preview stack that exists, read from AWS"
2233
2074
 
2234
- attribute :project, Location
2235
- attribute :script, Location, optional: true
2236
- attribute :run, RunKey
2237
- attribute :action, Action, default: { value: "list" }
2238
- attribute :branch, Branch, optional: true
2239
- attribute :confirm, Switch, optional: true
2240
- attribute :dry_run, Switch, optional: true
2241
-
2242
- sets :project
2243
- sets :script
2244
- sets :run
2245
- sets :action
2246
- sets :branch
2247
- sets :confirm
2248
- sets :dry_run
2075
+ attribute :project, Location, sets: true
2076
+ attribute :script, Location, optional: true, sets: true
2077
+ attribute :run, RunKey, sets: true
2078
+ attribute :action, Action, default: { value: "list" }, sets: true
2079
+ attribute :branch, Branch, optional: true, sets: true
2080
+ attribute :confirm, Switch, optional: true, sets: true
2081
+ attribute :dry_run, Switch, optional: true, sets: true
2082
+
2249
2083
 
2250
2084
  emits "PreviewListRequested"
2251
2085
  end
@@ -2253,21 +2087,14 @@ Hecks.bluebook "Deploy" do
2253
2087
  command "Deploy" do
2254
2088
  goal "Create or update a branch's preview from the images built locally (writes to AWS; refuses unless confirm=true)"
2255
2089
 
2256
- attribute :project, Location
2257
- attribute :script, Location, optional: true
2258
- attribute :run, RunKey
2259
- attribute :action, Action, default: { value: "deploy" }
2260
- attribute :branch, Branch, optional: true
2261
- attribute :confirm, Switch, optional: true
2262
- attribute :dry_run, Switch, optional: true
2263
-
2264
- sets :project
2265
- sets :script
2266
- sets :run
2267
- sets :action
2268
- sets :branch
2269
- sets :confirm
2270
- sets :dry_run
2090
+ attribute :project, Location, sets: true
2091
+ attribute :script, Location, optional: true, sets: true
2092
+ attribute :run, RunKey, sets: true
2093
+ attribute :action, Action, default: { value: "deploy" }, sets: true
2094
+ attribute :branch, Branch, optional: true, sets: true
2095
+ attribute :confirm, Switch, optional: true, sets: true
2096
+ attribute :dry_run, Switch, optional: true, sets: true
2097
+
2271
2098
 
2272
2099
  emits "PreviewDeployRequested"
2273
2100
  end
@@ -2275,21 +2102,14 @@ Hecks.bluebook "Deploy" do
2275
2102
  command "Destroy" do
2276
2103
  goal "Tear a branch's preview stack down (writes to AWS; refuses unless confirm=true)"
2277
2104
 
2278
- attribute :project, Location
2279
- attribute :script, Location, optional: true
2280
- attribute :run, RunKey
2281
- attribute :action, Action, default: { value: "destroy" }
2282
- attribute :branch, Branch, optional: true
2283
- attribute :confirm, Switch, optional: true
2284
- attribute :dry_run, Switch, optional: true
2285
-
2286
- sets :project
2287
- sets :script
2288
- sets :run
2289
- sets :action
2290
- sets :branch
2291
- sets :confirm
2292
- sets :dry_run
2105
+ attribute :project, Location, sets: true
2106
+ attribute :script, Location, optional: true, sets: true
2107
+ attribute :run, RunKey, sets: true
2108
+ attribute :action, Action, default: { value: "destroy" }, sets: true
2109
+ attribute :branch, Branch, optional: true, sets: true
2110
+ attribute :confirm, Switch, optional: true, sets: true
2111
+ attribute :dry_run, Switch, optional: true, sets: true
2112
+
2293
2113
 
2294
2114
  emits "PreviewDestroyRequested"
2295
2115
  end
@@ -2297,21 +2117,14 @@ Hecks.bluebook "Deploy" do
2297
2117
  command "Login" do
2298
2118
  goal "Mint a line that signs the deployer in to a preview as its first admin (reads its session secret; refuses unless confirm=true)"
2299
2119
 
2300
- attribute :project, Location
2301
- attribute :script, Location, optional: true
2302
- attribute :run, RunKey
2303
- attribute :action, Action, default: { value: "login" }
2304
- attribute :branch, Branch, optional: true
2305
- attribute :confirm, Switch, optional: true
2306
- attribute :dry_run, Switch, optional: true
2307
-
2308
- sets :project
2309
- sets :script
2310
- sets :run
2311
- sets :action
2312
- sets :branch
2313
- sets :confirm
2314
- sets :dry_run
2120
+ attribute :project, Location, sets: true
2121
+ attribute :script, Location, optional: true, sets: true
2122
+ attribute :run, RunKey, sets: true
2123
+ attribute :action, Action, default: { value: "login" }, sets: true
2124
+ attribute :branch, Branch, optional: true, sets: true
2125
+ attribute :confirm, Switch, optional: true, sets: true
2126
+ attribute :dry_run, Switch, optional: true, sets: true
2127
+
2315
2128
 
2316
2129
  emits "PreviewLoginRequested"
2317
2130
  end
@@ -2320,9 +2133,8 @@ Hecks.bluebook "Deploy" do
2320
2133
  goal "Record the names the script printed"
2321
2134
 
2322
2135
  reference_to PreviewRun
2323
- attribute :report, Report
2136
+ attribute :report, Report, sets: true
2324
2137
 
2325
- sets :report
2326
2138
 
2327
2139
  emits "PreviewNamed"
2328
2140
  end
@@ -2331,9 +2143,8 @@ Hecks.bluebook "Deploy" do
2331
2143
  goal "Record the preview URL the script printed"
2332
2144
 
2333
2145
  reference_to PreviewRun
2334
- attribute :report, Report
2146
+ attribute :report, Report, sets: true
2335
2147
 
2336
- sets :report
2337
2148
 
2338
2149
  emits "PreviewLocated"
2339
2150
  end
@@ -2342,9 +2153,8 @@ Hecks.bluebook "Deploy" do
2342
2153
  goal "Record the preview stacks the script listed"
2343
2154
 
2344
2155
  reference_to PreviewRun
2345
- attribute :report, Report
2156
+ attribute :report, Report, sets: true
2346
2157
 
2347
- sets :report
2348
2158
 
2349
2159
  emits "PreviewListed"
2350
2160
  end
@@ -2353,9 +2163,8 @@ Hecks.bluebook "Deploy" do
2353
2163
  goal "Record that the preview was created or updated, and what the script said"
2354
2164
 
2355
2165
  reference_to PreviewRun
2356
- attribute :report, Report
2166
+ attribute :report, Report, sets: true
2357
2167
 
2358
- sets :report
2359
2168
 
2360
2169
  emits "PreviewDeployed"
2361
2170
  end
@@ -2364,9 +2173,8 @@ Hecks.bluebook "Deploy" do
2364
2173
  goal "Record that the preview was torn down, and what the script said"
2365
2174
 
2366
2175
  reference_to PreviewRun
2367
- attribute :report, Report
2176
+ attribute :report, Report, sets: true
2368
2177
 
2369
- sets :report
2370
2178
 
2371
2179
  emits "PreviewDestroyed"
2372
2180
  end
@@ -2375,9 +2183,8 @@ Hecks.bluebook "Deploy" do
2375
2183
  goal "Record that the sign-in line was minted, and where the script put it"
2376
2184
 
2377
2185
  reference_to PreviewRun
2378
- attribute :report, Report
2186
+ attribute :report, Report, sets: true
2379
2187
 
2380
- sets :report
2381
2188
 
2382
2189
  emits "PreviewSignedIn"
2383
2190
  end
@@ -2386,9 +2193,8 @@ Hecks.bluebook "Deploy" do
2386
2193
  goal "Record the plan a dry run printed: what would run and where, with nothing run"
2387
2194
 
2388
2195
  reference_to PreviewRun
2389
- attribute :report, Report
2196
+ attribute :report, Report, sets: true
2390
2197
 
2391
- sets :report
2392
2198
 
2393
2199
  emits "PreviewPlanned"
2394
2200
  end
@@ -2397,9 +2203,8 @@ Hecks.bluebook "Deploy" do
2397
2203
  goal "Record that the run was refused or failed, with the script's status and what it said"
2398
2204
 
2399
2205
  reference_to PreviewRun
2400
- attribute :refusal, Report
2206
+ attribute :refusal, Report, sets: true
2401
2207
 
2402
- sets :refusal
2403
2208
 
2404
2209
  emits "PreviewFlagged"
2405
2210
  end
@@ -2420,32 +2225,32 @@ Hecks.bluebook "Deploy" do
2420
2225
 
2421
2226
  policy "RunPreviewWhenNameRequested" do
2422
2227
  on "PreviewRun.PreviewNameRequested"
2423
- trigger PreviewRun::DeployToolchain::RunPreview, with: { run: :run }
2228
+ ask :run_preview, with: { run: :run }
2424
2229
  end
2425
2230
 
2426
2231
  policy "RunPreviewWhenUrlRequested" do
2427
2232
  on "PreviewRun.PreviewUrlRequested"
2428
- trigger PreviewRun::DeployToolchain::RunPreview, with: { run: :run }
2233
+ ask :run_preview, with: { run: :run }
2429
2234
  end
2430
2235
 
2431
2236
  policy "RunPreviewWhenListRequested" do
2432
2237
  on "PreviewRun.PreviewListRequested"
2433
- trigger PreviewRun::DeployToolchain::RunPreview, with: { run: :run }
2238
+ ask :run_preview, with: { run: :run }
2434
2239
  end
2435
2240
 
2436
2241
  policy "RunPreviewWhenDeployRequested" do
2437
2242
  on "PreviewRun.PreviewDeployRequested"
2438
- trigger PreviewRun::DeployToolchain::RunPreview, with: { run: :run }
2243
+ ask :run_preview, with: { run: :run }
2439
2244
  end
2440
2245
 
2441
2246
  policy "RunPreviewWhenDestroyRequested" do
2442
2247
  on "PreviewRun.PreviewDestroyRequested"
2443
- trigger PreviewRun::DeployToolchain::RunPreview, with: { run: :run }
2248
+ ask :run_preview, with: { run: :run }
2444
2249
  end
2445
2250
 
2446
2251
  policy "RunPreviewWhenLoginRequested" do
2447
2252
  on "PreviewRun.PreviewLoginRequested"
2448
- trigger PreviewRun::DeployToolchain::RunPreview, with: { run: :run }
2253
+ ask :run_preview, with: { run: :run }
2449
2254
  end
2450
2255
 
2451
2256
  policy "RecordThePreviewName" do
@@ -2528,7 +2333,7 @@ Hecks.bluebook "Deploy" do
2528
2333
 
2529
2334
  # A task definition revision (or family) the companion's image and settings are read from.
2530
2335
  value_object "TaskDefinition" do
2531
- attribute :value, String, pattern: '^[A-Za-z0-9_-]+(:[0-9]+)?$'
2336
+ attribute :value, String, matches: :host_port
2532
2337
  end
2533
2338
 
2534
2339
  value_object "Switch" do
@@ -2544,6 +2349,7 @@ Hecks.bluebook "Deploy" do
2544
2349
  transition "Complete" => "rolled", from: "requested"
2545
2350
  transition "Plan" => "planned", from: "requested"
2546
2351
  transition "Flag" => "flagged", from: "requested"
2352
+ mark :terminal, "flagged", "planned", "rolled"
2547
2353
  end
2548
2354
 
2549
2355
  # `hecks deploy companion_roll.run <project> taskdef=<family:rev> [companion=umami] [confirm=true]
@@ -2555,21 +2361,14 @@ Hecks.bluebook "Deploy" do
2555
2361
  command "Run" do
2556
2362
  goal "Roll a companion Compose project onto the box and record the check on the box (refuses unless confirm=true)"
2557
2363
 
2558
- attribute :project, Location
2559
- attribute :script, Location, optional: true
2560
- attribute :run, RunKey
2561
- attribute :companion, Companion, default: { value: "umami" }
2562
- attribute :taskdef, TaskDefinition
2563
- attribute :confirm, Switch, optional: true
2564
- attribute :dry_run, Switch, optional: true
2565
-
2566
- sets :project
2567
- sets :script
2568
- sets :run
2569
- sets :companion
2570
- sets :taskdef
2571
- sets :confirm
2572
- sets :dry_run
2364
+ attribute :project, Location, sets: true
2365
+ attribute :script, Location, optional: true, sets: true
2366
+ attribute :run, RunKey, sets: true
2367
+ attribute :companion, Companion, default: { value: "umami" }, sets: true
2368
+ attribute :taskdef, TaskDefinition, sets: true
2369
+ attribute :confirm, Switch, optional: true, sets: true
2370
+ attribute :dry_run, Switch, optional: true, sets: true
2371
+
2573
2372
 
2574
2373
  emits "CompanionRollRequested"
2575
2374
  end
@@ -2578,9 +2377,8 @@ Hecks.bluebook "Deploy" do
2578
2377
  goal "Record that the companion rolled and passed its check on the box, and what the script printed"
2579
2378
 
2580
2379
  reference_to CompanionRoll
2581
- attribute :report, Report
2380
+ attribute :report, Report, sets: true
2582
2381
 
2583
- sets :report
2584
2382
 
2585
2383
  emits "CompanionRolled"
2586
2384
  end
@@ -2589,9 +2387,8 @@ Hecks.bluebook "Deploy" do
2589
2387
  goal "Record the plan a dry run printed: what would be rolled and where, with nothing run"
2590
2388
 
2591
2389
  reference_to CompanionRoll
2592
- attribute :report, Report
2390
+ attribute :report, Report, sets: true
2593
2391
 
2594
- sets :report
2595
2392
 
2596
2393
  emits "CompanionRollPlanned"
2597
2394
  end
@@ -2600,9 +2397,8 @@ Hecks.bluebook "Deploy" do
2600
2397
  goal "Record that the roll was refused, or the companion did not roll or is not healthy, and why"
2601
2398
 
2602
2399
  reference_to CompanionRoll
2603
- attribute :refusal, Report
2400
+ attribute :refusal, Report, sets: true
2604
2401
 
2605
- sets :refusal
2606
2402
 
2607
2403
  emits "CompanionRollFlagged"
2608
2404
  end
@@ -2623,7 +2419,7 @@ Hecks.bluebook "Deploy" do
2623
2419
 
2624
2420
  policy "RollCompanionWhenRequested" do
2625
2421
  on "CompanionRoll.CompanionRollRequested"
2626
- trigger CompanionRoll::DeployToolchain::RollCompanion, with: { run: :run }
2422
+ ask :roll_companion, with: { run: :run }
2627
2423
  end
2628
2424
 
2629
2425
  policy "RecordTheRolledCompanion" do
@@ -2680,6 +2476,7 @@ Hecks.bluebook "Deploy" do
2680
2476
  transition "Match" => "matching", from: "requested"
2681
2477
  transition "Drift" => "drifted", from: "requested"
2682
2478
  transition "Refuse" => "refused", from: "requested"
2479
+ mark :terminal, "drifted", "matching", "refused"
2683
2480
  end
2684
2481
 
2685
2482
  # `hecks deploy template_comparison.diff <before> after=<template> [--json] [--strict]`. `--strict` also counts
@@ -2687,17 +2484,12 @@ Hecks.bluebook "Deploy" do
2687
2484
  command "Diff" do
2688
2485
  goal "Compare two CloudFormation templates and report what differs by logical id"
2689
2486
 
2690
- attribute :before, Location
2691
- attribute :after, Location
2692
- attribute :run, RunKey
2693
- attribute :json, Switch, optional: true
2694
- attribute :strict, Switch, optional: true
2487
+ attribute :before, Location, sets: true
2488
+ attribute :after, Location, sets: true
2489
+ attribute :run, RunKey, sets: true
2490
+ attribute :json, Switch, optional: true, sets: true
2491
+ attribute :strict, Switch, optional: true, sets: true
2695
2492
 
2696
- sets :before
2697
- sets :after
2698
- sets :run
2699
- sets :json
2700
- sets :strict
2701
2493
 
2702
2494
  emits "ComparisonRequested"
2703
2495
  end
@@ -2706,12 +2498,11 @@ Hecks.bluebook "Deploy" do
2706
2498
  goal "Record that the templates agree"
2707
2499
 
2708
2500
  reference_to TemplateComparison
2709
- attribute :report, Report
2501
+ attribute :report, Report, sets: true
2710
2502
  attribute :different, Switch
2711
2503
 
2712
2504
  given("the templates agree") { !different.value }
2713
2505
 
2714
- sets :report
2715
2506
 
2716
2507
  emits "TemplatesMatched"
2717
2508
  end
@@ -2720,12 +2511,11 @@ Hecks.bluebook "Deploy" do
2720
2511
  goal "Record that the templates differ, and how"
2721
2512
 
2722
2513
  reference_to TemplateComparison
2723
- attribute :report, Report
2514
+ attribute :report, Report, sets: true
2724
2515
  attribute :different, Switch
2725
2516
 
2726
2517
  given("the templates differ") { different.value }
2727
2518
 
2728
- sets :report
2729
2519
 
2730
2520
  emits "TemplatesDrifted"
2731
2521
  end
@@ -2734,9 +2524,8 @@ Hecks.bluebook "Deploy" do
2734
2524
  goal "Record that a template could not be read, and why"
2735
2525
 
2736
2526
  reference_to TemplateComparison
2737
- attribute :refusal, Report
2527
+ attribute :refusal, Report, sets: true
2738
2528
 
2739
- sets :refusal
2740
2529
 
2741
2530
  emits "ComparisonRefused"
2742
2531
  end
@@ -2757,7 +2546,7 @@ Hecks.bluebook "Deploy" do
2757
2546
 
2758
2547
  policy "CompareWhenRequested" do
2759
2548
  on "TemplateComparison.ComparisonRequested"
2760
- trigger TemplateComparison::DeployToolchain::Compare, with: { run: :run }
2549
+ ask :compare, with: { run: :run }
2761
2550
  end
2762
2551
 
2763
2552
  policy "RecordTheMatch" do
@@ -2803,16 +2592,15 @@ Hecks.bluebook "Deploy" do
2803
2592
  mark :failure, "faulted"
2804
2593
  transition "Complete" => "projected", from: "requested"
2805
2594
  transition "Fault" => "faulted", from: "requested"
2595
+ mark :terminal, "faulted", "projected"
2806
2596
  end
2807
2597
 
2808
2598
  command "ProjectOidc" do
2809
- goal "Write each domain's OIDC client and scope manifest beside it: oidc.json, or one <chapter>.oidc.json for each chapter of a directory that holds several"
2599
+ goal "Write each domain's OIDC client and scope manifest beside it: oidc.json, or one <bluebook>.oidc.json for each bluebook of a directory that holds several"
2810
2600
 
2811
- attribute :domains, DomainList, optional: true
2812
- attribute :run, RunKey
2601
+ attribute :domains, DomainList, optional: true, sets: true
2602
+ attribute :run, RunKey, sets: true
2813
2603
 
2814
- sets :domains
2815
- sets :run
2816
2604
 
2817
2605
  emits "OidcProjectionRequested"
2818
2606
  end
@@ -2821,9 +2609,8 @@ Hecks.bluebook "Deploy" do
2821
2609
  goal "Record which manifests were written"
2822
2610
 
2823
2611
  reference_to OidcManifest
2824
- attribute :output, Report
2612
+ attribute :output, Report, sets: true
2825
2613
 
2826
- sets :output
2827
2614
 
2828
2615
  emits "OidcProjected"
2829
2616
  end
@@ -2832,9 +2619,8 @@ Hecks.bluebook "Deploy" do
2832
2619
  goal "Record that the manifests could not be projected, and why"
2833
2620
 
2834
2621
  reference_to OidcManifest
2835
- attribute :refusal, Report
2622
+ attribute :refusal, Report, sets: true
2836
2623
 
2837
- sets :refusal
2838
2624
 
2839
2625
  emits "OidcFaulted"
2840
2626
  end
@@ -2855,7 +2641,7 @@ Hecks.bluebook "Deploy" do
2855
2641
 
2856
2642
  policy "ProjectWhenRequested" do
2857
2643
  on "OidcManifest.OidcProjectionRequested"
2858
- trigger OidcManifest::DeployToolchain::Manifest, with: { run: :run }
2644
+ ask :manifest, with: { run: :run }
2859
2645
  end
2860
2646
 
2861
2647
  policy "RecordTheManifests" do