hecks 3.10.0 → 3.11.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.
- checksums.yaml +4 -4
- data/examples/pizzas/bluebook/pizzas.bluebook +29 -0
- data/examples/pizzas/bluebook/pizzas.hecksagon +7 -0
- data/exe/hecks +4 -4
- data/lib/hecks/adapters/driven/d1.rb +2 -10
- data/lib/hecks/adapters/driven/heki.adapter +1 -1
- data/lib/hecks/adapters/driven/heki.rb +2 -12
- data/lib/hecks/adapters/driven/lambda.adapter +1 -1
- data/lib/hecks/adapters/driven/lambda.rb +3 -18
- data/lib/hecks/adapters/driven/postgres.rb +4 -11
- data/lib/hecks/adapters/driven/sqlite.adapter +1 -1
- data/lib/hecks/adapters/driven/sqlite.rb +2 -10
- data/lib/hecks/adapters/driving/admission.rb +46 -0
- data/lib/hecks/adapters/driving/cli/nesting.rb +36 -0
- data/lib/hecks/adapters/driving/cli/shorthand.rb +88 -0
- data/lib/hecks/adapters/driving/cli.rb +127 -0
- data/lib/hecks/adapters/driving/cli_runner/answers.rb +160 -0
- data/lib/hecks/adapters/driving/cli_runner/resolution.rb +155 -0
- data/lib/hecks/adapters/driving/cli_runner/settling.rb +120 -0
- data/lib/hecks/adapters/driving/cli_runner/streaming.rb +93 -0
- data/lib/hecks/adapters/driving/cli_runner/suggestions.rb +47 -0
- data/lib/hecks/adapters/driving/cli_runner.rb +69 -0
- data/lib/hecks/adapters/driving/command_request.rb +121 -0
- data/lib/hecks/adapters/driving/handle.rb +214 -0
- data/lib/hecks/adapters/driving/json.rb +136 -0
- data/lib/hecks/adapters/driving/launcher_options.rb +267 -0
- data/lib/hecks/adapters/driving/mcp/properties.rb +49 -0
- data/lib/hecks/adapters/driving/mcp/tool_calls.rb +116 -0
- data/lib/hecks/adapters/driving/mcp/tool_definitions/auditing.rb +53 -0
- data/lib/hecks/adapters/driving/mcp/tool_definitions/calling.rb +71 -0
- data/lib/hecks/adapters/driving/mcp/tool_definitions/reading.rb +99 -0
- data/lib/hecks/adapters/driving/mcp/tool_definitions.rb +18 -0
- data/lib/hecks/adapters/driving/mcp.rb +159 -0
- data/lib/hecks/adapters/driving/mcp_guide_cache.rb +78 -0
- data/lib/hecks/adapters/driving/mcp_scope/argument_policy.rb +97 -0
- data/lib/hecks/adapters/driving/mcp_scope/env_problems.rb +69 -0
- data/lib/hecks/adapters/driving/mcp_scope/presenter.rb +83 -0
- data/lib/hecks/adapters/driving/mcp_scope.rb +213 -0
- data/lib/hecks/adapters/driving/ruby/aggregate_module.rb +171 -0
- data/lib/hecks/adapters/driving/ruby/chapter.rb +91 -0
- data/lib/hecks/adapters/driving/ruby.rb +83 -0
- data/lib/hecks/adapters/driving/usage_cache.rb +144 -0
- data/lib/hecks/{doors.rb → adapters/driving.rb} +10 -6
- data/lib/hecks/behaviors/expectations/boot.rb +1 -1
- data/lib/hecks/bench/ruby_runner.rb +1 -1
- data/lib/hecks/bluebook/ask_resolution.rb +130 -0
- data/lib/hecks/bluebook/assembly/aggregate_assembly.rb +8 -2
- data/lib/hecks/bluebook/assembly/contracts/rules.rb +4 -2
- data/lib/hecks/bluebook/assembly/contracts/structure.rb +3 -1
- data/lib/hecks/bluebook/assembly/marks.rb +1 -0
- data/lib/hecks/bluebook/attribute.rb +1 -1
- data/lib/hecks/bluebook/behaviour/command.rb +13 -8
- data/lib/hecks/bluebook/behaviour/policy.rb +30 -0
- data/lib/hecks/bluebook/capabilities/attribute_values.rb +72 -0
- data/lib/hecks/bluebook/capabilities.rb +91 -9
- data/lib/hecks/bluebook/domain_port.rb +16 -4
- data/lib/hecks/bluebook/dsl/adapter_builder.rb +18 -6
- data/lib/hecks/bluebook/dsl/binding_proxy.rb +13 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation/computed_sources.rb +98 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation/fan_out_rows.rb +42 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation/projected_fields.rb +14 -2
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation/provisions.rb +69 -3
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation/with_projections.rb +17 -10
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation.rb +5 -0
- data/lib/hecks/bluebook/dsl/bootstrap_table.rb +2 -0
- data/lib/hecks/bluebook/dsl/command_builder/mutations.rb +8 -1
- data/lib/hecks/bluebook/dsl/command_builder/operands.rb +121 -0
- data/lib/hecks/bluebook/dsl/command_builder.rb +2 -0
- data/lib/hecks/bluebook/dsl/hecksagon_builder.rb +10 -1
- data/lib/hecks/bluebook/dsl/lifecycle_builder.rb +45 -2
- data/lib/hecks/bluebook/dsl/policy_builder.rb +47 -10
- data/lib/hecks/bluebook/dsl/rule_reference.rb +7 -4
- data/lib/hecks/bluebook/dsl/world_builder.rb +1 -1
- data/lib/hecks/bluebook/expression/ast_json/emitters.rb +6 -0
- data/lib/hecks/bluebook/expression/ast_json.rb +9 -6
- data/lib/hecks/bluebook/expression/ast_reader.rb +14 -9
- data/lib/hecks/bluebook/expression/projection.json +36 -0
- data/lib/hecks/bluebook/expression/resolver/operations.rb +31 -0
- data/lib/hecks/bluebook/expression/resolver/parsing.rb +38 -5
- data/lib/hecks/bluebook/expression/resolver/scanning.rb +22 -5
- data/lib/hecks/bluebook/expression/resolver/values.rb +10 -0
- data/lib/hecks/bluebook/expression/resolver.rb +20 -1
- data/lib/hecks/bluebook/hecksagon.rb +23 -3
- data/lib/hecks/bluebook/lifecycle.rb +22 -3
- data/lib/hecks/bluebook/meta_validator/adapter_judge.rb +13 -1
- data/lib/hecks/bluebook/meta_validator/modes.rb +4 -1
- data/lib/hecks/bluebook/meta_validator/readings.rb +18 -1
- data/lib/hecks/bluebook/meta_validator/reconstruction/heads.rb +2 -1
- data/lib/hecks/bluebook/meta_validator/shapes.rb +5 -0
- data/lib/hecks/bluebook/meta_validator/verdict_cache.rb +1 -1
- data/lib/hecks/bluebook/meta_validator.rb +12 -12
- data/lib/hecks/bluebook/model_check/ask_checks.rb +71 -0
- data/lib/hecks/bluebook/model_check/policy_checks.rb +2 -1
- data/lib/hecks/bluebook/model_check/reference_checks.rb +70 -0
- data/lib/hecks/bluebook/model_check.rb +8 -2
- data/lib/hecks/bluebook/policy.rb +4 -2
- data/lib/hecks/bluebook/smoke_test.rb +1 -1
- data/lib/hecks/bluebook/synthesizer.rb +2 -0
- data/lib/hecks/bluebook.rb +1 -0
- data/lib/hecks/cli/command_table.rb +1 -1
- data/lib/hecks/cli/console.rb +2 -1
- data/lib/hecks/cli/document.rb +1 -1
- data/lib/hecks/cli/launcher_words.rb +4 -4
- data/lib/hecks/cli/mcp.rb +4 -4
- data/lib/hecks/cli/project_cli/launcher_source.rb +2 -2
- data/lib/hecks/cli/project_cli/templates.rb +5 -5
- data/lib/hecks/cli/project_cli.rb +9 -6
- data/lib/hecks/cli/run.rb +2 -2
- data/lib/hecks/cli/smoke_http/checks.rb +4 -1
- data/lib/hecks/cli/smoke_http/transport.rb +3 -3
- data/lib/hecks/cli/smoke_http.rb +3 -0
- data/lib/hecks/codemod.rb +5 -2
- data/lib/hecks/corpus/routes.rb +7 -0
- data/lib/hecks/corpus/rust.rb +3 -2
- data/lib/hecks/deploy/bluebook/deploy.bluebook +18 -2
- data/lib/hecks/doc/reference/rendering.rb +6 -3
- data/lib/hecks/forms/app/commands.rb +8 -7
- data/lib/hecks/forms/app/queries.rb +2 -1
- data/lib/hecks/forms/app.rb +1 -1
- data/lib/hecks/forms/record_renderer.rb +1 -1
- data/lib/hecks/framework/bluebook/privacy.bluebook +11 -0
- data/lib/hecks/fuzzing/concurrent_dispatch.rb +4 -1
- data/lib/hecks/fuzzing/failure_triage.rb +2 -1
- data/lib/hecks/fuzzing/mutation/run.rb +11 -4
- data/lib/hecks/fuzzing/properties/catalog.rb +6 -4
- data/lib/hecks/fuzzing/properties/guaranteed_by_construction.rb +18 -11
- data/lib/hecks/fuzzing/properties/guards.rb +1 -1
- data/lib/hecks/fuzzing/self_consistency/saga_redelivery.rb +1 -1
- data/lib/hecks/fuzzing/self_consistency.rb +6 -2
- data/lib/hecks/fuzzing/shrinker.rb +3 -1
- data/lib/hecks/fuzzing/value_generator.rb +19 -5
- data/lib/hecks/gate/stages.yml +4 -10
- data/lib/hecks/grammar/evolve.rb +1 -1
- data/lib/hecks/grammar/expression_operators.json +372 -0
- data/lib/hecks/grammar/operators.rb +3 -1
- data/lib/hecks/hecks/adapters/codebase/corpus_tasks.rb +10 -10
- data/lib/hecks/hecks/adapters/codebase/inspection/rubycritic.rb +35 -0
- data/lib/hecks/hecks/adapters/codebase/inspection.rb +104 -0
- data/lib/hecks/hecks/adapters/codebase/publishing.rb +2 -1
- data/lib/hecks/hecks/adapters/codebase/release_facts.rb +12 -2
- data/lib/hecks/hecks/adapters/codebase/source_tree.rb +2 -1
- data/lib/hecks/hecks/adapters/codebase/test_runner.rb +1 -1
- data/lib/hecks/hecks/adapters/cost_explorer.rb +8 -5
- data/lib/hecks/hecks/adapters/deploy_toolchain/statuses.rb +2 -1
- data/lib/hecks/hecks/adapters/finding_github.rb +13 -6
- data/lib/hecks/hecks/adapters/first_admin.rb +2 -2
- data/lib/hecks/hecks/adapters/github_rulesets.rb +6 -3
- data/lib/hecks/hecks/adapters/in_process_boot.rb +1 -1
- data/lib/hecks/hecks/adapters/journal_store/compaction.rb +1 -1
- data/lib/hecks/hecks/adapters/journal_store/edge_audit.rb +10 -20
- data/lib/hecks/hecks/adapters/journal_store/held_domain.rb +28 -5
- data/lib/hecks/hecks/adapters/local_files.rb +2 -2
- data/lib/hecks/hecks/adapters/rehearsal/audit_report.rb +107 -0
- data/lib/hecks/hecks/adapters/rehearsal/census.rb +71 -0
- data/lib/hecks/hecks/adapters/rehearsal/declaration.rb +133 -0
- data/lib/hecks/hecks/adapters/rehearsal/environment.rb +83 -0
- data/lib/hecks/hecks/adapters/rehearsal/inquiry.rb +142 -0
- data/lib/hecks/hecks/adapters/rehearsal/memory_store.rb +96 -0
- data/lib/hecks/hecks/adapters/rehearsal/postgres_census.rb +100 -0
- data/lib/hecks/hecks/adapters/rehearsal/postgres_reading.rb +69 -0
- data/lib/hecks/hecks/adapters/rehearsal/postgres_store.rb +129 -0
- data/lib/hecks/hecks/adapters/rehearsal/rows.rb +41 -0
- data/lib/hecks/hecks/adapters/rehearsal/rust_audit.rb +83 -0
- data/lib/hecks/hecks/adapters/rehearsal/subject.rb +104 -0
- data/lib/hecks/hecks/adapters/rehearsal.rb +54 -0
- data/lib/hecks/hecks/adapters/rehearsal_store.adapter +7 -0
- data/lib/hecks/hecks/adapters/rehearsal_store.rb +81 -0
- data/lib/hecks/hecks/adapters/terminal.rb +13 -11
- data/lib/hecks/hecks/codebase.behaviors +13 -1
- data/lib/hecks/hecks/codebase.bluebook +239 -5
- data/lib/hecks/hecks/custodian.behaviors +24 -6
- data/lib/hecks/hecks/custodian.bluebook +6 -1227
- data/lib/hecks/hecks/deploy.behaviors +1 -1
- data/lib/hecks/hecks/deploy.world +1 -3
- data/lib/hecks/hecks/hecks.behaviors +1 -1
- data/lib/hecks/hecks/hecks.hecksagon +53 -18
- data/lib/hecks/hecks/hecks.world +10 -10
- data/lib/hecks/hecks/rehearsal.bluebook +477 -0
- data/lib/hecks/hecks/site.behaviors +1 -1
- data/lib/hecks/hecks/site.world +0 -1
- data/lib/hecks/hecks/tooling.bluebook +1238 -0
- data/lib/hecks/indifferent_key.rb +20 -0
- data/lib/hecks/language/adapter.bluebook +13 -3
- data/lib/hecks/language/bluebook/aggregate.bluebook +23 -0
- data/lib/hecks/language/bluebook/bluebook.bluebook +15 -0
- data/lib/hecks/language/bluebook/entity.bluebook +18 -0
- data/lib/hecks/language/bluebook/policy.bluebook +9 -1
- data/lib/hecks/language/bluebook/query.bluebook +1 -1
- data/lib/hecks/language/bluebook/vocabulary.bluebook +11 -4
- data/lib/hecks/language/hecksagon/domain_port.bluebook +1 -1
- data/lib/hecks/language/hecksagon/hecksagon.bluebook +22 -0
- data/lib/hecks/language/oidc.json +10 -0
- data/lib/hecks/language/port.bluebook +4 -4
- data/lib/hecks/literal.rb +12 -3
- data/lib/hecks/ports/key_vault.rb +7 -2
- data/lib/hecks/ports/persistence/plugins/era/era_check.rb +21 -10
- data/lib/hecks/ports/persistence/plugins/era/postgres_era/boot.rb +4 -2
- data/lib/hecks/ports/persistence/plugins/era/postgres_era/lineage_manager/era_resolver.rb +2 -1
- data/lib/hecks/ports/persistence/repository_factory.rb +6 -3
- data/lib/hecks/projections/deploy/box/templates/deploy-box.sh.tmpl +29 -0
- data/lib/hecks/projections/deploy/box/templates/deploy-service.sh.tmpl +1 -1
- data/lib/hecks/projections/deploy/preview/preview.sh.erb +1 -1
- data/lib/hecks/projections/deploy/shared.rb +5 -2
- data/lib/hecks/projections/model/deviations.rb +2 -2
- data/lib/hecks/projections/model.rb +2 -2
- data/lib/hecks/projections/oidc.rb +13 -1
- data/lib/hecks/projections/shape.rb +5 -2
- data/lib/hecks/projections/site/cms_editor/attributes.rb +26 -6
- data/lib/hecks/projections/site/cms_editor/blocks.rb +157 -0
- data/lib/hecks/projections/site/cms_editor/checks.rb +14 -1
- data/lib/hecks/projections/site/cms_editor/clearing.rb +70 -0
- data/lib/hecks/projections/site/cms_editor/color.rb +124 -0
- data/lib/hecks/projections/site/cms_editor/composition.rb +42 -0
- data/lib/hecks/projections/site/cms_editor/destructive.rb +61 -0
- data/lib/hecks/projections/site/cms_editor/drafts.rb +102 -0
- data/lib/hecks/projections/site/cms_editor/hints.rb +74 -0
- data/lib/hecks/projections/site/cms_editor/icons.rb +86 -0
- data/lib/hecks/projections/site/cms_editor/key_kinds.rb +31 -0
- data/lib/hecks/projections/site/cms_editor/limits.rb +72 -0
- data/lib/hecks/projections/site/cms_editor/media.rb +1 -1
- data/lib/hecks/projections/site/cms_editor/moment.rb +34 -0
- data/lib/hecks/projections/site/cms_editor/palette.rb +115 -0
- data/lib/hecks/projections/site/cms_editor/pickers.rb +85 -0
- data/lib/hecks/projections/site/cms_editor/preview.rb +91 -0
- data/lib/hecks/projections/site/cms_editor/relations.rb +92 -0
- data/lib/hecks/projections/site/cms_editor/scale_checks.rb +66 -0
- data/lib/hecks/projections/site/cms_editor/scheduling.rb +150 -0
- data/lib/hecks/projections/site/cms_editor/schema.rb +96 -19
- data/lib/hecks/projections/site/cms_editor/setting.rb +52 -9
- data/lib/hecks/projections/site/cms_editor/targets.rb +86 -0
- data/lib/hecks/projections/site/cms_editor/templates/package.json.tmpl +18 -1
- data/lib/hecks/projections/site/cms_editor/templates/src/app.ts.tmpl +251 -57
- data/lib/hecks/projections/site/cms_editor/templates/src/assets.ts.tmpl +98 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/auth/membership.ts.tmpl +32 -24
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/app.css.tmpl +412 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/autosave.js.tmpl +144 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/blocks.js.tmpl +500 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/body_doc.js.tmpl +175 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/body_editor.js.tmpl +418 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/epoch.js.tmpl +61 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/forms.js.tmpl +210 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/lists.js.tmpl +40 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/main.js.tmpl +26 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/media_picker.js.tmpl +232 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/moments.js.tmpl +73 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/pickers.js.tmpl +152 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/preview.js.tmpl +98 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/shell.js.tmpl +140 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/browser/toast.js.tmpl +66 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/choices.ts.tmpl +99 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/commands.ts.tmpl +78 -24
- data/lib/hecks/projections/site/cms_editor/templates/src/config.ts.tmpl +6 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/flash.ts.tmpl +52 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/host.ts.tmpl +19 -2
- data/lib/hecks/projections/site/cms_editor/templates/src/media/handler.ts.tmpl +31 -8
- data/lib/hecks/projections/site/cms_editor/templates/src/names.ts.tmpl +36 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/schema.ts.tmpl +131 -2
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/availability.ts.tmpl +15 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/block_list.js.tmpl +213 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/blocks.ts.tmpl +275 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/body_model.js.tmpl +8 -5
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/detail.ts.tmpl +88 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/dialogs.ts.tmpl +43 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/fields.ts.tmpl +229 -34
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/html.ts.tmpl +40 -81
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/icons.ts.tmpl +15 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/input.ts.tmpl +29 -12
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/links.ts.tmpl +100 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/moments.ts.tmpl +44 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/outline.ts.tmpl +53 -17
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/pages.ts.tmpl +178 -88
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/paging.ts.tmpl +82 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/pickers.ts.tmpl +110 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/preview.ts.tmpl +87 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/related.ts.tmpl +97 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/schedule.ts.tmpl +160 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/shell.ts.tmpl +211 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/table.ts.tmpl +151 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/theme.js.tmpl +16 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/values.ts.tmpl +69 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/words.ts.tmpl +97 -0
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/world.ts.tmpl +35 -0
- data/lib/hecks/projections/site/cms_editor/templates/tsconfig.json.tmpl +2 -1
- data/lib/hecks/projections/site/cms_editor/theme.rb +29 -0
- data/lib/hecks/projections/site/cms_editor/theme_checks.rb +57 -0
- data/lib/hecks/projections/site/cms_editor.rb +49 -23
- data/lib/hecks/projections/site/role_probe.rb +2 -0
- data/lib/hecks/projector/cli_audience.rb +2 -1
- data/lib/hecks/projector/cli_projector/listing.rb +1 -1
- data/lib/hecks/projector/cli_projector/option_specs.rb +1 -1
- data/lib/hecks/projector/docs_projector/closing.rb +1 -1
- data/lib/hecks/projector/docs_projector.rb +1 -1
- data/lib/hecks/projector/exporter/bindings.rb +40 -10
- data/lib/hecks/projector/exporter/capability_values.rb +55 -0
- data/lib/hecks/projector/narrate_projector/reactions.rb +1 -1
- data/lib/hecks/projector/target.rb +11 -0
- data/lib/hecks/projector.rb +32 -5
- data/lib/hecks/quality_control/adapters/github_checks.rb +12 -8
- data/lib/hecks/quality_control/adapters/github_issues.rb +8 -4
- data/lib/hecks/quality_control/cli/qa_open_pr.rb +2 -2
- data/lib/hecks/quality_control/cli/qa_sweep/checks/shrinking.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_sweep/finding_report.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_sweep.rb +1 -1
- data/lib/hecks/quality_control/quality_control.bluebook +6 -2
- data/lib/hecks/release/approval.rb +64 -0
- data/lib/hecks/router/{door.rb → aggregate_reader.rb} +5 -4
- data/lib/hecks/router/namespace_installer.rb +16 -16
- data/lib/hecks/router.rb +1 -1
- data/lib/hecks/runtime/best_effort.rb +22 -0
- data/lib/hecks/runtime/command_interpreter/mutation_applier.rb +12 -2
- data/lib/hecks/runtime/command_interpreter.rb +3 -2
- data/lib/hecks/runtime/command_rules/emission.rb +1 -1
- data/lib/hecks/runtime/dispatcher.rb +4 -4
- data/lib/hecks/runtime/entity_element/location.rb +1 -1
- data/lib/hecks/runtime/event.rb +5 -0
- data/lib/hecks/runtime/identity.rb +7 -6
- data/lib/hecks/runtime/interpreting.rb +2 -1
- data/lib/hecks/runtime/invocation_builder.rb +1 -1
- data/lib/hecks/runtime/loader/boot_steps.rb +8 -5
- data/lib/hecks/runtime/loader.rb +10 -10
- data/lib/hecks/runtime/policy_interpreter/arguments.rb +7 -4
- data/lib/hecks/runtime/policy_interpreter/fan_out.rb +3 -3
- data/lib/hecks/runtime/policy_interpreter.rb +6 -6
- data/lib/hecks/runtime/port_operation_interpreter.rb +1 -1
- data/lib/hecks/runtime/reaction_invocation.rb +1 -1
- data/lib/hecks/runtime/rebuild_sweep.rb +11 -1
- data/lib/hecks/runtime/registry/ask_verification.rb +35 -0
- data/lib/hecks/runtime/registry/hecksagon_rules.rb +10 -0
- data/lib/hecks/runtime/registry/merging.rb +1 -1
- data/lib/hecks/runtime/registry/providers.rb +16 -0
- data/lib/hecks/runtime/registry/read_repository.rb +6 -4
- data/lib/hecks/runtime/registry/verification.rb +4 -1
- data/lib/hecks/runtime/registry/world_defaults.rb +29 -0
- data/lib/hecks/runtime/registry.rb +1 -1
- data/lib/hecks/runtime/saga_interpreter/compensation.rb +1 -1
- data/lib/hecks/runtime/saga_interpreter/delivery.rb +4 -4
- data/lib/hecks/runtime/saga_interpreter/transitions.rb +1 -1
- data/lib/hecks/runtime/saga_interpreter.rb +3 -3
- data/lib/hecks/runtime/tenant_check.rb +5 -4
- data/lib/hecks/runtime/value/coercion.rb +2 -2
- data/lib/hecks/runtime/value/validation.rb +16 -4
- data/lib/hecks/runtime.rb +9 -9
- data/lib/hecks/rust_build/project_rust/target_ir.rb +1 -1
- data/lib/hecks/rust_build/wasm.rb +1 -1
- data/lib/hecks/rust_build/wasm_browser.rb +1 -1
- data/lib/hecks/rust_build.rb +11 -0
- data/lib/hecks/served_options.rb +53 -0
- data/lib/hecks/site/bluebook/site.bluebook +1 -0
- data/lib/hecks/storehouse/audit.rb +1 -1
- data/lib/hecks/storehouse/dispatching.rb +8 -6
- data/lib/hecks/storehouse/introspection.rb +2 -2
- data/lib/hecks/storehouse/querying.rb +6 -4
- data/lib/hecks/storehouse.rb +4 -4
- data/lib/hecks/tools/comment_style/source_file.rb +4 -1
- data/lib/hecks/tools/deploy_recipe_lint/fixtures.rb +4 -1
- data/lib/hecks/tools/lanes/rows.rb +6 -0
- data/lib/hecks/tools/oidc_manifests.rb +4 -5
- data/lib/hecks/tools/regeneration_run.rb +11 -4
- data/lib/hecks/tools/site_routes/editor_files.rb +12 -5
- data/lib/hecks/tools/tenant_provisioning.rb +2 -2
- data/lib/hecks/tools/tools_doc.rb +4 -4
- data/lib/hecks/version.rb +1 -1
- data/lib/hecks/vocabulary.rb +4 -4
- data/lib/hecks.rb +15 -15
- data/lib/rubocop/cop/hecks/env_dump.rb +69 -0
- data/lib/rubocop/cop/hecks/monotonic_duration.rb +53 -0
- data/lib/rubocop/cop/hecks/no_wall_clock_in_runtime.rb +34 -0
- data/lib/rubocop/cop/hecks/raw_shell_interpolation.rb +79 -0
- data/lib/rubocop/cop/hecks/sleep_in_spec.rb +34 -0
- data/lib/rubocop/cop/hecks/swallowed_rescue.rb +37 -0
- data/lib/rubocop/cop/hecks/symbol_string_key_mix.rb +50 -0
- data/lib/rubocop/cop/hecks/untyped_raise.rb +37 -0
- data/prebuilt/05c358d38d661a3774f813d49c66f5b68939af94432d66257a56f49ee2598994.marshal +0 -0
- data/prebuilt/26c40c61f09b09b11651c64668eda3ceb180f83cf2a3802d3033d2fd99ac841b.marshal +0 -0
- data/prebuilt/verdicts-230ac18c25abfd3d92ede032bee2661a4c2cd2773ab0cf0e2ae52546ba2f7af9.json +1 -0
- data/rust/.gitignore +6 -0
- data/rust/Cargo.toml +6 -0
- data/rust/build/src/binding_pass.rs +103 -0
- data/rust/build/src/cargo_sync.rs +6 -0
- data/rust/build/src/lineage_pass.rs +3 -3
- data/rust/build/src/main.rs +17 -5
- data/rust/build/src/pipeline.rs +48 -5
- data/rust/build/src/seams_pass.rs +123 -0
- data/rust/build/src/translation_pass.rs +167 -0
- data/rust/codegen/src/asks.rs +103 -0
- data/rust/codegen/src/commands.rs +13 -8
- data/rust/codegen/src/constraints.rs +25 -0
- data/rust/codegen/src/domain_generator.rs +2 -0
- data/rust/codegen/src/expr_emitter.rs +13 -0
- data/rust/codegen/src/json_codec.rs +54 -15
- data/rust/codegen/src/main.rs +1 -0
- data/rust/codegen/src/mutations.rs +128 -3
- data/rust/codegen/src/queries.rs +11 -2
- data/rust/codegen/src/reactions.rs +1 -1
- data/rust/codegen/src/types.rs +166 -8
- data/rust/host/HECKS_RELEASE +1 -1
- data/rust/host/src/api.rs +4 -4
- data/rust/host/src/bin/validate_harness.rs +43 -0
- data/rust/host/src/boundary_fuzz/expr_json.rs +2 -2
- data/rust/host/src/boundary_fuzz/ir.rs +1 -0
- data/rust/host/src/boundary_fuzz/server.rs +1 -1
- data/rust/host/src/checkout.rs +35 -19
- data/rust/host/src/commerce_ir.rs +408 -2
- data/rust/host/src/expr_json.rs +118 -0
- data/rust/host/src/mint.rs +1 -1
- data/rust/host/src/payments/tests.rs +27 -1
- data/rust/host/src/payments.rs +12 -4
- data/rust/host/src/query_step.rs +22 -4
- data/rust/host/src/reference_validate.rs +653 -108
- data/rust/host/src/resend.rs +2 -0
- data/rust/host/src/server.rs +19 -6
- data/rust/host/src/ui_schema.rs +132 -5
- data/rust/host/src/web/newsletter.rs +7 -8
- data/rust/host/src/web/newsletter_send.rs +38 -13
- data/rust/host/src/web/registrations.rs +229 -26
- data/rust/host/src/web.rs +3 -3
- data/rust/parser/src/emit.rs +38 -6
- data/rust/parser/src/expr/ast_json.rs +7 -1
- data/rust/parser/src/expr/resolver.rs +171 -6
- data/rust/parser/src/ir.rs +7 -0
- data/rust/parser/src/keywords.rs +24 -0
- data/rust/parser/src/main.rs +3 -0
- data/rust/parser/src/parse/aggregate.rs +2 -1
- data/rust/parser/src/parse/chapter.rs +2 -2
- data/rust/parser/src/parse/command.rs +2 -0
- data/rust/parser/src/parse/hecksagon.rs +5 -2
- data/rust/parser/src/parse/lifecycle.rs +81 -0
- data/rust/parser/src/parse/mod.rs +15 -1
- data/rust/parser/src/parse/policy.rs +13 -2
- data/rust/parser/src/parse/value_object.rs +13 -8
- data/rust/parser/src/ruby_value.rs +1 -1
- data/rust/src/exemplar/commands.rs +4 -4
- data/rust/src/exemplar/constraints.rs +1 -1
- data/rust/src/exemplar/json.rs +43 -1
- data/rust/src/kernel/cli.rs +7 -5
- data/rust/src/kernel/dispatch.rs +2 -2
- data/rust/src/kernel/dispatch_guard_tests.rs +1 -1
- data/rust/src/kernel/expr.rs +66 -3
- data/rust/src/kernel/expression_operators/arithmetic.rs +130 -5
- data/rust/src/kernel/expression_operators/text.rs +26 -2
- data/rust/src/kernel/json.rs +15 -0
- data/rust/src/kernel/mod.rs +1 -1
- data/rust/src/kernel/orchestrate.rs +54 -5
- data/rust/src/kernel/orchestrate_guard_tests.rs +67 -0
- data/rust/src/kernel/pattern.rs +60 -0
- data/rust/src/kernel/reference_lookup.rs +90 -7
- metadata +140 -38
- data/lib/hecks/doors/cli_door/nesting.rb +0 -34
- data/lib/hecks/doors/cli_door/shorthand.rb +0 -85
- data/lib/hecks/doors/cli_door.rb +0 -124
- data/lib/hecks/doors/cli_runner/answers.rb +0 -138
- data/lib/hecks/doors/cli_runner/resolution.rb +0 -146
- data/lib/hecks/doors/cli_runner/settling.rb +0 -115
- data/lib/hecks/doors/cli_runner/streaming.rb +0 -90
- data/lib/hecks/doors/cli_runner/suggestions.rb +0 -43
- data/lib/hecks/doors/cli_runner.rb +0 -66
- data/lib/hecks/doors/command_request.rb +0 -119
- data/lib/hecks/doors/handle.rb +0 -208
- data/lib/hecks/doors/json_door.rb +0 -132
- data/lib/hecks/doors/launcher_options.rb +0 -247
- data/lib/hecks/doors/mcp_door/properties.rb +0 -47
- data/lib/hecks/doors/mcp_door/tool_calls.rb +0 -113
- data/lib/hecks/doors/mcp_door/tool_definitions/auditing.rb +0 -51
- data/lib/hecks/doors/mcp_door/tool_definitions/calling.rb +0 -69
- data/lib/hecks/doors/mcp_door/tool_definitions/reading.rb +0 -97
- data/lib/hecks/doors/mcp_door/tool_definitions.rb +0 -15
- data/lib/hecks/doors/mcp_door.rb +0 -156
- data/lib/hecks/doors/mcp_door_scope/argument_policy.rb +0 -92
- data/lib/hecks/doors/mcp_door_scope/env_problems.rb +0 -55
- data/lib/hecks/doors/mcp_door_scope/presenter.rb +0 -78
- data/lib/hecks/doors/mcp_door_scope.rb +0 -201
- data/lib/hecks/doors/mcp_guide_cache.rb +0 -75
- data/lib/hecks/doors/ruby_door/aggregate_door.rb +0 -162
- data/lib/hecks/doors/ruby_door/chapter.rb +0 -89
- data/lib/hecks/doors/ruby_door.rb +0 -80
- data/lib/hecks/doors/usage_cache.rb +0 -139
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/body_widget.js.tmpl +0 -282
- data/lib/hecks/projections/site/cms_editor/templates/src/ui/media_picker.js.tmpl +0 -109
- data/prebuilt/c28d6d9db14eea3e17161e9d9c262efee30b256cf97693a7cfd552bce24b2f7f.marshal +0 -0
- data/prebuilt/cb375cba61ca0dbe8ddb9739c306510fe05e5f4b7a9b6955caff8224c63ea0e0.marshal +0 -0
- data/prebuilt/verdicts-d6d584ad43b5f3cebf88aafbbdbf024c38574acf18e06adffbc555f7786b1c2f.json +0 -1
|
@@ -4,6 +4,8 @@ require_relative "model_check/client_profile"
|
|
|
4
4
|
require_relative "model_check/lifecycle_checks"
|
|
5
5
|
require_relative "model_check/saga_checks"
|
|
6
6
|
require_relative "model_check/policy_checks"
|
|
7
|
+
require_relative "model_check/ask_checks"
|
|
8
|
+
require_relative "model_check/reference_checks"
|
|
7
9
|
require_relative "model_check/verbs"
|
|
8
10
|
|
|
9
11
|
module Hecks
|
|
@@ -32,6 +34,8 @@ module Hecks
|
|
|
32
34
|
extend LifecycleChecks
|
|
33
35
|
extend SagaChecks
|
|
34
36
|
extend PolicyChecks
|
|
37
|
+
extend AskChecks
|
|
38
|
+
extend ReferenceChecks
|
|
35
39
|
extend Verbs
|
|
36
40
|
|
|
37
41
|
module_function
|
|
@@ -59,15 +63,17 @@ module Hecks
|
|
|
59
63
|
findings
|
|
60
64
|
end
|
|
61
65
|
|
|
62
|
-
# Lifecycles, sagas and
|
|
66
|
+
# Lifecycles, sagas, policies and references: what the model says about itself.
|
|
63
67
|
def modelled_findings(bluebook, options)
|
|
64
68
|
[
|
|
65
69
|
*bluebook.aggregates.flat_map { |aggregate| aggregate_lifecycle_findings(aggregate) },
|
|
70
|
+
*key_by_value_findings(bluebook),
|
|
66
71
|
*bluebook.process_managers.flat_map { |process_manager| saga_findings(bluebook, process_manager) },
|
|
67
72
|
*bluebook.policies.flat_map do |policy|
|
|
68
73
|
policy_findings(bluebook, policy, options[:hecksagon], options[:known_domains],
|
|
69
74
|
options[:global_emitted_events])
|
|
70
|
-
end
|
|
75
|
+
end,
|
|
76
|
+
*unused_ask_findings(bluebook)
|
|
71
77
|
]
|
|
72
78
|
end
|
|
73
79
|
|
|
@@ -13,6 +13,7 @@ module Hecks
|
|
|
13
13
|
name: :name,
|
|
14
14
|
on_event: :on_event,
|
|
15
15
|
trigger_command: :trigger_command,
|
|
16
|
+
ask: :ask,
|
|
16
17
|
target_domain: :target_domain,
|
|
17
18
|
expect_undelivered: :expect_undelivered,
|
|
18
19
|
where: :where,
|
|
@@ -21,17 +22,18 @@ module Hecks
|
|
|
21
22
|
where_ast: -> { where_ast }
|
|
22
23
|
)
|
|
23
24
|
|
|
24
|
-
attr_reader :name, :on_event, :trigger_command, :target_domain, :expect_undelivered, :where, :for_each, :with_spec
|
|
25
|
+
attr_reader :name, :on_event, :trigger_command, :ask, :target_domain, :expect_undelivered, :where, :for_each, :with_spec
|
|
25
26
|
|
|
26
27
|
# Aggregate, declared and deliberately off the wire
|
|
27
28
|
# the wire format is a pinned contract, and it does not carry
|
|
28
29
|
# where a policy was written before the builder hoisted it
|
|
29
30
|
attr_accessor :aggregate
|
|
30
31
|
|
|
31
|
-
def initialize(name:, on_event: nil, trigger_command: nil, target_domain: nil, expect_undelivered: false, where: nil, for_each: nil, with_spec: [], aggregate: nil)
|
|
32
|
+
def initialize(name:, on_event: nil, trigger_command: nil, ask: nil, target_domain: nil, expect_undelivered: false, where: nil, for_each: nil, with_spec: [], aggregate: nil)
|
|
32
33
|
@name = name.to_s
|
|
33
34
|
@on_event = on_event
|
|
34
35
|
@trigger_command = trigger_command
|
|
36
|
+
@ask = ask
|
|
35
37
|
@target_domain = target_domain
|
|
36
38
|
@expect_undelivered = expect_undelivered.to_s == "true"
|
|
37
39
|
@where = where
|
|
@@ -27,7 +27,7 @@ module Hecks
|
|
|
27
27
|
def call(dir)
|
|
28
28
|
Dir.mktmpdir("hecks-smoke-") do |scratch|
|
|
29
29
|
isolate!(dir, scratch)
|
|
30
|
-
dispatcher = Hecks.boot(scratch,
|
|
30
|
+
dispatcher = Hecks.boot(scratch, install_driving: false)
|
|
31
31
|
domain = dispatcher.registry.bluebooks.keys.first
|
|
32
32
|
next [] unless domain
|
|
33
33
|
|
data/lib/hecks/bluebook.rb
CHANGED
|
@@ -25,6 +25,7 @@ require_relative "bluebook/read_model"
|
|
|
25
25
|
require_relative "bluebook/entity"
|
|
26
26
|
require_relative "bluebook/domain_port"
|
|
27
27
|
require_relative "bluebook/policy"
|
|
28
|
+
require_relative "bluebook/ask_resolution"
|
|
28
29
|
require_relative "bluebook/process_manager"
|
|
29
30
|
require_relative "bluebook/aggregate"
|
|
30
31
|
require_relative "bluebook/hecksagon"
|
|
@@ -62,7 +62,7 @@ module Hecks
|
|
|
62
62
|
->(argv, program, _name) { ProjectCli.call(argv, program: program, root: Dir.pwd, remove_stale_bin: false) }
|
|
63
63
|
),
|
|
64
64
|
"mcp" => Command.new(
|
|
65
|
-
"Serve the MCP
|
|
65
|
+
"Serve the MCP server over stdio (no authentication; stdio only).",
|
|
66
66
|
"hecks mcp [--stdio]",
|
|
67
67
|
"cli/mcp",
|
|
68
68
|
->(argv, _program, _name) { Mcp.call(argv) }
|
data/lib/hecks/cli/console.rb
CHANGED
|
@@ -7,7 +7,8 @@ require_relative "../ports/persistence/plugins/era"
|
|
|
7
7
|
module Hecks
|
|
8
8
|
module CLI
|
|
9
9
|
# The command behind `hecks console` and Custodian's `Operation.OpenConsole`: boots a domain
|
|
10
|
-
# (pizzas on Memory by default) and drops into IRB with its
|
|
10
|
+
# (pizzas on Memory by default) and drops into IRB with its Ruby adapter installed, for
|
|
11
|
+
# dispatching a
|
|
11
12
|
# real command by hand. No argument needs no database (ADR 0073); a domain directory boots as
|
|
12
13
|
# it is wired, which may bind PostgresEra (examples/directory does).
|
|
13
14
|
module Console
|
data/lib/hecks/cli/document.rb
CHANGED
|
@@ -44,7 +44,7 @@ module Hecks
|
|
|
44
44
|
# @api private
|
|
45
45
|
def boot_bluebook(path)
|
|
46
46
|
begin
|
|
47
|
-
runtime = Hecks.boot(path,
|
|
47
|
+
runtime = Hecks.boot(path, install_driving: false)
|
|
48
48
|
rescue StandardError => e
|
|
49
49
|
abort "cannot read #{path}: #{e.message.lines.first.strip}"
|
|
50
50
|
end
|
|
@@ -57,7 +57,7 @@ module Hecks
|
|
|
57
57
|
def launcher_words(name, rest)
|
|
58
58
|
return [rest, nil] if UNTOUCHED.include?(name)
|
|
59
59
|
|
|
60
|
-
require_relative "../
|
|
60
|
+
require_relative "../adapters/driving/cli"
|
|
61
61
|
words = strip_generic(rest)
|
|
62
62
|
form = LAUNCHER_FORMS[name]
|
|
63
63
|
return [words, nil] unless form && words.any? { |word| word.match?(NAME_VALUE) }
|
|
@@ -133,7 +133,7 @@ module Hecks
|
|
|
133
133
|
|
|
134
134
|
# @api private
|
|
135
135
|
def add_flag(key, value, extra)
|
|
136
|
-
extra << "--#{key.tr("_", "-")}" if
|
|
136
|
+
extra << "--#{key.tr("_", "-")}" if Adapters::Driving::Cli.boolean(value)
|
|
137
137
|
nil
|
|
138
138
|
end
|
|
139
139
|
|
|
@@ -153,7 +153,7 @@ module Hecks
|
|
|
153
153
|
flag, value = word.split("=", 2)
|
|
154
154
|
next kept << word unless GENERIC_FLAGS.include?(flag)
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
Adapters::Driving::Cli.boolean(value || generic_value(queue))
|
|
157
157
|
end
|
|
158
158
|
kept
|
|
159
159
|
end
|
|
@@ -161,7 +161,7 @@ module Hecks
|
|
|
161
161
|
# The Boolean word that follows a generic flag, or "true" when none does.
|
|
162
162
|
# @api private
|
|
163
163
|
def generic_value(queue)
|
|
164
|
-
|
|
164
|
+
Adapters::Driving::Cli::BOOLEAN_WORDS.key?(queue.first.to_s.downcase) ? queue.shift : "true"
|
|
165
165
|
end
|
|
166
166
|
end
|
|
167
167
|
end
|
data/lib/hecks/cli/mcp.rb
CHANGED
|
@@ -2,14 +2,14 @@ require_relative "../mcp_stdio_guard"
|
|
|
2
2
|
|
|
3
3
|
module Hecks
|
|
4
4
|
module CLI
|
|
5
|
-
# The command behind `hecks mcp`: the MCP
|
|
5
|
+
# The command behind `hecks mcp`: the MCP server onto the
|
|
6
6
|
# storehouse bus, over stdio only.
|
|
7
7
|
#
|
|
8
8
|
# This file loads nothing but `McpStdioGuard`, so the transport check runs
|
|
9
9
|
# before the framework does.
|
|
10
10
|
module Mcp
|
|
11
11
|
# The server name the guard's refusals and warnings carry.
|
|
12
|
-
SERVER = "hecks-mcp
|
|
12
|
+
SERVER = "hecks-mcp".freeze
|
|
13
13
|
|
|
14
14
|
module_function
|
|
15
15
|
|
|
@@ -23,8 +23,8 @@ module Hecks
|
|
|
23
23
|
# set up for stdio
|
|
24
24
|
def call(argv)
|
|
25
25
|
McpStdioGuard.enforce_stdio!(server: SERVER, argv: argv)
|
|
26
|
-
require_relative "../
|
|
27
|
-
|
|
26
|
+
require_relative "../adapters/driving/mcp"
|
|
27
|
+
Adapters::Driving::Mcp.serve
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
end
|
|
@@ -126,8 +126,8 @@ module Hecks
|
|
|
126
126
|
# @api private
|
|
127
127
|
# @return [String] the opted-in launcher's middle
|
|
128
128
|
def described_entry(name, boot, shown, quiet: false)
|
|
129
|
-
started = "Hecks.boot_described(described,
|
|
130
|
-
started = "Hecks::
|
|
129
|
+
started = "Hecks.boot_described(described, install_driving: false)"
|
|
130
|
+
started = "Hecks::Adapters::Driving::LauncherOptions.quietly(hold: #{RUNS_ON_MEMORY}) { #{started} }" if quiet
|
|
131
131
|
render(DESCRIBED_ENTRY, boot: boot, shown: shown, name: name, started: started).chomp
|
|
132
132
|
end
|
|
133
133
|
|
|
@@ -38,7 +38,7 @@ module Hecks
|
|
|
38
38
|
abort "cannot open {{name}}: #{e.message.lines.first.strip}"
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
text, status, reason = Hecks::
|
|
41
|
+
text, status, reason = Hecks::Adapters::Driving::CliRunner.usage(
|
|
42
42
|
runtime: described, argv: ARGV, program: program
|
|
43
43
|
)
|
|
44
44
|
unless text
|
|
@@ -48,9 +48,9 @@ module Hecks
|
|
|
48
48
|
abort "cannot open {{name}}: #{e.message.lines.first.strip}"
|
|
49
49
|
end
|
|
50
50
|
# A question the world lists under `streams`, given `--stream`, tails until interrupted.
|
|
51
|
-
streamed = Hecks::
|
|
51
|
+
streamed = Hecks::Adapters::Driving::CliRunner.stream(runtime: runtime, argv: ARGV, program: program)
|
|
52
52
|
exit streamed unless streamed.nil?
|
|
53
|
-
text, status, reason = Hecks::
|
|
53
|
+
text, status, reason = Hecks::Adapters::Driving::CliRunner.call(
|
|
54
54
|
runtime: runtime, argv: ARGV, program: program
|
|
55
55
|
)
|
|
56
56
|
end
|
|
@@ -59,12 +59,12 @@ module Hecks
|
|
|
59
59
|
# The middle every launcher had before opted-in ones answered usage alone.
|
|
60
60
|
PLAIN_ENTRY = <<~'RUBY'.freeze
|
|
61
61
|
runtime = begin
|
|
62
|
-
Hecks.boot({{boot}},
|
|
62
|
+
Hecks.boot({{boot}}, install_driving: false)
|
|
63
63
|
rescue StandardError => e
|
|
64
64
|
abort "cannot open {{name}}: #{e.message.lines.first.strip}"
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
text, status = Hecks::
|
|
67
|
+
text, status = Hecks::Adapters::Driving::CliRunner.call(
|
|
68
68
|
runtime: runtime, argv: ARGV, program: "{{shown}}"
|
|
69
69
|
)
|
|
70
70
|
RUBY
|
|
@@ -9,12 +9,15 @@ module Hecks
|
|
|
9
9
|
# `Hecks.bluebook "QualityControl"` in `qa/` becomes `qa/quality_control`.
|
|
10
10
|
#
|
|
11
11
|
# Each launcher is a dozen lines pinning one directory and handing over to
|
|
12
|
-
# `
|
|
12
|
+
# `Adapters::Driving::CliRunner`; the surface itself is projected at the moment it runs,
|
|
13
13
|
# so editing a chapter changes behaviour without regenerating anything.
|
|
14
14
|
#
|
|
15
15
|
# A chapter whose world's `launcher` setting names an `executable` gets its launcher
|
|
16
16
|
# there instead: the Hecks chapter's is the gem's `exe/hecks`.
|
|
17
17
|
module ProjectCli
|
|
18
|
+
# Raised when the project loads no bluebook.
|
|
19
|
+
class Error < RuntimeError; end
|
|
20
|
+
|
|
18
21
|
# Build output and other trees under a root that hold no domain a caller means.
|
|
19
22
|
IGNORED = %r{\A(rust|deploy|tmp|coverage)/}
|
|
20
23
|
|
|
@@ -34,7 +37,7 @@ module Hecks
|
|
|
34
37
|
# @param argv [Array<String>] domain paths under `root`, and optionally `--check`
|
|
35
38
|
# @param program [String] how the caller was invoked, named in a launcher's header
|
|
36
39
|
# @param root [String] the directory launchers are written under
|
|
37
|
-
# @param remove_stale_bin [Boolean] delete `root/bin/<name>`, a second
|
|
40
|
+
# @param remove_stale_bin [Boolean] delete `root/bin/<name>`, a second entry point
|
|
38
41
|
# @return [void]
|
|
39
42
|
# @raise [SystemExit] with status 1 for a launcher out of date, an unreadable domain, a
|
|
40
43
|
# path outside `root` or an unknown flag
|
|
@@ -88,9 +91,9 @@ module Hecks
|
|
|
88
91
|
# when `check` found it out of date, `:failed` when the domain could not be read or its
|
|
89
92
|
# launcher could not be made
|
|
90
93
|
def one(root, path, program, check, remove_stale_bin)
|
|
91
|
-
runtime = Hecks.boot(File.join(root, path),
|
|
92
|
-
name = runtime.registry.bluebooks.keys.first or raise "it loads no bluebook"
|
|
93
|
-
setting =
|
|
94
|
+
runtime = Hecks.boot(File.join(root, path), install_driving: false)
|
|
95
|
+
name = runtime.registry.bluebooks.keys.first or raise Error, "it loads no bluebook"
|
|
96
|
+
setting = Adapters::Driving::LauncherOptions.settings(runtime, name) || {}
|
|
94
97
|
settle(launcher_target(name, path, setting, root, program), path, root, check, remove_stale_bin)
|
|
95
98
|
rescue StandardError, LoadError => e
|
|
96
99
|
refuse(path, "cannot boot — #{e.message.lines.first.to_s.strip}")
|
|
@@ -122,7 +125,7 @@ module Hecks
|
|
|
122
125
|
Target.new(name, label, File.join(root, label), text, snake, executable)
|
|
123
126
|
end
|
|
124
127
|
|
|
125
|
-
# Writes the launcher, makes it executable, and removes the second
|
|
128
|
+
# Writes the launcher, makes it executable, and removes the second entry point in `bin/`.
|
|
126
129
|
#
|
|
127
130
|
# @api private
|
|
128
131
|
def write_launcher(target, root, remove_stale_bin)
|
data/lib/hecks/cli/run.rb
CHANGED
|
@@ -68,8 +68,8 @@ module Hecks
|
|
|
68
68
|
# near miss deserves the runner's "did you mean" rather than the step-list
|
|
69
69
|
# form's "no such script".
|
|
70
70
|
def cli_form(domain, argv, program)
|
|
71
|
-
runtime = Hecks.boot(domain,
|
|
72
|
-
text, status =
|
|
71
|
+
runtime = Hecks.boot(domain, install_driving: false)
|
|
72
|
+
text, status = Adapters::Driving::CliRunner.call(runtime: runtime, argv: argv, program: program)
|
|
73
73
|
status.zero? ? puts(text) : abort(text)
|
|
74
74
|
exit 0
|
|
75
75
|
end
|
|
@@ -46,7 +46,10 @@ module Hecks
|
|
|
46
46
|
before = state
|
|
47
47
|
expect_success(post(payload, signed_headers))
|
|
48
48
|
after = state
|
|
49
|
-
|
|
49
|
+
unless before == after
|
|
50
|
+
raise Failure,
|
|
51
|
+
"the state changed on a repeated delivery:\n before #{before}\n after #{after}"
|
|
52
|
+
end
|
|
50
53
|
end
|
|
51
54
|
end
|
|
52
55
|
|
|
@@ -29,15 +29,15 @@ module Hecks
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def expect_status(res, code)
|
|
32
|
-
raise "expected #{code}, got #{res.code}" unless res.code.to_i == code
|
|
32
|
+
raise Failure, "expected #{code}, got #{res.code}" unless res.code.to_i == code
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def expect_success(res)
|
|
36
|
-
raise "expected 2xx, got #{res.code}: #{res.body.to_s[0, 200]}" unless res.code.to_i.between?(200, 299)
|
|
36
|
+
raise Failure, "expected 2xx, got #{res.code}: #{res.body.to_s[0, 200]}" unless res.code.to_i.between?(200, 299)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def expect_refused(res)
|
|
40
|
-
raise "expected a 4xx refusal, got #{res.code}" unless res.code.to_i.between?(400, 499)
|
|
40
|
+
raise Failure, "expected a 4xx refusal, got #{res.code}" unless res.code.to_i.between?(400, 499)
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
end
|
data/lib/hecks/cli/smoke_http.rb
CHANGED
|
@@ -12,6 +12,9 @@ module Hecks
|
|
|
12
12
|
module CLI
|
|
13
13
|
# One run of the checks against one service.
|
|
14
14
|
class SmokeHttp
|
|
15
|
+
# Raised when a smoke check's request gets an answer other than the one it expects.
|
|
16
|
+
class Failure < RuntimeError; end
|
|
17
|
+
|
|
15
18
|
include Checks
|
|
16
19
|
include Transport
|
|
17
20
|
extend Settings
|
data/lib/hecks/codemod.rb
CHANGED
|
@@ -6,6 +6,9 @@ module Hecks
|
|
|
6
6
|
# Shared machinery for a codemod that migrates real `.bluebook` source: boot,
|
|
7
7
|
# find candidates, edit, then verify by diffing the re-booted IR before keeping it.
|
|
8
8
|
module Codemod
|
|
9
|
+
# Raised when a shadow cannot be built from the construct.
|
|
10
|
+
class Error < RuntimeError; end
|
|
11
|
+
|
|
9
12
|
ROOT = File.expand_path("../..", __dir__)
|
|
10
13
|
|
|
11
14
|
EXAMPLE_ROOTS = Corpus.members(:example, root: ROOT).map(&:path)
|
|
@@ -155,8 +158,8 @@ module Hecks
|
|
|
155
158
|
|
|
156
159
|
matches = element_candidates(construct).select { |c| c.hecks_name.to_s == list_attr.type.to_s }
|
|
157
160
|
if matches.size > 1
|
|
158
|
-
raise "#{construct.hecks_name}##{list_field} names #{list_attr.type}, held by both a value " \
|
|
159
|
-
|
|
161
|
+
raise Error, "#{construct.hecks_name}##{list_field} names #{list_attr.type}, held by both a value " \
|
|
162
|
+
"object and an entity — ambiguous, cannot resolve which one the list holds"
|
|
160
163
|
end
|
|
161
164
|
|
|
162
165
|
matches.first
|
data/lib/hecks/corpus/routes.rb
CHANGED
|
@@ -24,9 +24,16 @@ module Hecks
|
|
|
24
24
|
"its filename declares (bump_* / same_*)"),
|
|
25
25
|
Route.new(%r{\Aspec/fixtures/model_check/}, :named_in, "spec/model_check_spec.rb", :each_file,
|
|
26
26
|
"domains broken on purpose; each must produce exactly the finding kinds it is built to trigger"),
|
|
27
|
+
Route.new(%r{\Aspec/fixtures/site/editor_chapters/domain/}, :named_in, "spec/site_cms_editor_chapters_spec.rb",
|
|
28
|
+
"site/editor_chapters",
|
|
29
|
+
"two chapters that both declare a Category, so the editor must tell them apart; one SQLite " \
|
|
30
|
+
"file keeps tables by bare aggregate name, which cannot hold both, so the sweep cannot boot it"),
|
|
27
31
|
# hecks fuzz sweeps it too, once Fuzzing::Replay coerces value-object args
|
|
28
32
|
# before recomputing givens — today it doesn't, so this given reads as
|
|
29
33
|
# wrongly admitted.
|
|
34
|
+
Route.new(%r{\Aspec/corpus/asks/}, :named_in, "spec/policy_ask_spec.rb", "spec/corpus/asks",
|
|
35
|
+
"a corpus-owned domain whose ports have no adapter, so an ask is refused; its frozen " \
|
|
36
|
+
"targets are held to the Ruby runtime there and to the Rust policy table in rust/codegen"),
|
|
30
37
|
Route.new(%r{\Aspec/fixtures/rust_host/}, :named_in, "rust/host/src/web/commerce.rs", "checkout_fixture",
|
|
31
38
|
"the Rust host's checkout fixture, pinned by its web and /api tests")
|
|
32
39
|
].freeze
|
data/lib/hecks/corpus/rust.rb
CHANGED
|
@@ -184,9 +184,10 @@ module Hecks
|
|
|
184
184
|
# domain wins Cargo's `default` is derived, not hand-picked.
|
|
185
185
|
#
|
|
186
186
|
# @param root [String] repository root to search under
|
|
187
|
-
# @return [Array<RustDomain>]
|
|
187
|
+
# @return [Array<RustDomain>] every Rust domain with a Cargo feature, in regeneration order:
|
|
188
|
+
# a fresh checkout has no generated output, so the sources, not the output, name them
|
|
188
189
|
def rust_regen_order(root: ROOT)
|
|
189
|
-
rust_domains(root: root)
|
|
190
|
+
rust_domains(root: root)
|
|
190
191
|
end
|
|
191
192
|
end
|
|
192
193
|
end
|
|
@@ -445,6 +445,7 @@ Hecks.bluebook "Deploy" do
|
|
|
445
445
|
end
|
|
446
446
|
|
|
447
447
|
lifecycle :status, default: "requested" do
|
|
448
|
+
mark :failure, "refused"
|
|
448
449
|
transition "Reprovision" => "requested", from: %w[provisioned refused]
|
|
449
450
|
transition "Complete" => "provisioned", from: "requested"
|
|
450
451
|
transition "Abandon" => "refused", from: "requested"
|
|
@@ -602,6 +603,7 @@ Hecks.bluebook "Deploy" do
|
|
|
602
603
|
end
|
|
603
604
|
|
|
604
605
|
lifecycle :status, default: "requested" do
|
|
606
|
+
mark :failure, "faulted"
|
|
605
607
|
transition "Complete" => "projected", from: "requested"
|
|
606
608
|
transition "Fault" => "faulted", from: "requested"
|
|
607
609
|
end
|
|
@@ -714,6 +716,7 @@ Hecks.bluebook "Deploy" do
|
|
|
714
716
|
end
|
|
715
717
|
|
|
716
718
|
lifecycle :status, default: "requested" do
|
|
719
|
+
mark :failure, "faulted"
|
|
717
720
|
transition "Complete" => "cleared", from: "requested"
|
|
718
721
|
transition "Fault" => "faulted", from: "requested"
|
|
719
722
|
end
|
|
@@ -811,6 +814,7 @@ Hecks.bluebook "Deploy" do
|
|
|
811
814
|
end
|
|
812
815
|
|
|
813
816
|
lifecycle :status, default: "requested" do
|
|
817
|
+
mark :failure, "flagged"
|
|
814
818
|
transition "Pass" => "clean", from: "requested"
|
|
815
819
|
transition "Flag" => "flagged", from: "requested"
|
|
816
820
|
end
|
|
@@ -914,6 +918,7 @@ Hecks.bluebook "Deploy" do
|
|
|
914
918
|
end
|
|
915
919
|
|
|
916
920
|
lifecycle :status, default: "requested" do
|
|
921
|
+
mark :failure, "flagged"
|
|
917
922
|
transition "Pass" => "within_budget", from: "requested"
|
|
918
923
|
transition "Flag" => "flagged", from: "requested"
|
|
919
924
|
end
|
|
@@ -1031,6 +1036,7 @@ Hecks.bluebook "Deploy" do
|
|
|
1031
1036
|
end
|
|
1032
1037
|
|
|
1033
1038
|
lifecycle :status, default: "requested" do
|
|
1039
|
+
mark :failure, "flagged"
|
|
1034
1040
|
transition "Pass" => "passed", from: "requested"
|
|
1035
1041
|
transition "Flag" => "flagged", from: "requested"
|
|
1036
1042
|
end
|
|
@@ -1179,6 +1185,7 @@ Hecks.bluebook "Deploy" do
|
|
|
1179
1185
|
end
|
|
1180
1186
|
|
|
1181
1187
|
lifecycle :status, default: "requested" do
|
|
1188
|
+
mark :failure, "flagged"
|
|
1182
1189
|
transition "Complete" => "rolled", from: "requested"
|
|
1183
1190
|
transition "Flag" => "flagged", from: "requested"
|
|
1184
1191
|
transition "Verify" => "verified", from: "rolled"
|
|
@@ -1361,6 +1368,7 @@ Hecks.bluebook "Deploy" do
|
|
|
1361
1368
|
end
|
|
1362
1369
|
|
|
1363
1370
|
lifecycle :status, default: "requested" do
|
|
1371
|
+
mark :failure, "flagged"
|
|
1364
1372
|
transition "Complete" => "rolled", from: "requested"
|
|
1365
1373
|
transition "Flag" => "flagged", from: "requested"
|
|
1366
1374
|
transition "Verify" => "verified", from: "rolled"
|
|
@@ -1372,10 +1380,11 @@ Hecks.bluebook "Deploy" do
|
|
|
1372
1380
|
# Runs the project's generated `deploy-box.sh`: render the Compose files, push them to the box over
|
|
1373
1381
|
# SSM, start the containers and check them. A policy then requests a `SmokeRun`, unless
|
|
1374
1382
|
# `skip_smoke=true`. Exit 1 when flagged, with the script's status (40 no instance, 41 the roll
|
|
1375
|
-
# failed, 42 the box unhealthy).
|
|
1383
|
+
# failed, 42 the box unhealthy, 43 no restore anchor). Before the roll the script names the point the
|
|
1384
|
+
# database can be restored to, so the report always carries the way back from a minted era.
|
|
1376
1385
|
|
|
1377
1386
|
command "Run" do
|
|
1378
|
-
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)"
|
|
1387
|
+
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)"
|
|
1379
1388
|
|
|
1380
1389
|
attribute :project, Location
|
|
1381
1390
|
attribute :script, Location, optional: true
|
|
@@ -1554,6 +1563,7 @@ Hecks.bluebook "Deploy" do
|
|
|
1554
1563
|
end
|
|
1555
1564
|
|
|
1556
1565
|
lifecycle :status, default: "requested" do
|
|
1566
|
+
mark :failure, "flagged", "drifted"
|
|
1557
1567
|
transition "Complete" => "restored", from: "requested"
|
|
1558
1568
|
transition "Plan" => "planned", from: "requested"
|
|
1559
1569
|
transition "Flag" => "flagged", from: "requested"
|
|
@@ -1835,6 +1845,7 @@ Hecks.bluebook "Deploy" do
|
|
|
1835
1845
|
end
|
|
1836
1846
|
|
|
1837
1847
|
lifecycle :status, default: "requested" do
|
|
1848
|
+
mark :failure, "drifted", "flagged"
|
|
1838
1849
|
transition "Match" => "verified", from: "requested"
|
|
1839
1850
|
transition "Differ" => "drifted", from: "requested"
|
|
1840
1851
|
transition "Flag" => "flagged", from: "requested"
|
|
@@ -1977,6 +1988,7 @@ Hecks.bluebook "Deploy" do
|
|
|
1977
1988
|
# No outcome is a failure: a report that could not be made is `unavailable`, never `flagged`
|
|
1978
1989
|
# (only a malformed request is), because the era check gates a deploy, not this report.
|
|
1979
1990
|
lifecycle :status, default: "requested" do
|
|
1991
|
+
mark :failure, "flagged"
|
|
1980
1992
|
transition "Match" => "unchanged", from: "requested"
|
|
1981
1993
|
transition "Differ" => "changed", from: "requested"
|
|
1982
1994
|
transition "Withhold" => "unavailable", from: "requested"
|
|
@@ -2140,6 +2152,7 @@ Hecks.bluebook "Deploy" do
|
|
|
2140
2152
|
end
|
|
2141
2153
|
|
|
2142
2154
|
lifecycle :status, default: "requested" do
|
|
2155
|
+
mark :failure, "flagged"
|
|
2143
2156
|
transition "RecordName" => "named", from: "requested"
|
|
2144
2157
|
transition "RecordUrl" => "located", from: "requested"
|
|
2145
2158
|
transition "RecordList" => "listed", from: "requested"
|
|
@@ -2513,6 +2526,7 @@ Hecks.bluebook "Deploy" do
|
|
|
2513
2526
|
end
|
|
2514
2527
|
|
|
2515
2528
|
lifecycle :status, default: "requested" do
|
|
2529
|
+
mark :failure, "flagged"
|
|
2516
2530
|
transition "Complete" => "rolled", from: "requested"
|
|
2517
2531
|
transition "Plan" => "planned", from: "requested"
|
|
2518
2532
|
transition "Flag" => "flagged", from: "requested"
|
|
@@ -2648,6 +2662,7 @@ Hecks.bluebook "Deploy" do
|
|
|
2648
2662
|
end
|
|
2649
2663
|
|
|
2650
2664
|
lifecycle :status, default: "requested" do
|
|
2665
|
+
mark :failure, "drifted", "refused"
|
|
2651
2666
|
transition "Match" => "matching", from: "requested"
|
|
2652
2667
|
transition "Drift" => "drifted", from: "requested"
|
|
2653
2668
|
transition "Refuse" => "refused", from: "requested"
|
|
@@ -2771,6 +2786,7 @@ Hecks.bluebook "Deploy" do
|
|
|
2771
2786
|
end
|
|
2772
2787
|
|
|
2773
2788
|
lifecycle :status, default: "requested" do
|
|
2789
|
+
mark :failure, "faulted"
|
|
2774
2790
|
transition "Complete" => "projected", from: "requested"
|
|
2775
2791
|
transition "Fault" => "faulted", from: "requested"
|
|
2776
2792
|
end
|
|
@@ -4,6 +4,9 @@ module Hecks
|
|
|
4
4
|
# Renders the pages themselves: a context's page word by word, and the index. Extended onto
|
|
5
5
|
# `Reference`.
|
|
6
6
|
module Rendering
|
|
7
|
+
# Raised when a page carries prose for a word the language does not declare.
|
|
8
|
+
class Error < RuntimeError; end
|
|
9
|
+
|
|
7
10
|
# Renders one context's page, grouped by word (not per form) so a
|
|
8
11
|
# two-form word doesn't repeat its heading and prose.
|
|
9
12
|
def render_page(context, prose, path)
|
|
@@ -13,13 +16,13 @@ module Hecks
|
|
|
13
16
|
page_markdown(context, prose[PREAMBLE].to_s.strip, sections)
|
|
14
17
|
end
|
|
15
18
|
|
|
16
|
-
# @raise [
|
|
19
|
+
# @raise [Error] when a page carries prose for a word the language does not declare
|
|
17
20
|
def refuse_orphans!(prose, words, context, path)
|
|
18
21
|
orphans = prose.keys - words.keys - [PREAMBLE]
|
|
19
22
|
return if orphans.empty?
|
|
20
23
|
|
|
21
|
-
raise "#{path} carries prose for #{orphans.join(", ")}, which the language no longer " \
|
|
22
|
-
|
|
24
|
+
raise Error, "#{path} carries prose for #{orphans.join(", ")}, which the language no longer " \
|
|
25
|
+
"declares in #{context} — deleting writing is a human's decision, so decide"
|
|
23
26
|
end
|
|
24
27
|
|
|
25
28
|
# @return [String] the page: its heading, generated lede, the hand-written preamble and the
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
require_relative "../command_form_renderer"
|
|
3
3
|
require_relative "../params"
|
|
4
|
-
require_relative "../../
|
|
5
|
-
require_relative "../../
|
|
4
|
+
require_relative "../../adapters/driving/command_request"
|
|
5
|
+
require_relative "../../adapters/driving/json"
|
|
6
6
|
|
|
7
7
|
module Hecks
|
|
8
8
|
module Forms
|
|
9
9
|
class App
|
|
10
|
-
# The command routes of `Forms::App`: the form, its submission, and the JSON
|
|
10
|
+
# The command routes of `Forms::App`: the form, its submission, and the JSON adapter to the
|
|
11
|
+
# same
|
|
11
12
|
# dispatch.
|
|
12
13
|
module Commands
|
|
13
14
|
private
|
|
@@ -63,7 +64,7 @@ module Hecks
|
|
|
63
64
|
def verb_name(domain, aggregate, verb) = "#{domain}::#{aggregate.hecks_name}.#{verb.hecks_name}"
|
|
64
65
|
|
|
65
66
|
def command_envelope(command, args)
|
|
66
|
-
|
|
67
|
+
Adapters::Driving::CommandRequest.normalize(args, receiver: command_receiver(command), legacy_receiver: :id)
|
|
67
68
|
end
|
|
68
69
|
|
|
69
70
|
def command_receiver(command) = command.creates? ? nil : :aggregate
|
|
@@ -78,9 +79,9 @@ module Hecks
|
|
|
78
79
|
end
|
|
79
80
|
|
|
80
81
|
def submitted_json(request, command)
|
|
81
|
-
raw =
|
|
82
|
-
envelope =
|
|
83
|
-
|
|
82
|
+
raw = Adapters::Driving::Json.parse(request.body.read)
|
|
83
|
+
envelope = Adapters::Driving::Json.command_request(raw, receiver: command_receiver(command),
|
|
84
|
+
legacy_receiver: :id)
|
|
84
85
|
[raw, envelope]
|
|
85
86
|
end
|
|
86
87
|
|
|
@@ -6,7 +6,8 @@ require_relative "../query_form_renderer"
|
|
|
6
6
|
module Hecks
|
|
7
7
|
module Forms
|
|
8
8
|
class App
|
|
9
|
-
# The query routes of `Forms::App`: the form with its results, and the JSON
|
|
9
|
+
# The query routes of `Forms::App`: the form with its results, and the JSON adapter to the
|
|
10
|
+
# same
|
|
10
11
|
# query.
|
|
11
12
|
module Queries
|
|
12
13
|
private
|
data/lib/hecks/forms/app.rb
CHANGED
|
@@ -87,7 +87,7 @@ module Hecks
|
|
|
87
87
|
|
|
88
88
|
def refuse_entity_command
|
|
89
89
|
raise RouteNotFound,
|
|
90
|
-
"entity command routes are not supported by Forms; use a command
|
|
90
|
+
"entity command routes are not supported by Forms; use a command route with " \
|
|
91
91
|
"to.aggregate and to.entity"
|
|
92
92
|
end
|
|
93
93
|
|
|
@@ -5,7 +5,7 @@ require_relative "record_table"
|
|
|
5
5
|
module Hecks
|
|
6
6
|
module Forms
|
|
7
7
|
# The index and show pages every aggregate gets, whether or not it declares a query.
|
|
8
|
-
# They read the repository directly, like `
|
|
8
|
+
# They read the repository directly, like `AggregateModule#all`/`#find`.
|
|
9
9
|
module RecordRenderer
|
|
10
10
|
# Renders the page listing every record of one aggregate.
|
|
11
11
|
def self.index(registry:, domain:, aggregate:)
|
|
@@ -2,6 +2,17 @@ Hecks.bluebook "Privacy" do
|
|
|
2
2
|
vision "Which fields of a domain's own aggregates are sensitive is a fact about that domain, declared apart from it — the domain itself never spells out that one of its own attributes is PII or PHI."
|
|
3
3
|
supporting
|
|
4
4
|
|
|
5
|
+
# What this chapter answers for every attaching domain: the boot that seeds `mark_sensitive`
|
|
6
|
+
# facts, the masking of a read and the cryptoshred read these verbs from here rather than
|
|
7
|
+
# recognising "Privacy" by name.
|
|
8
|
+
provides "privacy",
|
|
9
|
+
mark_sensitive: "Marking.Mark",
|
|
10
|
+
markings_for: "Marking.ForDomain"
|
|
11
|
+
|
|
12
|
+
provides "subject_keys",
|
|
13
|
+
key_for: "SubjectKey.ForSubject",
|
|
14
|
+
shred: "SubjectKey.Shred"
|
|
15
|
+
|
|
5
16
|
# A domain never marks itself: `Mark` is a wiring-time command (role "Deployment").
|
|
6
17
|
aggregate "Marking" do
|
|
7
18
|
description "One attribute of one domain's own aggregate, flagged sensitive — and the role required to read it unredacted."
|