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,3209 +0,0 @@
|
|
|
1
|
-
Hecks.bluebook "Hecks" do
|
|
2
|
-
# Codebase: working on this repository. Each aggregate here is a concern only a maintainer of
|
|
3
|
-
# Hecks runs, and every one of them needs a hecks checkout (ADR 0080, section 2). A request
|
|
4
|
-
# follows the journaled-command shape of Custodian: it is recorded, the SourceTree port is asked
|
|
5
|
-
# to examine the tree, `Accept` holds the one rule every Codebase change shares (the working tree
|
|
6
|
-
# is a hecks checkout, hecks.gemspec beside lib/), and only an accepted request is carried out.
|
|
7
|
-
# A command that rewrites tracked files reports drift and writes only when it is confirmed.
|
|
8
|
-
#
|
|
9
|
-
# The records are named for the run, as ModelCheckRun is, because several of the table's
|
|
10
|
-
# concerns share a name with a module the gem already owns.
|
|
11
|
-
|
|
12
|
-
# The language: the tables the Bluebook bluebook declares and everything projected from them. A
|
|
13
|
-
# projection reports drift from the committed files and writes only when it is confirmed; an
|
|
14
|
-
# evolution edits the syntax tables, regenerates the golden and holds the gates, and only when
|
|
15
|
-
# confirmed (without it, the edit is rehearsed in memory and nothing is written).
|
|
16
|
-
aggregate "LanguageRun" do
|
|
17
|
-
description "One change to the language's own tables, or one reading of where its words stand."
|
|
18
|
-
|
|
19
|
-
attribute :run, RunKey
|
|
20
|
-
attribute :operation, Operation, optional: true
|
|
21
|
-
attribute :confirm, Switch, optional: true
|
|
22
|
-
attribute :stdout, Switch, optional: true
|
|
23
|
-
attribute :word, Word, optional: true
|
|
24
|
-
attribute :context, Context, optional: true
|
|
25
|
-
attribute :body, Body, optional: true
|
|
26
|
-
attribute :inner, Fill, optional: true
|
|
27
|
-
attribute :opens, Fill, optional: true
|
|
28
|
-
attribute :fills, Fill, optional: true
|
|
29
|
-
attribute :new_name, Word, optional: true
|
|
30
|
-
attribute :kind, Kind, optional: true
|
|
31
|
-
attribute :required, Flag, optional: true
|
|
32
|
-
attribute :at, Position, optional: true
|
|
33
|
-
attribute :named, Fill, optional: true
|
|
34
|
-
attribute :pairs_shape, Shape, optional: true
|
|
35
|
-
attribute :checkout, Switch, optional: true
|
|
36
|
-
attribute :report, Report, optional: true
|
|
37
|
-
attribute :refusal, Report, optional: true
|
|
38
|
-
identified_by :run
|
|
39
|
-
|
|
40
|
-
value_object "RunKey" do
|
|
41
|
-
attribute :value, String, matches: :present
|
|
42
|
-
|
|
43
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
value_object "Operation" do
|
|
47
|
-
attribute :value, String, matches: :present
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
value_object "Switch" do
|
|
51
|
-
attribute :value, Boolean
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
value_object "Report" do
|
|
55
|
-
attribute :value, String
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# A keyword of the language, or the keyword an argument belongs to.
|
|
59
|
-
value_object "Word" do
|
|
60
|
-
attribute :value, String, matches: :present
|
|
61
|
-
|
|
62
|
-
invariant("a word is named") { !value.to_s.empty? }
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# The part of the language a word is a word in.
|
|
66
|
-
value_object "Context" do
|
|
67
|
-
attribute :value, String, matches: :identifier
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# What a word's block holds.
|
|
71
|
-
value_object "Body" do
|
|
72
|
-
attribute :value, String, pattern: '^(none|keywords|source|rows)$'
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# A cell of a table row; empty when the row leaves it blank.
|
|
76
|
-
value_object "Fill" do
|
|
77
|
-
attribute :value, String, pattern: '^[^\t\n\r]*$'
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# What an argument is.
|
|
81
|
-
value_object "Kind" do
|
|
82
|
-
attribute :value, String, pattern: '^(text|symbol|number|flag|literal|constant|pairs|list)$'
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Whether an argument is required.
|
|
86
|
-
value_object "Flag" do
|
|
87
|
-
attribute :value, String, pattern: '^(true|false)$'
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# An argument's place, counted from zero.
|
|
91
|
-
value_object "Position" do
|
|
92
|
-
attribute :value, String, pattern: '^[0-9]*$'
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# How a pairs argument is read, such as verbatim.
|
|
96
|
-
value_object "Shape" do
|
|
97
|
-
attribute :value, String, matches: :present
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
lifecycle :status, default: "requested" do
|
|
101
|
-
mark :failure, "faulted"
|
|
102
|
-
transition "Accept" => "accepted", from: "requested"
|
|
103
|
-
transition "Complete" => "completed", from: "accepted"
|
|
104
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
105
|
-
mark :terminal, "completed", "faulted"
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
command "ProjectModel" do
|
|
109
|
-
role "Maintainer"
|
|
110
|
-
goal "Project the model's holding half from the language that declares it"
|
|
111
|
-
|
|
112
|
-
attribute :run, RunKey, sets: true
|
|
113
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
114
|
-
|
|
115
|
-
sets :operation, to: "project_model"
|
|
116
|
-
|
|
117
|
-
emits ProjectModelRequested
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
command "ProjectVocabulary" do
|
|
121
|
-
role "Maintainer"
|
|
122
|
-
goal "Project the language's closed sets into the vocabulary"
|
|
123
|
-
|
|
124
|
-
attribute :run, RunKey, sets: true
|
|
125
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
126
|
-
|
|
127
|
-
sets :operation, to: "project_vocabulary"
|
|
128
|
-
|
|
129
|
-
emits ProjectVocabularyRequested
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
command "ProjectRustVocabulary" do
|
|
133
|
-
role "Maintainer"
|
|
134
|
-
goal "Project the vocabulary tables into the Rust kernel, one enum a table"
|
|
135
|
-
|
|
136
|
-
attribute :run, RunKey, sets: true
|
|
137
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
138
|
-
|
|
139
|
-
sets :operation, to: "project_rust_vocabulary"
|
|
140
|
-
|
|
141
|
-
emits ProjectRustVocabularyRequested
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
command "ProjectRefusalWording" do
|
|
145
|
-
role "Maintainer"
|
|
146
|
-
goal "Project the refusal template table, a second name of ProjectRustVocabulary"
|
|
147
|
-
|
|
148
|
-
attribute :run, RunKey, sets: true
|
|
149
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
150
|
-
|
|
151
|
-
sets :operation, to: "project_rust_vocabulary"
|
|
152
|
-
|
|
153
|
-
emits ProjectRefusalWordingRequested
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
command "ProjectReservedNames" do
|
|
157
|
-
role "Maintainer"
|
|
158
|
-
goal "Project the Rust and Cargo reserved words into the codegen and build crates"
|
|
159
|
-
|
|
160
|
-
attribute :run, RunKey, sets: true
|
|
161
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
162
|
-
|
|
163
|
-
sets :operation, to: "project_reserved_names"
|
|
164
|
-
|
|
165
|
-
emits ProjectReservedNamesRequested
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
command "ProjectParserTable" do
|
|
169
|
-
role "Maintainer"
|
|
170
|
-
goal "Project the Rust parser's keyword table"
|
|
171
|
-
|
|
172
|
-
attribute :run, RunKey, sets: true
|
|
173
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
174
|
-
|
|
175
|
-
sets :operation, to: "project_parser_table"
|
|
176
|
-
|
|
177
|
-
emits ProjectParserTableRequested
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
command "ProjectPhraseTable" do
|
|
181
|
-
role "Maintainer"
|
|
182
|
-
goal "Project the Rust parser's sentence table from the Sentence bluebook's phrase rows"
|
|
183
|
-
|
|
184
|
-
attribute :run, RunKey, sets: true
|
|
185
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
186
|
-
|
|
187
|
-
sets :operation, to: "project_phrase_table"
|
|
188
|
-
|
|
189
|
-
emits ProjectPhraseTableRequested
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
command "ProjectBootstrapTable" do
|
|
193
|
-
role "Maintainer"
|
|
194
|
-
goal "Project the DSL's bootstrap-window fallbacks from the keyword rows"
|
|
195
|
-
|
|
196
|
-
attribute :run, RunKey, sets: true
|
|
197
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
198
|
-
|
|
199
|
-
sets :operation, to: "project_bootstrap_table"
|
|
200
|
-
|
|
201
|
-
emits ProjectBootstrapTableRequested
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
command "ProjectFieldHints" do
|
|
205
|
-
role "Maintainer"
|
|
206
|
-
goal "Project the host's form-field hints"
|
|
207
|
-
|
|
208
|
-
attribute :run, RunKey, sets: true
|
|
209
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
210
|
-
|
|
211
|
-
sets :operation, to: "project_field_hints"
|
|
212
|
-
|
|
213
|
-
emits ProjectFieldHintsRequested
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
command "ProjectExpressionTables" do
|
|
217
|
-
role "Maintainer"
|
|
218
|
-
goal "Project the expression machinery's operator and normalisation tables"
|
|
219
|
-
|
|
220
|
-
attribute :stdout, Switch, optional: true, sets: true
|
|
221
|
-
attribute :run, RunKey, sets: true
|
|
222
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
223
|
-
|
|
224
|
-
sets :operation, to: "project_expression_tables"
|
|
225
|
-
|
|
226
|
-
emits ProjectExpressionTablesRequested
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
command "ProjectReference" do
|
|
230
|
-
role "Maintainer"
|
|
231
|
-
goal "Regenerate the DSL reference from the Syntax bluebook, keeping the committed prose"
|
|
232
|
-
|
|
233
|
-
attribute :run, RunKey, sets: true
|
|
234
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
235
|
-
|
|
236
|
-
sets :operation, to: "project_reference"
|
|
237
|
-
|
|
238
|
-
emits ProjectReferenceRequested
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
command "Propose" do
|
|
242
|
-
role "Maintainer"
|
|
243
|
-
goal "Enter a keyword row, proposed: it reaches no projection until admitted"
|
|
244
|
-
|
|
245
|
-
attribute :word, Word, sets: true
|
|
246
|
-
attribute :context, Context, sets: true
|
|
247
|
-
attribute :body, Body, optional: true, sets: true
|
|
248
|
-
attribute :inner, Fill, optional: true, sets: true
|
|
249
|
-
attribute :opens, Fill, optional: true, sets: true
|
|
250
|
-
attribute :fills, Fill, optional: true, sets: true
|
|
251
|
-
attribute :run, RunKey, sets: true
|
|
252
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
253
|
-
|
|
254
|
-
sets :operation, to: "propose"
|
|
255
|
-
|
|
256
|
-
emits ProposeRequested
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
command "Admit" do
|
|
260
|
-
role "Maintainer"
|
|
261
|
-
goal "Move a proposed keyword row to admitted"
|
|
262
|
-
|
|
263
|
-
attribute :word, Word, sets: true
|
|
264
|
-
attribute :context, Context, sets: true
|
|
265
|
-
attribute :run, RunKey, sets: true
|
|
266
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
267
|
-
|
|
268
|
-
sets :operation, to: "admit"
|
|
269
|
-
|
|
270
|
-
emits AdmitRequested
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
command "Deprecate" do
|
|
274
|
-
role "Maintainer"
|
|
275
|
-
goal "Move an admitted keyword row to deprecated"
|
|
276
|
-
|
|
277
|
-
attribute :word, Word, sets: true
|
|
278
|
-
attribute :context, Context, sets: true
|
|
279
|
-
attribute :run, RunKey, sets: true
|
|
280
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
281
|
-
|
|
282
|
-
sets :operation, to: "deprecate"
|
|
283
|
-
|
|
284
|
-
emits DeprecateRequested
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
command "Retire" do
|
|
288
|
-
role "Maintainer"
|
|
289
|
-
goal "Move a deprecated or admitted keyword row to retired"
|
|
290
|
-
|
|
291
|
-
attribute :word, Word, sets: true
|
|
292
|
-
attribute :context, Context, sets: true
|
|
293
|
-
attribute :run, RunKey, sets: true
|
|
294
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
295
|
-
|
|
296
|
-
sets :operation, to: "retire"
|
|
297
|
-
|
|
298
|
-
emits RetireRequested
|
|
299
|
-
end
|
|
300
|
-
|
|
301
|
-
command "Rename" do
|
|
302
|
-
role "Maintainer"
|
|
303
|
-
goal "Respell a keyword row; the old spelling keeps parsing"
|
|
304
|
-
|
|
305
|
-
attribute :word, Word, sets: true
|
|
306
|
-
attribute :context, Context, sets: true
|
|
307
|
-
attribute :new_name, Word, sets: true
|
|
308
|
-
attribute :run, RunKey, sets: true
|
|
309
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
310
|
-
|
|
311
|
-
sets :operation, to: "rename"
|
|
312
|
-
|
|
313
|
-
emits RenameRequested
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
command "ProposeArgument" do
|
|
317
|
-
role "Maintainer"
|
|
318
|
-
goal "Enter an argument row of a keyword, proposed"
|
|
319
|
-
|
|
320
|
-
attribute :word, Word, sets: true
|
|
321
|
-
attribute :context, Context, sets: true
|
|
322
|
-
attribute :kind, Kind, sets: true
|
|
323
|
-
attribute :required, Flag, optional: true, sets: true
|
|
324
|
-
attribute :at, Position, optional: true, sets: true
|
|
325
|
-
attribute :named, Fill, optional: true, sets: true
|
|
326
|
-
attribute :fills, Fill, optional: true, sets: true
|
|
327
|
-
attribute :pairs_shape, Shape, optional: true, sets: true
|
|
328
|
-
attribute :run, RunKey, sets: true
|
|
329
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
330
|
-
|
|
331
|
-
sets :operation, to: "propose_argument"
|
|
332
|
-
|
|
333
|
-
emits ProposeArgumentRequested
|
|
334
|
-
end
|
|
335
|
-
|
|
336
|
-
command "AdmitArgument" do
|
|
337
|
-
role "Maintainer"
|
|
338
|
-
goal "Move a proposed argument row to admitted"
|
|
339
|
-
|
|
340
|
-
attribute :word, Word, sets: true
|
|
341
|
-
attribute :context, Context, sets: true
|
|
342
|
-
attribute :at, Position, optional: true, sets: true
|
|
343
|
-
attribute :named, Fill, optional: true, sets: true
|
|
344
|
-
attribute :run, RunKey, sets: true
|
|
345
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
346
|
-
|
|
347
|
-
sets :operation, to: "admit_argument"
|
|
348
|
-
|
|
349
|
-
emits AdmitArgumentRequested
|
|
350
|
-
end
|
|
351
|
-
|
|
352
|
-
command "DeprecateArgument" do
|
|
353
|
-
role "Maintainer"
|
|
354
|
-
goal "Move an admitted argument row to deprecated"
|
|
355
|
-
|
|
356
|
-
attribute :word, Word, sets: true
|
|
357
|
-
attribute :context, Context, sets: true
|
|
358
|
-
attribute :at, Position, optional: true, sets: true
|
|
359
|
-
attribute :named, Fill, optional: true, sets: true
|
|
360
|
-
attribute :run, RunKey, sets: true
|
|
361
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
362
|
-
|
|
363
|
-
sets :operation, to: "deprecate_argument"
|
|
364
|
-
|
|
365
|
-
emits DeprecateArgumentRequested
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
command "RetireArgument" do
|
|
369
|
-
role "Maintainer"
|
|
370
|
-
goal "Move a deprecated or admitted argument row to retired"
|
|
371
|
-
|
|
372
|
-
attribute :word, Word, sets: true
|
|
373
|
-
attribute :context, Context, sets: true
|
|
374
|
-
attribute :at, Position, optional: true, sets: true
|
|
375
|
-
attribute :named, Fill, optional: true, sets: true
|
|
376
|
-
attribute :run, RunKey, sets: true
|
|
377
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
378
|
-
|
|
379
|
-
sets :operation, to: "retire_argument"
|
|
380
|
-
|
|
381
|
-
emits RetireArgumentRequested
|
|
382
|
-
end
|
|
383
|
-
|
|
384
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
385
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
386
|
-
command "Accept" do
|
|
387
|
-
role "System"
|
|
388
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
389
|
-
|
|
390
|
-
reference_to LanguageRun
|
|
391
|
-
attribute :checkout, Switch, sets: true
|
|
392
|
-
|
|
393
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
emits LanguageAccepted
|
|
397
|
-
end
|
|
398
|
-
|
|
399
|
-
command "Complete" do
|
|
400
|
-
role "System"
|
|
401
|
-
goal "Record that the request was carried out, and what it reported"
|
|
402
|
-
|
|
403
|
-
reference_to LanguageRun
|
|
404
|
-
attribute :report, Report, sets: true
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
emits LanguageCompleted
|
|
408
|
-
end
|
|
409
|
-
|
|
410
|
-
command "Fault" do
|
|
411
|
-
role "System"
|
|
412
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
413
|
-
|
|
414
|
-
reference_to LanguageRun
|
|
415
|
-
attribute :refusal, Report, sets: true
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
emits LanguageFaulted
|
|
419
|
-
end
|
|
420
|
-
|
|
421
|
-
query "LanguageOutcome" do
|
|
422
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
423
|
-
attribute :run, RunKey
|
|
424
|
-
where(run: :run)
|
|
425
|
-
order_by :run
|
|
426
|
-
end
|
|
427
|
-
|
|
428
|
-
query "LanguageFaulted" do
|
|
429
|
-
description "Every request that was refused or could not be carried out."
|
|
430
|
-
where(status: "faulted")
|
|
431
|
-
order_by :run
|
|
432
|
-
end
|
|
433
|
-
|
|
434
|
-
# An answer that is one document of text, exactly as the tool that produced it wrote it.
|
|
435
|
-
value_object "Document" do
|
|
436
|
-
attribute :text, String
|
|
437
|
-
end
|
|
438
|
-
|
|
439
|
-
query "WordStatus" do
|
|
440
|
-
description "Where every word of the language stands: the ones not simply admitted, and the renamed."
|
|
441
|
-
returns Document
|
|
442
|
-
end
|
|
443
|
-
end
|
|
444
|
-
|
|
445
|
-
policy "ExamineWhenProjectModelRequested" do
|
|
446
|
-
on "LanguageRun.ProjectModelRequested"
|
|
447
|
-
ask :examine, with: { run: :run }
|
|
448
|
-
end
|
|
449
|
-
|
|
450
|
-
policy "ExamineWhenProjectVocabularyRequested" do
|
|
451
|
-
on "LanguageRun.ProjectVocabularyRequested"
|
|
452
|
-
ask :examine, with: { run: :run }
|
|
453
|
-
end
|
|
454
|
-
|
|
455
|
-
policy "ExamineWhenProjectRustVocabularyRequested" do
|
|
456
|
-
on "LanguageRun.ProjectRustVocabularyRequested"
|
|
457
|
-
ask :examine, with: { run: :run }
|
|
458
|
-
end
|
|
459
|
-
|
|
460
|
-
policy "ExamineWhenProjectRefusalWordingRequested" do
|
|
461
|
-
on "LanguageRun.ProjectRefusalWordingRequested"
|
|
462
|
-
ask :examine, with: { run: :run }
|
|
463
|
-
end
|
|
464
|
-
|
|
465
|
-
policy "ExamineWhenProjectReservedNamesRequested" do
|
|
466
|
-
on "LanguageRun.ProjectReservedNamesRequested"
|
|
467
|
-
ask :examine, with: { run: :run }
|
|
468
|
-
end
|
|
469
|
-
|
|
470
|
-
policy "ExamineWhenProjectParserTableRequested" do
|
|
471
|
-
on "LanguageRun.ProjectParserTableRequested"
|
|
472
|
-
ask :examine, with: { run: :run }
|
|
473
|
-
end
|
|
474
|
-
|
|
475
|
-
policy "ExamineWhenProjectPhraseTableRequested" do
|
|
476
|
-
on "LanguageRun.ProjectPhraseTableRequested"
|
|
477
|
-
ask :examine, with: { run: :run }
|
|
478
|
-
end
|
|
479
|
-
|
|
480
|
-
policy "ExamineWhenProjectBootstrapTableRequested" do
|
|
481
|
-
on "LanguageRun.ProjectBootstrapTableRequested"
|
|
482
|
-
ask :examine, with: { run: :run }
|
|
483
|
-
end
|
|
484
|
-
|
|
485
|
-
policy "ExamineWhenProjectFieldHintsRequested" do
|
|
486
|
-
on "LanguageRun.ProjectFieldHintsRequested"
|
|
487
|
-
ask :examine, with: { run: :run }
|
|
488
|
-
end
|
|
489
|
-
|
|
490
|
-
policy "ExamineWhenProjectExpressionTablesRequested" do
|
|
491
|
-
on "LanguageRun.ProjectExpressionTablesRequested"
|
|
492
|
-
ask :examine, with: { run: :run }
|
|
493
|
-
end
|
|
494
|
-
|
|
495
|
-
policy "ExamineWhenProjectReferenceRequested" do
|
|
496
|
-
on "LanguageRun.ProjectReferenceRequested"
|
|
497
|
-
ask :examine, with: { run: :run }
|
|
498
|
-
end
|
|
499
|
-
|
|
500
|
-
policy "ExamineWhenProposeRequested" do
|
|
501
|
-
on "LanguageRun.ProposeRequested"
|
|
502
|
-
ask :examine, with: { run: :run }
|
|
503
|
-
end
|
|
504
|
-
|
|
505
|
-
policy "ExamineWhenAdmitRequested" do
|
|
506
|
-
on "LanguageRun.AdmitRequested"
|
|
507
|
-
ask :examine, with: { run: :run }
|
|
508
|
-
end
|
|
509
|
-
|
|
510
|
-
policy "ExamineWhenDeprecateRequested" do
|
|
511
|
-
on "LanguageRun.DeprecateRequested"
|
|
512
|
-
ask :examine, with: { run: :run }
|
|
513
|
-
end
|
|
514
|
-
|
|
515
|
-
policy "ExamineWhenRetireRequested" do
|
|
516
|
-
on "LanguageRun.RetireRequested"
|
|
517
|
-
ask :examine, with: { run: :run }
|
|
518
|
-
end
|
|
519
|
-
|
|
520
|
-
policy "ExamineWhenRenameRequested" do
|
|
521
|
-
on "LanguageRun.RenameRequested"
|
|
522
|
-
ask :examine, with: { run: :run }
|
|
523
|
-
end
|
|
524
|
-
|
|
525
|
-
policy "ExamineWhenProposeArgumentRequested" do
|
|
526
|
-
on "LanguageRun.ProposeArgumentRequested"
|
|
527
|
-
ask :examine, with: { run: :run }
|
|
528
|
-
end
|
|
529
|
-
|
|
530
|
-
policy "ExamineWhenAdmitArgumentRequested" do
|
|
531
|
-
on "LanguageRun.AdmitArgumentRequested"
|
|
532
|
-
ask :examine, with: { run: :run }
|
|
533
|
-
end
|
|
534
|
-
|
|
535
|
-
policy "ExamineWhenDeprecateArgumentRequested" do
|
|
536
|
-
on "LanguageRun.DeprecateArgumentRequested"
|
|
537
|
-
ask :examine, with: { run: :run }
|
|
538
|
-
end
|
|
539
|
-
|
|
540
|
-
policy "ExamineWhenRetireArgumentRequested" do
|
|
541
|
-
on "LanguageRun.RetireArgumentRequested"
|
|
542
|
-
ask :examine, with: { run: :run }
|
|
543
|
-
end
|
|
544
|
-
|
|
545
|
-
policy "AcceptLanguageWhenExamined" do
|
|
546
|
-
on "LanguageRun.LanguageExamined"
|
|
547
|
-
trigger LanguageRun::Accept, with: { checkout: :checkout }
|
|
548
|
-
end
|
|
549
|
-
|
|
550
|
-
policy "FaultLanguageWhenNotAccepted" do
|
|
551
|
-
on "LanguageRun.LanguageExamined"
|
|
552
|
-
where { !checkout.value }
|
|
553
|
-
trigger LanguageRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
554
|
-
end
|
|
555
|
-
|
|
556
|
-
policy "PerformLanguageWhenAccepted" do
|
|
557
|
-
on "LanguageRun.LanguageAccepted"
|
|
558
|
-
ask :perform, with: { run: :run }
|
|
559
|
-
end
|
|
560
|
-
|
|
561
|
-
policy "RecordLanguageOutcome" do
|
|
562
|
-
on "LanguageRun.LanguageAnswered"
|
|
563
|
-
trigger LanguageRun::Complete, with: { report: :report }
|
|
564
|
-
end
|
|
565
|
-
|
|
566
|
-
policy "RecordLanguageFault" do
|
|
567
|
-
on "LanguageRun.LanguageRefused"
|
|
568
|
-
trigger LanguageRun::Fault, with: { refusal: :refusal }
|
|
569
|
-
end
|
|
570
|
-
|
|
571
|
-
# The Rust kernel: the capability enums the hand-written kernel is matched against, and the check
|
|
572
|
-
# that every attribute shape and expression-operator category the grammar admits has its file.
|
|
573
|
-
aggregate "KernelRun" do
|
|
574
|
-
description "One projection of the Rust kernel's capability enums, or one measure of their coverage."
|
|
575
|
-
|
|
576
|
-
attribute :run, RunKey
|
|
577
|
-
attribute :operation, Operation, optional: true
|
|
578
|
-
attribute :confirm, Switch, optional: true
|
|
579
|
-
attribute :checkout, Switch, optional: true
|
|
580
|
-
attribute :report, Report, optional: true
|
|
581
|
-
attribute :refusal, Report, optional: true
|
|
582
|
-
identified_by :run
|
|
583
|
-
|
|
584
|
-
value_object "RunKey" do
|
|
585
|
-
attribute :value, String, matches: :present
|
|
586
|
-
|
|
587
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
588
|
-
end
|
|
589
|
-
|
|
590
|
-
value_object "Operation" do
|
|
591
|
-
attribute :value, String, matches: :present
|
|
592
|
-
end
|
|
593
|
-
|
|
594
|
-
value_object "Switch" do
|
|
595
|
-
attribute :value, Boolean
|
|
596
|
-
end
|
|
597
|
-
|
|
598
|
-
value_object "Report" do
|
|
599
|
-
attribute :value, String
|
|
600
|
-
end
|
|
601
|
-
|
|
602
|
-
lifecycle :status, default: "requested" do
|
|
603
|
-
mark :failure, "faulted"
|
|
604
|
-
transition "Accept" => "accepted", from: "requested"
|
|
605
|
-
transition "Complete" => "completed", from: "accepted"
|
|
606
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
607
|
-
mark :terminal, "completed", "faulted"
|
|
608
|
-
end
|
|
609
|
-
|
|
610
|
-
command "ProjectKernelCapabilities" do
|
|
611
|
-
role "Maintainer"
|
|
612
|
-
goal "Project the capability enums the hand-written Rust kernel is matched against"
|
|
613
|
-
|
|
614
|
-
attribute :run, RunKey, sets: true
|
|
615
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
616
|
-
|
|
617
|
-
sets :operation, to: "project_kernel_capabilities"
|
|
618
|
-
|
|
619
|
-
emits ProjectKernelCapabilitiesRequested
|
|
620
|
-
end
|
|
621
|
-
|
|
622
|
-
command "MeasureKernelCoverage" do
|
|
623
|
-
role "Maintainer"
|
|
624
|
-
goal "Check that every capability the grammar admits has its hand-written kernel file"
|
|
625
|
-
|
|
626
|
-
attribute :run, RunKey, sets: true
|
|
627
|
-
|
|
628
|
-
sets :operation, to: "measure_kernel_coverage"
|
|
629
|
-
|
|
630
|
-
emits MeasureKernelCoverageRequested
|
|
631
|
-
end
|
|
632
|
-
|
|
633
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
634
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
635
|
-
command "Accept" do
|
|
636
|
-
role "System"
|
|
637
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
638
|
-
|
|
639
|
-
reference_to KernelRun
|
|
640
|
-
attribute :checkout, Switch, sets: true
|
|
641
|
-
|
|
642
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
emits KernelAccepted
|
|
646
|
-
end
|
|
647
|
-
|
|
648
|
-
command "Complete" do
|
|
649
|
-
role "System"
|
|
650
|
-
goal "Record that the request was carried out, and what it reported"
|
|
651
|
-
|
|
652
|
-
reference_to KernelRun
|
|
653
|
-
attribute :report, Report, sets: true
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
emits KernelCompleted
|
|
657
|
-
end
|
|
658
|
-
|
|
659
|
-
command "Fault" do
|
|
660
|
-
role "System"
|
|
661
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
662
|
-
|
|
663
|
-
reference_to KernelRun
|
|
664
|
-
attribute :refusal, Report, sets: true
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
emits KernelFaulted
|
|
668
|
-
end
|
|
669
|
-
|
|
670
|
-
query "KernelOutcome" do
|
|
671
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
672
|
-
attribute :run, RunKey
|
|
673
|
-
where(run: :run)
|
|
674
|
-
order_by :run
|
|
675
|
-
end
|
|
676
|
-
|
|
677
|
-
query "KernelFaulted" do
|
|
678
|
-
description "Every request that was refused or could not be carried out."
|
|
679
|
-
where(status: "faulted")
|
|
680
|
-
order_by :run
|
|
681
|
-
end
|
|
682
|
-
end
|
|
683
|
-
|
|
684
|
-
policy "ExamineWhenProjectKernelCapabilitiesRequested" do
|
|
685
|
-
on "KernelRun.ProjectKernelCapabilitiesRequested"
|
|
686
|
-
ask :examine, with: { run: :run }
|
|
687
|
-
end
|
|
688
|
-
|
|
689
|
-
policy "ExamineWhenMeasureKernelCoverageRequested" do
|
|
690
|
-
on "KernelRun.MeasureKernelCoverageRequested"
|
|
691
|
-
ask :examine, with: { run: :run }
|
|
692
|
-
end
|
|
693
|
-
|
|
694
|
-
policy "AcceptKernelWhenExamined" do
|
|
695
|
-
on "KernelRun.KernelExamined"
|
|
696
|
-
trigger KernelRun::Accept, with: { checkout: :checkout }
|
|
697
|
-
end
|
|
698
|
-
|
|
699
|
-
policy "FaultKernelWhenNotAccepted" do
|
|
700
|
-
on "KernelRun.KernelExamined"
|
|
701
|
-
where { !checkout.value }
|
|
702
|
-
trigger KernelRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
703
|
-
end
|
|
704
|
-
|
|
705
|
-
policy "PerformKernelWhenAccepted" do
|
|
706
|
-
on "KernelRun.KernelAccepted"
|
|
707
|
-
ask :perform, with: { run: :run }
|
|
708
|
-
end
|
|
709
|
-
|
|
710
|
-
policy "RecordKernelOutcome" do
|
|
711
|
-
on "KernelRun.KernelAnswered"
|
|
712
|
-
trigger KernelRun::Complete, with: { report: :report }
|
|
713
|
-
end
|
|
714
|
-
|
|
715
|
-
policy "RecordKernelFault" do
|
|
716
|
-
on "KernelRun.KernelRefused"
|
|
717
|
-
trigger KernelRun::Fault, with: { refusal: :refusal }
|
|
718
|
-
end
|
|
719
|
-
|
|
720
|
-
# Conformance: the checks on the language itself. Each finds every disagreement and refuses with
|
|
721
|
-
# them all, so a check that fails is recorded as faulted with what it found. The argument-gate
|
|
722
|
-
# matrix rewrites a committed matrix and its fixtures, so it only reports unless it is confirmed.
|
|
723
|
-
aggregate "ConformanceRun" do
|
|
724
|
-
description "One check that the engines, the reference docs and the argument gates agree with the language."
|
|
725
|
-
|
|
726
|
-
attribute :run, RunKey
|
|
727
|
-
attribute :operation, Operation, optional: true
|
|
728
|
-
attribute :confirm, Switch, optional: true
|
|
729
|
-
attribute :additive, Switch, optional: true
|
|
730
|
-
attribute :checkout, Switch, optional: true
|
|
731
|
-
attribute :report, Report, optional: true
|
|
732
|
-
attribute :refusal, Report, optional: true
|
|
733
|
-
identified_by :run
|
|
734
|
-
|
|
735
|
-
value_object "RunKey" do
|
|
736
|
-
attribute :value, String, matches: :present
|
|
737
|
-
|
|
738
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
739
|
-
end
|
|
740
|
-
|
|
741
|
-
value_object "Operation" do
|
|
742
|
-
attribute :value, String, matches: :present
|
|
743
|
-
end
|
|
744
|
-
|
|
745
|
-
value_object "Switch" do
|
|
746
|
-
attribute :value, Boolean
|
|
747
|
-
end
|
|
748
|
-
|
|
749
|
-
value_object "Report" do
|
|
750
|
-
attribute :value, String
|
|
751
|
-
end
|
|
752
|
-
|
|
753
|
-
lifecycle :status, default: "requested" do
|
|
754
|
-
mark :failure, "faulted"
|
|
755
|
-
transition "Accept" => "accepted", from: "requested"
|
|
756
|
-
transition "Complete" => "completed", from: "accepted"
|
|
757
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
758
|
-
mark :terminal, "completed", "faulted"
|
|
759
|
-
end
|
|
760
|
-
|
|
761
|
-
command "CheckEngineAgreement" do
|
|
762
|
-
role "Maintainer"
|
|
763
|
-
goal "Check that the query engines route every comparator through the one shared implementation"
|
|
764
|
-
|
|
765
|
-
attribute :run, RunKey, sets: true
|
|
766
|
-
|
|
767
|
-
sets :operation, to: "check_engine_agreement"
|
|
768
|
-
|
|
769
|
-
emits CheckEngineAgreementRequested
|
|
770
|
-
end
|
|
771
|
-
|
|
772
|
-
command "MeasureDocCoverage" do
|
|
773
|
-
role "Maintainer"
|
|
774
|
-
goal "Check that every live word of the language has prose and a running example in the reference"
|
|
775
|
-
|
|
776
|
-
attribute :run, RunKey, sets: true
|
|
777
|
-
|
|
778
|
-
sets :operation, to: "measure_doc_coverage"
|
|
779
|
-
|
|
780
|
-
emits MeasureDocCoverageRequested
|
|
781
|
-
end
|
|
782
|
-
|
|
783
|
-
command "CheckShapeLedger" do
|
|
784
|
-
role "Maintainer"
|
|
785
|
-
goal "Check that no bluebook's storage shape moved without a translation edge, and rewrite the ledger when confirmed"
|
|
786
|
-
|
|
787
|
-
attribute :run, RunKey, sets: true
|
|
788
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
789
|
-
# With `confirm`: write the empty edge for a shape that moved with none, for a change that only adds.
|
|
790
|
-
attribute :additive, Switch, optional: true, sets: true
|
|
791
|
-
|
|
792
|
-
sets :operation, to: "check_shape_ledger"
|
|
793
|
-
|
|
794
|
-
emits CheckShapeLedgerRequested
|
|
795
|
-
end
|
|
796
|
-
|
|
797
|
-
command "ArgumentGateMatrix" do
|
|
798
|
-
role "Maintainer"
|
|
799
|
-
goal "Generate the argument-gate ordering matrix; rewrite it and its fixtures only when confirmed"
|
|
800
|
-
|
|
801
|
-
attribute :run, RunKey, sets: true
|
|
802
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
803
|
-
|
|
804
|
-
sets :operation, to: "argument_gate_matrix"
|
|
805
|
-
|
|
806
|
-
emits ArgumentGateMatrixRequested
|
|
807
|
-
end
|
|
808
|
-
|
|
809
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
810
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
811
|
-
command "Accept" do
|
|
812
|
-
role "System"
|
|
813
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
814
|
-
|
|
815
|
-
reference_to ConformanceRun
|
|
816
|
-
attribute :checkout, Switch, sets: true
|
|
817
|
-
|
|
818
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
emits ConformanceAccepted
|
|
822
|
-
end
|
|
823
|
-
|
|
824
|
-
command "Complete" do
|
|
825
|
-
role "System"
|
|
826
|
-
goal "Record that the request was carried out, and what it reported"
|
|
827
|
-
|
|
828
|
-
reference_to ConformanceRun
|
|
829
|
-
attribute :report, Report, sets: true
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
emits ConformanceCompleted
|
|
833
|
-
end
|
|
834
|
-
|
|
835
|
-
command "Fault" do
|
|
836
|
-
role "System"
|
|
837
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
838
|
-
|
|
839
|
-
reference_to ConformanceRun
|
|
840
|
-
attribute :refusal, Report, sets: true
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
emits ConformanceFaulted
|
|
844
|
-
end
|
|
845
|
-
|
|
846
|
-
query "ConformanceOutcome" do
|
|
847
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
848
|
-
attribute :run, RunKey
|
|
849
|
-
where(run: :run)
|
|
850
|
-
order_by :run
|
|
851
|
-
end
|
|
852
|
-
|
|
853
|
-
query "ConformanceFaulted" do
|
|
854
|
-
description "Every request that was refused or could not be carried out."
|
|
855
|
-
where(status: "faulted")
|
|
856
|
-
order_by :run
|
|
857
|
-
end
|
|
858
|
-
end
|
|
859
|
-
|
|
860
|
-
policy "ExamineWhenCheckEngineAgreementRequested" do
|
|
861
|
-
on "ConformanceRun.CheckEngineAgreementRequested"
|
|
862
|
-
ask :examine, with: { run: :run }
|
|
863
|
-
end
|
|
864
|
-
|
|
865
|
-
policy "ExamineWhenMeasureDocCoverageRequested" do
|
|
866
|
-
on "ConformanceRun.MeasureDocCoverageRequested"
|
|
867
|
-
ask :examine, with: { run: :run }
|
|
868
|
-
end
|
|
869
|
-
|
|
870
|
-
policy "ExamineWhenCheckShapeLedgerRequested" do
|
|
871
|
-
on "ConformanceRun.CheckShapeLedgerRequested"
|
|
872
|
-
ask :examine, with: { run: :run }
|
|
873
|
-
end
|
|
874
|
-
|
|
875
|
-
policy "ExamineWhenArgumentGateMatrixRequested" do
|
|
876
|
-
on "ConformanceRun.ArgumentGateMatrixRequested"
|
|
877
|
-
ask :examine, with: { run: :run }
|
|
878
|
-
end
|
|
879
|
-
|
|
880
|
-
policy "AcceptConformanceWhenExamined" do
|
|
881
|
-
on "ConformanceRun.ConformanceExamined"
|
|
882
|
-
trigger ConformanceRun::Accept, with: { checkout: :checkout }
|
|
883
|
-
end
|
|
884
|
-
|
|
885
|
-
policy "FaultConformanceWhenNotAccepted" do
|
|
886
|
-
on "ConformanceRun.ConformanceExamined"
|
|
887
|
-
where { !checkout.value }
|
|
888
|
-
trigger ConformanceRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
889
|
-
end
|
|
890
|
-
|
|
891
|
-
policy "PerformConformanceWhenAccepted" do
|
|
892
|
-
on "ConformanceRun.ConformanceAccepted"
|
|
893
|
-
ask :perform, with: { run: :run }
|
|
894
|
-
end
|
|
895
|
-
|
|
896
|
-
policy "RecordConformanceOutcome" do
|
|
897
|
-
on "ConformanceRun.ConformanceAnswered"
|
|
898
|
-
trigger ConformanceRun::Complete, with: { report: :report }
|
|
899
|
-
end
|
|
900
|
-
|
|
901
|
-
policy "RecordConformanceFault" do
|
|
902
|
-
on "ConformanceRun.ConformanceRefused"
|
|
903
|
-
trigger ConformanceRun::Fault, with: { refusal: :refusal }
|
|
904
|
-
end
|
|
905
|
-
|
|
906
|
-
# Regeneration: rebuilding every corpus domain's committed output, which only this repository has.
|
|
907
|
-
# A check projects into a scratch crate and never writes the tree; without --confirm the run is
|
|
908
|
-
# that check, so the tracked generated files change only when the regeneration is confirmed.
|
|
909
|
-
aggregate "RegenerationRun" do
|
|
910
|
-
description "One regeneration of every corpus domain's committed Rust output, or the check that it is current."
|
|
911
|
-
|
|
912
|
-
attribute :run, RunKey
|
|
913
|
-
attribute :operation, Operation, optional: true
|
|
914
|
-
attribute :confirm, Switch, optional: true
|
|
915
|
-
attribute :check, Switch, optional: true
|
|
916
|
-
attribute :live, Switch, optional: true
|
|
917
|
-
attribute :gate, GateName, optional: true
|
|
918
|
-
attribute :checkout, Switch, optional: true
|
|
919
|
-
attribute :report, Report, optional: true
|
|
920
|
-
attribute :refusal, Report, optional: true
|
|
921
|
-
identified_by :run
|
|
922
|
-
|
|
923
|
-
value_object "RunKey" do
|
|
924
|
-
attribute :value, String, matches: :present
|
|
925
|
-
|
|
926
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
927
|
-
end
|
|
928
|
-
|
|
929
|
-
value_object "Operation" do
|
|
930
|
-
attribute :value, String, matches: :present
|
|
931
|
-
end
|
|
932
|
-
|
|
933
|
-
value_object "Switch" do
|
|
934
|
-
attribute :value, Boolean
|
|
935
|
-
end
|
|
936
|
-
|
|
937
|
-
value_object "Report" do
|
|
938
|
-
attribute :value, String
|
|
939
|
-
end
|
|
940
|
-
|
|
941
|
-
# A `CiGate` row of the Vocabulary bluebook, by name.
|
|
942
|
-
value_object "GateName" do
|
|
943
|
-
attribute :value, String, matches: :present
|
|
944
|
-
end
|
|
945
|
-
|
|
946
|
-
lifecycle :status, default: "requested" do
|
|
947
|
-
mark :failure, "faulted"
|
|
948
|
-
transition "Accept" => "accepted", from: "requested"
|
|
949
|
-
transition "Complete" => "completed", from: "accepted"
|
|
950
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
951
|
-
mark :terminal, "completed", "faulted"
|
|
952
|
-
end
|
|
953
|
-
|
|
954
|
-
command "RegenerateCorpus" do
|
|
955
|
-
role "Maintainer"
|
|
956
|
-
goal "Regenerate every corpus domain's Rust output, or with check only compare it with the tree"
|
|
957
|
-
|
|
958
|
-
attribute :check, Switch, optional: true, sets: true
|
|
959
|
-
attribute :run, RunKey, sets: true
|
|
960
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
961
|
-
|
|
962
|
-
sets :operation, to: "regenerate_corpus"
|
|
963
|
-
|
|
964
|
-
emits RegenerateCorpusRequested
|
|
965
|
-
end
|
|
966
|
-
|
|
967
|
-
command "ProjectCiGates" do
|
|
968
|
-
role "Maintainer"
|
|
969
|
-
goal "Project the CiGate rows into the workflows' marked detector jobs, or with check only compare them"
|
|
970
|
-
|
|
971
|
-
attribute :check, Switch, optional: true, sets: true
|
|
972
|
-
attribute :run, RunKey, sets: true
|
|
973
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
974
|
-
|
|
975
|
-
sets :operation, to: "project_ci_gates"
|
|
976
|
-
|
|
977
|
-
emits ProjectCiGatesRequested
|
|
978
|
-
end
|
|
979
|
-
|
|
980
|
-
command "ProjectLanes" do
|
|
981
|
-
role "Maintainer"
|
|
982
|
-
goal "Project the Lane rows into the rulesets and the promotion workflow, or with live compare GitHub's rulesets"
|
|
983
|
-
|
|
984
|
-
attribute :check, Switch, optional: true, sets: true
|
|
985
|
-
attribute :live, Switch, optional: true, sets: true
|
|
986
|
-
attribute :run, RunKey, sets: true
|
|
987
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
988
|
-
|
|
989
|
-
sets :operation, to: "project_lanes"
|
|
990
|
-
|
|
991
|
-
emits ProjectLanesRequested
|
|
992
|
-
end
|
|
993
|
-
|
|
994
|
-
command "ProjectToolsDoc" do
|
|
995
|
-
role "Maintainer"
|
|
996
|
-
goal "Write the launcher forms of docs/tools.md from the RetiredScript rows, or with check only compare them"
|
|
997
|
-
|
|
998
|
-
attribute :check, Switch, optional: true, sets: true
|
|
999
|
-
attribute :run, RunKey, sets: true
|
|
1000
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1001
|
-
|
|
1002
|
-
sets :operation, to: "project_tools_doc"
|
|
1003
|
-
|
|
1004
|
-
emits ProjectToolsDocRequested
|
|
1005
|
-
end
|
|
1006
|
-
|
|
1007
|
-
command "DecideCiGate" do
|
|
1008
|
-
role "Maintainer"
|
|
1009
|
-
goal "Say whether this run's change touches what a CiGate row guards, as the gated job's detector"
|
|
1010
|
-
|
|
1011
|
-
attribute :gate, GateName, sets: true
|
|
1012
|
-
attribute :run, RunKey, sets: true
|
|
1013
|
-
|
|
1014
|
-
sets :operation, to: "decide_ci_gate"
|
|
1015
|
-
|
|
1016
|
-
emits DecideCiGateRequested
|
|
1017
|
-
end
|
|
1018
|
-
|
|
1019
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
1020
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
1021
|
-
command "Accept" do
|
|
1022
|
-
role "System"
|
|
1023
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
1024
|
-
|
|
1025
|
-
reference_to RegenerationRun
|
|
1026
|
-
attribute :checkout, Switch, sets: true
|
|
1027
|
-
|
|
1028
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
emits RegenerationAccepted
|
|
1032
|
-
end
|
|
1033
|
-
|
|
1034
|
-
command "Complete" do
|
|
1035
|
-
role "System"
|
|
1036
|
-
goal "Record that the request was carried out, and what it reported"
|
|
1037
|
-
|
|
1038
|
-
reference_to RegenerationRun
|
|
1039
|
-
attribute :report, Report, sets: true
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
emits RegenerationCompleted
|
|
1043
|
-
end
|
|
1044
|
-
|
|
1045
|
-
command "Fault" do
|
|
1046
|
-
role "System"
|
|
1047
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
1048
|
-
|
|
1049
|
-
reference_to RegenerationRun
|
|
1050
|
-
attribute :refusal, Report, sets: true
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
emits RegenerationFaulted
|
|
1054
|
-
end
|
|
1055
|
-
|
|
1056
|
-
query "RegenerationOutcome" do
|
|
1057
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
1058
|
-
attribute :run, RunKey
|
|
1059
|
-
where(run: :run)
|
|
1060
|
-
order_by :run
|
|
1061
|
-
end
|
|
1062
|
-
|
|
1063
|
-
query "RegenerationFaulted" do
|
|
1064
|
-
description "Every request that was refused or could not be carried out."
|
|
1065
|
-
where(status: "faulted")
|
|
1066
|
-
order_by :run
|
|
1067
|
-
end
|
|
1068
|
-
end
|
|
1069
|
-
|
|
1070
|
-
policy "ExamineWhenRegenerateCorpusRequested" do
|
|
1071
|
-
on "RegenerationRun.RegenerateCorpusRequested"
|
|
1072
|
-
ask :examine, with: { run: :run }
|
|
1073
|
-
end
|
|
1074
|
-
|
|
1075
|
-
policy "ExamineWhenProjectCiGatesRequested" do
|
|
1076
|
-
on "RegenerationRun.ProjectCiGatesRequested"
|
|
1077
|
-
ask :examine, with: { run: :run }
|
|
1078
|
-
end
|
|
1079
|
-
|
|
1080
|
-
policy "ExamineWhenProjectLanesRequested" do
|
|
1081
|
-
on "RegenerationRun.ProjectLanesRequested"
|
|
1082
|
-
ask :examine, with: { run: :run }
|
|
1083
|
-
end
|
|
1084
|
-
|
|
1085
|
-
policy "ExamineWhenProjectToolsDocRequested" do
|
|
1086
|
-
on "RegenerationRun.ProjectToolsDocRequested"
|
|
1087
|
-
ask :examine, with: { run: :run }
|
|
1088
|
-
end
|
|
1089
|
-
|
|
1090
|
-
policy "ExamineWhenDecideCiGateRequested" do
|
|
1091
|
-
on "RegenerationRun.DecideCiGateRequested"
|
|
1092
|
-
ask :examine, with: { run: :run }
|
|
1093
|
-
end
|
|
1094
|
-
|
|
1095
|
-
policy "AcceptRegenerationWhenExamined" do
|
|
1096
|
-
on "RegenerationRun.RegenerationExamined"
|
|
1097
|
-
trigger RegenerationRun::Accept, with: { checkout: :checkout }
|
|
1098
|
-
end
|
|
1099
|
-
|
|
1100
|
-
policy "FaultRegenerationWhenNotAccepted" do
|
|
1101
|
-
on "RegenerationRun.RegenerationExamined"
|
|
1102
|
-
where { !checkout.value }
|
|
1103
|
-
trigger RegenerationRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
1104
|
-
end
|
|
1105
|
-
|
|
1106
|
-
policy "PerformRegenerationWhenAccepted" do
|
|
1107
|
-
on "RegenerationRun.RegenerationAccepted"
|
|
1108
|
-
ask :perform, with: { run: :run }
|
|
1109
|
-
end
|
|
1110
|
-
|
|
1111
|
-
policy "RecordRegenerationOutcome" do
|
|
1112
|
-
on "RegenerationRun.RegenerationAnswered"
|
|
1113
|
-
trigger RegenerationRun::Complete, with: { report: :report }
|
|
1114
|
-
end
|
|
1115
|
-
|
|
1116
|
-
policy "RecordRegenerationFault" do
|
|
1117
|
-
on "RegenerationRun.RegenerationRefused"
|
|
1118
|
-
trigger RegenerationRun::Fault, with: { refusal: :refusal }
|
|
1119
|
-
end
|
|
1120
|
-
|
|
1121
|
-
# Gate: the checks a stage holds a change against before it is let through. The checks are data
|
|
1122
|
-
# (the Vocabulary gate rows), run together, and a red one faults the run, so `--wait` fails the
|
|
1123
|
-
# push or the build that asked, and the journal keeps when the gate went red.
|
|
1124
|
-
aggregate "GateRun" do
|
|
1125
|
-
description "One run of a stage's checks: every check of the stage, or the ones named."
|
|
1126
|
-
|
|
1127
|
-
attribute :run, RunKey
|
|
1128
|
-
attribute :operation, Operation, optional: true
|
|
1129
|
-
attribute :stage, Stage
|
|
1130
|
-
attribute :only, CheckList, optional: true
|
|
1131
|
-
attribute :checkout, Switch, optional: true
|
|
1132
|
-
attribute :report, Report, optional: true
|
|
1133
|
-
attribute :refusal, Report, optional: true
|
|
1134
|
-
identified_by :run
|
|
1135
|
-
|
|
1136
|
-
value_object "RunKey" do
|
|
1137
|
-
attribute :value, String, matches: :present
|
|
1138
|
-
|
|
1139
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
1140
|
-
end
|
|
1141
|
-
|
|
1142
|
-
value_object "Operation" do
|
|
1143
|
-
attribute :value, String, matches: :present
|
|
1144
|
-
end
|
|
1145
|
-
|
|
1146
|
-
value_object "Stage" do
|
|
1147
|
-
attribute :value, String, matches: :snake_name
|
|
1148
|
-
|
|
1149
|
-
invariant("a stage is named") { !value.to_s.empty? }
|
|
1150
|
-
end
|
|
1151
|
-
|
|
1152
|
-
value_object "CheckList" do
|
|
1153
|
-
attribute :value, String, pattern: '^[a-z][a-z0-9_]*(,[a-z][a-z0-9_]*)*$'
|
|
1154
|
-
end
|
|
1155
|
-
|
|
1156
|
-
value_object "Switch" do
|
|
1157
|
-
attribute :value, Boolean
|
|
1158
|
-
end
|
|
1159
|
-
|
|
1160
|
-
value_object "Report" do
|
|
1161
|
-
attribute :value, String
|
|
1162
|
-
end
|
|
1163
|
-
|
|
1164
|
-
lifecycle :status, default: "requested" do
|
|
1165
|
-
mark :failure, "faulted"
|
|
1166
|
-
transition "Accept" => "accepted", from: "requested"
|
|
1167
|
-
transition "Complete" => "completed", from: "accepted"
|
|
1168
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
1169
|
-
mark :terminal, "completed", "faulted"
|
|
1170
|
-
end
|
|
1171
|
-
|
|
1172
|
-
command "Gate" do
|
|
1173
|
-
role "Maintainer"
|
|
1174
|
-
goal "Run every check of a stage, or the ones named, and keep whether the gate is green"
|
|
1175
|
-
|
|
1176
|
-
attribute :stage, Stage, sets: true
|
|
1177
|
-
attribute :only, CheckList, optional: true, sets: true
|
|
1178
|
-
attribute :run, RunKey, sets: true
|
|
1179
|
-
|
|
1180
|
-
sets :operation, to: "gate"
|
|
1181
|
-
|
|
1182
|
-
emits GateRequested
|
|
1183
|
-
end
|
|
1184
|
-
|
|
1185
|
-
command "Accept" do
|
|
1186
|
-
role "System"
|
|
1187
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
1188
|
-
|
|
1189
|
-
reference_to GateRun
|
|
1190
|
-
attribute :checkout, Switch, sets: true
|
|
1191
|
-
|
|
1192
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
emits GateAccepted
|
|
1196
|
-
end
|
|
1197
|
-
|
|
1198
|
-
command "Complete" do
|
|
1199
|
-
role "System"
|
|
1200
|
-
goal "Record that every check passed, and which"
|
|
1201
|
-
|
|
1202
|
-
reference_to GateRun
|
|
1203
|
-
attribute :report, Report, sets: true
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
emits GateCompleted
|
|
1207
|
-
end
|
|
1208
|
-
|
|
1209
|
-
command "Fault" do
|
|
1210
|
-
role "System"
|
|
1211
|
-
goal "Record that a check was red or the run could not be made, and why"
|
|
1212
|
-
|
|
1213
|
-
reference_to GateRun
|
|
1214
|
-
attribute :refusal, Report, sets: true
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
emits GateFaulted
|
|
1218
|
-
end
|
|
1219
|
-
|
|
1220
|
-
query "GateOutcome" do
|
|
1221
|
-
description "How one run ended: its status, and what it reported or why it failed."
|
|
1222
|
-
attribute :run, RunKey
|
|
1223
|
-
where(run: :run)
|
|
1224
|
-
order_by :run
|
|
1225
|
-
end
|
|
1226
|
-
|
|
1227
|
-
query "GateFaulted" do
|
|
1228
|
-
description "Every run that went red or could not be made."
|
|
1229
|
-
where(status: "faulted")
|
|
1230
|
-
order_by :run
|
|
1231
|
-
end
|
|
1232
|
-
end
|
|
1233
|
-
|
|
1234
|
-
policy "ExamineWhenGateRequested" do
|
|
1235
|
-
on "GateRun.GateRequested"
|
|
1236
|
-
ask :examine, with: { run: :run }
|
|
1237
|
-
end
|
|
1238
|
-
|
|
1239
|
-
policy "AcceptGateWhenExamined" do
|
|
1240
|
-
on "GateRun.GateExamined"
|
|
1241
|
-
trigger GateRun::Accept, with: { checkout: :checkout }
|
|
1242
|
-
end
|
|
1243
|
-
|
|
1244
|
-
policy "FaultGateWhenNotAccepted" do
|
|
1245
|
-
on "GateRun.GateExamined"
|
|
1246
|
-
where { !checkout.value }
|
|
1247
|
-
trigger GateRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
1248
|
-
end
|
|
1249
|
-
|
|
1250
|
-
policy "PerformGateWhenAccepted" do
|
|
1251
|
-
on "GateRun.GateAccepted"
|
|
1252
|
-
ask :perform, with: { run: :run }
|
|
1253
|
-
end
|
|
1254
|
-
|
|
1255
|
-
policy "RecordGateOutcome" do
|
|
1256
|
-
on "GateRun.GateAnswered"
|
|
1257
|
-
trigger GateRun::Complete, with: { report: :report }
|
|
1258
|
-
end
|
|
1259
|
-
|
|
1260
|
-
policy "RecordGateFault" do
|
|
1261
|
-
on "GateRun.GateRefused"
|
|
1262
|
-
trigger GateRun::Fault, with: { refusal: :refusal }
|
|
1263
|
-
end
|
|
1264
|
-
|
|
1265
|
-
# Style: the comment style guides (Ruby and Rust) and the canonical form of a JSON document. A
|
|
1266
|
-
# check finds every violation; a fix rewrites files, so it lists what it would rewrite unless
|
|
1267
|
-
# it is confirmed. The baseline of tolerated long blocks is written only when confirmed.
|
|
1268
|
-
aggregate "StyleRun" do
|
|
1269
|
-
description "One check or fix of comment style, or one document written with its keys in order."
|
|
1270
|
-
|
|
1271
|
-
attribute :run, RunKey
|
|
1272
|
-
attribute :operation, Operation, optional: true
|
|
1273
|
-
attribute :confirm, Switch, optional: true
|
|
1274
|
-
attribute :paths, PathList, optional: true
|
|
1275
|
-
attribute :only, CategoryList, optional: true
|
|
1276
|
-
attribute :json, Switch, optional: true
|
|
1277
|
-
attribute :top, Top, optional: true
|
|
1278
|
-
attribute :ref, Ref, optional: true
|
|
1279
|
-
attribute :file, FilePath, optional: true
|
|
1280
|
-
attribute :checkout, Switch, optional: true
|
|
1281
|
-
attribute :report, Report, optional: true
|
|
1282
|
-
attribute :refusal, Report, optional: true
|
|
1283
|
-
identified_by :run
|
|
1284
|
-
|
|
1285
|
-
value_object "RunKey" do
|
|
1286
|
-
attribute :value, String, matches: :present
|
|
1287
|
-
|
|
1288
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
1289
|
-
end
|
|
1290
|
-
|
|
1291
|
-
value_object "Operation" do
|
|
1292
|
-
attribute :value, String, matches: :present
|
|
1293
|
-
end
|
|
1294
|
-
|
|
1295
|
-
value_object "Switch" do
|
|
1296
|
-
attribute :value, Boolean
|
|
1297
|
-
end
|
|
1298
|
-
|
|
1299
|
-
value_object "Report" do
|
|
1300
|
-
attribute :value, String
|
|
1301
|
-
end
|
|
1302
|
-
|
|
1303
|
-
# Files or directories, comma separated.
|
|
1304
|
-
value_object "PathList" do
|
|
1305
|
-
attribute :value, String, matches: :csv_list
|
|
1306
|
-
end
|
|
1307
|
-
|
|
1308
|
-
# Violation categories, comma separated.
|
|
1309
|
-
value_object "CategoryList" do
|
|
1310
|
-
attribute :value, String, pattern: '^[a-z_]+(,[a-z_]+)*$'
|
|
1311
|
-
end
|
|
1312
|
-
|
|
1313
|
-
# How many rows a report lists.
|
|
1314
|
-
value_object "Top" do
|
|
1315
|
-
attribute :value, Integer
|
|
1316
|
-
|
|
1317
|
-
invariant("a count is positive") { value > 0 }
|
|
1318
|
-
end
|
|
1319
|
-
|
|
1320
|
-
# A revision a code comparison is made against.
|
|
1321
|
-
value_object "Ref" do
|
|
1322
|
-
attribute :value, String, matches: :no_whitespace
|
|
1323
|
-
end
|
|
1324
|
-
|
|
1325
|
-
# A JSON file.
|
|
1326
|
-
value_object "FilePath" do
|
|
1327
|
-
attribute :value, String, matches: :not_empty
|
|
1328
|
-
|
|
1329
|
-
invariant("a file is named") { !value.to_s.empty? }
|
|
1330
|
-
end
|
|
1331
|
-
|
|
1332
|
-
lifecycle :status, default: "requested" do
|
|
1333
|
-
mark :failure, "faulted"
|
|
1334
|
-
transition "Accept" => "accepted", from: "requested"
|
|
1335
|
-
transition "Complete" => "completed", from: "accepted"
|
|
1336
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
1337
|
-
mark :terminal, "completed", "faulted"
|
|
1338
|
-
end
|
|
1339
|
-
|
|
1340
|
-
command "CheckComments" do
|
|
1341
|
-
role "Maintainer"
|
|
1342
|
-
goal "List every comment that breaks the Ruby style guide"
|
|
1343
|
-
|
|
1344
|
-
attribute :paths, PathList, sets: true
|
|
1345
|
-
attribute :only, CategoryList, optional: true, sets: true
|
|
1346
|
-
attribute :run, RunKey, sets: true
|
|
1347
|
-
|
|
1348
|
-
sets :operation, to: "check_comments"
|
|
1349
|
-
|
|
1350
|
-
emits CheckCommentsRequested
|
|
1351
|
-
end
|
|
1352
|
-
|
|
1353
|
-
command "FixComments" do
|
|
1354
|
-
role "Maintainer"
|
|
1355
|
-
goal "Rewrite the mechanical Ruby comment violations"
|
|
1356
|
-
|
|
1357
|
-
attribute :paths, PathList, sets: true
|
|
1358
|
-
attribute :only, CategoryList, optional: true, sets: true
|
|
1359
|
-
attribute :run, RunKey, sets: true
|
|
1360
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1361
|
-
|
|
1362
|
-
sets :operation, to: "fix_comments"
|
|
1363
|
-
|
|
1364
|
-
emits FixCommentsRequested
|
|
1365
|
-
end
|
|
1366
|
-
|
|
1367
|
-
command "WriteCommentBaseline" do
|
|
1368
|
-
role "Maintainer"
|
|
1369
|
-
goal "Record every long comment block as tolerated, for lib/hecks unless paths are named"
|
|
1370
|
-
|
|
1371
|
-
attribute :paths, PathList, optional: true, sets: true
|
|
1372
|
-
attribute :run, RunKey, sets: true
|
|
1373
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1374
|
-
|
|
1375
|
-
sets :operation, to: "write_comment_baseline"
|
|
1376
|
-
|
|
1377
|
-
emits WriteCommentBaselineRequested
|
|
1378
|
-
end
|
|
1379
|
-
|
|
1380
|
-
command "CheckCommentsUnchanged" do
|
|
1381
|
-
role "Maintainer"
|
|
1382
|
-
goal "Prove an edit was comment-only: no file's code differs from the ref"
|
|
1383
|
-
|
|
1384
|
-
attribute :ref, Ref, sets: true
|
|
1385
|
-
attribute :paths, PathList, optional: true, sets: true
|
|
1386
|
-
attribute :run, RunKey, sets: true
|
|
1387
|
-
|
|
1388
|
-
sets :operation, to: "check_comments_unchanged"
|
|
1389
|
-
|
|
1390
|
-
emits CheckCommentsUnchangedRequested
|
|
1391
|
-
end
|
|
1392
|
-
|
|
1393
|
-
command "CheckRustComments" do
|
|
1394
|
-
role "Maintainer"
|
|
1395
|
-
goal "List every comment that breaks the Rust style guide"
|
|
1396
|
-
|
|
1397
|
-
attribute :paths, PathList, sets: true
|
|
1398
|
-
attribute :only, CategoryList, optional: true, sets: true
|
|
1399
|
-
attribute :run, RunKey, sets: true
|
|
1400
|
-
|
|
1401
|
-
sets :operation, to: "check_rust_comments"
|
|
1402
|
-
|
|
1403
|
-
emits CheckRustCommentsRequested
|
|
1404
|
-
end
|
|
1405
|
-
|
|
1406
|
-
command "FixRustComments" do
|
|
1407
|
-
role "Maintainer"
|
|
1408
|
-
goal "Rewrite the mechanical Rust comment violations"
|
|
1409
|
-
|
|
1410
|
-
attribute :paths, PathList, sets: true
|
|
1411
|
-
attribute :only, CategoryList, optional: true, sets: true
|
|
1412
|
-
attribute :run, RunKey, sets: true
|
|
1413
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1414
|
-
|
|
1415
|
-
sets :operation, to: "fix_rust_comments"
|
|
1416
|
-
|
|
1417
|
-
emits FixRustCommentsRequested
|
|
1418
|
-
end
|
|
1419
|
-
|
|
1420
|
-
command "Canonicalise" do
|
|
1421
|
-
role "Maintainer"
|
|
1422
|
-
goal "Write a JSON document with every object's keys sorted"
|
|
1423
|
-
|
|
1424
|
-
attribute :file, FilePath, sets: true
|
|
1425
|
-
attribute :run, RunKey, sets: true
|
|
1426
|
-
|
|
1427
|
-
sets :operation, to: "canonicalise"
|
|
1428
|
-
|
|
1429
|
-
emits CanonicaliseRequested
|
|
1430
|
-
end
|
|
1431
|
-
|
|
1432
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
1433
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
1434
|
-
command "Accept" do
|
|
1435
|
-
role "System"
|
|
1436
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
1437
|
-
|
|
1438
|
-
reference_to StyleRun
|
|
1439
|
-
attribute :checkout, Switch, sets: true
|
|
1440
|
-
|
|
1441
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
emits StyleAccepted
|
|
1445
|
-
end
|
|
1446
|
-
|
|
1447
|
-
command "Complete" do
|
|
1448
|
-
role "System"
|
|
1449
|
-
goal "Record that the request was carried out, and what it reported"
|
|
1450
|
-
|
|
1451
|
-
reference_to StyleRun
|
|
1452
|
-
attribute :report, Report, sets: true
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
emits StyleCompleted
|
|
1456
|
-
end
|
|
1457
|
-
|
|
1458
|
-
command "Fault" do
|
|
1459
|
-
role "System"
|
|
1460
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
1461
|
-
|
|
1462
|
-
reference_to StyleRun
|
|
1463
|
-
attribute :refusal, Report, sets: true
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
emits StyleFaulted
|
|
1467
|
-
end
|
|
1468
|
-
|
|
1469
|
-
query "StyleOutcome" do
|
|
1470
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
1471
|
-
attribute :run, RunKey
|
|
1472
|
-
where(run: :run)
|
|
1473
|
-
order_by :run
|
|
1474
|
-
end
|
|
1475
|
-
|
|
1476
|
-
query "StyleFaulted" do
|
|
1477
|
-
description "Every request that was refused or could not be carried out."
|
|
1478
|
-
where(status: "faulted")
|
|
1479
|
-
order_by :run
|
|
1480
|
-
end
|
|
1481
|
-
|
|
1482
|
-
# An answer that is one document of text, exactly as the tool that produced it wrote it.
|
|
1483
|
-
value_object "Document" do
|
|
1484
|
-
attribute :text, String
|
|
1485
|
-
end
|
|
1486
|
-
|
|
1487
|
-
query "ReportComments" do
|
|
1488
|
-
description "The Ruby comment violations, as summary tables, a list or JSON."
|
|
1489
|
-
attribute :paths, PathList
|
|
1490
|
-
attribute :only, CategoryList, optional: true
|
|
1491
|
-
attribute :json, Switch, optional: true
|
|
1492
|
-
attribute :top, Top, optional: true
|
|
1493
|
-
returns Document
|
|
1494
|
-
end
|
|
1495
|
-
|
|
1496
|
-
query "ReportRustComments" do
|
|
1497
|
-
description "The Rust comment violations, as summary tables, a list or JSON."
|
|
1498
|
-
attribute :paths, PathList
|
|
1499
|
-
attribute :only, CategoryList, optional: true
|
|
1500
|
-
attribute :json, Switch, optional: true
|
|
1501
|
-
attribute :top, Top, optional: true
|
|
1502
|
-
returns Document
|
|
1503
|
-
end
|
|
1504
|
-
end
|
|
1505
|
-
|
|
1506
|
-
policy "ExamineWhenCheckCommentsRequested" do
|
|
1507
|
-
on "StyleRun.CheckCommentsRequested"
|
|
1508
|
-
ask :examine, with: { run: :run }
|
|
1509
|
-
end
|
|
1510
|
-
|
|
1511
|
-
policy "ExamineWhenFixCommentsRequested" do
|
|
1512
|
-
on "StyleRun.FixCommentsRequested"
|
|
1513
|
-
ask :examine, with: { run: :run }
|
|
1514
|
-
end
|
|
1515
|
-
|
|
1516
|
-
policy "ExamineWhenWriteCommentBaselineRequested" do
|
|
1517
|
-
on "StyleRun.WriteCommentBaselineRequested"
|
|
1518
|
-
ask :examine, with: { run: :run }
|
|
1519
|
-
end
|
|
1520
|
-
|
|
1521
|
-
policy "ExamineWhenCheckCommentsUnchangedRequested" do
|
|
1522
|
-
on "StyleRun.CheckCommentsUnchangedRequested"
|
|
1523
|
-
ask :examine, with: { run: :run }
|
|
1524
|
-
end
|
|
1525
|
-
|
|
1526
|
-
policy "ExamineWhenCheckRustCommentsRequested" do
|
|
1527
|
-
on "StyleRun.CheckRustCommentsRequested"
|
|
1528
|
-
ask :examine, with: { run: :run }
|
|
1529
|
-
end
|
|
1530
|
-
|
|
1531
|
-
policy "ExamineWhenFixRustCommentsRequested" do
|
|
1532
|
-
on "StyleRun.FixRustCommentsRequested"
|
|
1533
|
-
ask :examine, with: { run: :run }
|
|
1534
|
-
end
|
|
1535
|
-
|
|
1536
|
-
policy "ExamineWhenCanonicaliseRequested" do
|
|
1537
|
-
on "StyleRun.CanonicaliseRequested"
|
|
1538
|
-
ask :examine, with: { run: :run }
|
|
1539
|
-
end
|
|
1540
|
-
|
|
1541
|
-
policy "AcceptStyleWhenExamined" do
|
|
1542
|
-
on "StyleRun.StyleExamined"
|
|
1543
|
-
trigger StyleRun::Accept, with: { checkout: :checkout }
|
|
1544
|
-
end
|
|
1545
|
-
|
|
1546
|
-
policy "FaultStyleWhenNotAccepted" do
|
|
1547
|
-
on "StyleRun.StyleExamined"
|
|
1548
|
-
where { !checkout.value }
|
|
1549
|
-
trigger StyleRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
1550
|
-
end
|
|
1551
|
-
|
|
1552
|
-
policy "PerformStyleWhenAccepted" do
|
|
1553
|
-
on "StyleRun.StyleAccepted"
|
|
1554
|
-
ask :perform, with: { run: :run }
|
|
1555
|
-
end
|
|
1556
|
-
|
|
1557
|
-
policy "RecordStyleOutcome" do
|
|
1558
|
-
on "StyleRun.StyleAnswered"
|
|
1559
|
-
trigger StyleRun::Complete, with: { report: :report }
|
|
1560
|
-
end
|
|
1561
|
-
|
|
1562
|
-
policy "RecordStyleFault" do
|
|
1563
|
-
on "StyleRun.StyleRefused"
|
|
1564
|
-
trigger StyleRun::Fault, with: { refusal: :refusal }
|
|
1565
|
-
end
|
|
1566
|
-
|
|
1567
|
-
# Inspection: ranking the Ruby by complexity, finding copied code, listing design smells and
|
|
1568
|
-
# writing the combined report. A read of the tree: nothing is rewritten. The files the style
|
|
1569
|
-
# config excludes (generated output, vendored code) are left out of every tool.
|
|
1570
|
-
aggregate "InspectionRun" do
|
|
1571
|
-
description "One inspection of the Ruby by flog, flay, reek or rubycritic."
|
|
1572
|
-
|
|
1573
|
-
attribute :run, RunKey
|
|
1574
|
-
attribute :operation, Operation, optional: true
|
|
1575
|
-
attribute :paths, PathList, optional: true
|
|
1576
|
-
attribute :top, Top, optional: true
|
|
1577
|
-
attribute :checkout, Switch, optional: true
|
|
1578
|
-
attribute :report, Report, optional: true
|
|
1579
|
-
attribute :refusal, Report, optional: true
|
|
1580
|
-
identified_by :run
|
|
1581
|
-
|
|
1582
|
-
value_object "RunKey" do
|
|
1583
|
-
attribute :value, String, matches: :present
|
|
1584
|
-
|
|
1585
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
1586
|
-
end
|
|
1587
|
-
|
|
1588
|
-
value_object "Operation" do
|
|
1589
|
-
attribute :value, String, matches: :present
|
|
1590
|
-
end
|
|
1591
|
-
|
|
1592
|
-
value_object "Switch" do
|
|
1593
|
-
attribute :value, Boolean
|
|
1594
|
-
end
|
|
1595
|
-
|
|
1596
|
-
value_object "Report" do
|
|
1597
|
-
attribute :value, String
|
|
1598
|
-
end
|
|
1599
|
-
|
|
1600
|
-
# Files or directories, comma separated; lib when none is named.
|
|
1601
|
-
value_object "PathList" do
|
|
1602
|
-
attribute :value, String, matches: :csv_list
|
|
1603
|
-
end
|
|
1604
|
-
|
|
1605
|
-
# How many lines of the report are kept.
|
|
1606
|
-
value_object "Top" do
|
|
1607
|
-
attribute :value, Integer
|
|
1608
|
-
|
|
1609
|
-
invariant("a count is positive") { value > 0 }
|
|
1610
|
-
end
|
|
1611
|
-
|
|
1612
|
-
lifecycle :status, default: "requested" do
|
|
1613
|
-
mark :failure, "faulted"
|
|
1614
|
-
transition "Accept" => "accepted", from: "requested"
|
|
1615
|
-
transition "Complete" => "completed", from: "accepted"
|
|
1616
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
1617
|
-
mark :terminal, "completed", "faulted"
|
|
1618
|
-
end
|
|
1619
|
-
|
|
1620
|
-
command "Flog" do
|
|
1621
|
-
role "Maintainer"
|
|
1622
|
-
goal "Rank the Ruby methods by complexity, worst first"
|
|
1623
|
-
|
|
1624
|
-
attribute :paths, PathList, optional: true, sets: true
|
|
1625
|
-
attribute :top, Top, optional: true, sets: true
|
|
1626
|
-
attribute :run, RunKey, sets: true
|
|
1627
|
-
|
|
1628
|
-
sets :operation, to: "flog"
|
|
1629
|
-
|
|
1630
|
-
emits FlogRequested
|
|
1631
|
-
end
|
|
1632
|
-
|
|
1633
|
-
command "Flay" do
|
|
1634
|
-
role "Maintainer"
|
|
1635
|
-
goal "Find Ruby code that is copied or nearly copied"
|
|
1636
|
-
|
|
1637
|
-
attribute :paths, PathList, optional: true, sets: true
|
|
1638
|
-
attribute :top, Top, optional: true, sets: true
|
|
1639
|
-
attribute :run, RunKey, sets: true
|
|
1640
|
-
|
|
1641
|
-
sets :operation, to: "flay"
|
|
1642
|
-
|
|
1643
|
-
emits FlayRequested
|
|
1644
|
-
end
|
|
1645
|
-
|
|
1646
|
-
command "Reek" do
|
|
1647
|
-
role "Maintainer"
|
|
1648
|
-
goal "List the design smells in the Ruby"
|
|
1649
|
-
|
|
1650
|
-
attribute :paths, PathList, optional: true, sets: true
|
|
1651
|
-
attribute :top, Top, optional: true, sets: true
|
|
1652
|
-
attribute :run, RunKey, sets: true
|
|
1653
|
-
|
|
1654
|
-
sets :operation, to: "reek"
|
|
1655
|
-
|
|
1656
|
-
emits ReekRequested
|
|
1657
|
-
end
|
|
1658
|
-
|
|
1659
|
-
command "Rubycritic" do
|
|
1660
|
-
role "Maintainer"
|
|
1661
|
-
goal "Write the combined quality report, with git churn"
|
|
1662
|
-
|
|
1663
|
-
attribute :paths, PathList, optional: true, sets: true
|
|
1664
|
-
attribute :top, Top, optional: true, sets: true
|
|
1665
|
-
attribute :run, RunKey, sets: true
|
|
1666
|
-
|
|
1667
|
-
sets :operation, to: "rubycritic"
|
|
1668
|
-
|
|
1669
|
-
emits RubycriticRequested
|
|
1670
|
-
end
|
|
1671
|
-
|
|
1672
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
1673
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
1674
|
-
command "Accept" do
|
|
1675
|
-
role "System"
|
|
1676
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
1677
|
-
|
|
1678
|
-
reference_to InspectionRun
|
|
1679
|
-
attribute :checkout, Switch, sets: true
|
|
1680
|
-
|
|
1681
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
emits InspectionAccepted
|
|
1685
|
-
end
|
|
1686
|
-
|
|
1687
|
-
command "Complete" do
|
|
1688
|
-
role "System"
|
|
1689
|
-
goal "Record that the inspection was carried out, and what it reported"
|
|
1690
|
-
|
|
1691
|
-
reference_to InspectionRun
|
|
1692
|
-
attribute :report, Report, sets: true
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
emits InspectionCompleted
|
|
1696
|
-
end
|
|
1697
|
-
|
|
1698
|
-
command "Fault" do
|
|
1699
|
-
role "System"
|
|
1700
|
-
goal "Record that the inspection was refused or could not be carried out, and why"
|
|
1701
|
-
|
|
1702
|
-
reference_to InspectionRun
|
|
1703
|
-
attribute :refusal, Report, sets: true
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
emits InspectionFaulted
|
|
1707
|
-
end
|
|
1708
|
-
|
|
1709
|
-
query "InspectionOutcome" do
|
|
1710
|
-
description "How one inspection ended: its status, and what it reported or why it failed."
|
|
1711
|
-
attribute :run, RunKey
|
|
1712
|
-
where(run: :run)
|
|
1713
|
-
order_by :run
|
|
1714
|
-
end
|
|
1715
|
-
|
|
1716
|
-
query "InspectionsFaulted" do
|
|
1717
|
-
description "Every inspection that was refused or could not be carried out."
|
|
1718
|
-
where(status: "faulted")
|
|
1719
|
-
order_by :run
|
|
1720
|
-
end
|
|
1721
|
-
|
|
1722
|
-
# A regular expression, matched against one line of text at a time.
|
|
1723
|
-
value_object "Pattern" do
|
|
1724
|
-
attribute :value, String, matches: :present
|
|
1725
|
-
end
|
|
1726
|
-
|
|
1727
|
-
# An answer that is one document of text, one `path:line: text` row to a match.
|
|
1728
|
-
value_object "Document" do
|
|
1729
|
-
attribute :text, String
|
|
1730
|
-
end
|
|
1731
|
-
|
|
1732
|
-
query "Search" do
|
|
1733
|
-
description "The lines of the checkout's text files that match a pattern, as path:line: text."
|
|
1734
|
-
attribute :pattern, Pattern
|
|
1735
|
-
attribute :paths, PathList, optional: true
|
|
1736
|
-
attribute :top, Top, optional: true
|
|
1737
|
-
returns Document
|
|
1738
|
-
end
|
|
1739
|
-
|
|
1740
|
-
# A file of the checkout, named from its root.
|
|
1741
|
-
value_object "SourcePath" do
|
|
1742
|
-
attribute :value, String, matches: :present
|
|
1743
|
-
end
|
|
1744
|
-
|
|
1745
|
-
# A line of a file, counted from 1.
|
|
1746
|
-
value_object "LineNumber" do
|
|
1747
|
-
attribute :value, Integer
|
|
1748
|
-
|
|
1749
|
-
invariant("a line is counted from 1") { value > 0 }
|
|
1750
|
-
end
|
|
1751
|
-
|
|
1752
|
-
# The name a construct is declared under, as it stands between the quotes.
|
|
1753
|
-
value_object "DeclaredName" do
|
|
1754
|
-
attribute :value, String, matches: :present
|
|
1755
|
-
end
|
|
1756
|
-
|
|
1757
|
-
# What a declaration is: aggregate, command, query, policy and the rest.
|
|
1758
|
-
value_object "DeclaredKind" do
|
|
1759
|
-
attribute :value, String, pattern: '^[a-z_]+$'
|
|
1760
|
-
end
|
|
1761
|
-
|
|
1762
|
-
query "ReadSource" do
|
|
1763
|
-
description "The numbered lines of one file of the checkout, whole or from one line to another."
|
|
1764
|
-
attribute :path, SourcePath
|
|
1765
|
-
attribute :from, LineNumber, optional: true
|
|
1766
|
-
attribute :to, LineNumber, optional: true
|
|
1767
|
-
attribute :top, Top, optional: true
|
|
1768
|
-
returns Document
|
|
1769
|
-
end
|
|
1770
|
-
|
|
1771
|
-
query "Outline" do
|
|
1772
|
-
description "What a file declares, by line: each construct of a bluebook, each definition of Ruby."
|
|
1773
|
-
attribute :path, SourcePath
|
|
1774
|
-
returns Document
|
|
1775
|
-
end
|
|
1776
|
-
|
|
1777
|
-
query "Declaration" do
|
|
1778
|
-
description "Where a named construct is declared across the corpus, as path:from-to, with its text on request."
|
|
1779
|
-
attribute :name, DeclaredName
|
|
1780
|
-
attribute :kind, DeclaredKind, optional: true
|
|
1781
|
-
attribute :paths, PathList, optional: true
|
|
1782
|
-
attribute :show, Switch, optional: true
|
|
1783
|
-
returns Document
|
|
1784
|
-
end
|
|
1785
|
-
end
|
|
1786
|
-
|
|
1787
|
-
policy "ExamineWhenFlogRequested" do
|
|
1788
|
-
on "InspectionRun.FlogRequested"
|
|
1789
|
-
ask :examine, with: { run: :run }
|
|
1790
|
-
end
|
|
1791
|
-
|
|
1792
|
-
policy "ExamineWhenFlayRequested" do
|
|
1793
|
-
on "InspectionRun.FlayRequested"
|
|
1794
|
-
ask :examine, with: { run: :run }
|
|
1795
|
-
end
|
|
1796
|
-
|
|
1797
|
-
policy "ExamineWhenReekRequested" do
|
|
1798
|
-
on "InspectionRun.ReekRequested"
|
|
1799
|
-
ask :examine, with: { run: :run }
|
|
1800
|
-
end
|
|
1801
|
-
|
|
1802
|
-
policy "ExamineWhenRubycriticRequested" do
|
|
1803
|
-
on "InspectionRun.RubycriticRequested"
|
|
1804
|
-
ask :examine, with: { run: :run }
|
|
1805
|
-
end
|
|
1806
|
-
|
|
1807
|
-
policy "AcceptInspectionWhenExamined" do
|
|
1808
|
-
on "InspectionRun.InspectionExamined"
|
|
1809
|
-
trigger InspectionRun::Accept, with: { checkout: :checkout }
|
|
1810
|
-
end
|
|
1811
|
-
|
|
1812
|
-
policy "FaultInspectionWhenNotAccepted" do
|
|
1813
|
-
on "InspectionRun.InspectionExamined"
|
|
1814
|
-
where { !checkout.value }
|
|
1815
|
-
trigger InspectionRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
1816
|
-
end
|
|
1817
|
-
|
|
1818
|
-
policy "PerformInspectionWhenAccepted" do
|
|
1819
|
-
on "InspectionRun.InspectionAccepted"
|
|
1820
|
-
ask :perform, with: { run: :run }
|
|
1821
|
-
end
|
|
1822
|
-
|
|
1823
|
-
policy "RecordInspectionOutcome" do
|
|
1824
|
-
on "InspectionRun.InspectionAnswered"
|
|
1825
|
-
trigger InspectionRun::Complete, with: { report: :report }
|
|
1826
|
-
end
|
|
1827
|
-
|
|
1828
|
-
policy "RecordInspectionFault" do
|
|
1829
|
-
on "InspectionRun.InspectionRefused"
|
|
1830
|
-
trigger InspectionRun::Fault, with: { refusal: :refusal }
|
|
1831
|
-
end
|
|
1832
|
-
|
|
1833
|
-
# Codemod: the mechanical rewrites of the example bluebooks. Each one edits tracked files, so
|
|
1834
|
-
# unconfirmed it rehearses the edit (the script reboots every bluebook and puts the files back)
|
|
1835
|
-
# and reports what it would change; the files stay changed only when it is confirmed.
|
|
1836
|
-
aggregate "CodemodRun" do
|
|
1837
|
-
description "One rewrite of the example bluebooks by a codemod, or the rehearsal of it."
|
|
1838
|
-
|
|
1839
|
-
attribute :run, RunKey
|
|
1840
|
-
attribute :operation, Operation, optional: true
|
|
1841
|
-
attribute :confirm, Switch, optional: true
|
|
1842
|
-
attribute :checkout, Switch, optional: true
|
|
1843
|
-
attribute :report, Report, optional: true
|
|
1844
|
-
attribute :refusal, Report, optional: true
|
|
1845
|
-
identified_by :run
|
|
1846
|
-
|
|
1847
|
-
value_object "RunKey" do
|
|
1848
|
-
attribute :value, String, matches: :present
|
|
1849
|
-
|
|
1850
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
1851
|
-
end
|
|
1852
|
-
|
|
1853
|
-
value_object "Operation" do
|
|
1854
|
-
attribute :value, String, matches: :present
|
|
1855
|
-
end
|
|
1856
|
-
|
|
1857
|
-
value_object "Switch" do
|
|
1858
|
-
attribute :value, Boolean
|
|
1859
|
-
end
|
|
1860
|
-
|
|
1861
|
-
value_object "Report" do
|
|
1862
|
-
attribute :value, String
|
|
1863
|
-
end
|
|
1864
|
-
|
|
1865
|
-
lifecycle :status, default: "requested" do
|
|
1866
|
-
mark :failure, "faulted"
|
|
1867
|
-
transition "Accept" => "accepted", from: "requested"
|
|
1868
|
-
transition "Complete" => "completed", from: "accepted"
|
|
1869
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
1870
|
-
mark :terminal, "completed", "faulted"
|
|
1871
|
-
end
|
|
1872
|
-
|
|
1873
|
-
command "HoistLocalGivens" do
|
|
1874
|
-
role "Maintainer"
|
|
1875
|
-
goal "Hoist a given that several commands of one owner repeat into one owner-level given"
|
|
1876
|
-
|
|
1877
|
-
attribute :run, RunKey, sets: true
|
|
1878
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1879
|
-
|
|
1880
|
-
sets :operation, to: "hoist_local_givens"
|
|
1881
|
-
|
|
1882
|
-
emits HoistLocalGivensRequested
|
|
1883
|
-
end
|
|
1884
|
-
|
|
1885
|
-
command "DropImplicitAppendFields" do
|
|
1886
|
-
role "Maintainer"
|
|
1887
|
-
goal "Drop an attribute line that only repeats what an append target element declares"
|
|
1888
|
-
|
|
1889
|
-
attribute :run, RunKey, sets: true
|
|
1890
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
1891
|
-
|
|
1892
|
-
sets :operation, to: "drop_implicit_append_fields"
|
|
1893
|
-
|
|
1894
|
-
emits DropImplicitAppendFieldsRequested
|
|
1895
|
-
end
|
|
1896
|
-
|
|
1897
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
1898
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
1899
|
-
command "Accept" do
|
|
1900
|
-
role "System"
|
|
1901
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
1902
|
-
|
|
1903
|
-
reference_to CodemodRun
|
|
1904
|
-
attribute :checkout, Switch, sets: true
|
|
1905
|
-
|
|
1906
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
emits CodemodAccepted
|
|
1910
|
-
end
|
|
1911
|
-
|
|
1912
|
-
command "Complete" do
|
|
1913
|
-
role "System"
|
|
1914
|
-
goal "Record that the request was carried out, and what it reported"
|
|
1915
|
-
|
|
1916
|
-
reference_to CodemodRun
|
|
1917
|
-
attribute :report, Report, sets: true
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
emits CodemodCompleted
|
|
1921
|
-
end
|
|
1922
|
-
|
|
1923
|
-
command "Fault" do
|
|
1924
|
-
role "System"
|
|
1925
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
1926
|
-
|
|
1927
|
-
reference_to CodemodRun
|
|
1928
|
-
attribute :refusal, Report, sets: true
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
emits CodemodFaulted
|
|
1932
|
-
end
|
|
1933
|
-
|
|
1934
|
-
query "CodemodOutcome" do
|
|
1935
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
1936
|
-
attribute :run, RunKey
|
|
1937
|
-
where(run: :run)
|
|
1938
|
-
order_by :run
|
|
1939
|
-
end
|
|
1940
|
-
|
|
1941
|
-
query "CodemodFaulted" do
|
|
1942
|
-
description "Every request that was refused or could not be carried out."
|
|
1943
|
-
where(status: "faulted")
|
|
1944
|
-
order_by :run
|
|
1945
|
-
end
|
|
1946
|
-
end
|
|
1947
|
-
|
|
1948
|
-
policy "ExamineWhenHoistLocalGivensRequested" do
|
|
1949
|
-
on "CodemodRun.HoistLocalGivensRequested"
|
|
1950
|
-
ask :examine, with: { run: :run }
|
|
1951
|
-
end
|
|
1952
|
-
|
|
1953
|
-
policy "ExamineWhenDropImplicitAppendFieldsRequested" do
|
|
1954
|
-
on "CodemodRun.DropImplicitAppendFieldsRequested"
|
|
1955
|
-
ask :examine, with: { run: :run }
|
|
1956
|
-
end
|
|
1957
|
-
|
|
1958
|
-
policy "AcceptCodemodWhenExamined" do
|
|
1959
|
-
on "CodemodRun.CodemodExamined"
|
|
1960
|
-
trigger CodemodRun::Accept, with: { checkout: :checkout }
|
|
1961
|
-
end
|
|
1962
|
-
|
|
1963
|
-
policy "FaultCodemodWhenNotAccepted" do
|
|
1964
|
-
on "CodemodRun.CodemodExamined"
|
|
1965
|
-
where { !checkout.value }
|
|
1966
|
-
trigger CodemodRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
1967
|
-
end
|
|
1968
|
-
|
|
1969
|
-
policy "PerformCodemodWhenAccepted" do
|
|
1970
|
-
on "CodemodRun.CodemodAccepted"
|
|
1971
|
-
ask :perform, with: { run: :run }
|
|
1972
|
-
end
|
|
1973
|
-
|
|
1974
|
-
policy "RecordCodemodOutcome" do
|
|
1975
|
-
on "CodemodRun.CodemodAnswered"
|
|
1976
|
-
trigger CodemodRun::Complete, with: { report: :report }
|
|
1977
|
-
end
|
|
1978
|
-
|
|
1979
|
-
policy "RecordCodemodFault" do
|
|
1980
|
-
on "CodemodRun.CodemodRefused"
|
|
1981
|
-
trigger CodemodRun::Fault, with: { refusal: :refusal }
|
|
1982
|
-
end
|
|
1983
|
-
|
|
1984
|
-
# TestSuite: the tooling around this repository's specs. Listings of which files a shard or a
|
|
1985
|
-
# job runs are pure reads; refreshing the committed timings, rewriting the persistence fixtures
|
|
1986
|
-
# and writing the committed spec list change tracked files and need --confirm; a stress run
|
|
1987
|
-
# and a single example only run specs and write nothing tracked.
|
|
1988
|
-
aggregate "TestSuiteRun" do
|
|
1989
|
-
description "One piece of work on the test suite: a listing, a baseline, a run or a fixture rewrite."
|
|
1990
|
-
|
|
1991
|
-
attribute :run, RunKey
|
|
1992
|
-
attribute :operation, Operation, optional: true
|
|
1993
|
-
attribute :confirm, Switch, optional: true
|
|
1994
|
-
attribute :workers, Count, optional: true
|
|
1995
|
-
attribute :from_run, RunId, optional: true
|
|
1996
|
-
attribute :file, FilePath, optional: true
|
|
1997
|
-
attribute :example, ExampleText, optional: true
|
|
1998
|
-
attribute :runs, Count, optional: true
|
|
1999
|
-
attribute :parallel, Count, optional: true
|
|
2000
|
-
attribute :seed_start, Count, optional: true
|
|
2001
|
-
attribute :fixture, FixtureName, optional: true
|
|
2002
|
-
attribute :exclude, ExcludePattern, optional: true
|
|
2003
|
-
attribute :tags, TagArguments, optional: true
|
|
2004
|
-
attribute :strict, Switch, optional: true
|
|
2005
|
-
attribute :seeds, Count, optional: true
|
|
2006
|
-
attribute :environment, EnvironmentName, optional: true
|
|
2007
|
-
attribute :declaration_cache, Switch, optional: true
|
|
2008
|
-
attribute :crate, CrateName, optional: true
|
|
2009
|
-
attribute :write, FilePath, optional: true
|
|
2010
|
-
attribute :group, Count, optional: true
|
|
2011
|
-
attribute :groups, Count, optional: true
|
|
2012
|
-
attribute :runtime_log, FilePath, optional: true
|
|
2013
|
-
attribute :check, FilePath, optional: true
|
|
2014
|
-
attribute :checkout, Switch, optional: true
|
|
2015
|
-
attribute :report, Report, optional: true
|
|
2016
|
-
attribute :refusal, Report, optional: true
|
|
2017
|
-
identified_by :run
|
|
2018
|
-
|
|
2019
|
-
value_object "RunKey" do
|
|
2020
|
-
attribute :value, String, matches: :present
|
|
2021
|
-
|
|
2022
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
2023
|
-
end
|
|
2024
|
-
|
|
2025
|
-
value_object "Operation" do
|
|
2026
|
-
attribute :value, String, matches: :present
|
|
2027
|
-
end
|
|
2028
|
-
|
|
2029
|
-
value_object "Switch" do
|
|
2030
|
-
attribute :value, Boolean
|
|
2031
|
-
end
|
|
2032
|
-
|
|
2033
|
-
value_object "Report" do
|
|
2034
|
-
attribute :value, String
|
|
2035
|
-
end
|
|
2036
|
-
|
|
2037
|
-
# How many, always at least one.
|
|
2038
|
-
value_object "Count" do
|
|
2039
|
-
attribute :value, Integer
|
|
2040
|
-
|
|
2041
|
-
invariant("a count is positive") { value > 0 }
|
|
2042
|
-
end
|
|
2043
|
-
|
|
2044
|
-
# A CI run's number.
|
|
2045
|
-
value_object "RunId" do
|
|
2046
|
-
attribute :value, String, matches: :digits
|
|
2047
|
-
end
|
|
2048
|
-
|
|
2049
|
-
# A file, relative to the checkout or absolute.
|
|
2050
|
-
value_object "FilePath" do
|
|
2051
|
-
attribute :value, String, matches: :not_empty
|
|
2052
|
-
|
|
2053
|
-
invariant("a file is named") { !value.to_s.empty? }
|
|
2054
|
-
end
|
|
2055
|
-
|
|
2056
|
-
# Part of an example's description.
|
|
2057
|
-
value_object "ExampleText" do
|
|
2058
|
-
attribute :value, String, matches: :not_empty
|
|
2059
|
-
|
|
2060
|
-
invariant("an example is named") { !value.to_s.empty? }
|
|
2061
|
-
end
|
|
2062
|
-
|
|
2063
|
-
# The name of a semantics-corpus fixture.
|
|
2064
|
-
value_object "FixtureName" do
|
|
2065
|
-
attribute :value, String, pattern: '^[a-z0-9_]+$'
|
|
2066
|
-
end
|
|
2067
|
-
|
|
2068
|
-
# A regular expression naming the specs to leave out.
|
|
2069
|
-
value_object "ExcludePattern" do
|
|
2070
|
-
attribute :value, String, matches: :not_empty
|
|
2071
|
-
end
|
|
2072
|
-
|
|
2073
|
-
# The tag filter, as the test runner spells it.
|
|
2074
|
-
value_object "TagArguments" do
|
|
2075
|
-
attribute :value, String, pattern: '^[^\t\n\r]+$'
|
|
2076
|
-
end
|
|
2077
|
-
|
|
2078
|
-
# An environment overlay's name, as `environments/<name>.world` spells it.
|
|
2079
|
-
value_object "EnvironmentName" do
|
|
2080
|
-
attribute :value, String, pattern: '^[a-z][a-z0-9_]*$'
|
|
2081
|
-
end
|
|
2082
|
-
|
|
2083
|
-
# A Rust test target whose fuzzers take their seed counts as arguments: the host, the parser,
|
|
2084
|
-
# or the JSON parse fuzzer of the root crate.
|
|
2085
|
-
value_object "CrateName" do
|
|
2086
|
-
attribute :value, String, pattern: '^(host|parser|json)$'
|
|
2087
|
-
end
|
|
2088
|
-
|
|
2089
|
-
lifecycle :status, default: "requested" do
|
|
2090
|
-
mark :failure, "faulted"
|
|
2091
|
-
transition "Accept" => "accepted", from: "requested"
|
|
2092
|
-
transition "Complete" => "completed", from: "accepted"
|
|
2093
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
2094
|
-
mark :terminal, "completed", "faulted"
|
|
2095
|
-
end
|
|
2096
|
-
|
|
2097
|
-
command "RefreshRuntimeBaseline" do
|
|
2098
|
-
role "Maintainer"
|
|
2099
|
-
goal "Regenerate the committed runtime baselines the sharded jobs group from"
|
|
2100
|
-
|
|
2101
|
-
attribute :workers, Count, default: 6, sets: true
|
|
2102
|
-
attribute :from_run, RunId, optional: true, sets: true
|
|
2103
|
-
attribute :run, RunKey, sets: true
|
|
2104
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
2105
|
-
|
|
2106
|
-
sets :operation, to: "refresh_runtime_baseline"
|
|
2107
|
-
|
|
2108
|
-
emits RefreshRuntimeBaselineRequested
|
|
2109
|
-
end
|
|
2110
|
-
|
|
2111
|
-
command "RunSpecExample" do
|
|
2112
|
-
role "Maintainer"
|
|
2113
|
-
goal "Run one spec file filtered to one example, through the test runner in this process"
|
|
2114
|
-
|
|
2115
|
-
attribute :file, FilePath, sets: true
|
|
2116
|
-
attribute :example, ExampleText, sets: true
|
|
2117
|
-
attribute :run, RunKey, sets: true
|
|
2118
|
-
# Run the specs as CI does: the slow io, process and fuzzing groups included, and a Postgres
|
|
2119
|
-
# that is not reachable a failure, not a skip.
|
|
2120
|
-
attribute :strict, Switch, optional: true, sets: true
|
|
2121
|
-
# How many seeds the property specs try, where they default to a few.
|
|
2122
|
-
attribute :seeds, Count, optional: true, sets: true
|
|
2123
|
-
# The environment overlay the example boots its domains on, such as `memory`.
|
|
2124
|
-
attribute :environment, EnvironmentName, optional: true, sets: true
|
|
2125
|
-
# RSpec tag filters, such as `cloudfront` for the examples that call a real AWS account.
|
|
2126
|
-
attribute :tags, TagArguments, optional: true, sets: true
|
|
2127
|
-
# Whether specs share the loaded declarations of an unchanged domain directory; false loads each
|
|
2128
|
-
# boot afresh.
|
|
2129
|
-
attribute :declaration_cache, Switch, default: true, sets: true
|
|
2130
|
-
|
|
2131
|
-
sets :operation, to: "run_spec_example"
|
|
2132
|
-
|
|
2133
|
-
emits RunSpecExampleRequested
|
|
2134
|
-
end
|
|
2135
|
-
|
|
2136
|
-
command "StressConcurrency" do
|
|
2137
|
-
role "Maintainer"
|
|
2138
|
-
goal "Rerun the thread-safety specs under many seeds, several processes at a time"
|
|
2139
|
-
|
|
2140
|
-
attribute :runs, Count, default: 30, sets: true
|
|
2141
|
-
# The machine's own core count when none is named, which no fixed default can say.
|
|
2142
|
-
attribute :parallel, Count, optional: true, sets: true
|
|
2143
|
-
attribute :seed_start, Count, default: 1, sets: true
|
|
2144
|
-
attribute :run, RunKey, sets: true
|
|
2145
|
-
|
|
2146
|
-
sets :operation, to: "stress_concurrency"
|
|
2147
|
-
|
|
2148
|
-
emits StressConcurrencyRequested
|
|
2149
|
-
end
|
|
2150
|
-
|
|
2151
|
-
command "RunCargoTests" do
|
|
2152
|
-
role "Maintainer"
|
|
2153
|
-
goal "Run the cargo tests of the host, the parser or the JSON fuzzer, with the seed counts their fuzzers take"
|
|
2154
|
-
|
|
2155
|
-
attribute :crate, CrateName, sets: true
|
|
2156
|
-
attribute :seeds, Count, optional: true, sets: true
|
|
2157
|
-
attribute :seed_start, Count, optional: true, sets: true
|
|
2158
|
-
attribute :run, RunKey, sets: true
|
|
2159
|
-
|
|
2160
|
-
sets :operation, to: "run_cargo_tests"
|
|
2161
|
-
|
|
2162
|
-
emits RunCargoTestsRequested
|
|
2163
|
-
end
|
|
2164
|
-
|
|
2165
|
-
# The caches key on a digest of what they were built from, so a stale entry is never read; this
|
|
2166
|
-
# is for ruling a cache out as the cause of a surprise, which turning it off used to do.
|
|
2167
|
-
command "ClearCaches" do
|
|
2168
|
-
role "Maintainer"
|
|
2169
|
-
goal "Delete the on-disk syntax-boot and verdict caches, so the next boot builds and judges afresh"
|
|
2170
|
-
|
|
2171
|
-
attribute :run, RunKey, sets: true
|
|
2172
|
-
|
|
2173
|
-
sets :operation, to: "clear_caches"
|
|
2174
|
-
|
|
2175
|
-
emits ClearCachesRequested
|
|
2176
|
-
end
|
|
2177
|
-
|
|
2178
|
-
command "RegenerateLegacyFixtures" do
|
|
2179
|
-
role "Maintainer"
|
|
2180
|
-
goal "Regenerate the persistence legacy fixtures through the real adapters"
|
|
2181
|
-
|
|
2182
|
-
attribute :run, RunKey, sets: true
|
|
2183
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
2184
|
-
|
|
2185
|
-
sets :operation, to: "regenerate_legacy_fixtures"
|
|
2186
|
-
|
|
2187
|
-
emits RegenerateLegacyFixturesRequested
|
|
2188
|
-
end
|
|
2189
|
-
|
|
2190
|
-
command "SeedSemanticsCorpus" do
|
|
2191
|
-
role "Maintainer"
|
|
2192
|
-
goal "Fill the expected outcome of every semantics fixture that lacks one, or re-seed one"
|
|
2193
|
-
|
|
2194
|
-
attribute :fixture, FixtureName, optional: true, sets: true
|
|
2195
|
-
attribute :run, RunKey, sets: true
|
|
2196
|
-
|
|
2197
|
-
sets :operation, to: "seed_semantics_corpus"
|
|
2198
|
-
|
|
2199
|
-
emits SeedSemanticsCorpusRequested
|
|
2200
|
-
end
|
|
2201
|
-
|
|
2202
|
-
command "WriteIoParallelSpecList" do
|
|
2203
|
-
role "Maintainer"
|
|
2204
|
-
goal "Write the committed list of the spec files a tag filter selects"
|
|
2205
|
-
|
|
2206
|
-
attribute :exclude, ExcludePattern, sets: true
|
|
2207
|
-
attribute :tags, TagArguments, optional: true, sets: true
|
|
2208
|
-
attribute :write, FilePath, sets: true
|
|
2209
|
-
attribute :run, RunKey, sets: true
|
|
2210
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
2211
|
-
|
|
2212
|
-
sets :operation, to: "write_io_parallel_spec_list"
|
|
2213
|
-
|
|
2214
|
-
emits WriteIoParallelSpecListRequested
|
|
2215
|
-
end
|
|
2216
|
-
|
|
2217
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
2218
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
2219
|
-
command "Accept" do
|
|
2220
|
-
role "System"
|
|
2221
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
2222
|
-
|
|
2223
|
-
reference_to TestSuiteRun
|
|
2224
|
-
attribute :checkout, Switch, sets: true
|
|
2225
|
-
|
|
2226
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
emits TestSuiteAccepted
|
|
2230
|
-
end
|
|
2231
|
-
|
|
2232
|
-
command "Complete" do
|
|
2233
|
-
role "System"
|
|
2234
|
-
goal "Record that the request was carried out, and what it reported"
|
|
2235
|
-
|
|
2236
|
-
reference_to TestSuiteRun
|
|
2237
|
-
attribute :report, Report, sets: true
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
emits TestSuiteCompleted
|
|
2241
|
-
end
|
|
2242
|
-
|
|
2243
|
-
command "Fault" do
|
|
2244
|
-
role "System"
|
|
2245
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
2246
|
-
|
|
2247
|
-
reference_to TestSuiteRun
|
|
2248
|
-
attribute :refusal, Report, sets: true
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
emits TestSuiteFaulted
|
|
2252
|
-
end
|
|
2253
|
-
|
|
2254
|
-
query "TestSuiteOutcome" do
|
|
2255
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
2256
|
-
attribute :run, RunKey
|
|
2257
|
-
where(run: :run)
|
|
2258
|
-
order_by :run
|
|
2259
|
-
end
|
|
2260
|
-
|
|
2261
|
-
query "TestSuiteFaulted" do
|
|
2262
|
-
description "Every request that was refused or could not be carried out."
|
|
2263
|
-
where(status: "faulted")
|
|
2264
|
-
order_by :run
|
|
2265
|
-
end
|
|
2266
|
-
|
|
2267
|
-
# An answer that is one document of text, exactly as the tool that produced it wrote it.
|
|
2268
|
-
value_object "Document" do
|
|
2269
|
-
attribute :text, String
|
|
2270
|
-
end
|
|
2271
|
-
|
|
2272
|
-
query "ShardSpecs" do
|
|
2273
|
-
description "The spec files one group of a runtime-balanced split runs."
|
|
2274
|
-
attribute :group, Count
|
|
2275
|
-
attribute :groups, Count
|
|
2276
|
-
attribute :runtime_log, FilePath, optional: true
|
|
2277
|
-
returns Document
|
|
2278
|
-
end
|
|
2279
|
-
|
|
2280
|
-
query "ListIoParallelSpecs" do
|
|
2281
|
-
description "The spec files with an example a tag filter selects."
|
|
2282
|
-
attribute :exclude, ExcludePattern
|
|
2283
|
-
attribute :tags, TagArguments, optional: true
|
|
2284
|
-
attribute :check, FilePath, optional: true
|
|
2285
|
-
returns Document
|
|
2286
|
-
end
|
|
2287
|
-
|
|
2288
|
-
query "RecordPatternCases" do
|
|
2289
|
-
description "The expected match results of the pattern cases, as JSON."
|
|
2290
|
-
returns Document
|
|
2291
|
-
end
|
|
2292
|
-
end
|
|
2293
|
-
|
|
2294
|
-
policy "ExamineWhenRefreshRuntimeBaselineRequested" do
|
|
2295
|
-
on "TestSuiteRun.RefreshRuntimeBaselineRequested"
|
|
2296
|
-
ask :examine, with: { run: :run }
|
|
2297
|
-
end
|
|
2298
|
-
|
|
2299
|
-
policy "ExamineWhenRunSpecExampleRequested" do
|
|
2300
|
-
on "TestSuiteRun.RunSpecExampleRequested"
|
|
2301
|
-
ask :examine, with: { run: :run }
|
|
2302
|
-
end
|
|
2303
|
-
|
|
2304
|
-
policy "ExamineWhenStressConcurrencyRequested" do
|
|
2305
|
-
on "TestSuiteRun.StressConcurrencyRequested"
|
|
2306
|
-
ask :examine, with: { run: :run }
|
|
2307
|
-
end
|
|
2308
|
-
|
|
2309
|
-
policy "ExamineWhenRunCargoTestsRequested" do
|
|
2310
|
-
on "TestSuiteRun.RunCargoTestsRequested"
|
|
2311
|
-
ask :examine, with: { run: :run }
|
|
2312
|
-
end
|
|
2313
|
-
|
|
2314
|
-
policy "ExamineWhenClearCachesRequested" do
|
|
2315
|
-
on "TestSuiteRun.ClearCachesRequested"
|
|
2316
|
-
ask :examine, with: { run: :run }
|
|
2317
|
-
end
|
|
2318
|
-
|
|
2319
|
-
policy "ExamineWhenRegenerateLegacyFixturesRequested" do
|
|
2320
|
-
on "TestSuiteRun.RegenerateLegacyFixturesRequested"
|
|
2321
|
-
ask :examine, with: { run: :run }
|
|
2322
|
-
end
|
|
2323
|
-
|
|
2324
|
-
policy "ExamineWhenSeedSemanticsCorpusRequested" do
|
|
2325
|
-
on "TestSuiteRun.SeedSemanticsCorpusRequested"
|
|
2326
|
-
ask :examine, with: { run: :run }
|
|
2327
|
-
end
|
|
2328
|
-
|
|
2329
|
-
policy "ExamineWhenWriteIoParallelSpecListRequested" do
|
|
2330
|
-
on "TestSuiteRun.WriteIoParallelSpecListRequested"
|
|
2331
|
-
ask :examine, with: { run: :run }
|
|
2332
|
-
end
|
|
2333
|
-
|
|
2334
|
-
policy "AcceptTestSuiteWhenExamined" do
|
|
2335
|
-
on "TestSuiteRun.TestSuiteExamined"
|
|
2336
|
-
trigger TestSuiteRun::Accept, with: { checkout: :checkout }
|
|
2337
|
-
end
|
|
2338
|
-
|
|
2339
|
-
policy "FaultTestSuiteWhenNotAccepted" do
|
|
2340
|
-
on "TestSuiteRun.TestSuiteExamined"
|
|
2341
|
-
where { !checkout.value }
|
|
2342
|
-
trigger TestSuiteRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
2343
|
-
end
|
|
2344
|
-
|
|
2345
|
-
policy "PerformTestSuiteWhenAccepted" do
|
|
2346
|
-
on "TestSuiteRun.TestSuiteAccepted"
|
|
2347
|
-
ask :perform, with: { run: :run }
|
|
2348
|
-
end
|
|
2349
|
-
|
|
2350
|
-
policy "RecordTestSuiteOutcome" do
|
|
2351
|
-
on "TestSuiteRun.TestSuiteAnswered"
|
|
2352
|
-
trigger TestSuiteRun::Complete, with: { report: :report }
|
|
2353
|
-
end
|
|
2354
|
-
|
|
2355
|
-
policy "RecordTestSuiteFault" do
|
|
2356
|
-
on "TestSuiteRun.TestSuiteRefused"
|
|
2357
|
-
trigger TestSuiteRun::Fault, with: { refusal: :refusal }
|
|
2358
|
-
end
|
|
2359
|
-
|
|
2360
|
-
# Corpus: what this repository's committed domains are, and what the language's own IR holds.
|
|
2361
|
-
# Every question about them is a pure read, answered by the SourceTree port: which domains carry
|
|
2362
|
-
# a Rust feature, the order they regenerate in, whether each generated module is covered, and the
|
|
2363
|
-
# structural queries over the IR. Two commands open a long-running server: the query MCP server
|
|
2364
|
-
# on stdio and the forms app on a local port; each is recorded, runs until it is closed, and
|
|
2365
|
-
# answers when it ends.
|
|
2366
|
-
aggregate "CorpusRun" do
|
|
2367
|
-
description "One look at the corpus and the language's IR, or one server opened on them."
|
|
2368
|
-
|
|
2369
|
-
attribute :run, RunKey
|
|
2370
|
-
attribute :operation, Operation, optional: true
|
|
2371
|
-
attribute :confirm, Switch, optional: true
|
|
2372
|
-
attribute :names, NameList, optional: true
|
|
2373
|
-
attribute :domains, PathList, optional: true
|
|
2374
|
-
attribute :meta, Switch, optional: true
|
|
2375
|
-
attribute :name, ConstructName, optional: true
|
|
2376
|
-
attribute :field, FieldName, optional: true
|
|
2377
|
-
attribute :port, Port, optional: true
|
|
2378
|
-
attribute :agent, AgentName, optional: true
|
|
2379
|
-
attribute :directory, Directory, optional: true
|
|
2380
|
-
attribute :checkout, Switch, optional: true
|
|
2381
|
-
attribute :report, Report, optional: true
|
|
2382
|
-
attribute :refusal, Report, optional: true
|
|
2383
|
-
identified_by :run
|
|
2384
|
-
|
|
2385
|
-
# One directory of files, named by a path.
|
|
2386
|
-
value_object "Directory" do
|
|
2387
|
-
attribute :value, String, matches: :present
|
|
2388
|
-
end
|
|
2389
|
-
|
|
2390
|
-
value_object "RunKey" do
|
|
2391
|
-
attribute :value, String, matches: :present
|
|
2392
|
-
|
|
2393
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
2394
|
-
end
|
|
2395
|
-
|
|
2396
|
-
# Which agent drives the Composer's assistant: the real `claude`, or a scripted `fake` for
|
|
2397
|
-
# trying the editor without a model.
|
|
2398
|
-
value_object "AgentName" do
|
|
2399
|
-
attribute :value, String, pattern: '^(claude|fake)$'
|
|
2400
|
-
end
|
|
2401
|
-
|
|
2402
|
-
value_object "Operation" do
|
|
2403
|
-
attribute :value, String, matches: :present
|
|
2404
|
-
end
|
|
2405
|
-
|
|
2406
|
-
value_object "Switch" do
|
|
2407
|
-
attribute :value, Boolean
|
|
2408
|
-
end
|
|
2409
|
-
|
|
2410
|
-
value_object "Report" do
|
|
2411
|
-
attribute :value, String
|
|
2412
|
-
end
|
|
2413
|
-
|
|
2414
|
-
# Construct names, comma separated.
|
|
2415
|
-
value_object "NameList" do
|
|
2416
|
-
attribute :value, String, pattern: '^[A-Za-z][A-Za-z0-9_]*(,[A-Za-z][A-Za-z0-9_]*)*$'
|
|
2417
|
-
end
|
|
2418
|
-
|
|
2419
|
-
# Domain directories, comma separated.
|
|
2420
|
-
value_object "PathList" do
|
|
2421
|
-
attribute :value, String, matches: :csv_list
|
|
2422
|
-
end
|
|
2423
|
-
|
|
2424
|
-
# The name of one IR construct.
|
|
2425
|
-
value_object "ConstructName" do
|
|
2426
|
-
attribute :value, String, matches: :identifier
|
|
2427
|
-
end
|
|
2428
|
-
|
|
2429
|
-
# The name of one field of a construct.
|
|
2430
|
-
value_object "FieldName" do
|
|
2431
|
-
attribute :value, String, matches: :snake_name
|
|
2432
|
-
end
|
|
2433
|
-
|
|
2434
|
-
# A local port a server listens on.
|
|
2435
|
-
value_object "Port" do
|
|
2436
|
-
attribute :value, Integer
|
|
2437
|
-
|
|
2438
|
-
invariant("a port is 1 to 65535") { value >= 1 && value <= 65535 }
|
|
2439
|
-
end
|
|
2440
|
-
|
|
2441
|
-
lifecycle :status, default: "requested" do
|
|
2442
|
-
mark :failure, "faulted"
|
|
2443
|
-
transition "Accept" => "accepted", from: "requested"
|
|
2444
|
-
transition "Complete" => "completed", from: "accepted"
|
|
2445
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
2446
|
-
mark :terminal, "completed", "faulted"
|
|
2447
|
-
end
|
|
2448
|
-
|
|
2449
|
-
command "ServeQueryIrMcp" do
|
|
2450
|
-
role "Maintainer"
|
|
2451
|
-
goal "Serve the IR queries to an MCP client over stdio until it closes"
|
|
2452
|
-
|
|
2453
|
-
attribute :run, RunKey, sets: true
|
|
2454
|
-
|
|
2455
|
-
sets :operation, to: "serve_query_ir_mcp"
|
|
2456
|
-
|
|
2457
|
-
emits ServeQueryIrMcpRequested
|
|
2458
|
-
end
|
|
2459
|
-
|
|
2460
|
-
command "Present" do
|
|
2461
|
-
role "Maintainer"
|
|
2462
|
-
goal "Serve the banking example's rendered forms and views on a local port until stopped"
|
|
2463
|
-
|
|
2464
|
-
attribute :port, Port, optional: true, sets: true
|
|
2465
|
-
attribute :run, RunKey, sets: true
|
|
2466
|
-
|
|
2467
|
-
sets :operation, to: "present"
|
|
2468
|
-
|
|
2469
|
-
emits PresentRequested
|
|
2470
|
-
end
|
|
2471
|
-
|
|
2472
|
-
command "Compose" do
|
|
2473
|
-
role "Maintainer"
|
|
2474
|
-
goal "Serve the Composer, a live bluebook editor over one domain directory, on a local port until stopped"
|
|
2475
|
-
|
|
2476
|
-
attribute :port, Port, optional: true, sets: true
|
|
2477
|
-
attribute :domains, PathList, optional: true, sets: true
|
|
2478
|
-
attribute :agent, AgentName, default: "claude", sets: true
|
|
2479
|
-
attribute :run, RunKey, sets: true
|
|
2480
|
-
|
|
2481
|
-
sets :operation, to: "compose"
|
|
2482
|
-
|
|
2483
|
-
emits ComposeRequested
|
|
2484
|
-
end
|
|
2485
|
-
|
|
2486
|
-
command "Preview" do
|
|
2487
|
-
role "Maintainer"
|
|
2488
|
-
goal "Serve one directory of static files, such as a website, on a local port until stopped"
|
|
2489
|
-
|
|
2490
|
-
attribute :directory, Directory, sets: true
|
|
2491
|
-
attribute :port, Port, optional: true, sets: true
|
|
2492
|
-
attribute :run, RunKey, sets: true
|
|
2493
|
-
|
|
2494
|
-
sets :operation, to: "preview"
|
|
2495
|
-
|
|
2496
|
-
emits PreviewRequested
|
|
2497
|
-
end
|
|
2498
|
-
|
|
2499
|
-
# What the tree reported about itself, held against every request: nothing here runs
|
|
2500
|
-
# outside a hecks checkout (hecks.gemspec beside lib/).
|
|
2501
|
-
command "Accept" do
|
|
2502
|
-
role "System"
|
|
2503
|
-
goal "Let a request through only when the working tree is a hecks checkout"
|
|
2504
|
-
|
|
2505
|
-
reference_to CorpusRun
|
|
2506
|
-
attribute :checkout, Switch, sets: true
|
|
2507
|
-
|
|
2508
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
emits CorpusAccepted
|
|
2512
|
-
end
|
|
2513
|
-
|
|
2514
|
-
command "Complete" do
|
|
2515
|
-
role "System"
|
|
2516
|
-
goal "Record that the request was carried out, and what it reported"
|
|
2517
|
-
|
|
2518
|
-
reference_to CorpusRun
|
|
2519
|
-
attribute :report, Report, sets: true
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
emits CorpusCompleted
|
|
2523
|
-
end
|
|
2524
|
-
|
|
2525
|
-
command "Fault" do
|
|
2526
|
-
role "System"
|
|
2527
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
2528
|
-
|
|
2529
|
-
reference_to CorpusRun
|
|
2530
|
-
attribute :refusal, Report, sets: true
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
emits CorpusFaulted
|
|
2534
|
-
end
|
|
2535
|
-
|
|
2536
|
-
query "CorpusOutcome" do
|
|
2537
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
2538
|
-
attribute :run, RunKey
|
|
2539
|
-
where(run: :run)
|
|
2540
|
-
order_by :run
|
|
2541
|
-
end
|
|
2542
|
-
|
|
2543
|
-
query "CorpusFaulted" do
|
|
2544
|
-
description "Every request that was refused or could not be carried out."
|
|
2545
|
-
where(status: "faulted")
|
|
2546
|
-
order_by :run
|
|
2547
|
-
end
|
|
2548
|
-
|
|
2549
|
-
# An answer that is one document of text, exactly as the tool that produced it wrote it.
|
|
2550
|
-
value_object "Document" do
|
|
2551
|
-
attribute :text, String
|
|
2552
|
-
end
|
|
2553
|
-
|
|
2554
|
-
query "RustDomains" do
|
|
2555
|
-
description "The feature and directory of every domain with a Rust feature."
|
|
2556
|
-
returns Document
|
|
2557
|
-
end
|
|
2558
|
-
|
|
2559
|
-
query "RegenOrder" do
|
|
2560
|
-
description "The directories regeneration walks, in the order it walks them."
|
|
2561
|
-
returns Document
|
|
2562
|
-
end
|
|
2563
|
-
|
|
2564
|
-
query "CorpusRustCoverage" do
|
|
2565
|
-
description "Whether every generated Rust module is routed by its domain."
|
|
2566
|
-
returns Document
|
|
2567
|
-
end
|
|
2568
|
-
|
|
2569
|
-
query "IrConstructs" do
|
|
2570
|
-
description "The structural diff of each IR construct from its meta-domain."
|
|
2571
|
-
attribute :names, NameList, optional: true
|
|
2572
|
-
returns Document
|
|
2573
|
-
end
|
|
2574
|
-
|
|
2575
|
-
query "IrDuplicates" do
|
|
2576
|
-
description "The rules declared more than once across the corpus."
|
|
2577
|
-
attribute :domains, PathList, optional: true
|
|
2578
|
-
attribute :meta, Switch, optional: true
|
|
2579
|
-
returns Document
|
|
2580
|
-
end
|
|
2581
|
-
|
|
2582
|
-
query "IrImpact" do
|
|
2583
|
-
description "Which propagation touchpoints of a construct's field already show it."
|
|
2584
|
-
attribute :name, ConstructName
|
|
2585
|
-
attribute :field, FieldName
|
|
2586
|
-
returns Document
|
|
2587
|
-
end
|
|
2588
|
-
end
|
|
2589
|
-
|
|
2590
|
-
policy "ExamineWhenServeQueryIrMcpRequested" do
|
|
2591
|
-
on "CorpusRun.ServeQueryIrMcpRequested"
|
|
2592
|
-
ask :examine, with: { run: :run }
|
|
2593
|
-
end
|
|
2594
|
-
|
|
2595
|
-
policy "ExamineWhenPresentRequested" do
|
|
2596
|
-
on "CorpusRun.PresentRequested"
|
|
2597
|
-
ask :examine, with: { run: :run }
|
|
2598
|
-
end
|
|
2599
|
-
|
|
2600
|
-
policy "ExamineWhenComposeRequested" do
|
|
2601
|
-
on "CorpusRun.ComposeRequested"
|
|
2602
|
-
ask :examine, with: { run: :run }
|
|
2603
|
-
end
|
|
2604
|
-
|
|
2605
|
-
policy "ExamineWhenPreviewRequested" do
|
|
2606
|
-
on "CorpusRun.PreviewRequested"
|
|
2607
|
-
ask :examine, with: { run: :run }
|
|
2608
|
-
end
|
|
2609
|
-
|
|
2610
|
-
policy "AcceptCorpusWhenExamined" do
|
|
2611
|
-
on "CorpusRun.CorpusExamined"
|
|
2612
|
-
trigger CorpusRun::Accept, with: { checkout: :checkout }
|
|
2613
|
-
end
|
|
2614
|
-
|
|
2615
|
-
policy "FaultCorpusWhenNotAccepted" do
|
|
2616
|
-
on "CorpusRun.CorpusExamined"
|
|
2617
|
-
where { !checkout.value }
|
|
2618
|
-
trigger CorpusRun::Fault, with: { refusal: "needs a hecks checkout: hecks.gemspec stands beside lib/" }
|
|
2619
|
-
end
|
|
2620
|
-
|
|
2621
|
-
policy "PerformCorpusWhenAccepted" do
|
|
2622
|
-
on "CorpusRun.CorpusAccepted"
|
|
2623
|
-
ask :perform, with: { run: :run }
|
|
2624
|
-
end
|
|
2625
|
-
|
|
2626
|
-
policy "RecordCorpusOutcome" do
|
|
2627
|
-
on "CorpusRun.CorpusAnswered"
|
|
2628
|
-
trigger CorpusRun::Complete, with: { report: :report }
|
|
2629
|
-
end
|
|
2630
|
-
|
|
2631
|
-
policy "RecordCorpusFault" do
|
|
2632
|
-
on "CorpusRun.CorpusRefused"
|
|
2633
|
-
trigger CorpusRun::Fault, with: { refusal: :refusal }
|
|
2634
|
-
end
|
|
2635
|
-
|
|
2636
|
-
# Publishing: cutting a release of this gem. The run holds the facts the Git adapter surveyed
|
|
2637
|
-
# (branch, tree, versions, changelog, tag), and `Accept` holds the rules that let a release go
|
|
2638
|
-
# ahead: the adapter supplies the facts and the givens decide. Only an accepted run is carried
|
|
2639
|
-
# out, and without --confirm it is the old dry run: every check and build, nothing tagged,
|
|
2640
|
-
# pushed or published. A real run advances the root Release: tagged, published, verified.
|
|
2641
|
-
aggregate "PublishingRun" do
|
|
2642
|
-
description "One release of the gem, or the rehearsal of it: judged by the facts, then carried out."
|
|
2643
|
-
|
|
2644
|
-
acknowledges :key_by_value, "the version this run tags; its Release is made by the run's own Tag, so a reference would require the record the command exists to make",
|
|
2645
|
-
of: :version
|
|
2646
|
-
acknowledges :key_by_value, "the client package's version, not a gem Release",
|
|
2647
|
-
of: :client_version
|
|
2648
|
-
acknowledges :key_by_value, "the IR format's version, not a gem Release",
|
|
2649
|
-
of: :ir_version
|
|
2650
|
-
|
|
2651
|
-
attribute :run, RunKey
|
|
2652
|
-
attribute :operation, Operation, optional: true
|
|
2653
|
-
attribute :confirm, Switch, optional: true
|
|
2654
|
-
attribute :gem_only, Switch, optional: true
|
|
2655
|
-
attribute :npm_only, Switch, optional: true
|
|
2656
|
-
attribute :npm_local, Switch, optional: true
|
|
2657
|
-
attribute :no_wait, Switch, optional: true
|
|
2658
|
-
attribute :checkout, Switch, optional: true
|
|
2659
|
-
attribute :branch, Word, optional: true
|
|
2660
|
-
attribute :release_lane, Word, optional: true
|
|
2661
|
-
attribute :on_origin, Switch, optional: true
|
|
2662
|
-
attribute :clean, Switch, optional: true
|
|
2663
|
-
attribute :version, Version, optional: true
|
|
2664
|
-
attribute :client_version, Version, optional: true
|
|
2665
|
-
attribute :changelog, Switch, optional: true
|
|
2666
|
-
attribute :approved, Switch, optional: true
|
|
2667
|
-
attribute :tag_state, Word, optional: true
|
|
2668
|
-
attribute :head, Word, optional: true
|
|
2669
|
-
attribute :ir_version, Version, optional: true
|
|
2670
|
-
attribute :ships_from, Checkout, optional: true
|
|
2671
|
-
attribute :tagged, Switch, optional: true
|
|
2672
|
-
attribute :published, Switch, optional: true
|
|
2673
|
-
attribute :verified, Switch, optional: true
|
|
2674
|
-
attribute :report, Report, optional: true
|
|
2675
|
-
attribute :refusal, Report, optional: true
|
|
2676
|
-
identified_by :run
|
|
2677
|
-
|
|
2678
|
-
value_object "RunKey" do
|
|
2679
|
-
attribute :value, String, matches: :present
|
|
2680
|
-
|
|
2681
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
2682
|
-
end
|
|
2683
|
-
|
|
2684
|
-
value_object "Operation" do
|
|
2685
|
-
attribute :value, String, matches: :present
|
|
2686
|
-
end
|
|
2687
|
-
|
|
2688
|
-
value_object "Switch" do
|
|
2689
|
-
attribute :value, Boolean
|
|
2690
|
-
end
|
|
2691
|
-
|
|
2692
|
-
value_object "Report" do
|
|
2693
|
-
attribute :value, String
|
|
2694
|
-
end
|
|
2695
|
-
|
|
2696
|
-
# One word of a fact: a branch, a commit, whether a tag stands.
|
|
2697
|
-
value_object "Word" do
|
|
2698
|
-
attribute :value, String, matches: :present
|
|
2699
|
-
end
|
|
2700
|
-
|
|
2701
|
-
value_object "Version" do
|
|
2702
|
-
attribute :value, String, matches: :version
|
|
2703
|
-
end
|
|
2704
|
-
|
|
2705
|
-
# The working tree the release is cut from.
|
|
2706
|
-
value_object "Checkout" do
|
|
2707
|
-
attribute :path, String
|
|
2708
|
-
end
|
|
2709
|
-
|
|
2710
|
-
lifecycle :status, default: "requested" do
|
|
2711
|
-
mark :failure, "faulted"
|
|
2712
|
-
transition "Accept" => "accepted", from: "requested"
|
|
2713
|
-
transition "AcceptGem" => "accepted", from: "requested"
|
|
2714
|
-
transition "Complete" => "completed", from: "accepted"
|
|
2715
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
2716
|
-
mark :terminal, "completed", "faulted"
|
|
2717
|
-
end
|
|
2718
|
-
|
|
2719
|
-
command "Publish" do
|
|
2720
|
-
role "Maintainer"
|
|
2721
|
-
goal "Tag the merged release commit, publish the gem, and get the client package published"
|
|
2722
|
-
|
|
2723
|
-
attribute :gem_only, Switch, optional: true, sets: true
|
|
2724
|
-
attribute :npm_only, Switch, optional: true, sets: true
|
|
2725
|
-
attribute :npm_local, Switch, optional: true, sets: true
|
|
2726
|
-
attribute :no_wait, Switch, optional: true, sets: true
|
|
2727
|
-
attribute :run, RunKey, sets: true
|
|
2728
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
2729
|
-
|
|
2730
|
-
sets :operation, to: "publish"
|
|
2731
|
-
|
|
2732
|
-
emits PublishRequested
|
|
2733
|
-
end
|
|
2734
|
-
|
|
2735
|
-
command "PublishGem" do
|
|
2736
|
-
role "Maintainer"
|
|
2737
|
-
goal "Build the gem and push it to the gem registry, with the key the vault holds"
|
|
2738
|
-
|
|
2739
|
-
attribute :run, RunKey, sets: true
|
|
2740
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
2741
|
-
|
|
2742
|
-
sets :operation, to: "publish_gem"
|
|
2743
|
-
|
|
2744
|
-
emits PublishGemRequested
|
|
2745
|
-
end
|
|
2746
|
-
|
|
2747
|
-
# What the tree reported about itself, and the facts the Git adapter surveyed, held against the
|
|
2748
|
-
# rules of a release. Nothing here runs outside a hecks checkout (hecks.gemspec beside lib/).
|
|
2749
|
-
command "Accept" do
|
|
2750
|
-
role "System"
|
|
2751
|
-
goal "Let a release go ahead only in a hecks checkout, and only when the facts satisfy every rule"
|
|
2752
|
-
|
|
2753
|
-
reference_to PublishingRun
|
|
2754
|
-
attribute :checkout, Switch, sets: true
|
|
2755
|
-
attribute :branch, Word, sets: true
|
|
2756
|
-
attribute :release_lane, Word, sets: true
|
|
2757
|
-
attribute :on_origin, Switch, sets: true
|
|
2758
|
-
attribute :clean, Switch, sets: true
|
|
2759
|
-
attribute :version, Version, sets: true
|
|
2760
|
-
attribute :client_version, Version, sets: true
|
|
2761
|
-
attribute :changelog, Switch, sets: true
|
|
2762
|
-
attribute :approved, Switch, sets: true
|
|
2763
|
-
attribute :tag_state, Word, sets: true
|
|
2764
|
-
attribute :head, Word, sets: true
|
|
2765
|
-
attribute :ir_version, Version, sets: true
|
|
2766
|
-
attribute :ships_from, Checkout, sets: true
|
|
2767
|
-
|
|
2768
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
2769
|
-
given("a release is cut from the release lane (the Lane row that feeds a tag): switch to it first") do
|
|
2770
|
-
branch.value == release_lane.value
|
|
2771
|
-
end
|
|
2772
|
-
given("the release lane is its origin: wait for the release commit to be promoted, then pull") { on_origin.value }
|
|
2773
|
-
given("the working tree is clean: commit or discard changes first") { clean.value }
|
|
2774
|
-
given("the client package is at the gem's version: bump the package first") do
|
|
2775
|
-
client_version.value == version.value
|
|
2776
|
-
end
|
|
2777
|
-
given("CHANGELOG.md has a heading for the version: add the release entry") { changelog.value }
|
|
2778
|
-
given("the commit that set the version carries a Release-Approved-By line: the owner decides when a release happens") do
|
|
2779
|
-
approved.value || tag_state.value == "at_release_commit"
|
|
2780
|
-
end
|
|
2781
|
-
given("a tag for the version points at the release commit, not elsewhere") do
|
|
2782
|
-
tag_state.value != "elsewhere"
|
|
2783
|
-
end
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
emits PublishingAccepted
|
|
2787
|
-
end
|
|
2788
|
-
|
|
2789
|
-
# release_gem's one rule: the client package is released beside the gem at the same version.
|
|
2790
|
-
command "AcceptGem" do
|
|
2791
|
-
role "System"
|
|
2792
|
-
goal "Let a gem push go ahead only in a hecks checkout, with the client package at the gem's version"
|
|
2793
|
-
|
|
2794
|
-
reference_to PublishingRun
|
|
2795
|
-
attribute :checkout, Switch, sets: true
|
|
2796
|
-
attribute :version, Version, sets: true
|
|
2797
|
-
attribute :client_version, Version, sets: true
|
|
2798
|
-
attribute :ir_version, Version, sets: true
|
|
2799
|
-
attribute :ships_from, Checkout, sets: true
|
|
2800
|
-
|
|
2801
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
2802
|
-
given("the client package is at the gem's version: bump the package first") do
|
|
2803
|
-
client_version.value == version.value
|
|
2804
|
-
end
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
emits GemAccepted
|
|
2808
|
-
end
|
|
2809
|
-
|
|
2810
|
-
command "Complete" do
|
|
2811
|
-
role "System"
|
|
2812
|
-
goal "Record that the release was carried out, what it did, and what it reported"
|
|
2813
|
-
|
|
2814
|
-
reference_to PublishingRun
|
|
2815
|
-
attribute :report, Report, sets: true
|
|
2816
|
-
attribute :tagged, Switch, sets: true
|
|
2817
|
-
attribute :published, Switch, sets: true
|
|
2818
|
-
attribute :verified, Switch, sets: true
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
emits PublishingCompleted
|
|
2822
|
-
end
|
|
2823
|
-
|
|
2824
|
-
command "Fault" do
|
|
2825
|
-
role "System"
|
|
2826
|
-
goal "Record that the request was refused or could not be carried out, and why"
|
|
2827
|
-
|
|
2828
|
-
reference_to PublishingRun
|
|
2829
|
-
attribute :refusal, Report, sets: true
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
emits PublishingFaulted
|
|
2833
|
-
end
|
|
2834
|
-
|
|
2835
|
-
query "PublishingOutcome" do
|
|
2836
|
-
description "How one request ended: its status, and what it reported or why it failed."
|
|
2837
|
-
attribute :run, RunKey
|
|
2838
|
-
where(run: :run)
|
|
2839
|
-
order_by :run
|
|
2840
|
-
end
|
|
2841
|
-
|
|
2842
|
-
query "PublishingFaulted" do
|
|
2843
|
-
description "Every request that was refused or could not be carried out."
|
|
2844
|
-
where(status: "faulted")
|
|
2845
|
-
order_by :run
|
|
2846
|
-
end
|
|
2847
|
-
end
|
|
2848
|
-
|
|
2849
|
-
policy "ExaminePublishingWhenPublishRequested" do
|
|
2850
|
-
on "PublishingRun.PublishRequested"
|
|
2851
|
-
ask :examine, with: { run: :run }
|
|
2852
|
-
end
|
|
2853
|
-
|
|
2854
|
-
policy "ExaminePublishingWhenPublishGemRequested" do
|
|
2855
|
-
on "PublishingRun.PublishGemRequested"
|
|
2856
|
-
ask :examine, with: { run: :run }
|
|
2857
|
-
end
|
|
2858
|
-
|
|
2859
|
-
policy "AcceptTheReleaseWhenExamined" do
|
|
2860
|
-
on "PublishingRun.PublishingExamined"
|
|
2861
|
-
where { operation.value == "publish" }
|
|
2862
|
-
trigger PublishingRun::Accept, with: { checkout: :checkout, branch: :branch, release_lane: :release_lane,
|
|
2863
|
-
on_origin: :on_origin, clean: :clean, version: :version,
|
|
2864
|
-
client_version: :client_version,
|
|
2865
|
-
changelog: :changelog, approved: :approved, tag_state: :tag_state,
|
|
2866
|
-
head: :head, ir_version: :ir_version, ships_from: :ships_from }
|
|
2867
|
-
end
|
|
2868
|
-
|
|
2869
|
-
policy "AcceptTheGemWhenExamined" do
|
|
2870
|
-
on "PublishingRun.PublishingExamined"
|
|
2871
|
-
where { operation.value == "publish_gem" }
|
|
2872
|
-
trigger PublishingRun::AcceptGem, with: { checkout: :checkout, version: :version,
|
|
2873
|
-
client_version: :client_version, ir_version: :ir_version,
|
|
2874
|
-
ships_from: :ships_from }
|
|
2875
|
-
end
|
|
2876
|
-
|
|
2877
|
-
policy "FaultTheReleaseWhenNotAccepted" do
|
|
2878
|
-
on "PublishingRun.PublishingExamined"
|
|
2879
|
-
where do
|
|
2880
|
-
operation.value == "publish" &&
|
|
2881
|
-
(!checkout.value || branch.value != release_lane.value || !on_origin.value || !clean.value ||
|
|
2882
|
-
client_version.value != version.value || !changelog.value || tag_state.value == "elsewhere" ||
|
|
2883
|
-
(!approved.value && tag_state.value != "at_release_commit"))
|
|
2884
|
-
end
|
|
2885
|
-
trigger PublishingRun::Fault, with: { refusal: "a release rule is not met: check the branch, tree, versions, CHANGELOG, tag and the Release-Approved-By line" }
|
|
2886
|
-
end
|
|
2887
|
-
|
|
2888
|
-
policy "FaultTheGemWhenNotAccepted" do
|
|
2889
|
-
on "PublishingRun.PublishingExamined"
|
|
2890
|
-
where do
|
|
2891
|
-
operation.value == "publish_gem" && (!checkout.value || client_version.value != version.value)
|
|
2892
|
-
end
|
|
2893
|
-
trigger PublishingRun::Fault, with: { refusal: "a gem push rule is not met: needs a checkout and the client at the gem's version" }
|
|
2894
|
-
end
|
|
2895
|
-
|
|
2896
|
-
policy "PerformPublishingWhenAccepted" do
|
|
2897
|
-
on "PublishingRun.PublishingAccepted"
|
|
2898
|
-
ask :perform, with: { run: :run }
|
|
2899
|
-
end
|
|
2900
|
-
|
|
2901
|
-
policy "PerformPublishingWhenGemAccepted" do
|
|
2902
|
-
on "PublishingRun.GemAccepted"
|
|
2903
|
-
ask :perform, with: { run: :run }
|
|
2904
|
-
end
|
|
2905
|
-
|
|
2906
|
-
# A real run advances the root Release: tagged when the tag was made, published when a registry
|
|
2907
|
-
# took the gem, verified when every registry in scope lists the version.
|
|
2908
|
-
policy "RecordTheTagWhenPublished" do
|
|
2909
|
-
on "PublishingRun.PublishingAnswered"
|
|
2910
|
-
where { tagged.value }
|
|
2911
|
-
trigger Release::Tag, with: { version: :version, ir_version: :ir_version, ships_from: :ships_from }
|
|
2912
|
-
end
|
|
2913
|
-
|
|
2914
|
-
policy "RecordThePublishingWhenPublished" do
|
|
2915
|
-
on "PublishingRun.PublishingAnswered"
|
|
2916
|
-
where { published.value }
|
|
2917
|
-
trigger Release::MarkPublished, with: { version: :version }
|
|
2918
|
-
end
|
|
2919
|
-
|
|
2920
|
-
policy "RecordTheVerificationWhenPublished" do
|
|
2921
|
-
on "PublishingRun.PublishingAnswered"
|
|
2922
|
-
where { verified.value }
|
|
2923
|
-
trigger Release::Verify, with: { version: :version }
|
|
2924
|
-
end
|
|
2925
|
-
|
|
2926
|
-
# A release that stopped after a real step (the tag pushed, the gem published) still records the
|
|
2927
|
-
# steps it took on the root Release, then ends as a fault carrying what the release said.
|
|
2928
|
-
policy "RecordPublishingOutcome" do
|
|
2929
|
-
on "PublishingRun.PublishingAnswered"
|
|
2930
|
-
where { succeeded.value }
|
|
2931
|
-
trigger PublishingRun::Complete, with: { report: :report, tagged: :tagged, published: :published,
|
|
2932
|
-
verified: :verified }
|
|
2933
|
-
end
|
|
2934
|
-
|
|
2935
|
-
policy "RecordPublishingShortfall" do
|
|
2936
|
-
on "PublishingRun.PublishingAnswered"
|
|
2937
|
-
where { succeeded.value == false }
|
|
2938
|
-
trigger PublishingRun::Fault, with: { refusal: :report }
|
|
2939
|
-
end
|
|
2940
|
-
|
|
2941
|
-
policy "RecordPublishingFault" do
|
|
2942
|
-
on "PublishingRun.PublishingRefused"
|
|
2943
|
-
trigger PublishingRun::Fault, with: { refusal: :refusal }
|
|
2944
|
-
end
|
|
2945
|
-
|
|
2946
|
-
# Promotion: moving a lane forward onto a commit that has passed every `RequiredCheck`. The
|
|
2947
|
-
# adapter reads the facts (does the lane exist, where its head stands, where each check stands
|
|
2948
|
-
# against the commit) and `Accept` holds the rules, so what makes a commit fit for the lane is
|
|
2949
|
-
# decided here and in the Lane and RequiredCheck rows, never by the workflow that runs
|
|
2950
|
-
# `hecks promotion_run.promote`. Without --confirm the run is a rehearsal: it names the move it
|
|
2951
|
-
# would make and makes none. A real run fast-forwards the lane (never forces it) and moves the
|
|
2952
|
-
# tag the lane `feeds`, forward only; a lane that already holds the commit still has its tag
|
|
2953
|
-
# brought up to the lane's head, so a half-finished run is finished by the next.
|
|
2954
|
-
#
|
|
2955
|
-
# A commit is certified by the checks of that exact commit. With `commit` named, that commit is
|
|
2956
|
-
# the one judged, and no other is ever put in its place. Without it, the commit is the newest
|
|
2957
|
-
# one of the followed lane (first-parent, a bounded way back) that every `RequiredCheck` passed
|
|
2958
|
-
# on and that fast-forwards the lane, so the outcome never depends on which push's CI run
|
|
2959
|
-
# started the promotion; when none qualifies the refusal names what the lane's head is
|
|
2960
|
-
# waiting on.
|
|
2961
|
-
aggregate "PromotionRun" do
|
|
2962
|
-
description "One move of a lane onto a commit, or the rehearsal of it: judged by the facts, then carried out."
|
|
2963
|
-
|
|
2964
|
-
attribute :run, RunKey
|
|
2965
|
-
attribute :operation, Operation, optional: true
|
|
2966
|
-
attribute :confirm, Switch, optional: true
|
|
2967
|
-
attribute :lane, Word
|
|
2968
|
-
attribute :commit, Word, optional: true
|
|
2969
|
-
attribute :checkout, Switch, optional: true
|
|
2970
|
-
attribute :lane_known, Switch, optional: true
|
|
2971
|
-
attribute :green, Switch, optional: true
|
|
2972
|
-
attribute :descends, Switch, optional: true
|
|
2973
|
-
attribute :head, Word, optional: true
|
|
2974
|
-
attribute :behind_hours, Hours, optional: true
|
|
2975
|
-
attribute :limit_hours, Hours, optional: true
|
|
2976
|
-
attribute :alert_key, Word, optional: true
|
|
2977
|
-
attribute :promoted, Switch, optional: true
|
|
2978
|
-
attribute :reason, Report, optional: true
|
|
2979
|
-
attribute :report, Report, optional: true
|
|
2980
|
-
attribute :refusal, Report, optional: true
|
|
2981
|
-
identified_by :run
|
|
2982
|
-
|
|
2983
|
-
value_object "RunKey" do
|
|
2984
|
-
attribute :value, String, matches: :present
|
|
2985
|
-
|
|
2986
|
-
invariant("a run is named") { !value.to_s.empty? }
|
|
2987
|
-
end
|
|
2988
|
-
|
|
2989
|
-
value_object "Operation" do
|
|
2990
|
-
attribute :value, String, matches: :present
|
|
2991
|
-
end
|
|
2992
|
-
|
|
2993
|
-
value_object "Switch" do
|
|
2994
|
-
attribute :value, Boolean
|
|
2995
|
-
end
|
|
2996
|
-
|
|
2997
|
-
value_object "Report" do
|
|
2998
|
-
attribute :value, String
|
|
2999
|
-
end
|
|
3000
|
-
|
|
3001
|
-
# A branch name, or a commit.
|
|
3002
|
-
value_object "Word" do
|
|
3003
|
-
attribute :value, String, matches: :present
|
|
3004
|
-
end
|
|
3005
|
-
|
|
3006
|
-
# How long a lane has stood behind the lane it follows, or how long its row lets it.
|
|
3007
|
-
value_object "Hours" do
|
|
3008
|
-
attribute :value, Integer
|
|
3009
|
-
end
|
|
3010
|
-
|
|
3011
|
-
lifecycle :status, default: "requested" do
|
|
3012
|
-
mark :failure, "faulted"
|
|
3013
|
-
transition "Accept" => "accepted", from: "requested"
|
|
3014
|
-
transition "Observe" => "observed", from: "requested"
|
|
3015
|
-
transition "Complete" => "completed", from: %w[accepted observed]
|
|
3016
|
-
transition "Fault" => "faulted", from: %w[requested accepted]
|
|
3017
|
-
transition "Lag" => "faulted", from: "observed"
|
|
3018
|
-
mark :terminal, "completed", "faulted"
|
|
3019
|
-
end
|
|
3020
|
-
|
|
3021
|
-
# Looks at a lane and moves nothing: faults when it has stood behind the lane it follows for
|
|
3022
|
-
# longer than its `Lane` row allows, which files a finding. A lane whose row allows no lag is
|
|
3023
|
-
# never late.
|
|
3024
|
-
command "Watch" do
|
|
3025
|
-
role "Maintainer"
|
|
3026
|
-
goal "Fault when a lane has stood behind the lane it follows for longer than its Lane row allows"
|
|
3027
|
-
|
|
3028
|
-
attribute :lane, Word, sets: true
|
|
3029
|
-
attribute :run, RunKey, sets: true
|
|
3030
|
-
attribute :alert_key, Word, sets: true
|
|
3031
|
-
|
|
3032
|
-
sets :operation, to: "watch"
|
|
3033
|
-
|
|
3034
|
-
emits WatchRequested
|
|
3035
|
-
end
|
|
3036
|
-
|
|
3037
|
-
command "Promote" do
|
|
3038
|
-
role "Maintainer"
|
|
3039
|
-
goal "Move a lane onto a commit that has passed every required check, or with no --confirm rehearse the move"
|
|
3040
|
-
|
|
3041
|
-
attribute :lane, Word, sets: true
|
|
3042
|
-
attribute :commit, Word, optional: true, sets: true
|
|
3043
|
-
attribute :run, RunKey, sets: true
|
|
3044
|
-
attribute :confirm, Switch, optional: true, sets: true
|
|
3045
|
-
|
|
3046
|
-
sets :operation, to: "promote"
|
|
3047
|
-
|
|
3048
|
-
emits PromoteRequested
|
|
3049
|
-
end
|
|
3050
|
-
|
|
3051
|
-
# What the tree and the remote reported, held against the rules of a promotion: the adapter
|
|
3052
|
-
# supplies the facts and the givens decide.
|
|
3053
|
-
command "Accept" do
|
|
3054
|
-
role "System"
|
|
3055
|
-
goal "Let a lane move only in a hecks checkout, onto a commit that is green on every required check and contains the lane's head"
|
|
3056
|
-
|
|
3057
|
-
reference_to PromotionRun
|
|
3058
|
-
attribute :checkout, Switch, sets: true
|
|
3059
|
-
attribute :lane_known, Switch, sets: true
|
|
3060
|
-
attribute :green, Switch, sets: true
|
|
3061
|
-
attribute :descends, Switch, sets: true
|
|
3062
|
-
attribute :commit, Word, sets: true
|
|
3063
|
-
attribute :head, Word, optional: true, sets: true
|
|
3064
|
-
|
|
3065
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
3066
|
-
given("the lane is one of the Lane rows, and follows another lane") { lane_known.value }
|
|
3067
|
-
given("every RequiredCheck is green on the commit: wait for the checks, or fix the red one") { green.value }
|
|
3068
|
-
given("the commit is on the lane it follows and contains the lane's head: a lane only moves forward") { descends.value }
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
emits PromotionAccepted
|
|
3072
|
-
end
|
|
3073
|
-
|
|
3074
|
-
# What the tree and the remote reported about a watched lane, held against the rules of a
|
|
3075
|
-
# watch: it needs a hecks checkout and a lane that follows another.
|
|
3076
|
-
command "Observe" do
|
|
3077
|
-
role "System"
|
|
3078
|
-
goal "Let a lane be judged late or on time only in a hecks checkout, for a lane that follows another"
|
|
3079
|
-
|
|
3080
|
-
reference_to PromotionRun
|
|
3081
|
-
attribute :checkout, Switch, sets: true
|
|
3082
|
-
attribute :lane_known, Switch, sets: true
|
|
3083
|
-
attribute :behind_hours, Hours, sets: true
|
|
3084
|
-
attribute :limit_hours, Hours, sets: true
|
|
3085
|
-
attribute :alert_key, Word, sets: true
|
|
3086
|
-
attribute :promoted, Switch, sets: true
|
|
3087
|
-
attribute :reason, Report, sets: true
|
|
3088
|
-
|
|
3089
|
-
given("needs a hecks checkout: hecks.gemspec stands beside lib/") { checkout.value }
|
|
3090
|
-
given("the lane is one of the Lane rows, and follows another lane") { lane_known.value }
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
emits LaneObserved
|
|
3094
|
-
end
|
|
3095
|
-
|
|
3096
|
-
command "Complete" do
|
|
3097
|
-
role "System"
|
|
3098
|
-
goal "Record that the promotion was carried out or rehearsed, or the lane was on time, and what it reported"
|
|
3099
|
-
|
|
3100
|
-
reference_to PromotionRun
|
|
3101
|
-
attribute :report, Report, sets: true
|
|
3102
|
-
attribute :promoted, Switch, sets: true
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
emits PromotionCompleted
|
|
3106
|
-
end
|
|
3107
|
-
|
|
3108
|
-
# A lane that has stood behind the lane it follows for longer than its Lane row allows.
|
|
3109
|
-
command "Lag" do
|
|
3110
|
-
role "System"
|
|
3111
|
-
goal "Record that a lane is late, and what it is waiting on, under the alert key that names its finding"
|
|
3112
|
-
|
|
3113
|
-
reference_to PromotionRun
|
|
3114
|
-
attribute :refusal, Report, sets: true
|
|
3115
|
-
attribute :alert_key, Word, sets: true
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
emits LaneLagged
|
|
3119
|
-
end
|
|
3120
|
-
|
|
3121
|
-
command "Fault" do
|
|
3122
|
-
role "System"
|
|
3123
|
-
goal "Record that the promotion was refused or could not be carried out, and why"
|
|
3124
|
-
|
|
3125
|
-
reference_to PromotionRun
|
|
3126
|
-
attribute :refusal, Report, sets: true
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
emits PromotionFaulted
|
|
3130
|
-
end
|
|
3131
|
-
|
|
3132
|
-
query "PromotionOutcome" do
|
|
3133
|
-
description "How one promotion ended: its status, and what it reported or why it failed."
|
|
3134
|
-
attribute :run, RunKey
|
|
3135
|
-
where(run: :run)
|
|
3136
|
-
order_by :run
|
|
3137
|
-
end
|
|
3138
|
-
|
|
3139
|
-
query "PromotionFaulted" do
|
|
3140
|
-
description "Every promotion that was refused or could not be carried out."
|
|
3141
|
-
where(status: "faulted")
|
|
3142
|
-
order_by :run
|
|
3143
|
-
end
|
|
3144
|
-
end
|
|
3145
|
-
|
|
3146
|
-
policy "ExamineWhenPromoteRequested" do
|
|
3147
|
-
on "PromotionRun.PromoteRequested"
|
|
3148
|
-
ask :examine, with: { run: :run }
|
|
3149
|
-
end
|
|
3150
|
-
|
|
3151
|
-
policy "ExamineWhenWatchRequested" do
|
|
3152
|
-
on "PromotionRun.WatchRequested"
|
|
3153
|
-
ask :examine, with: { run: :run }
|
|
3154
|
-
end
|
|
3155
|
-
|
|
3156
|
-
policy "ObserveWhenWatchExamined" do
|
|
3157
|
-
on "PromotionRun.PromotionExamined"
|
|
3158
|
-
where { operation.value == "watch" }
|
|
3159
|
-
trigger PromotionRun::Observe, with: { checkout: :checkout, lane_known: :lane_known, behind_hours: :behind_hours,
|
|
3160
|
-
limit_hours: :limit_hours, alert_key: :alert_key, promoted: :promoted,
|
|
3161
|
-
reason: :reason }
|
|
3162
|
-
end
|
|
3163
|
-
|
|
3164
|
-
policy "FaultWhenWatchCannotBeJudged" do
|
|
3165
|
-
on "PromotionRun.PromotionExamined"
|
|
3166
|
-
where { operation.value == "watch" && (!checkout.value || !lane_known.value) }
|
|
3167
|
-
trigger PromotionRun::Fault, with: { refusal: :reason }
|
|
3168
|
-
end
|
|
3169
|
-
|
|
3170
|
-
policy "LagWhenLaneLate" do
|
|
3171
|
-
on "PromotionRun.LaneObserved"
|
|
3172
|
-
where { behind_hours.value > limit_hours.value }
|
|
3173
|
-
trigger PromotionRun::Lag, with: { refusal: :reason, alert_key: :alert_key }
|
|
3174
|
-
end
|
|
3175
|
-
|
|
3176
|
-
policy "CompleteWhenLaneOnTime" do
|
|
3177
|
-
on "PromotionRun.LaneObserved"
|
|
3178
|
-
where { behind_hours.value <= limit_hours.value }
|
|
3179
|
-
trigger PromotionRun::Complete, with: { report: :reason, promoted: :promoted }
|
|
3180
|
-
end
|
|
3181
|
-
|
|
3182
|
-
policy "AcceptPromotionWhenExamined" do
|
|
3183
|
-
on "PromotionRun.PromotionExamined"
|
|
3184
|
-
where { operation.value == "promote" }
|
|
3185
|
-
trigger PromotionRun::Accept, with: { checkout: :checkout, lane_known: :lane_known, green: :green,
|
|
3186
|
-
descends: :descends, commit: :commit, head: :head }
|
|
3187
|
-
end
|
|
3188
|
-
|
|
3189
|
-
policy "FaultPromotionWhenNotAccepted" do
|
|
3190
|
-
on "PromotionRun.PromotionExamined"
|
|
3191
|
-
where { operation.value == "promote" && (!checkout.value || !lane_known.value || !green.value || !descends.value) }
|
|
3192
|
-
trigger PromotionRun::Fault, with: { refusal: :reason }
|
|
3193
|
-
end
|
|
3194
|
-
|
|
3195
|
-
policy "PerformPromotionWhenAccepted" do
|
|
3196
|
-
on "PromotionRun.PromotionAccepted"
|
|
3197
|
-
ask :perform, with: { run: :run }
|
|
3198
|
-
end
|
|
3199
|
-
|
|
3200
|
-
policy "RecordPromotionOutcome" do
|
|
3201
|
-
on "PromotionRun.PromotionAnswered"
|
|
3202
|
-
trigger PromotionRun::Complete, with: { report: :report, promoted: :promoted }
|
|
3203
|
-
end
|
|
3204
|
-
|
|
3205
|
-
policy "RecordPromotionFault" do
|
|
3206
|
-
on "PromotionRun.PromotionRefused"
|
|
3207
|
-
trigger PromotionRun::Fault, with: { refusal: :refusal }
|
|
3208
|
-
end
|
|
3209
|
-
end
|