hecks 6.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/hecks +19 -12
- data/lib/hecks/adapters/driven/claude_code.rb +2 -2
- data/lib/hecks/adapters/driven/folder.rb +10 -1
- data/lib/hecks/adapters/driven/folder_overlay.rb +15 -0
- data/lib/hecks/adapters/driven/heki.rb +1 -1
- data/lib/hecks/adapters/driven/in_process_key_vault.rb +1 -1
- data/lib/hecks/adapters/driven/memory/outbox_rows.rb +2 -2
- data/lib/hecks/adapters/driven/postgres/name_guard.rb +25 -0
- data/lib/hecks/adapters/driven/postgres/outbox.rb +3 -3
- data/lib/hecks/adapters/driven/postgres/repository.rb +1 -1
- data/lib/hecks/adapters/driven/postgres/shared_connection.rb +1 -1
- data/lib/hecks/adapters/driven/postgres.rb +3 -0
- data/lib/hecks/adapters/driven/postgres_era/boot.rb +28 -16
- data/lib/hecks/adapters/driven/postgres_era/class_methods.rb +27 -7
- data/lib/hecks/adapters/driven/postgres_era/dialect.rb +10 -5
- data/lib/hecks/adapters/driven/postgres_era/field_cache_provisioner.rb +39 -0
- data/lib/hecks/adapters/driven/postgres_era/journal.rb +52 -13
- data/lib/hecks/adapters/driven/postgres_era/lineage/chain_sql.rb +29 -49
- data/lib/hecks/adapters/driven/postgres_era/lineage/direct_sql.rb +73 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/direct_verified.json +10 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/direct_verified.rb +65 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/domain_rename.rb +77 -25
- data/lib/hecks/adapters/driven/postgres_era/lineage/domain_rename_state.rb +108 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/era_integrity.rb +11 -6
- data/lib/hecks/adapters/driven/postgres_era/lineage/era_store.rb +63 -5
- data/lib/hecks/adapters/driven/postgres_era/lineage/layered_sql.rb +64 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/ledger_reset.rb +150 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/mint_provisioning.rb +85 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/mint_transaction.rb +11 -7
- data/lib/hecks/adapters/driven/postgres_era/lineage/provisioning.rb +11 -5
- data/lib/hecks/adapters/driven/postgres_era/lineage/split_sql.rb +76 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage/sql_templates.rb +9 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage.rb +10 -2
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/context.rb +23 -3
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/coverage_check.rb +3 -1
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/disposable_ledger.rb +119 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/era_resolution.rb +219 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/era_resolver.rb +68 -71
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/held_era.rb +68 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/ledger_change.rb +63 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/merge_coordinator.rb +1 -1
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/mint_decision.rb +163 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/mint_request.rb +24 -0
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/minter.rb +59 -21
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager/refusals.rb +24 -11
- data/lib/hecks/adapters/driven/postgres_era/lineage_manager.rb +40 -6
- data/lib/hecks/adapters/driven/postgres_era/shared_tables.rb +32 -0
- data/lib/hecks/adapters/driven/postgres_era.adapter +12 -0
- data/lib/hecks/adapters/driven/postgres_era.rb +25 -10
- data/lib/hecks/adapters/driven/prism.rb +0 -1
- data/lib/hecks/adapters/driven/sql_query_builder.rb +1 -0
- data/lib/hecks/adapters/driven/sqlite/dispatch_claims.rb +1 -1
- data/lib/hecks/adapters/driven/sqlite/name_guard.rb +25 -0
- data/lib/hecks/adapters/driven/sqlite/outbox.rb +2 -2
- data/lib/hecks/adapters/driven/sqlite/repository.rb +1 -1
- data/lib/hecks/adapters/driven/sqlite/schema_builder.rb +20 -0
- data/lib/hecks/adapters/driven/sqlite.rb +9 -1
- data/lib/hecks/adapters/driven/tenant_provisioner.rb +1 -1
- data/lib/hecks/adapters/driven/worktree_overlay.rb +117 -0
- data/lib/hecks/adapters/driving/cli/shorthand.rb +5 -1
- data/lib/hecks/adapters/driving/cli.rb +1 -1
- data/lib/hecks/adapters/driving/cli_runner/answers.rb +77 -22
- data/lib/hecks/adapters/driving/cli_runner/bang_rule.rb +35 -0
- data/lib/hecks/adapters/driving/cli_runner/completion_words.rb +36 -0
- data/lib/hecks/adapters/driving/cli_runner/json_words.rb +55 -0
- data/lib/hecks/adapters/driving/cli_runner/name_index.rb +63 -0
- data/lib/hecks/adapters/driving/cli_runner/read_context.rb +32 -0
- data/lib/hecks/adapters/driving/cli_runner/renamed_names.rb +49 -0
- data/lib/hecks/adapters/driving/cli_runner/resolution.rb +43 -17
- data/lib/hecks/adapters/driving/cli_runner/resume_words.rb +63 -0
- data/lib/hecks/adapters/driving/cli_runner/run_reference.rb +66 -0
- data/lib/hecks/adapters/driving/cli_runner/run_replay.rb +118 -0
- data/lib/hecks/adapters/driving/cli_runner/search_words.rb +35 -0
- data/lib/hecks/adapters/driving/cli_runner/settling.rb +6 -5
- data/lib/hecks/adapters/driving/cli_runner/streaming.rb +11 -10
- data/lib/hecks/adapters/driving/cli_runner/suggestions.rb +1 -1
- data/lib/hecks/adapters/driving/cli_runner/tour_words.rb +77 -0
- data/lib/hecks/adapters/driving/cli_runner/verb_names.rb +36 -4
- data/lib/hecks/adapters/driving/cli_runner/verbosity.rb +75 -0
- data/lib/hecks/adapters/driving/cli_runner.rb +106 -7
- data/lib/hecks/adapters/driving/context_line.rb +85 -0
- data/lib/hecks/adapters/driving/exit_status.rb +31 -0
- data/lib/hecks/adapters/driving/launcher_options.rb +7 -5
- data/lib/hecks/adapters/driving/mcp/progress_sink.rb +45 -0
- data/lib/hecks/adapters/driving/mcp/tool_calls.rb +7 -5
- data/lib/hecks/adapters/driving/mcp.rb +25 -5
- data/lib/hecks/adapters/driving/mcp_scope/argument_policy.rb +40 -7
- data/lib/hecks/adapters/driving/mcp_scope.rb +8 -7
- data/lib/hecks/adapters/driving/ruby/aggregate_module/hooks.rb +154 -0
- data/lib/hecks/adapters/driving/ruby/aggregate_module.rb +64 -93
- data/lib/hecks/adapters/driving/usage_log.rb +146 -0
- data/lib/hecks/adapters/driving/write_guard.rb +55 -0
- data/lib/hecks/adapters/driving.rb +0 -1
- data/lib/hecks/behaviors/dsl.rb +5 -1
- data/lib/hecks/behaviors/expectations/boot.rb +0 -1
- data/lib/hecks/bluebook/acknowledgements.rb +1 -1
- data/lib/hecks/bluebook/aggregate.rb +21 -18
- data/lib/hecks/bluebook/assembly/contracts/sagas.rb +2 -0
- data/lib/hecks/bluebook/assembly/contracts/structure.rb +18 -13
- data/lib/hecks/bluebook/behaviour/aggregate.rb +27 -3
- data/lib/hecks/bluebook/command.rb +16 -5
- data/lib/hecks/bluebook/declaration.rb +32 -4
- data/lib/hecks/bluebook/domain_port.rb +7 -3
- data/lib/hecks/bluebook/dsl/aggregate_builder/relationships.rb +0 -2
- data/lib/hecks/bluebook/dsl/aggregate_builder/renaming.rb +25 -0
- data/lib/hecks/bluebook/dsl/aggregate_builder.rb +3 -0
- data/lib/hecks/bluebook/dsl/attribute_collector.rb +0 -1
- data/lib/hecks/bluebook/dsl/audience_word.rb +40 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/metadata.rb +56 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/modules.rb +80 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation/correlation_keys.rb +51 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder/validation.rb +1 -0
- data/lib/hecks/bluebook/dsl/bluebook_builder.rb +17 -34
- data/lib/hecks/bluebook/dsl/bootstrap_table.rb +8 -0
- data/lib/hecks/bluebook/dsl/command_builder.rb +13 -3
- data/lib/hecks/bluebook/dsl/entity_builder.rb +0 -2
- data/lib/hecks/bluebook/dsl/generic_dispatch.rb +6 -4
- data/lib/hecks/bluebook/dsl/kinds.rb +53 -0
- data/lib/hecks/bluebook/dsl/port_operation_builder.rb +9 -2
- data/lib/hecks/bluebook/dsl/process_manager_builder.rb +25 -15
- data/lib/hecks/bluebook/dsl/translation_builder.rb +16 -1
- data/lib/hecks/bluebook/dsl/word_gate.rb +1 -1
- data/lib/hecks/bluebook/dsl.rb +1 -0
- data/lib/hecks/bluebook/meta_validator/judge/identity.rb +9 -4
- data/lib/hecks/bluebook/meta_validator/plan/category.rb +10 -2
- data/lib/hecks/bluebook/meta_validator/plan/verbs.rb +9 -0
- data/lib/hecks/bluebook/meta_validator/plan.rb +2 -1
- data/lib/hecks/bluebook/meta_validator/reconstruction/heads.rb +3 -1
- data/lib/hecks/bluebook/meta_validator/reconstruction/reading.rb +7 -0
- data/lib/hecks/bluebook/meta_validator/reconstruction.rb +7 -2
- data/lib/hecks/bluebook/meta_validator/shapes.rb +3 -0
- data/lib/hecks/bluebook/meta_validator/syntax_boot/disk_cache.rb +1 -1
- data/lib/hecks/bluebook/model_check/aggregate_checks.rb +27 -0
- data/lib/hecks/bluebook/model_check/ask_checks.rb +25 -0
- data/lib/hecks/bluebook/model_check/reaction_chains.rb +114 -0
- data/lib/hecks/bluebook/model_check/reaction_cycles.rb +53 -0
- data/lib/hecks/bluebook/model_check/reaction_depth_checks.rb +58 -0
- data/lib/hecks/bluebook/model_check/reaction_walk.rb +62 -0
- data/lib/hecks/bluebook/model_check.rb +5 -27
- data/lib/hecks/bluebook/process_manager.rb +20 -3
- data/lib/hecks/bluebook/translation.rb +5 -3
- data/lib/hecks/bluebook/translation_plan.rb +9 -2
- data/lib/hecks/ci_pipeline/adapters/ci_cache.adapter +7 -0
- data/lib/hecks/ci_pipeline/adapters/ci_cache.rb +39 -0
- data/lib/hecks/ci_pipeline/adapters/ci_runner.adapter +7 -0
- data/lib/hecks/ci_pipeline/adapters/ci_runner.rb +55 -0
- data/lib/hecks/ci_pipeline/ci_pipeline.behaviors +322 -0
- data/lib/hecks/ci_pipeline/ci_pipeline.bluebook +938 -0
- data/lib/hecks/ci_pipeline/ci_pipeline.hecksagon +12 -0
- data/lib/hecks/ci_pipeline/ci_pipeline.ports.hecksagon +16 -0
- data/lib/hecks/ci_speed/adapters/ci_reader.adapter +7 -0
- data/lib/hecks/ci_speed/adapters/ci_reader.rb +141 -0
- data/lib/hecks/ci_speed/adapters/local_runner/answer.rb +41 -0
- data/lib/hecks/ci_speed/adapters/local_runner/catalog.rb +89 -0
- data/lib/hecks/ci_speed/adapters/local_runner/checkouts.rb +89 -0
- data/lib/hecks/ci_speed/adapters/local_runner/launcher.rb +69 -0
- data/lib/hecks/ci_speed/adapters/local_runner/load_average.rb +38 -0
- data/lib/hecks/ci_speed/adapters/local_runner/refs.rb +39 -0
- data/lib/hecks/ci_speed/adapters/local_runner/refused.rb +11 -0
- data/lib/hecks/ci_speed/adapters/local_runner/verdict.rb +71 -0
- data/lib/hecks/ci_speed/adapters/local_runner.adapter +7 -0
- data/lib/hecks/ci_speed/adapters/local_runner.rb +168 -0
- data/lib/hecks/ci_speed/adapters/replayed_runner.rb +39 -0
- data/lib/hecks/ci_speed/ci_speed.behaviors +341 -0
- data/lib/hecks/ci_speed/ci_speed.bluebook +1073 -0
- data/lib/hecks/ci_speed/ci_speed.hecksagon +11 -0
- data/lib/hecks/ci_speed/ci_speed.ports.hecksagon +21 -0
- data/lib/hecks/ci_workflows/ci_workflows.behaviors +13 -0
- data/lib/hecks/ci_workflows/ci_workflows.bluebook +173 -0
- data/lib/hecks/ci_workflows/ci_workflows.hecksagon +15 -0
- data/lib/hecks/coder/coder.bluebook +385 -0
- data/lib/hecks/coder/coder.hecksagon +12 -0
- data/lib/hecks/command_names/check.rb +39 -0
- data/lib/hecks/command_names/extractor.rb +67 -0
- data/lib/hecks/command_names/index.rb +40 -0
- data/lib/hecks/command_names/resolution.rb +81 -0
- data/lib/hecks/command_names/scan.rb +54 -0
- data/lib/hecks/command_names/sources.rb +73 -0
- data/lib/hecks/command_names.rb +26 -0
- data/lib/hecks/composer/jobs.rb +1 -1
- data/lib/hecks/composer/toolbox.rb +8 -1
- data/lib/hecks/corpus/generated_key.rb +205 -0
- data/lib/hecks/corpus/listing.rb +34 -0
- data/lib/hecks/corpus/rust.rb +27 -11
- data/lib/hecks/corpus/sources.rb +2 -1
- data/lib/hecks/corpus.rb +37 -42
- data/lib/hecks/deprecation.rb +23 -0
- data/lib/hecks/doc/reference/readme.rb +1 -1
- data/lib/hecks/doc/reference/rendering.rb +2 -2
- data/lib/hecks/doc/reference.rb +1 -1
- data/lib/hecks/embryonaut_bluebook/manifest.rb +1 -1
- data/lib/hecks/fixer/fixer.bluebook +240 -0
- data/lib/hecks/fixer/fixer.hecksagon +17 -0
- data/lib/hecks/framework_bluebooks.rb +32 -7
- data/lib/hecks/fuzzing/concurrent_dispatch/world_copy.rb +1 -0
- data/lib/hecks/fuzzing/isolated_boot/postgres_scratch.rb +11 -12
- data/lib/hecks/fuzzing/isolated_boot/worlds.rb +23 -5
- data/lib/hecks/fuzzing/isolated_boot.rb +1 -1
- data/lib/hecks/fuzzing/mutation/checks.rb +3 -3
- data/lib/hecks/grammar/translation.bluebook +1 -1
- data/lib/hecks/grammar/translation_rules.json +64 -0
- data/lib/hecks/hecks/adapter_words.json +7 -0
- data/lib/hecks/hecks/adapters/area_overlap.rb +156 -0
- data/lib/hecks/hecks/adapters/claude_agents.rb +8 -3
- data/lib/hecks/hecks/adapters/codebase/batch_runs.rb +60 -0
- data/lib/hecks/hecks/adapters/codebase/changed_specs.rb +52 -0
- data/lib/hecks/hecks/adapters/codebase/codemods.rb +3 -2
- data/lib/hecks/hecks/adapters/codebase/conformance.rb +14 -1
- data/lib/hecks/hecks/adapters/codebase/corpus_queries.rb +53 -0
- data/lib/hecks/hecks/adapters/codebase/generated_keys.rb +31 -0
- data/lib/hecks/hecks/adapters/codebase/impacted_specs.rb +110 -0
- data/lib/hecks/hecks/adapters/codebase/language.rb +2 -2
- data/lib/hecks/hecks/adapters/codebase/launcher_text.rb +39 -0
- data/lib/hecks/hecks/adapters/codebase/minitest_runs.rb +52 -0
- data/lib/hecks/hecks/adapters/codebase/regeneration.rb +51 -8
- data/lib/hecks/hecks/adapters/codebase/run_options.rb +35 -0
- data/lib/hecks/hecks/adapters/codebase/scripting.rb +39 -0
- data/lib/hecks/hecks/adapters/codebase/search.rb +1 -1
- data/lib/hecks/hecks/adapters/codebase/source_tree.rb +79 -51
- data/lib/hecks/hecks/adapters/codebase/spec_files/report.rb +71 -0
- data/lib/hecks/hecks/adapters/codebase/spec_files/shared_run.rb +73 -0
- data/lib/hecks/hecks/adapters/codebase/spec_files.rb +95 -0
- data/lib/hecks/hecks/adapters/codebase/test_runner.rb +53 -4
- data/lib/hecks/hecks/adapters/codebase/test_scope.rb +105 -0
- data/lib/hecks/hecks/adapters/codebase/test_suite.rb +48 -34
- data/lib/hecks/hecks/adapters/console_capture.rb +1 -1
- data/lib/hecks/hecks/adapters/cost_explorer.rb +9 -1
- data/lib/hecks/hecks/adapters/dispatching/brief_text.rb +51 -0
- data/lib/hecks/hecks/adapters/dispatching/launcher.rb +97 -0
- data/lib/hecks/hecks/adapters/dispatching/plan.rb +82 -0
- data/lib/hecks/hecks/adapters/dispatching/rows.rb +66 -0
- data/lib/hecks/hecks/adapters/dispatching/settings.rb +81 -0
- data/lib/hecks/hecks/adapters/dispatching/settler.rb +40 -0
- data/lib/hecks/hecks/adapters/dispatching.adapter +7 -0
- data/lib/hecks/hecks/adapters/dispatching.rb +93 -0
- data/lib/hecks/hecks/adapters/doctor_reading/report.rb +27 -0
- data/lib/hecks/hecks/adapters/doctor_reading.adapter +7 -0
- data/lib/hecks/hecks/adapters/doctor_reading.rb +161 -0
- data/lib/hecks/hecks/adapters/git_checkout.rb +1 -1
- data/lib/hecks/hecks/adapters/git_commit.adapter +7 -0
- data/lib/hecks/hecks/adapters/git_commit.rb +61 -0
- data/lib/hecks/hecks/adapters/git_landing/finisher.rb +82 -0
- data/lib/hecks/hecks/adapters/git_landing/foreign_hold.rb +111 -0
- data/lib/hecks/hecks/adapters/git_landing/line.rb +171 -0
- data/lib/hecks/hecks/adapters/git_landing/lineup.rb +98 -0
- data/lib/hecks/hecks/adapters/git_landing/merger.rb +1 -1
- data/lib/hecks/hecks/adapters/git_landing/numbering.rb +54 -0
- data/lib/hecks/hecks/adapters/git_landing/rivals.rb +59 -0
- data/lib/hecks/hecks/adapters/git_landing/ticket.rb +156 -0
- data/lib/hecks/hecks/adapters/git_landing/tidy.rb +147 -0
- data/lib/hecks/hecks/adapters/git_landing/train.rb +104 -0
- data/lib/hecks/hecks/adapters/git_landing/verdict.rb +64 -0
- data/lib/hecks/hecks/adapters/git_landing/waiting.rb +120 -0
- data/lib/hecks/hecks/adapters/git_landing.rb +106 -20
- data/lib/hecks/hecks/adapters/git_main_pull.rb +99 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/bench.rb +82 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/due.rb +84 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/impacted/skips.rb +47 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/impacted/spec_run.rb +75 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/impacted.rb +181 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/line.rb +76 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/reading.rb +24 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/record.rb +146 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/spec_map/corpus.rb +25 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/spec_map/needles.rb +61 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/spec_map.rb +105 -0
- data/lib/hecks/hecks/adapters/git_rehearsal/stages.rb +118 -0
- data/lib/hecks/hecks/adapters/git_rehearsal.adapter +7 -0
- data/lib/hecks/hecks/adapters/git_rehearsal.rb +141 -0
- data/lib/hecks/hecks/adapters/git_train/bench.rb +15 -15
- data/lib/hecks/hecks/adapters/git_train/branch_guard.rb +62 -0
- data/lib/hecks/hecks/adapters/git_train/carriage.rb +27 -28
- data/lib/hecks/hecks/adapters/git_train/launcher_shape.rb +75 -0
- data/lib/hecks/hecks/adapters/git_train/mint_step.rb +47 -0
- data/lib/hecks/hecks/adapters/git_train/settlement.rb +167 -0
- data/lib/hecks/hecks/adapters/git_train.rb +73 -15
- data/lib/hecks/hecks/adapters/git_worktree_add.adapter +7 -0
- data/lib/hecks/hecks/adapters/git_worktree_add.rb +68 -0
- data/lib/hecks/hecks/adapters/github_pull_requests.adapter +7 -0
- data/lib/hecks/hecks/adapters/github_pull_requests.rb +109 -0
- data/lib/hecks/hecks/adapters/host_http.rb +6 -6
- data/lib/hecks/hecks/adapters/in_process_boot.rb +10 -8
- data/lib/hecks/hecks/adapters/in_process_operations.rb +11 -17
- data/lib/hecks/hecks/adapters/in_process_undo.rb +17 -0
- data/lib/hecks/hecks/adapters/journal_store/changes.rb +13 -4
- data/lib/hecks/hecks/adapters/journal_store/edge_audit.rb +28 -15
- data/lib/hecks/hecks/adapters/journal_store/examination.rb +17 -1
- data/lib/hecks/hecks/adapters/journal_store/held_domain/renaming.rb +45 -0
- data/lib/hecks/hecks/adapters/journal_store/held_domain.rb +31 -5
- data/lib/hecks/hecks/adapters/journal_store/held_mint.rb +128 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/attestation.rb +1 -1
- data/lib/hecks/hecks/adapters/journal_store/readings/boot_status.rb +58 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/composition.rb +39 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/outcomes.rb +76 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/postgres_reader.rb +44 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/reader.rb +64 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/report.rb +102 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/sqlite_reader.rb +43 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/stores.rb +80 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/subscribers.rb +72 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace/summary.rb +39 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/event_trace.rb +39 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/command_line.rb +57 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/edge_guards.rb +107 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/inspection.rb +94 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/plan.rb +66 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/report.rb +72 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/store.rb +34 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/watermark_guards.rb +86 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan/world.rb +66 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/mint_plan.rb +36 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/projection_audit.rb +64 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/scaffolding.rb +3 -3
- data/lib/hecks/hecks/adapters/journal_store/readings/sqlite_status/database_reading.rb +113 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/sqlite_status/read_only.rb +33 -0
- data/lib/hecks/hecks/adapters/journal_store/readings/sqlite_status.rb +32 -0
- data/lib/hecks/hecks/adapters/journal_store/readings.rb +13 -1
- data/lib/hecks/hecks/adapters/journal_store/reconcile_report.rb +60 -0
- data/lib/hecks/hecks/adapters/journal_store/reconciliation.rb +121 -0
- data/lib/hecks/hecks/adapters/journal_store/translation_write/shape_edge.rb +59 -0
- data/lib/hecks/hecks/adapters/journal_store/translation_write.rb +123 -0
- data/lib/hecks/hecks/adapters/journal_store.rb +16 -0
- data/lib/hecks/hecks/adapters/landed_work.adapter +7 -0
- data/lib/hecks/hecks/adapters/landed_work.rb +52 -0
- data/lib/hecks/hecks/adapters/local_files.rb +6 -6
- data/lib/hecks/hecks/adapters/process_pool.rb +3 -2
- data/lib/hecks/hecks/adapters/push_size.rb +57 -0
- data/lib/hecks/hecks/adapters/qa_quiescing.adapter +7 -0
- data/lib/hecks/hecks/adapters/qa_quiescing.rb +57 -0
- data/lib/hecks/hecks/adapters/rehearsal/inquiry.rb +30 -3
- data/lib/hecks/hecks/adapters/rehearsal/memory_store.rb +63 -3
- data/lib/hecks/hecks/adapters/rehearsal/postgres_reading.rb +29 -6
- data/lib/hecks/hecks/adapters/rehearsal/subject.rb +11 -5
- data/lib/hecks/hecks/adapters/rust_toolchain.rb +10 -1
- data/lib/hecks/hecks/adapters/rust_workspace.rb +1 -1
- data/lib/hecks/hecks/adapters/settings_reading/disposable_ledger.rb +32 -0
- data/lib/hecks/hecks/adapters/settings_reading/push_nudge.rb +26 -0
- data/lib/hecks/hecks/adapters/settings_reading/stores.rb +76 -0
- data/lib/hecks/hecks/adapters/settings_reading/test_scope.rb +28 -0
- data/lib/hecks/hecks/adapters/settings_reading.rb +28 -2
- data/lib/hecks/hecks/adapters/started_work.rb +42 -0
- data/lib/hecks/hecks/adapters/terminal.rb +12 -10
- data/lib/hecks/hecks/adapters/where_reading.adapter +7 -0
- data/lib/hecks/hecks/adapters/where_reading.rb +64 -0
- data/lib/hecks/hecks/adapters/work_areas.rb +57 -0
- data/lib/hecks/hecks/adapters/work_limits.rb +57 -0
- data/lib/hecks/hecks/build/build.bluebook +576 -0
- data/lib/hecks/hecks/check/check.bluebook +966 -0
- data/lib/hecks/hecks/codebase.behaviors +61 -5
- data/lib/hecks/hecks/composer.behaviors +1 -1
- data/lib/hecks/hecks/context_map.hecksagon +1 -1
- data/lib/hecks/hecks/custodian.behaviors +33 -7
- data/lib/hecks/hecks/delegate/delegate.bluebook +355 -0
- data/lib/hecks/hecks/deliver/deliver.bluebook +945 -0
- data/lib/hecks/hecks/deploy.behaviors +1 -1
- data/lib/hecks/hecks/evolve/evolve.bluebook +788 -0
- data/lib/hecks/hecks/find/find.bluebook +81 -0
- data/lib/hecks/hecks/hecks.behaviors +1 -1
- data/lib/hecks/hecks/hecks.bluebook +0 -133
- data/lib/hecks/hecks/hecks.contextmap +2 -0
- data/lib/hecks/hecks/hecks.hecksagon +185 -29
- data/lib/hecks/hecks/hecks.world +35 -9
- data/lib/hecks/hecks/implicit_moves.json +24 -0
- data/lib/hecks/hecks/migrate/migrate.bluebook +1066 -0
- data/lib/hecks/hecks/operate/operate.bluebook +695 -0
- data/lib/hecks/hecks/quiesce/quiesce.bluebook +117 -0
- data/lib/hecks/hecks/rehearse/rehearse.bluebook +133 -0
- data/lib/hecks/hecks/release/release.bluebook +916 -0
- data/lib/hecks/hecks/serve/serve.bluebook +134 -0
- data/lib/hecks/hecks/shapes.json +1 -15
- data/lib/hecks/hecks/site.behaviors +1 -1
- data/lib/hecks/hecks/start/start.bluebook +194 -0
- data/lib/hecks/hecks/test/test.bluebook +638 -0
- data/lib/hecks/hecks/tickets.world +14 -0
- data/lib/hecks/language/bluebook/aggregate.bluebook +22 -0
- data/lib/hecks/language/bluebook/bluebook.bluebook +34 -0
- data/lib/hecks/language/bluebook/command.bluebook +35 -0
- data/lib/hecks/language/bluebook/process_manager.bluebook +14 -1
- data/lib/hecks/language/bluebook/vocabulary.bluebook +174 -54
- data/lib/hecks/language/hecksagon/domain_port.bluebook +1 -0
- data/lib/hecks/language/hecksagon/port_operation.bluebook +14 -0
- data/lib/hecks/language/kinds/run.kind +120 -0
- data/lib/hecks/language/oidc.json +10 -0
- data/lib/hecks/language/translation/translation_aggregate.bluebook +24 -0
- data/lib/hecks/module_folders.rb +31 -0
- data/lib/hecks/ports/key_vault.rb +1 -1
- data/lib/hecks/ports/persistence/append_only.rb +26 -8
- data/lib/hecks/ports/persistence/binding_policy.rb +3 -1
- data/lib/hecks/ports/persistence/codec_boundary.rb +1 -1
- data/lib/hecks/ports/persistence/mint_door.rb +74 -0
- data/lib/hecks/ports/persistence/plugins/era/era_check.rb +6 -5
- data/lib/hecks/ports/persistence/plugins/era/era_guard/shape_diff.rb +5 -1
- data/lib/hecks/ports/persistence/plugins/era/era_status.rb +48 -0
- data/lib/hecks/ports/persistence/plugins/era/projected_bluebook.rb +127 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/additive_shape.rb +107 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/compose.rb +155 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/compose_render.rb +79 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/edge_files.rb +49 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/edge_route.rb +61 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/implicit_edge.rb +67 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/reconcile.rb +130 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/reconcile_files.rb +35 -0
- data/lib/hecks/ports/persistence/plugins/era/translation/scaffold/differ.rb +13 -5
- data/lib/hecks/ports/persistence/plugins/era/translation.rb +5 -0
- data/lib/hecks/ports/persistence/plugins/era.rb +1 -0
- data/lib/hecks/ports/persistence/repository_factory.rb +11 -3
- data/lib/hecks/ports/persistence/stored_name_guard.rb +36 -0
- data/lib/hecks/ports/persistence.rb +2 -0
- data/lib/hecks/projections/ci_pipeline/table/checks.rb +137 -0
- data/lib/hecks/projections/ci_pipeline/table/lookup.rb +59 -0
- data/lib/hecks/projections/ci_pipeline/table/refusals.rb +58 -0
- data/lib/hecks/projections/ci_pipeline/table/rows.rb +119 -0
- data/lib/hecks/projections/ci_pipeline/table/tree.rb +30 -0
- data/lib/hecks/projections/ci_pipeline/table/typing.rb +92 -0
- data/lib/hecks/projections/ci_pipeline/table.rb +112 -0
- data/lib/hecks/projections/ci_pipeline/workflows.rb +162 -0
- data/lib/hecks/projections/ci_pipeline/yaml_text.rb +104 -0
- data/lib/hecks/projections/deploy/box/hosting.rb +1 -1
- data/lib/hecks/projections/deploy/box/roll_recipe.rb +1 -1
- data/lib/hecks/projections/deploy/box/roll_scripts.rb +1 -1
- data/lib/hecks/projections/deploy/box.rb +1 -1
- data/lib/hecks/projections/deploy/templates/fargate/Makefile.tmpl +1 -1
- data/lib/hecks/projections/deploy/templates/lambda/Makefile.tmpl +3 -3
- data/lib/hecks/projections/undo.rb +46 -0
- data/lib/hecks/projections.rb +2 -0
- data/lib/hecks/projector/cli_projector/claims.rb +11 -0
- data/lib/hecks/projector/cli_projector/command_help.rb +6 -1
- data/lib/hecks/projector/cli_projector/command_specs.rb +11 -1
- data/lib/hecks/projector/cli_projector/completion.rb +87 -0
- data/lib/hecks/projector/cli_projector/everyday.rb +40 -0
- data/lib/hecks/projector/cli_projector/json_listing.rb +77 -0
- data/lib/hecks/projector/cli_projector/listing.rb +1 -1
- data/lib/hecks/projector/cli_projector/modules.rb +39 -0
- data/lib/hecks/projector/cli_projector/query_specs.rb +1 -0
- data/lib/hecks/projector/cli_projector/renames.rb +58 -0
- data/lib/hecks/projector/cli_projector/search.rb +74 -0
- data/lib/hecks/projector/cli_projector/usage.rb +23 -6
- data/lib/hecks/projector/cli_projector.rb +24 -1
- data/lib/hecks/quality_control/adapters/ci_head.adapter +8 -0
- data/lib/hecks/quality_control/adapters/image_roll.adapter +9 -0
- data/lib/hecks/quality_control/adapters/image_roll.rb +158 -0
- data/lib/hecks/quality_control/adapters/main_maintenance.adapter +8 -0
- data/lib/hecks/quality_control/adapters/main_maintenance.rb +275 -0
- data/lib/hecks/quality_control/adapters/pump_tools.adapter +7 -0
- data/lib/hecks/quality_control/adapters/pump_tools.rb +18 -0
- data/lib/hecks/quality_control/adapters/push_due_reader.adapter +8 -0
- data/lib/hecks/quality_control/adapters/push_due_reader.rb +99 -0
- data/lib/hecks/quality_control/adapters/qa_auto_mint.rb +183 -0
- data/lib/hecks/quality_control/adapters/qa_era_mint.rb +94 -0
- data/lib/hecks/quality_control/adapters/qa_quiesce_marker.rb +126 -0
- data/lib/hecks/quality_control/adapters/run_keys.rb +36 -0
- data/lib/hecks/quality_control/adapters/run_reader.adapter +7 -0
- data/lib/hecks/quality_control/adapters/run_reader.rb +188 -0
- data/lib/hecks/quality_control/cli/child.rb +1 -0
- data/lib/hecks/quality_control/cli/qa_discover_external_domains/scanning.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_domain_novelty.rb +3 -3
- data/lib/hecks/quality_control/cli/qa_event_pump/attached.rb +67 -0
- data/lib/hecks/quality_control/cli/qa_event_pump/consumer.rb +103 -0
- data/lib/hecks/quality_control/cli/qa_event_pump/cursors.rb +60 -0
- data/lib/hecks/quality_control/cli/qa_event_pump/reactions.rb +46 -0
- data/lib/hecks/quality_control/cli/qa_event_pump/reader.rb +30 -0
- data/lib/hecks/quality_control/cli/qa_event_pump.rb +76 -0
- data/lib/hecks/quality_control/cli/qa_fix_main_bug/publishing.rb +79 -0
- data/lib/hecks/quality_control/cli/qa_fix_main_bug.rb +167 -0
- data/lib/hecks/quality_control/cli/qa_generated_domains/evaluation.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_generated_domains/promotion.rb +3 -3
- data/lib/hecks/quality_control/cli/qa_main_gate/gate_run.rb +52 -0
- data/lib/hecks/quality_control/cli/qa_main_gate/logging.rb +70 -0
- data/lib/hecks/quality_control/cli/qa_main_gate/shell.rb +47 -0
- data/lib/hecks/quality_control/cli/qa_main_gate/sweeping.rb +59 -0
- data/lib/hecks/quality_control/cli/qa_main_gate/worktree.rb +62 -0
- data/lib/hecks/quality_control/cli/qa_main_gate.rb +135 -0
- data/lib/hecks/quality_control/cli/qa_postgres_role.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_pr_check/checking.rb +2 -3
- data/lib/hecks/quality_control/cli/qa_push_nudge.rb +48 -0
- data/lib/hecks/quality_control/cli/qa_seed_angles/seed.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_sweep/seat.rb +1 -1
- data/lib/hecks/quality_control/cli/qa_tick/event_pump_step.rb +34 -0
- data/lib/hecks/quality_control/cli/qa_tick/output.rb +16 -1
- data/lib/hecks/quality_control/cli/qa_tick/push_nudge_step.rb +28 -0
- data/lib/hecks/quality_control/cli/qa_tick/quiesce_guard.rb +51 -0
- data/lib/hecks/quality_control/cli/qa_tick.rb +36 -8
- data/lib/hecks/quality_control/quality_control.behaviors +65 -0
- data/lib/hecks/quality_control/quality_control.bluebook +1131 -11
- data/lib/hecks/quality_control/quality_control.hecksagon +11 -0
- data/lib/hecks/quality_control/quality_control.ports.hecksagon +138 -0
- data/lib/hecks/query_ir/touchpoints.rb +5 -7
- data/lib/hecks/refused.rb +21 -0
- data/lib/hecks/release/approval.rb +6 -3
- data/lib/hecks/release/conditions.rb +46 -0
- data/lib/hecks/release/runner/gem_publisher.rb +4 -4
- data/lib/hecks/release/version_commit.rb +48 -0
- data/lib/hecks/runtime/command_interpreter/hydration.rb +5 -4
- data/lib/hecks/runtime/command_interpreter/persisting.rb +11 -3
- data/lib/hecks/runtime/command_interpreter.rb +2 -2
- data/lib/hecks/runtime/command_rules/admissibility.rb +0 -2
- data/lib/hecks/runtime/command_rules/emission.rb +0 -1
- data/lib/hecks/runtime/dependency_planning/expression_reads.rb +0 -1
- data/lib/hecks/runtime/dispatcher/planning.rb +24 -0
- data/lib/hecks/runtime/dispatcher/routing.rb +6 -0
- data/lib/hecks/runtime/dispatcher/value_routing.rb +54 -0
- data/lib/hecks/runtime/dispatcher.rb +7 -1
- data/lib/hecks/runtime/dry_run_plan.rb +60 -0
- data/lib/hecks/runtime/entity_element/location.rb +0 -1
- data/lib/hecks/runtime/entity_element/mutations.rb +0 -1
- data/lib/hecks/runtime/entity_interpreter/locating.rb +5 -0
- data/lib/hecks/runtime/entity_interpreter.rb +0 -1
- data/lib/hecks/runtime/errors.rb +26 -0
- data/lib/hecks/runtime/instance.rb +0 -1
- data/lib/hecks/runtime/invocation_builder.rb +0 -1
- data/lib/hecks/runtime/outbox/consumer_runner.rb +9 -1
- data/lib/hecks/runtime/outbox/relay.rb +25 -4
- data/lib/hecks/runtime/outbox/runnable.rb +3 -1
- data/lib/hecks/runtime/outbox.rb +6 -2
- data/lib/hecks/runtime/policy_interpreter/fan_out.rb +18 -2
- data/lib/hecks/runtime/policy_interpreter.rb +17 -9
- data/lib/hecks/runtime/port_operation_interpreter.rb +21 -7
- data/lib/hecks/runtime/query_interpreter/arguments.rb +6 -5
- data/lib/hecks/runtime/reaction_invocation.rb +0 -1
- data/lib/hecks/runtime/refusal_wording.rb +12 -1
- data/lib/hecks/runtime/registry/context_maps.rb +1 -5
- data/lib/hecks/runtime/registry/declarations.rb +34 -4
- data/lib/hecks/runtime/registry/hecksagon_rules.rb +15 -1
- data/lib/hecks/runtime/registry/runtime_state.rb +10 -0
- data/lib/hecks/runtime/registry/world_defaults.rb +24 -2
- data/lib/hecks/runtime/registry/world_names.rb +99 -0
- data/lib/hecks/runtime/registry.rb +33 -27
- data/lib/hecks/runtime/saga_interpreter/compensation.rb +10 -0
- data/lib/hecks/runtime/saga_interpreter/correlation.rb +29 -3
- data/lib/hecks/runtime/saga_interpreter/delivery.rb +0 -1
- data/lib/hecks/runtime/saga_interpreter/lifecycle.rb +1 -1
- data/lib/hecks/runtime/saga_interpreter.rb +46 -2
- data/lib/hecks/runtime/value/coercion.rb +36 -8
- data/lib/hecks/rust_build/conformance.rb +16 -5
- data/lib/hecks/rust_build/parser.rb +25 -0
- data/lib/hecks/rust_build/project_rust/codegen_run.rb +45 -12
- data/lib/hecks/rust_build/project_rust/declared.rb +80 -0
- data/lib/hecks/rust_build/project_rust/features_header.rb +22 -0
- data/lib/hecks/rust_build/project_rust/manifest.rb +96 -0
- data/lib/hecks/rust_build/project_rust/meta.rb +36 -0
- data/lib/hecks/rust_build/project_rust.rb +28 -90
- data/lib/hecks/rust_build/write_if_changed.rb +19 -4
- data/lib/hecks/rust_build.rb +2 -1
- data/lib/hecks/rust_format.rb +32 -2
- data/lib/hecks/secrets.rb +111 -0
- data/lib/hecks/shape_ledger/edge_hygiene.rb +170 -0
- data/lib/hecks/shape_ledger/scope.rb +51 -0
- data/lib/hecks/shape_ledger/status.rb +89 -0
- data/lib/hecks/shape_ledger.rb +78 -33
- data/lib/hecks/site/bluebook/site.bluebook +1 -0
- data/lib/hecks/storehouse/audit.rb +34 -4
- data/lib/hecks/storehouse/callers.rb +8 -0
- data/lib/hecks/storehouse/dispatching.rb +14 -3
- data/lib/hecks/storehouse/identity.rb +41 -0
- data/lib/hecks/storehouse/querying.rb +7 -7
- data/lib/hecks/storehouse.rb +28 -10
- data/lib/hecks/tickets/bluebook/adapters/work_areas.adapter +7 -0
- data/lib/hecks/tickets/bluebook/adapters/work_limits.adapter +7 -0
- data/lib/hecks/tickets/bluebook/tickets.behaviors +70 -0
- data/lib/hecks/tickets/bluebook/tickets.bluebook +323 -28
- data/lib/hecks/tickets/bluebook/tickets.hecksagon +7 -0
- data/lib/hecks/tickets/bluebook/tickets.ports.hecksagon +17 -0
- data/lib/hecks/{cli → tools}/behaviors.rb +1 -1
- data/lib/hecks/{cli → tools}/canonicalise.rb +1 -1
- data/lib/hecks/{cli → tools}/check_engine_agreement.rb +1 -1
- data/lib/hecks/{cli → tools}/check_era.rb +6 -6
- data/lib/hecks/tools/ci_gates.rb +8 -2
- data/lib/hecks/tools/ci_workflows.rb +98 -0
- data/lib/hecks/{cli → tools}/console.rb +1 -1
- data/lib/hecks/{cli → tools}/deploy_template_diff.rb +1 -1
- data/lib/hecks/{cli → tools}/doc_coverage.rb +2 -2
- data/lib/hecks/{cli → tools}/document.rb +1 -1
- data/lib/hecks/{cli → tools}/domain_stub.rb +1 -1
- data/lib/hecks/{cli → tools}/domain_writer.rb +1 -1
- data/lib/hecks/tools/downstream_model_check.rb +122 -0
- data/lib/hecks/tools/evolve_run.rb +2 -2
- data/lib/hecks/{cli → tools}/expected_era.rb +1 -1
- data/lib/hecks/{cli → tools}/expression_projection.rb +1 -1
- data/lib/hecks/{cli → tools}/follow.rb +1 -1
- data/lib/hecks/tools/fuzz_sweep/options.rb +40 -5
- data/lib/hecks/tools/fuzz_sweep/pool.rb +12 -1
- data/lib/hecks/tools/fuzz_sweep/shards.rb +155 -0
- data/lib/hecks/tools/fuzz_sweep.rb +11 -5
- data/lib/hecks/tools/gate.rb +38 -29
- data/lib/hecks/tools/gate_memo/local_files.rb +33 -0
- data/lib/hecks/tools/gate_memo/rehearsal.rb +54 -0
- data/lib/hecks/tools/gate_memo/ruby_files.rb +152 -0
- data/lib/hecks/tools/gate_memo/session.rb +114 -0
- data/lib/hecks/tools/gate_memo/standalone.rb +67 -0
- data/lib/hecks/tools/gate_memo.rb +196 -0
- data/lib/hecks/tools/gate_report.rb +56 -0
- data/lib/hecks/{cli → tools}/history.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_agent.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_aggregate.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_draft.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_record.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_run.rb +2 -2
- data/lib/hecks/{cli → tools}/interview_session/agent_state.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_session/catalog.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_session/manual_findings.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_session/proposals.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_session.rb +2 -2
- data/lib/hecks/{cli → tools}/interview_shape/lifecycle.rb +1 -1
- data/lib/hecks/{cli → tools}/interview_shape.rb +1 -1
- data/lib/hecks/{cli → tools}/ir.rb +1 -1
- data/lib/hecks/tools/lanes/files.rb +1 -1
- data/lib/hecks/tools/lanes/watch_workflow.rb +6 -8
- data/lib/hecks/tools/lanes/workflow.rb +1 -1
- data/lib/hecks/tools/lanes.rb +1 -1
- data/lib/hecks/{cli → tools}/mcp.rb +1 -1
- data/lib/hecks/{cli → tools}/model_check/examination.rb +1 -1
- data/lib/hecks/{cli → tools}/model_check/sources.rb +1 -1
- data/lib/hecks/{cli → tools}/model_check.rb +1 -1
- data/lib/hecks/tools/move_disables/reasons.rb +35 -0
- data/lib/hecks/tools/move_disables.rb +211 -0
- data/lib/hecks/tools/move_former_name.rb +105 -0
- data/lib/hecks/{cli → tools}/pattern_cases.rb +1 -1
- data/lib/hecks/{cli → tools}/persistence_notice.rb +1 -1
- data/lib/hecks/{cli → tools}/present.rb +1 -1
- data/lib/hecks/{cli → tools}/project_cli/launcher_source.rb +32 -22
- data/lib/hecks/{cli → tools}/project_cli/templates.rb +22 -15
- data/lib/hecks/{cli → tools}/project_cli.rb +11 -7
- data/lib/hecks/{cli → tools}/project_diagrams.rb +3 -3
- data/lib/hecks/{cli → tools}/project_glossary.rb +2 -2
- data/lib/hecks/{cli → tools}/reference.rb +2 -2
- data/lib/hecks/{cli → tools}/refresh_projections.rb +1 -1
- data/lib/hecks/{cli → tools}/refresh_rspec_runtime_baseline.rb +1 -1
- data/lib/hecks/tools/regeneration_run/pool.rb +148 -0
- data/lib/hecks/tools/regeneration_run/scratch.rb +76 -0
- data/lib/hecks/tools/regeneration_run.rb +125 -103
- data/lib/hecks/{cli → tools}/release.rb +1 -1
- data/lib/hecks/{cli → tools}/release_gem.rb +1 -1
- data/lib/hecks/{cli → tools}/rspec_io_parallel_files.rb +1 -1
- data/lib/hecks/{cli → tools}/rspec_shard_files.rb +1 -1
- data/lib/hecks/{cli → tools}/run.rb +9 -2
- data/lib/hecks/{cli → tools}/run_expectations.rb +1 -1
- data/lib/hecks/{cli → tools}/seed_semantics_corpus.rb +4 -4
- data/lib/hecks/{cli → tools}/serve_query_ir_mcp.rb +1 -1
- data/lib/hecks/{cli → tools}/shape.rb +3 -2
- data/lib/hecks/{cli → tools}/smoke_http/checks.rb +1 -1
- data/lib/hecks/{cli → tools}/smoke_http/settings.rb +1 -1
- data/lib/hecks/{cli → tools}/smoke_http/transport.rb +1 -1
- data/lib/hecks/{cli → tools}/smoke_http.rb +1 -1
- data/lib/hecks/{cli → tools}/smoke_test.rb +1 -1
- data/lib/hecks/{cli → tools}/spec_example.rb +1 -1
- data/lib/hecks/tools/stage_progress.rb +54 -0
- data/lib/hecks/{cli → tools}/statements.rb +1 -1
- data/lib/hecks/{cli → tools}/stores.rb +1 -1
- data/lib/hecks/{cli → tools}/stress_concurrency_specs/reporting.rb +1 -1
- data/lib/hecks/{cli → tools}/stress_concurrency_specs/usage.rb +4 -4
- data/lib/hecks/{cli → tools}/stress_concurrency_specs.rb +3 -3
- data/lib/hecks/tools/tenant_provisioning.rb +23 -0
- data/lib/hecks/tools/tools_doc.rb +10 -8
- data/lib/hecks/tools/translation_audit/edges.rb +21 -16
- data/lib/hecks/tools/translation_audit/verdicts.rb +1 -1
- data/lib/hecks/tools/translation_audit.rb +1 -1
- data/lib/hecks/tools/translation_scaffold.rb +1 -1
- data/lib/hecks/tools.rb +4 -1
- data/lib/hecks/version.rb +1 -1
- data/lib/hecks/vocabulary.rb +61 -31
- data/lib/hecks/workflow_pagination/judge.rb +48 -0
- data/lib/hecks/workflow_pagination/statement.rb +50 -0
- data/lib/hecks/workflow_pagination.rb +58 -0
- data/lib/hecks.rb +2 -0
- data/lib/rubocop/cop/hecks/bare_event_and_query_names.rb +58 -0
- data/lib/rubocop/cop/hecks/correlates_by_aggregate.rb +39 -0
- data/lib/rubocop/cop/hecks/creating_command_sets.rb +75 -0
- data/lib/rubocop/cop/hecks/invariant_expression_language.rb +47 -0
- data/lib/rubocop/cop/hecks/lifecycle_needs_attribute.rb +58 -0
- data/lib/rubocop/cop/hecks/no_id_string_attribute.rb +49 -0
- data/lib/rubocop/cop/hecks/one_terminal_mark_per_lifecycle.rb +47 -0
- data/lib/rubocop/cop/hecks/value_object_shorthand.rb +56 -0
- data/prebuilt/13c04bdc5970295b310f0a980d397ba722232c8da99cc1a0cdb383249921e871.marshal +0 -0
- data/prebuilt/e3857b77f47d9ecc1787b2e1f5136364f3cb3444ef4aea5479f3b98167affea2.marshal +0 -0
- data/qa/settings.yml +23 -0
- data/rust/.gitignore +0 -6
- data/rust/Cargo.toml +2 -1
- data/rust/build/Cargo.toml +1 -1
- data/rust/build/src/binding_pass.rs +57 -4
- data/rust/build/src/pipeline.rs +6 -4
- data/rust/build/src/resolve.rs +1 -0
- data/rust/codegen/Cargo.toml +1 -1
- data/rust/codegen/src/domain_generator.rs +3 -0
- data/rust/codegen/src/json_codec.rs +182 -23
- data/rust/codegen/src/one_of_references.rs +1 -0
- data/rust/codegen/src/queries.rs +20 -2
- data/rust/codegen/src/registry.rs +21 -5
- data/rust/expr/Cargo.toml +1 -1
- data/rust/host/Cargo.toml +1 -1
- data/rust/host/HECKS_RELEASE +1 -1
- data/rust/host/core/Cargo.toml +1 -1
- data/rust/host/src/bin/mint_harness.rs +1 -0
- data/rust/host/src/boot.rs +1 -0
- data/rust/host/src/store/mint.rs +40 -6
- data/rust/lsp/Cargo.toml +1 -1
- data/rust/parser/Cargo.toml +1 -1
- data/rust/parser/src/build/correlation_keys.rs +125 -0
- data/rust/parser/src/build/mod.rs +1 -0
- data/rust/parser/src/emit.rs +55 -3
- data/rust/parser/src/ir.rs +33 -1
- data/rust/parser/src/keywords.rs +289 -1
- data/rust/parser/src/main.rs +2 -0
- data/rust/parser/src/parse/aggregate.rs +10 -1
- data/rust/parser/src/parse/audience.rs +65 -0
- data/rust/parser/src/parse/command.rs +14 -0
- data/rust/parser/src/parse/declaration.rs +97 -0
- data/rust/parser/src/parse/domain_port.rs +6 -0
- data/rust/parser/src/parse/mod.rs +1 -0
- data/rust/parser/src/parse/process_manager.rs +17 -10
- data/rust/parser/src/parse/world.rs +12 -8
- data/rust/parser/src/render_ruby.rs +9 -0
- data/rust/parser/src/sentence/format.rs +3 -0
- data/rust/parser/src/sentence/process.rs +6 -2
- data/rust/src/exemplar/json.rs +17 -0
- data/rust/src/kernel/cli.rs +27 -3
- data/rust/src/kernel/dispatch.rs +4 -2
- data/rust/src/kernel/json.rs +62 -0
- data/rust/src/kernel/orchestrate.rs +28 -3
- data/rust/src/kernel/orchestrate_guard_tests.rs +12 -12
- data/rust/web/Cargo.toml +1 -1
- metadata +389 -96
- data/lib/hecks/cli/command_table.rb +0 -72
- data/lib/hecks/cli/launcher_words.rb +0 -168
- data/lib/hecks/cli.rb +0 -133
- data/lib/hecks/hecks/agents.bluebook +0 -246
- data/lib/hecks/hecks/codebase.bluebook +0 -3209
- data/lib/hecks/hecks/custodian.bluebook +0 -1300
- data/lib/hecks/hecks/ledger.bluebook +0 -190
- data/lib/hecks/hecks/rehearsal.bluebook +0 -437
- data/lib/hecks/hecks/tooling.bluebook +0 -1234
- data/lib/hecks/hecks/translations/2-148748.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-15a2e4.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-1b447c.bluebook +0 -5
- data/lib/hecks/hecks/translations/2-240474.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-44446d.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-46ca26.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-473eab.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-75cc28.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-781c07.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-84c18b.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-aa5fff.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-bfdb48.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-cd96d8.bluebook +0 -10
- data/lib/hecks/hecks/translations/2-d43f71.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-eea577.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-f53248.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-fbb677.bluebook +0 -2
- data/lib/hecks/hecks/translations/2-ffdf12.bluebook +0 -6
- data/lib/hecks/quality_control/adapters/clearance_recorder.rb +0 -36
- data/lib/hecks/quality_control/adapters/github_ci_webhook.rb +0 -56
- data/prebuilt/31cf81e12f16236ad26249be590cfea3799c9db67432e6a4ef54b801c355b6ae.marshal +0 -0
- data/prebuilt/68ecb2bd3abb1a221007db4f2b0375834c13aaccac8f2b99778e8517f11aa113.marshal +0 -0
- data/prebuilt/verdicts-0328c2403383837d780ad5ed81d1da351c56436b894cf9015b5d56b8f1f1bf10.json +0 -1
|
@@ -1,1300 +0,0 @@
|
|
|
1
|
-
Hecks.bluebook "Hecks" do
|
|
2
|
-
# Custodian: operating a domain, in the Operations module (ADR 0096). Each aggregate here is a
|
|
3
|
-
# concern a client runs against a domain that is running (ADR 0080, section 2); the tooling for
|
|
4
|
-
# building one is in tooling.bluebook.
|
|
5
|
-
|
|
6
|
-
aggregate "Operation" do
|
|
7
|
-
description "One thing an operator ran against a domain, and how it ended."
|
|
8
|
-
|
|
9
|
-
acknowledges :key_by_value, "any address an operator checks, not only the address of a recorded Host",
|
|
10
|
-
of: :url
|
|
11
|
-
|
|
12
|
-
attribute :run, OperationKey
|
|
13
|
-
attribute :subject, Subject, optional: true
|
|
14
|
-
attribute :script, Script, optional: true
|
|
15
|
-
attribute :verb, Verb, optional: true
|
|
16
|
-
attribute :arguments, list_of(Word), optional: true
|
|
17
|
-
attribute :url, Address, optional: true
|
|
18
|
-
attribute :path, RoutePath, optional: true
|
|
19
|
-
attribute :header, HeaderName, optional: true
|
|
20
|
-
attribute :scheme, Scheme, optional: true
|
|
21
|
-
attribute :payload, Payload, optional: true
|
|
22
|
-
attribute :payload_file, PayloadFile, optional: true
|
|
23
|
-
attribute :health_path, RoutePath, optional: true
|
|
24
|
-
attribute :state_path, RoutePath, optional: true
|
|
25
|
-
attribute :email, Email, optional: true
|
|
26
|
-
attribute :name, PersonName, optional: true
|
|
27
|
-
attribute :role, RoleName, optional: true
|
|
28
|
-
attribute :claimed, Switch, optional: true
|
|
29
|
-
attribute :row, RowId, optional: true
|
|
30
|
-
attribute :output, Output, optional: true
|
|
31
|
-
attribute :refusal, Output, optional: true
|
|
32
|
-
identified_by :run
|
|
33
|
-
|
|
34
|
-
value_object "Switch" do
|
|
35
|
-
attribute :value, Boolean
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# The delivery id an outbox row carries, as the stalled-row warning at boot names it.
|
|
39
|
-
value_object "RowId" do
|
|
40
|
-
attribute :value, String, matches: :present
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
value_object "OperationKey" do
|
|
44
|
-
attribute :value, String, matches: :present
|
|
45
|
-
|
|
46
|
-
invariant("an operation is named") { !value.to_s.empty? }
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# What the operation acts on: a domain directory, or a behaviors file or directory.
|
|
50
|
-
value_object "Subject" do
|
|
51
|
-
attribute :value, String, matches: :not_empty
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
value_object "Script" do
|
|
55
|
-
attribute :value, String
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
value_object "Verb" do
|
|
59
|
-
attribute :value, String, matches: :present
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# One `name=value` word of the verb a run dispatches.
|
|
63
|
-
value_object "Word" do
|
|
64
|
-
attribute :value, String
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
value_object "Address" do
|
|
68
|
-
attribute :value, String, matches: :http_scheme
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
value_object "RoutePath" do
|
|
72
|
-
attribute :value, String, pattern: '^/'
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
value_object "HeaderName" do
|
|
76
|
-
attribute :value, String, matches: :present
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
value_object "Scheme" do
|
|
80
|
-
attribute :value, String, pattern: '^(timestamped|sha256|hex)$'
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
value_object "Payload" do
|
|
84
|
-
attribute :value, String
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
value_object "PayloadFile" do
|
|
88
|
-
attribute :value, String, matches: :not_empty
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
value_object "Output" do
|
|
92
|
-
attribute :value, String
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# Who the first administrator is: a person of the domain's membership bluebook.
|
|
96
|
-
value_object "Email" do
|
|
97
|
-
attribute :value, String, pattern: '^[^ \t\n\r@]+@[^ \t\n\r@]+$'
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
value_object "PersonName" do
|
|
101
|
-
attribute :value, String, matches: :not_empty
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
value_object "RoleName" do
|
|
105
|
-
attribute :value, String, matches: :no_whitespace
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
lifecycle :status, default: "requested" do
|
|
109
|
-
mark :failure, "failed"
|
|
110
|
-
transition "Succeed" => "succeeded", from: "requested"
|
|
111
|
-
transition "Fail" => "failed", from: "requested"
|
|
112
|
-
mark :terminal, "failed", "succeeded"
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
# Runs one verb, or a JSON step list, against the domain: `hecks run [domain] script=steps.json`
|
|
116
|
-
# or `hecks run [domain] verb=create_pizza arguments=name.value=Margherita`. The signing secret
|
|
117
|
-
# for SmokeHttp is never an argument: it is read from SMOKE_WEBHOOK_SECRET.
|
|
118
|
-
command "Run" do
|
|
119
|
-
role "Operator"
|
|
120
|
-
goal "Dispatch a verb or a step list against a domain and keep what it reported"
|
|
121
|
-
|
|
122
|
-
attribute :run, OperationKey, sets: true
|
|
123
|
-
attribute :subject, Subject, optional: true, sets: true
|
|
124
|
-
attribute :script, Script, optional: true, sets: true
|
|
125
|
-
attribute :verb, Verb, optional: true, sets: true
|
|
126
|
-
attribute :arguments, list_of(Word), optional: true, sets: true
|
|
127
|
-
|
|
128
|
-
given("exactly one of a script and a verb is named: pass script= or verb=, not both") do
|
|
129
|
-
(script.set? && verb.unset?) || (script.unset? && verb.set?)
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
emits RunRequested
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
command "RefreshProjections" do
|
|
137
|
-
role "Operator"
|
|
138
|
-
goal "Bring every read-model projection of a domain up to date now"
|
|
139
|
-
|
|
140
|
-
attribute :run, OperationKey, sets: true
|
|
141
|
-
attribute :subject, Subject, sets: true
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
emits ProjectionsRefreshRequested
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
# Redelivers what a domain's outbox left behind. A row never claimed is always safe to redeliver. A
|
|
148
|
-
# row claimed before a crash and never settled may or may not have run its effect, so it is only
|
|
149
|
-
# named (on stderr, as at boot) unless `claimed.value=true` says the effect is known not to have run,
|
|
150
|
-
# for every claimed row, or `row.value=<delivery id>` says it for that one row alone.
|
|
151
|
-
command "RedriveOutbox" do
|
|
152
|
-
role "Operator"
|
|
153
|
-
goal "Redeliver the reactions a domain's outbox left undelivered, and name the claimed ones that stalled"
|
|
154
|
-
|
|
155
|
-
attribute :run, OperationKey, sets: true
|
|
156
|
-
attribute :subject, Subject, sets: true
|
|
157
|
-
attribute :claimed, Switch, optional: true, sets: true
|
|
158
|
-
attribute :row, RowId, optional: true, sets: true
|
|
159
|
-
|
|
160
|
-
given("one claimed row is named, or all of them are: pass row= or claimed=, not both") do
|
|
161
|
-
row.unset? || claimed.unset?
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
emits OutboxRedriveRequested
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# Settles one stalled claimed row as failed without running its effect, for a row whose effect is
|
|
169
|
-
# known to have landed or that nobody wants run. It never redelivers; `RedriveOutbox` does that.
|
|
170
|
-
command "AbandonOutboxRow" do
|
|
171
|
-
role "Operator"
|
|
172
|
-
goal "Settle one stalled outbox row as failed, naming it by its delivery id, without running it"
|
|
173
|
-
|
|
174
|
-
attribute :run, OperationKey
|
|
175
|
-
attribute :subject, Subject
|
|
176
|
-
attribute :row, RowId
|
|
177
|
-
|
|
178
|
-
sets :run
|
|
179
|
-
sets :subject
|
|
180
|
-
sets :row
|
|
181
|
-
|
|
182
|
-
emits OutboxRowAbandonRequested
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
command "RunBehaviors" do
|
|
186
|
-
role "Operator"
|
|
187
|
-
goal "Run a domain's behavior tests and keep the verdict"
|
|
188
|
-
|
|
189
|
-
attribute :run, OperationKey, sets: true
|
|
190
|
-
attribute :subject, Subject, sets: true
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
emits BehaviorsRequested
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
command "OpenConsole" do
|
|
197
|
-
role "Operator"
|
|
198
|
-
goal "Open an interactive console on a domain"
|
|
199
|
-
|
|
200
|
-
attribute :run, OperationKey, sets: true
|
|
201
|
-
attribute :subject, Subject, optional: true, sets: true
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
emits ConsoleRequested
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
command "SmokeTest" do
|
|
208
|
-
role "Operator"
|
|
209
|
-
goal "Dispatch one synthesized call per command and report of a wired domain"
|
|
210
|
-
|
|
211
|
-
attribute :run, OperationKey, sets: true
|
|
212
|
-
attribute :subject, Subject, optional: true, sets: true
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
emits SmokeTestRequested
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
command "SmokeHttp" do
|
|
219
|
-
role "Operator"
|
|
220
|
-
goal "Check that a running service refuses bad signatures and accepts a good one"
|
|
221
|
-
|
|
222
|
-
attribute :run, OperationKey, sets: true
|
|
223
|
-
attribute :url, Address, optional: true, sets: true
|
|
224
|
-
attribute :path, RoutePath, sets: true
|
|
225
|
-
attribute :header, HeaderName, optional: true, sets: true
|
|
226
|
-
attribute :scheme, Scheme, optional: true, sets: true
|
|
227
|
-
attribute :payload, Payload, optional: true, sets: true
|
|
228
|
-
attribute :payload_file, PayloadFile, optional: true, sets: true
|
|
229
|
-
attribute :health_path, RoutePath, optional: true, sets: true
|
|
230
|
-
attribute :state_path, RoutePath, optional: true, sets: true
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
emits SmokeHttpRequested
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
# `hecks operation.bootstrap_admin <domain> email=<email> [name=<name>] [role=<role>]`. A
|
|
237
|
-
# domain whose bluebook `provides "membership"` has nobody who may grant access until someone is
|
|
238
|
-
# granted it. This admits the person and grants them the role the grant command is gated to
|
|
239
|
-
# (or `role`), as a caller that names that role and binds no `actor_id`: Governance checks that
|
|
240
|
-
# caller by the role it states, which is how the first grant gets made (ADR 0025). It is
|
|
241
|
-
# refused once anyone holds the administrator role (`Admin`, or `Owner`), and the domain's
|
|
242
|
-
# persistence must be the one the service runs on (`DATABASE_URL`), not Memory.
|
|
243
|
-
command "BootstrapAdmin" do
|
|
244
|
-
role "Operator"
|
|
245
|
-
goal "Admit the first administrator of a domain's membership bluebook and grant them access"
|
|
246
|
-
|
|
247
|
-
attribute :run, OperationKey, sets: true
|
|
248
|
-
attribute :subject, Subject, sets: true
|
|
249
|
-
attribute :email, Email, sets: true
|
|
250
|
-
attribute :name, PersonName, optional: true, sets: true
|
|
251
|
-
attribute :role, RoleName, optional: true, sets: true
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
emits AdminBootstrapRequested
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
command "Succeed" do
|
|
258
|
-
role "System"
|
|
259
|
-
goal "Record that the operation ended well, and what it reported"
|
|
260
|
-
|
|
261
|
-
reference_to Operation
|
|
262
|
-
attribute :output, Output, sets: true
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
emits OperationSucceeded
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
command "Fail" do
|
|
269
|
-
role "System"
|
|
270
|
-
goal "Record that the operation was refused or found a problem, and what it said"
|
|
271
|
-
|
|
272
|
-
reference_to Operation
|
|
273
|
-
attribute :refusal, Output, sets: true
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
emits OperationFailed
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
query "Outcome" do
|
|
280
|
-
description "How one operation ended: its status, and what it reported or why it failed."
|
|
281
|
-
attribute :run, OperationKey
|
|
282
|
-
where(run: :run)
|
|
283
|
-
order_by :run
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
query "Failed" do
|
|
287
|
-
description "Every operation that was refused or found a problem."
|
|
288
|
-
where(status: "failed")
|
|
289
|
-
order_by :run
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
# A follow's answer: the count to pass back as `since`, the entries past it, and when it looked.
|
|
293
|
-
value_object "Tail" do
|
|
294
|
-
attribute :cursor, Integer
|
|
295
|
-
attribute :events, list_of(FollowedEvent)
|
|
296
|
-
attribute :taken_at, String
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
# One entry of a persisted event log; the payload is its JSON text, since a value object
|
|
300
|
-
# holds no free-form map.
|
|
301
|
-
value_object "FollowedEvent" do
|
|
302
|
-
attribute :name, String
|
|
303
|
-
attribute :aggregate, String
|
|
304
|
-
attribute :id, String
|
|
305
|
-
attribute :payload, String
|
|
306
|
-
attribute :occurred_at, String
|
|
307
|
-
end
|
|
308
|
-
|
|
309
|
-
# A launcher answers once, so a follow is a bounded poll: it answers the entries past `since`
|
|
310
|
-
# and a `cursor` to pass as the next `since`, waiting up to `wait` seconds for the first one.
|
|
311
|
-
# `hecks follow <domain> --stream` asks again from each cursor and prints every entry as it
|
|
312
|
-
# arrives, until interrupted (the world's `launcher` setting lists the question under `streams`).
|
|
313
|
-
query "Follow" do
|
|
314
|
-
description "A domain's persisted event log past a cursor, for tailing it call by call."
|
|
315
|
-
attribute :domain, Subject
|
|
316
|
-
attribute :aggregate, Verb, optional: true
|
|
317
|
-
attribute :since, Integer, optional: true
|
|
318
|
-
attribute :from_now, Boolean, optional: true
|
|
319
|
-
attribute :wait, Integer, optional: true
|
|
320
|
-
attribute :interval, Float, optional: true
|
|
321
|
-
returns Tail
|
|
322
|
-
end
|
|
323
|
-
end
|
|
324
|
-
|
|
325
|
-
policy "RunWhenRequested" do
|
|
326
|
-
on "Operation.RunRequested"
|
|
327
|
-
ask :execute, with: { run: :run }
|
|
328
|
-
end
|
|
329
|
-
|
|
330
|
-
policy "RefreshWhenRequested" do
|
|
331
|
-
on "Operation.ProjectionsRefreshRequested"
|
|
332
|
-
ask :refresh, with: { run: :run }
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
policy "RedriveWhenRequested" do
|
|
336
|
-
on "Operation.OutboxRedriveRequested"
|
|
337
|
-
ask :redrive, with: { run: :run }
|
|
338
|
-
end
|
|
339
|
-
|
|
340
|
-
policy "AbandonWhenRequested" do
|
|
341
|
-
on "Operation.OutboxRowAbandonRequested"
|
|
342
|
-
ask :abandon, with: { run: :run }
|
|
343
|
-
end
|
|
344
|
-
|
|
345
|
-
policy "VerifyWhenRequested" do
|
|
346
|
-
on "Operation.BehaviorsRequested"
|
|
347
|
-
ask :verify, with: { run: :run }
|
|
348
|
-
end
|
|
349
|
-
|
|
350
|
-
policy "SmokeWhenRequested" do
|
|
351
|
-
on "Operation.SmokeTestRequested"
|
|
352
|
-
ask :smoke, with: { run: :run }
|
|
353
|
-
end
|
|
354
|
-
|
|
355
|
-
policy "BootstrapWhenRequested" do
|
|
356
|
-
on "Operation.AdminBootstrapRequested"
|
|
357
|
-
ask :bootstrap, with: { run: :run }
|
|
358
|
-
end
|
|
359
|
-
|
|
360
|
-
policy "OpenWhenRequested" do
|
|
361
|
-
on "Operation.ConsoleRequested"
|
|
362
|
-
ask :open, with: { run: :run }
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
policy "ProbeWhenRequested" do
|
|
366
|
-
on "Operation.SmokeHttpRequested"
|
|
367
|
-
ask :probe, with: { run: :run }
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
policy "RecordTheOutput" do
|
|
371
|
-
on "Operation.OperationAnswered"
|
|
372
|
-
trigger Operation::Succeed, with: { output: :output }
|
|
373
|
-
end
|
|
374
|
-
|
|
375
|
-
policy "RecordTheFailure" do
|
|
376
|
-
on "Operation.OperationRefused"
|
|
377
|
-
trigger Operation::Fail, with: { refusal: :refusal }
|
|
378
|
-
end
|
|
379
|
-
|
|
380
|
-
aggregate "Host" do
|
|
381
|
-
description "A running rust/host, and the version and era it last reported."
|
|
382
|
-
|
|
383
|
-
attribute :host, Address
|
|
384
|
-
attribute :expected, ExpectedFile, optional: true
|
|
385
|
-
attribute :timeout, Seconds, optional: true
|
|
386
|
-
attribute :era, EraId, optional: true
|
|
387
|
-
attribute :version, VersionText, optional: true
|
|
388
|
-
attribute :report, Report, optional: true
|
|
389
|
-
attribute :refusal, Report, optional: true
|
|
390
|
-
identified_by :host
|
|
391
|
-
|
|
392
|
-
value_object "Address" do
|
|
393
|
-
attribute :value, String, matches: :http_scheme
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
# The file listing the eras that should be running, one per line.
|
|
397
|
-
value_object "ExpectedFile" do
|
|
398
|
-
attribute :value, String, matches: :not_empty
|
|
399
|
-
end
|
|
400
|
-
|
|
401
|
-
value_object "Seconds" do
|
|
402
|
-
attribute :value, Float
|
|
403
|
-
|
|
404
|
-
invariant("a timeout is positive") { value > 0 }
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
value_object "EraId" do
|
|
408
|
-
attribute :value, String, matches: :present
|
|
409
|
-
end
|
|
410
|
-
|
|
411
|
-
value_object "VersionText" do
|
|
412
|
-
attribute :value, String
|
|
413
|
-
end
|
|
414
|
-
|
|
415
|
-
value_object "Verdict" do
|
|
416
|
-
attribute :value, String, pattern: '^(match|unlisted|mismatch)$'
|
|
417
|
-
end
|
|
418
|
-
|
|
419
|
-
value_object "Report" do
|
|
420
|
-
attribute :value, String
|
|
421
|
-
end
|
|
422
|
-
|
|
423
|
-
lifecycle :status, default: "requested" do
|
|
424
|
-
mark :failure, "drifted", "unreachable"
|
|
425
|
-
transition "Recheck" => "requested", from: %w[observed drifted unreachable]
|
|
426
|
-
transition "Observe" => "observed", from: "requested"
|
|
427
|
-
transition "Drift" => "drifted", from: "requested"
|
|
428
|
-
transition "Lose" => "unreachable", from: "requested"
|
|
429
|
-
end
|
|
430
|
-
|
|
431
|
-
# `hecks check_era <url> expected=era-file [timeout=]` records the first check of a host under
|
|
432
|
-
# its URL. A host is one record, and a creating command cannot repeat an identity, so a later
|
|
433
|
-
# check of the same host is `hecks recheck <url> expected=era-file`. Both are read with
|
|
434
|
-
# `hecks standing <url>`.
|
|
435
|
-
command "CheckEra" do
|
|
436
|
-
role "Operator"
|
|
437
|
-
goal "Ask a running host which era it reports, and keep whether it is one that should be running"
|
|
438
|
-
|
|
439
|
-
attribute :host, Address, sets: true
|
|
440
|
-
attribute :expected, ExpectedFile
|
|
441
|
-
attribute :timeout, Seconds, default: 10
|
|
442
|
-
|
|
443
|
-
sets :expected
|
|
444
|
-
sets :timeout
|
|
445
|
-
|
|
446
|
-
emits EraCheckRequested
|
|
447
|
-
end
|
|
448
|
-
|
|
449
|
-
command "Recheck" do
|
|
450
|
-
role "Operator"
|
|
451
|
-
goal "Ask a host already checked which era it reports now"
|
|
452
|
-
|
|
453
|
-
reference_to Host
|
|
454
|
-
attribute :expected, ExpectedFile
|
|
455
|
-
attribute :timeout, Seconds, default: 10
|
|
456
|
-
|
|
457
|
-
sets :expected
|
|
458
|
-
sets :timeout
|
|
459
|
-
|
|
460
|
-
emits EraRecheckRequested
|
|
461
|
-
end
|
|
462
|
-
|
|
463
|
-
# The host reported an era the list accepts, or a list that names none.
|
|
464
|
-
command "Observe" do
|
|
465
|
-
role "System"
|
|
466
|
-
goal "Record the version and era a running host reported"
|
|
467
|
-
|
|
468
|
-
reference_to Host
|
|
469
|
-
attribute :era, EraId, sets: true
|
|
470
|
-
attribute :version, VersionText, sets: true
|
|
471
|
-
attribute :report, Report, sets: true
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
emits EraObserved
|
|
475
|
-
end
|
|
476
|
-
|
|
477
|
-
# The host reported an era that is not on the list: the finding the roll must stop on.
|
|
478
|
-
command "Drift" do
|
|
479
|
-
role "System"
|
|
480
|
-
goal "Record that a running host reports an era that should not be running"
|
|
481
|
-
|
|
482
|
-
reference_to Host
|
|
483
|
-
attribute :era, EraId, sets: true
|
|
484
|
-
attribute :version, VersionText, sets: true
|
|
485
|
-
attribute :report, Report, sets: true
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
emits EraDrifted
|
|
489
|
-
end
|
|
490
|
-
|
|
491
|
-
command "Lose" do
|
|
492
|
-
role "System"
|
|
493
|
-
goal "Record that the host could not be reached, or answered no era, and what was said"
|
|
494
|
-
|
|
495
|
-
reference_to Host
|
|
496
|
-
attribute :refusal, Report, sets: true
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
emits HostLost
|
|
500
|
-
end
|
|
501
|
-
|
|
502
|
-
query "Standing" do
|
|
503
|
-
description "What one check of a host found: its status, era and version, or why it failed."
|
|
504
|
-
attribute :host, Address
|
|
505
|
-
where(host: :host)
|
|
506
|
-
order_by :host
|
|
507
|
-
end
|
|
508
|
-
|
|
509
|
-
query "Drifted" do
|
|
510
|
-
description "Every host that reported an era that should not be running."
|
|
511
|
-
where(status: "drifted")
|
|
512
|
-
order_by :host
|
|
513
|
-
end
|
|
514
|
-
end
|
|
515
|
-
|
|
516
|
-
policy "FetchWhenChecked" do
|
|
517
|
-
on "Host.EraCheckRequested"
|
|
518
|
-
ask :fetch, with: { host: :host }
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
policy "FetchWhenRechecked" do
|
|
522
|
-
on "Host.EraRecheckRequested"
|
|
523
|
-
ask :fetch, with: { host: :host }
|
|
524
|
-
end
|
|
525
|
-
|
|
526
|
-
policy "RecordTheEra" do
|
|
527
|
-
on "Host.EraReported"
|
|
528
|
-
where { verdict.value != "mismatch" }
|
|
529
|
-
trigger Host::Observe, with: { era: :era, version: :version, report: :report }
|
|
530
|
-
end
|
|
531
|
-
|
|
532
|
-
policy "RecordTheDrift" do
|
|
533
|
-
on "Host.EraReported"
|
|
534
|
-
where { verdict.value == "mismatch" }
|
|
535
|
-
trigger Host::Drift, with: { era: :era, version: :version, report: :report }
|
|
536
|
-
end
|
|
537
|
-
|
|
538
|
-
policy "RecordTheLostHost" do
|
|
539
|
-
on "Host.HostRefused"
|
|
540
|
-
trigger Host::Lose, with: { refusal: :refusal }
|
|
541
|
-
end
|
|
542
|
-
|
|
543
|
-
# Many agents finish together and each would push, running every pre-push check at once. A
|
|
544
|
-
# boarding waits its turn behind the push in flight from the same repository, then pushes the
|
|
545
|
-
# local branch with whatever else has landed on it, or finds an earlier push already carried it.
|
|
546
|
-
aggregate "PushTrain" do
|
|
547
|
-
description "One push of a checkout's branch, taken in turn: carried by an earlier push, pushed, or refused."
|
|
548
|
-
|
|
549
|
-
attribute :run, RunKey
|
|
550
|
-
attribute :branch, Word, optional: true
|
|
551
|
-
attribute :remote, Word, optional: true
|
|
552
|
-
attribute :checkout, Word, optional: true
|
|
553
|
-
attribute :full_gate, Switch, optional: true
|
|
554
|
-
attribute :boarded, Word, optional: true
|
|
555
|
-
attribute :pushed, Word, optional: true
|
|
556
|
-
attribute :report, Report, optional: true
|
|
557
|
-
attribute :refusal, Report, optional: true
|
|
558
|
-
identified_by :run
|
|
559
|
-
|
|
560
|
-
value_object "RunKey" do
|
|
561
|
-
attribute :value, String, matches: :present
|
|
562
|
-
end
|
|
563
|
-
|
|
564
|
-
# A branch, a remote, a directory or a commit.
|
|
565
|
-
value_object "Word" do
|
|
566
|
-
attribute :value, String, matches: :present
|
|
567
|
-
end
|
|
568
|
-
|
|
569
|
-
value_object "Report" do
|
|
570
|
-
attribute :value, String
|
|
571
|
-
end
|
|
572
|
-
|
|
573
|
-
value_object "Switch" do
|
|
574
|
-
attribute :value, Boolean
|
|
575
|
-
end
|
|
576
|
-
|
|
577
|
-
lifecycle :status, default: "requested" do
|
|
578
|
-
mark :failure, "faulted"
|
|
579
|
-
transition "Push" => "pushed", from: "requested"
|
|
580
|
-
transition "Ride" => "carried", from: "requested"
|
|
581
|
-
transition "Fault" => "faulted", from: "requested"
|
|
582
|
-
transition "Summarize" => "surveyed", from: "requested"
|
|
583
|
-
mark :terminal, "carried", "faulted", "pushed", "surveyed"
|
|
584
|
-
end
|
|
585
|
-
|
|
586
|
-
command "Board" do
|
|
587
|
-
role "Operator"
|
|
588
|
-
goal "Push this checkout's branch once the push ahead of it lands, unless that push already carried it"
|
|
589
|
-
|
|
590
|
-
attribute :run, RunKey, sets: true
|
|
591
|
-
attribute :branch, Word, default: "main", sets: true
|
|
592
|
-
attribute :remote, Word, default: "origin", sets: true
|
|
593
|
-
attribute :checkout, Word, optional: true, sets: true
|
|
594
|
-
# Run the whole `pre_push` stage, the suite included, which also writes the CI attestation
|
|
595
|
-
# note; without it the push runs only the `unguarded_push` stage.
|
|
596
|
-
attribute :full_gate, Switch, optional: true, sets: true
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
emits BoardingRequested
|
|
600
|
-
end
|
|
601
|
-
|
|
602
|
-
# A survey pushes nothing: it lists every checkout under a directory (`checkout`) whose branch
|
|
603
|
-
# has commits its remote does not, so what waits to board is known before anything boards.
|
|
604
|
-
command "Survey" do
|
|
605
|
-
role "Operator"
|
|
606
|
-
goal "List every checkout under a directory whose branch has commits its remote does not"
|
|
607
|
-
|
|
608
|
-
attribute :run, RunKey, sets: true
|
|
609
|
-
attribute :remote, Word, default: "origin", sets: true
|
|
610
|
-
attribute :checkout, Word, optional: true, sets: true
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
emits SurveyRequested
|
|
614
|
-
end
|
|
615
|
-
|
|
616
|
-
command "Summarize" do
|
|
617
|
-
role "System"
|
|
618
|
-
goal "Record what a survey found waiting to push"
|
|
619
|
-
|
|
620
|
-
reference_to PushTrain
|
|
621
|
-
attribute :report, Report, sets: true
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
emits CheckoutsSurveyed
|
|
625
|
-
end
|
|
626
|
-
|
|
627
|
-
# The branch was pushed: every commit on it reached the remote, what this boarding carried and
|
|
628
|
-
# whatever landed on it while it waited.
|
|
629
|
-
command "Push" do
|
|
630
|
-
role "System"
|
|
631
|
-
goal "Record the commit a boarding pushed"
|
|
632
|
-
|
|
633
|
-
reference_to PushTrain
|
|
634
|
-
attribute :checkout, Word, sets: true
|
|
635
|
-
attribute :boarded, Word, sets: true
|
|
636
|
-
attribute :pushed, Word, sets: true
|
|
637
|
-
attribute :report, Report, sets: true
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
emits BranchPushed
|
|
641
|
-
end
|
|
642
|
-
|
|
643
|
-
# An earlier push already took the boarded commit to the remote, so this one pushed nothing.
|
|
644
|
-
command "Ride" do
|
|
645
|
-
role "System"
|
|
646
|
-
goal "Record that an earlier push already carried the boarded commit"
|
|
647
|
-
|
|
648
|
-
reference_to PushTrain
|
|
649
|
-
attribute :checkout, Word, sets: true
|
|
650
|
-
attribute :boarded, Word, sets: true
|
|
651
|
-
attribute :report, Report, sets: true
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
emits CarriedByEarlierPush
|
|
655
|
-
end
|
|
656
|
-
|
|
657
|
-
command "Fault" do
|
|
658
|
-
role "System"
|
|
659
|
-
goal "Record why a boarding could not push"
|
|
660
|
-
|
|
661
|
-
reference_to PushTrain
|
|
662
|
-
attribute :refusal, Report, sets: true
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
emits PushFaulted
|
|
666
|
-
end
|
|
667
|
-
|
|
668
|
-
query "Outcome" do
|
|
669
|
-
description "How one boarding ended: pushed, carried by an earlier push, or why it failed."
|
|
670
|
-
attribute :run, RunKey
|
|
671
|
-
where(run: :run)
|
|
672
|
-
order_by :run
|
|
673
|
-
end
|
|
674
|
-
end
|
|
675
|
-
|
|
676
|
-
policy "CarryWhenBoarded" do
|
|
677
|
-
on "PushTrain.BoardingRequested"
|
|
678
|
-
ask :carry, with: { run: :run }
|
|
679
|
-
end
|
|
680
|
-
|
|
681
|
-
policy "RecordThePush" do
|
|
682
|
-
on "PushTrain.TrainAnswered"
|
|
683
|
-
where { outcome.value == "pushed" }
|
|
684
|
-
trigger PushTrain::Push, with: { checkout: :checkout, boarded: :boarded, pushed: :pushed, report: :report }
|
|
685
|
-
end
|
|
686
|
-
|
|
687
|
-
policy "RecordTheRide" do
|
|
688
|
-
on "PushTrain.TrainAnswered"
|
|
689
|
-
where { outcome.value == "carried" }
|
|
690
|
-
trigger PushTrain::Ride, with: { checkout: :checkout, boarded: :boarded, report: :report }
|
|
691
|
-
end
|
|
692
|
-
|
|
693
|
-
policy "RecordTheRefusedPush" do
|
|
694
|
-
on "PushTrain.TrainRefused"
|
|
695
|
-
trigger PushTrain::Fault, with: { refusal: :refusal }
|
|
696
|
-
end
|
|
697
|
-
|
|
698
|
-
policy "SurveyWhenAsked" do
|
|
699
|
-
on "PushTrain.SurveyRequested"
|
|
700
|
-
ask :tally, with: { run: :run }
|
|
701
|
-
end
|
|
702
|
-
|
|
703
|
-
policy "RecordTheSurvey" do
|
|
704
|
-
on "PushTrain.SurveyAnswered"
|
|
705
|
-
trigger PushTrain::Summarize, with: { report: :report }
|
|
706
|
-
end
|
|
707
|
-
|
|
708
|
-
policy "RecordTheRefusedSurvey" do
|
|
709
|
-
on "PushTrain.SurveyRefused"
|
|
710
|
-
trigger PushTrain::Fault, with: { refusal: :refusal }
|
|
711
|
-
end
|
|
712
|
-
|
|
713
|
-
# Deploys stay by hand: a push that reached the remote says a deploy is ready, and nothing more.
|
|
714
|
-
policy "AnnounceWhenPushed" do
|
|
715
|
-
on "PushTrain.BranchPushed"
|
|
716
|
-
ask :announce, with: { run: :run }
|
|
717
|
-
end
|
|
718
|
-
|
|
719
|
-
# A checkout's state, read and never written: nothing needs a raw `git status`, `git diff` or
|
|
720
|
-
# `git log`. The `Reading` port's adapter answers each query; the aggregate keeps no record.
|
|
721
|
-
aggregate "Checkout" do
|
|
722
|
-
description "A look at a checkout: its branch, what it changed and what it committed."
|
|
723
|
-
|
|
724
|
-
attribute :checkout, Place
|
|
725
|
-
identified_by :checkout
|
|
726
|
-
|
|
727
|
-
# A directory inside the repository; the current directory when a query names none.
|
|
728
|
-
value_object "Place" do
|
|
729
|
-
attribute :value, String, matches: :present
|
|
730
|
-
end
|
|
731
|
-
|
|
732
|
-
value_object "Word" do
|
|
733
|
-
attribute :value, String, matches: :present
|
|
734
|
-
end
|
|
735
|
-
|
|
736
|
-
value_object "Document" do
|
|
737
|
-
attribute :text, String
|
|
738
|
-
end
|
|
739
|
-
|
|
740
|
-
query "Status" do
|
|
741
|
-
description "The checkout's branch, whether it is a linked worktree, where it stands against main and origin/main, and what is changed or untracked."
|
|
742
|
-
attribute :checkout, Place, optional: true
|
|
743
|
-
returns Document
|
|
744
|
-
end
|
|
745
|
-
|
|
746
|
-
query "Changes" do
|
|
747
|
-
description "What the checkout changed since a ref (main by default): the diffstat, or the paths alone."
|
|
748
|
-
attribute :checkout, Place, optional: true
|
|
749
|
-
attribute :since, Word, optional: true
|
|
750
|
-
attribute :names_only, Boolean, optional: true
|
|
751
|
-
returns Document
|
|
752
|
-
end
|
|
753
|
-
|
|
754
|
-
query "Log" do
|
|
755
|
-
description "The commits in a range, newest first (the last 20 when none is named)."
|
|
756
|
-
attribute :checkout, Place, optional: true
|
|
757
|
-
attribute :range, Word, optional: true
|
|
758
|
-
returns Document
|
|
759
|
-
end
|
|
760
|
-
|
|
761
|
-
query "Settings" do
|
|
762
|
-
description "What this copy resolves for each setting that can come from a variable, its own world or a default, and which one supplied it."
|
|
763
|
-
attribute :domain, Place, optional: true
|
|
764
|
-
returns Document
|
|
765
|
-
end
|
|
766
|
-
end
|
|
767
|
-
|
|
768
|
-
# Agents merge straight to local main and clean up what they merged. A landing merges a worktree's
|
|
769
|
-
# branch onto main, fast-forward first and as a merge commit when main moved; a conflict is
|
|
770
|
-
# reported and never settled, and nothing is forced or pushed. A retirement removes the worktree
|
|
771
|
-
# and its branch once the branch is on main, and refuses while it holds uncommitted work or
|
|
772
|
-
# commits main lacks, so no unpushed work is deleted.
|
|
773
|
-
aggregate "Landing" do
|
|
774
|
-
description "One branch landed on local main, or one worktree retired: done, or refused with the reason."
|
|
775
|
-
|
|
776
|
-
attribute :run, RunKey
|
|
777
|
-
attribute :checkout, Word, optional: true
|
|
778
|
-
attribute :branch, Word, optional: true
|
|
779
|
-
attribute :onto, Word, optional: true
|
|
780
|
-
attribute :landed, Word, optional: true
|
|
781
|
-
attribute :report, Report, optional: true
|
|
782
|
-
attribute :refusal, Report, optional: true
|
|
783
|
-
identified_by :run
|
|
784
|
-
|
|
785
|
-
value_object "RunKey" do
|
|
786
|
-
attribute :value, String, matches: :present
|
|
787
|
-
end
|
|
788
|
-
|
|
789
|
-
# A branch, a directory or a commit.
|
|
790
|
-
value_object "Word" do
|
|
791
|
-
attribute :value, String, matches: :present
|
|
792
|
-
end
|
|
793
|
-
|
|
794
|
-
value_object "Report" do
|
|
795
|
-
attribute :value, String
|
|
796
|
-
end
|
|
797
|
-
|
|
798
|
-
value_object "Document" do
|
|
799
|
-
attribute :text, String
|
|
800
|
-
end
|
|
801
|
-
|
|
802
|
-
lifecycle :status, default: "requested" do
|
|
803
|
-
mark :failure, "refused"
|
|
804
|
-
transition "Record" => "landed", from: "requested"
|
|
805
|
-
transition "Clear" => "retired", from: "requested"
|
|
806
|
-
transition "Refuse" => "refused", from: "requested"
|
|
807
|
-
transition "Decline" => "refused", from: "requested"
|
|
808
|
-
mark :terminal, "landed", "refused", "retired"
|
|
809
|
-
end
|
|
810
|
-
|
|
811
|
-
command "Land" do
|
|
812
|
-
role "Operator"
|
|
813
|
-
goal "Merge a worktree's branch onto local main: fast-forward when it can be, a merge commit when main moved, never forced, never pushed"
|
|
814
|
-
|
|
815
|
-
attribute :run, RunKey, sets: true
|
|
816
|
-
attribute :checkout, Word, optional: true, sets: true
|
|
817
|
-
attribute :branch, Word, optional: true, sets: true
|
|
818
|
-
attribute :onto, Word, default: "main", sets: true
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
emits LandingRequested
|
|
822
|
-
end
|
|
823
|
-
|
|
824
|
-
command "Record" do
|
|
825
|
-
role "System"
|
|
826
|
-
goal "Record the commit main names once the branch is on it"
|
|
827
|
-
|
|
828
|
-
reference_to Landing
|
|
829
|
-
attribute :branch, Word, sets: true
|
|
830
|
-
attribute :landed, Word, sets: true
|
|
831
|
-
attribute :report, Report, sets: true
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
emits BranchLanded
|
|
835
|
-
end
|
|
836
|
-
|
|
837
|
-
command "Refuse" do
|
|
838
|
-
role "System"
|
|
839
|
-
goal "Record why a branch could not be landed"
|
|
840
|
-
|
|
841
|
-
reference_to Landing
|
|
842
|
-
attribute :refusal, Report, sets: true
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
emits LandingRefused
|
|
846
|
-
end
|
|
847
|
-
|
|
848
|
-
command "Retire" do
|
|
849
|
-
role "Operator"
|
|
850
|
-
goal "Remove a merged worktree and delete its branch, unless it holds uncommitted work or commits main lacks"
|
|
851
|
-
|
|
852
|
-
attribute :run, RunKey, sets: true
|
|
853
|
-
attribute :checkout, Word, optional: true, sets: true
|
|
854
|
-
attribute :branch, Word, optional: true, sets: true
|
|
855
|
-
attribute :onto, Word, default: "main", sets: true
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
emits RetirementRequested
|
|
859
|
-
end
|
|
860
|
-
|
|
861
|
-
command "Clear" do
|
|
862
|
-
role "System"
|
|
863
|
-
goal "Record that the worktree and its branch are gone"
|
|
864
|
-
|
|
865
|
-
reference_to Landing
|
|
866
|
-
attribute :branch, Word, sets: true
|
|
867
|
-
attribute :report, Report, sets: true
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
emits WorktreeRetired
|
|
871
|
-
end
|
|
872
|
-
|
|
873
|
-
command "Decline" do
|
|
874
|
-
role "System"
|
|
875
|
-
goal "Record why a worktree was kept"
|
|
876
|
-
|
|
877
|
-
reference_to Landing
|
|
878
|
-
attribute :refusal, Report, sets: true
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
emits RetirementDeclined
|
|
882
|
-
end
|
|
883
|
-
|
|
884
|
-
query "Outcome" do
|
|
885
|
-
description "How one landing or retirement ended: the commit main names, or why it was refused."
|
|
886
|
-
attribute :run, RunKey
|
|
887
|
-
where(run: :run)
|
|
888
|
-
order_by :run
|
|
889
|
-
end
|
|
890
|
-
|
|
891
|
-
query "Unlanded" do
|
|
892
|
-
description "Every branch with commits that are not on main, or with uncommitted work, and where its worktree is."
|
|
893
|
-
attribute :checkout, Word, optional: true
|
|
894
|
-
attribute :onto, Word, optional: true
|
|
895
|
-
returns Document
|
|
896
|
-
end
|
|
897
|
-
end
|
|
898
|
-
|
|
899
|
-
policy "MergeWhenLanding" do
|
|
900
|
-
on "Landing.LandingRequested"
|
|
901
|
-
ask :merge, with: { run: :run }
|
|
902
|
-
end
|
|
903
|
-
|
|
904
|
-
policy "RecordTheLanding" do
|
|
905
|
-
on "Landing.MergeAnswered"
|
|
906
|
-
trigger Landing::Record, with: { branch: :branch, landed: :landed, report: :report }
|
|
907
|
-
end
|
|
908
|
-
|
|
909
|
-
policy "RecordTheRefusedLanding" do
|
|
910
|
-
on "Landing.MergeRefused"
|
|
911
|
-
trigger Landing::Refuse, with: { refusal: :refusal }
|
|
912
|
-
end
|
|
913
|
-
|
|
914
|
-
policy "RemoveWhenRetiring" do
|
|
915
|
-
on "Landing.RetirementRequested"
|
|
916
|
-
ask :remove, with: { run: :run }
|
|
917
|
-
end
|
|
918
|
-
|
|
919
|
-
policy "RecordTheRetirement" do
|
|
920
|
-
on "Landing.RemovalAnswered"
|
|
921
|
-
trigger Landing::Clear, with: { branch: :branch, report: :report }
|
|
922
|
-
end
|
|
923
|
-
|
|
924
|
-
policy "RecordTheKeptWorktree" do
|
|
925
|
-
on "Landing.RemovalRefused"
|
|
926
|
-
trigger Landing::Decline, with: { refusal: :refusal }
|
|
927
|
-
end
|
|
928
|
-
|
|
929
|
-
# The copy of Hecks that runs the train follows what it pushed, so the next boarding and the
|
|
930
|
-
# records it keeps run the code that landed, not the code that was there when it was set up.
|
|
931
|
-
policy "KeepTheLauncherCurrent" do
|
|
932
|
-
on "PushTrain.BranchPushed"
|
|
933
|
-
ask :refresh, with: { run: :run }
|
|
934
|
-
end
|
|
935
|
-
|
|
936
|
-
aggregate "Era" do
|
|
937
|
-
description "One change to a domain's journal of eras, and how it ended: a store's upkeep."
|
|
938
|
-
|
|
939
|
-
acknowledges :key_by_value, "the domain's path, and Introspection declares queries only, so it holds no records and a reference would be refused on every write",
|
|
940
|
-
of: :domain
|
|
941
|
-
|
|
942
|
-
attribute :run, RunKey
|
|
943
|
-
attribute :domain, DomainPath
|
|
944
|
-
attribute :operation, OperationName, optional: true
|
|
945
|
-
attribute :winners, WinnerList, optional: true
|
|
946
|
-
attribute :era, Ordinal, optional: true
|
|
947
|
-
attribute :aggregates, AggregateList, optional: true
|
|
948
|
-
attribute :confirm, Switch, optional: true
|
|
949
|
-
attribute :capable, Switch, optional: true
|
|
950
|
-
attribute :held, Count, optional: true
|
|
951
|
-
attribute :forks, Count, optional: true
|
|
952
|
-
attribute :contested, Count, optional: true
|
|
953
|
-
attribute :bound, Count, optional: true
|
|
954
|
-
attribute :candidates, Count, optional: true
|
|
955
|
-
attribute :drifted, Switch, optional: true
|
|
956
|
-
attribute :loadable, Switch, optional: true
|
|
957
|
-
attribute :shape_kept, Switch, optional: true
|
|
958
|
-
attribute :report, Report, optional: true
|
|
959
|
-
attribute :refusal, Report, optional: true
|
|
960
|
-
identified_by :run
|
|
961
|
-
|
|
962
|
-
value_object "RunKey" do
|
|
963
|
-
attribute :value, String, matches: :present
|
|
964
|
-
|
|
965
|
-
invariant("a change is named") { !value.to_s.empty? }
|
|
966
|
-
end
|
|
967
|
-
|
|
968
|
-
# The domain whose journal is changed: its directory.
|
|
969
|
-
value_object "DomainPath" do
|
|
970
|
-
attribute :value, String, matches: :not_empty
|
|
971
|
-
end
|
|
972
|
-
|
|
973
|
-
value_object "OperationName" do
|
|
974
|
-
attribute :value, String,
|
|
975
|
-
pattern: '^(hold_first|merge_tail|reattest|backfill_projections|compact|compact_heki)$'
|
|
976
|
-
end
|
|
977
|
-
|
|
978
|
-
# `id:old,id:new`: which world's record wins for each id both worlds touched since the cut.
|
|
979
|
-
value_object "WinnerList" do
|
|
980
|
-
attribute :value, String, pattern: '^[^ \t\n\r,]+:(old|new)(,[^ \t\n\r,]+:(old|new))*$'
|
|
981
|
-
end
|
|
982
|
-
|
|
983
|
-
value_object "Ordinal" do
|
|
984
|
-
attribute :value, Integer
|
|
985
|
-
|
|
986
|
-
invariant("an era is counted from one") { value > 0 }
|
|
987
|
-
end
|
|
988
|
-
|
|
989
|
-
# Aggregate names, comma separated; every aggregate that keeps a journal when absent.
|
|
990
|
-
value_object "AggregateList" do
|
|
991
|
-
attribute :value, String, matches: :not_empty
|
|
992
|
-
end
|
|
993
|
-
|
|
994
|
-
value_object "Switch" do
|
|
995
|
-
attribute :value, Boolean
|
|
996
|
-
end
|
|
997
|
-
|
|
998
|
-
value_object "Count" do
|
|
999
|
-
attribute :value, Integer
|
|
1000
|
-
end
|
|
1001
|
-
|
|
1002
|
-
value_object "Report" do
|
|
1003
|
-
attribute :value, String
|
|
1004
|
-
end
|
|
1005
|
-
|
|
1006
|
-
lifecycle :status, default: "requested" do
|
|
1007
|
-
mark :failure, "refused"
|
|
1008
|
-
transition "Permit" => "admitted", from: "requested"
|
|
1009
|
-
transition "Settle" => "settled", from: "admitted"
|
|
1010
|
-
transition "Abandon" => "refused", from: %w[requested admitted]
|
|
1011
|
-
mark :terminal, "refused", "settled"
|
|
1012
|
-
end
|
|
1013
|
-
|
|
1014
|
-
# The seven requests. Each records what was asked and names its operation; the journal store
|
|
1015
|
-
# then examines the domain and reports facts (`EraExamined`), `Permit` holds the rules that need
|
|
1016
|
-
# those facts, and only an admitted change is made (`EraChanged`). A change that changes
|
|
1017
|
-
# something needs an explicit `--confirm`.
|
|
1018
|
-
command "HoldFirst" do
|
|
1019
|
-
role "Operator"
|
|
1020
|
-
goal "Hold the first era of a domain that holds none, as its first boot would"
|
|
1021
|
-
|
|
1022
|
-
attribute :domain, DomainPath, sets: true
|
|
1023
|
-
attribute :run, RunKey, sets: true
|
|
1024
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1025
|
-
|
|
1026
|
-
given("holding the first era is confirmed") { confirm.value == true }
|
|
1027
|
-
|
|
1028
|
-
sets :operation, to: "hold_first"
|
|
1029
|
-
|
|
1030
|
-
emits FirstEraRequested
|
|
1031
|
-
end
|
|
1032
|
-
|
|
1033
|
-
command "MergeTail" do
|
|
1034
|
-
role "Operator"
|
|
1035
|
-
goal "Interleave the old world's writes since the cut into the live head, by their ordinals"
|
|
1036
|
-
|
|
1037
|
-
attribute :domain, DomainPath, sets: true
|
|
1038
|
-
attribute :run, RunKey, sets: true
|
|
1039
|
-
attribute :winners, WinnerList, optional: true, sets: true
|
|
1040
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1041
|
-
|
|
1042
|
-
given("the merge is confirmed") { confirm.value == true }
|
|
1043
|
-
|
|
1044
|
-
sets :operation, to: "merge_tail"
|
|
1045
|
-
|
|
1046
|
-
emits TailMergeRequested
|
|
1047
|
-
end
|
|
1048
|
-
|
|
1049
|
-
command "Reattest" do
|
|
1050
|
-
role "Operator"
|
|
1051
|
-
goal "Freeze an era's held text as it now stands, after a person has read it"
|
|
1052
|
-
|
|
1053
|
-
attribute :domain, DomainPath, sets: true
|
|
1054
|
-
attribute :era, Ordinal, sets: true
|
|
1055
|
-
attribute :run, RunKey, sets: true
|
|
1056
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1057
|
-
|
|
1058
|
-
given("the text is accepted as the era's own") { confirm.value == true }
|
|
1059
|
-
|
|
1060
|
-
sets :operation, to: "reattest"
|
|
1061
|
-
|
|
1062
|
-
emits ReattestRequested
|
|
1063
|
-
end
|
|
1064
|
-
|
|
1065
|
-
command "BackfillProjections" do
|
|
1066
|
-
role "Operator"
|
|
1067
|
-
goal "Store the shape every held era froze with, for the eras that predate it"
|
|
1068
|
-
|
|
1069
|
-
attribute :domain, DomainPath, sets: true
|
|
1070
|
-
attribute :run, RunKey, sets: true
|
|
1071
|
-
|
|
1072
|
-
sets :operation, to: "backfill_projections"
|
|
1073
|
-
|
|
1074
|
-
emits BackfillRequested
|
|
1075
|
-
end
|
|
1076
|
-
|
|
1077
|
-
command "Compact" do
|
|
1078
|
-
role "Operator"
|
|
1079
|
-
goal "Delete the journal entries a Postgres or Sqlite aggregate has already projected"
|
|
1080
|
-
|
|
1081
|
-
attribute :domain, DomainPath, sets: true
|
|
1082
|
-
attribute :aggregates, AggregateList, optional: true, sets: true
|
|
1083
|
-
attribute :run, RunKey, sets: true
|
|
1084
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1085
|
-
|
|
1086
|
-
given("the compaction is confirmed") { confirm.value == true }
|
|
1087
|
-
|
|
1088
|
-
sets :operation, to: "compact"
|
|
1089
|
-
|
|
1090
|
-
emits CompactionRequested
|
|
1091
|
-
end
|
|
1092
|
-
|
|
1093
|
-
command "CompactHeki" do
|
|
1094
|
-
role "Operator"
|
|
1095
|
-
goal "Empty a Heki aggregate's journal, keeping the snapshot"
|
|
1096
|
-
|
|
1097
|
-
attribute :domain, DomainPath, sets: true
|
|
1098
|
-
attribute :aggregates, AggregateList, optional: true, sets: true
|
|
1099
|
-
attribute :run, RunKey, sets: true
|
|
1100
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1101
|
-
|
|
1102
|
-
given("the compaction is confirmed") { confirm.value == true }
|
|
1103
|
-
|
|
1104
|
-
sets :operation, to: "compact_heki"
|
|
1105
|
-
|
|
1106
|
-
emits HekiCompactionRequested
|
|
1107
|
-
end
|
|
1108
|
-
|
|
1109
|
-
# The facts the journal store reported, held against the change that was asked for.
|
|
1110
|
-
command "Permit" do
|
|
1111
|
-
role "System"
|
|
1112
|
-
goal "Let a change through only when what was found in the journal allows it"
|
|
1113
|
-
|
|
1114
|
-
reference_to Era
|
|
1115
|
-
attribute :capable, Switch, sets: true
|
|
1116
|
-
attribute :held, Count, sets: true
|
|
1117
|
-
attribute :forks, Count, sets: true
|
|
1118
|
-
attribute :contested, Count, sets: true
|
|
1119
|
-
attribute :bound, Count, sets: true
|
|
1120
|
-
attribute :candidates, Count, sets: true
|
|
1121
|
-
attribute :drifted, Switch, sets: true
|
|
1122
|
-
attribute :loadable, Switch, sets: true
|
|
1123
|
-
attribute :shape_kept, Switch, sets: true
|
|
1124
|
-
attribute :operation, OperationName, sets: true
|
|
1125
|
-
|
|
1126
|
-
given("the store keeps eras") do
|
|
1127
|
-
capable.value || operation.value == "compact" || operation.value == "compact_heki"
|
|
1128
|
-
end
|
|
1129
|
-
given("no era is held yet") { operation.value != "hold_first" || held.value == 0 }
|
|
1130
|
-
given("an era beyond the first stands before a tail is merged") do
|
|
1131
|
-
operation.value != "merge_tail" || held.value > 1
|
|
1132
|
-
end
|
|
1133
|
-
given("exactly one edge leaves each era") { operation.value != "merge_tail" || forks.value == 0 }
|
|
1134
|
-
given("every record both worlds touched has a named winner") do
|
|
1135
|
-
operation.value != "merge_tail" || contested.value == 0
|
|
1136
|
-
end
|
|
1137
|
-
given("an aggregate matches") do
|
|
1138
|
-
(operation.value != "compact" && operation.value != "compact_heki") || candidates.value > 0
|
|
1139
|
-
end
|
|
1140
|
-
given("no projection reads the journal that would be emptied") do
|
|
1141
|
-
(operation.value != "compact" && operation.value != "compact_heki") || bound.value == 0
|
|
1142
|
-
end
|
|
1143
|
-
given("the held text no longer matches its digest: there is nothing to re-attest") do
|
|
1144
|
-
operation.value != "reattest" || drifted.value
|
|
1145
|
-
end
|
|
1146
|
-
given("the edited text loads as a bluebook: restore a loadable text") do
|
|
1147
|
-
operation.value != "reattest" || loadable.value
|
|
1148
|
-
end
|
|
1149
|
-
given("the edit kept the era's shape, not just its text: restore a text with the original shape") do
|
|
1150
|
-
operation.value != "reattest" || shape_kept.value
|
|
1151
|
-
end
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
emits EraPermitted
|
|
1155
|
-
end
|
|
1156
|
-
|
|
1157
|
-
command "Settle" do
|
|
1158
|
-
role "System"
|
|
1159
|
-
goal "Record that the admitted change was made, and what it did"
|
|
1160
|
-
|
|
1161
|
-
reference_to Era
|
|
1162
|
-
attribute :report, Report, sets: true
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
emits EraSettled
|
|
1166
|
-
end
|
|
1167
|
-
|
|
1168
|
-
command "Abandon" do
|
|
1169
|
-
role "System"
|
|
1170
|
-
goal "Record that the change was refused, or could not be made, and why"
|
|
1171
|
-
|
|
1172
|
-
reference_to Era
|
|
1173
|
-
attribute :refusal, Report, sets: true
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
emits EraAbandoned
|
|
1177
|
-
end
|
|
1178
|
-
|
|
1179
|
-
query "Settlement" do
|
|
1180
|
-
description "What one change did: its status, and the report or the reason it was refused."
|
|
1181
|
-
attribute :run, RunKey
|
|
1182
|
-
where(run: :run)
|
|
1183
|
-
order_by :run
|
|
1184
|
-
end
|
|
1185
|
-
|
|
1186
|
-
query "Abandoned" do
|
|
1187
|
-
description "Every change that was refused or could not be made."
|
|
1188
|
-
where(status: "refused")
|
|
1189
|
-
order_by :run
|
|
1190
|
-
end
|
|
1191
|
-
|
|
1192
|
-
# An answer that is one document of text, exactly as the tool that produced it wrote it.
|
|
1193
|
-
value_object "Document" do
|
|
1194
|
-
attribute :text, String
|
|
1195
|
-
end
|
|
1196
|
-
|
|
1197
|
-
# The reads that used to write. None holds an era or names one: a domain that holds no era
|
|
1198
|
-
# answers "no era held yet", and `hold_first` is the only thing that holds the first.
|
|
1199
|
-
query "ScaffoldTranslation" do
|
|
1200
|
-
description "The edge file that would lead the latest held era to the current shape."
|
|
1201
|
-
attribute :domain, DomainPath
|
|
1202
|
-
returns Document
|
|
1203
|
-
end
|
|
1204
|
-
|
|
1205
|
-
query "AuditTranslation" do
|
|
1206
|
-
description "The audit of the edge that leads the latest held era to the current shape."
|
|
1207
|
-
attribute :domain, DomainPath
|
|
1208
|
-
returns Document
|
|
1209
|
-
end
|
|
1210
|
-
|
|
1211
|
-
query "Attestation" do
|
|
1212
|
-
description "An era's held text as it now stands, and whether it still matches its digest."
|
|
1213
|
-
attribute :domain, DomainPath
|
|
1214
|
-
attribute :era, Ordinal
|
|
1215
|
-
returns Document
|
|
1216
|
-
end
|
|
1217
|
-
|
|
1218
|
-
query "Compaction" do
|
|
1219
|
-
description "What compacting the domain's journals would delete, without deleting it."
|
|
1220
|
-
attribute :domain, DomainPath
|
|
1221
|
-
attribute :aggregates, AggregateList, optional: true
|
|
1222
|
-
returns Document
|
|
1223
|
-
end
|
|
1224
|
-
end
|
|
1225
|
-
|
|
1226
|
-
policy "ExamineWhenFirstEraRequested" do
|
|
1227
|
-
on "Era.FirstEraRequested"
|
|
1228
|
-
ask :examine, with: { run: :run }
|
|
1229
|
-
end
|
|
1230
|
-
|
|
1231
|
-
policy "ExamineWhenTailMergeRequested" do
|
|
1232
|
-
on "Era.TailMergeRequested"
|
|
1233
|
-
ask :examine, with: { run: :run }
|
|
1234
|
-
end
|
|
1235
|
-
|
|
1236
|
-
policy "ExamineWhenReattestRequested" do
|
|
1237
|
-
on "Era.ReattestRequested"
|
|
1238
|
-
ask :examine, with: { run: :run }
|
|
1239
|
-
end
|
|
1240
|
-
|
|
1241
|
-
policy "ExamineWhenBackfillRequested" do
|
|
1242
|
-
on "Era.BackfillRequested"
|
|
1243
|
-
ask :examine, with: { run: :run }
|
|
1244
|
-
end
|
|
1245
|
-
|
|
1246
|
-
policy "ExamineWhenCompactionRequested" do
|
|
1247
|
-
on "Era.CompactionRequested"
|
|
1248
|
-
ask :examine, with: { run: :run }
|
|
1249
|
-
end
|
|
1250
|
-
|
|
1251
|
-
policy "ExamineWhenHekiCompactionRequested" do
|
|
1252
|
-
on "Era.HekiCompactionRequested"
|
|
1253
|
-
ask :examine, with: { run: :run }
|
|
1254
|
-
end
|
|
1255
|
-
|
|
1256
|
-
policy "PermitWhenExamined" do
|
|
1257
|
-
on "Era.EraExamined"
|
|
1258
|
-
trigger Era::Permit, with: {
|
|
1259
|
-
capable: :capable, held: :held, forks: :forks, contested: :contested,
|
|
1260
|
-
bound: :bound, candidates: :candidates,
|
|
1261
|
-
drifted: :drifted, loadable: :loadable, shape_kept: :shape_kept, operation: :operation
|
|
1262
|
-
}
|
|
1263
|
-
end
|
|
1264
|
-
|
|
1265
|
-
# `Permit` refuses when a rule is unmet and emits nothing, so this reaction is its complement:
|
|
1266
|
-
# it holds the same rules negated, so an examined change that is not let through is abandoned
|
|
1267
|
-
# rather than left `requested`.
|
|
1268
|
-
policy "AbandonWhenNotPermitted" do
|
|
1269
|
-
on "Era.EraExamined"
|
|
1270
|
-
where do
|
|
1271
|
-
(!capable.value && operation.value != "compact" && operation.value != "compact_heki") ||
|
|
1272
|
-
(operation.value == "hold_first" && held.value != 0) ||
|
|
1273
|
-
(operation.value == "merge_tail" && (held.value <= 1 || forks.value != 0 || contested.value != 0)) ||
|
|
1274
|
-
((operation.value == "compact" || operation.value == "compact_heki") &&
|
|
1275
|
-
(candidates.value <= 0 || bound.value != 0)) ||
|
|
1276
|
-
(operation.value == "reattest" && (!drifted.value || !loadable.value || !shape_kept.value))
|
|
1277
|
-
end
|
|
1278
|
-
trigger Era::Abandon, with: { refusal: "the journal's facts do not admit this change" }
|
|
1279
|
-
end
|
|
1280
|
-
|
|
1281
|
-
# A compaction waits for its seal (ledger.bluebook); every other change is applied at once.
|
|
1282
|
-
policy "ChangeWhenPermitted" do
|
|
1283
|
-
on "Era.EraPermitted"
|
|
1284
|
-
where do
|
|
1285
|
-
operation.value != "compact" && operation.value != "compact_heki"
|
|
1286
|
-
end
|
|
1287
|
-
ask :apply, with: { run: :run }
|
|
1288
|
-
end
|
|
1289
|
-
|
|
1290
|
-
policy "RecordTheChange" do
|
|
1291
|
-
on "Era.EraChanged"
|
|
1292
|
-
trigger Era::Settle, with: { report: :report }
|
|
1293
|
-
end
|
|
1294
|
-
|
|
1295
|
-
policy "RecordTheRefusedChange" do
|
|
1296
|
-
on "Era.EraRefused"
|
|
1297
|
-
trigger Era::Abandon, with: { refusal: :refusal }
|
|
1298
|
-
end
|
|
1299
|
-
|
|
1300
|
-
end
|