Module: Ast::Merge
- Defined in:
- lib/ast/merge.rb,
lib/ast/merge/version.rb
Defined Under Namespace
Modules: Version
Constant Summary collapse
- PACKAGE_NAME =
"ast-merge"- REVIEW_TRANSPORT_VERSION =
1- STRUCTURED_EDIT_TRANSPORT_VERSION =
1- TEMPLATE_TOKEN_CONFIG =
Token::Resolver::Config.new(separators: ["|", ":"]).freeze
- COMPACT_RULESET_REQUIRED_DIRECTIVES =
%w[format owners match read attach].freeze
- COMPACT_RULESET_SINGLETON_DIRECTIVES =
%w[format owners match read attach comment_style render].freeze
- COMPACT_RULESET_REPEATABLE_KEYED_DIRECTIVES =
%w[capability logical_owner repair surface delegate].freeze
- COMPACT_RULESET_READ_VALUES =
%w[source_augmented_portable_write native_read_portable_write native_mutation].freeze
- COMPACT_RULESET_ATTACH_VALUES =
%w[ layout_only tracker_layout_merge augmenter_preferred_tracker_layout normalize_tracked_layout_merge ].freeze
- VERSION =
Version::VERSION
Class Method Summary collapse
- .apply_template_execution(entries) ⇒ Object
- .apply_template_tree_execution_to_directory(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) ⇒ Object
- .classify_template_target_path(path) ⇒ Object
- .conformance_family_entries(manifest, family) ⇒ Object
- .conformance_family_feature_profile_path(manifest, family) ⇒ Object
- .conformance_fixture_path(manifest, family, role) ⇒ Object
- .conformance_manifest_replay_context(manifest, options) ⇒ Object
- .conformance_manifest_review_request_ids(manifest, options) ⇒ Object
- .conformance_manifest_review_state_envelope(state) ⇒ Object
- .conformance_review_host_hints(options) ⇒ Object
- .conformance_suite_definition(manifest, selector) ⇒ Object
- .conformance_suite_descriptor_string(definition) ⇒ Object
- .conformance_suite_selectors(manifest) ⇒ Object
- .deep_dup(value) ⇒ Object
- .deep_symbolize(value) ⇒ Object
- .default_conformance_family_context(family_profile) ⇒ Object
- .default_template_token_config ⇒ Object
- .delegated_child_apply_plan(state, family) ⇒ Object
- .delegated_child_operation(operation_id:, parent_operation_id:, requested_strategy:, language_chain:, surface:) ⇒ Object
- .discovered_surface(surface_kind:, effective_language:, address:, owner:, declared_language: nil, parent_address: nil, span: nil, reconstruction_strategy:, metadata: nil) ⇒ Object
- .enrich_template_plan_entries(entries, existing_destination_paths) ⇒ Object
- .enrich_template_plan_entries_with_token_state(entries, template_contents, replacements, config = nil) ⇒ Object
- .evaluate_template_tree_convergence(template_source_paths, template_contents, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) ⇒ Object
- .execute_delegated_child_apply_plan(apply_plan, applied_children, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
- .execute_nested_merge(nested_outputs, default_family:, request_id_prefix:, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
- .execute_review_replay_bundle_envelope_reviewed_nested_executions(envelope, &callbacks_for_execution) ⇒ Object
- .execute_review_replay_bundle_reviewed_nested_executions(bundle, &callbacks_for_execution) ⇒ Object
- .execute_review_state_envelope_reviewed_nested_executions(envelope, &callbacks_for_execution) ⇒ Object
- .execute_review_state_reviewed_nested_executions(state, &callbacks_for_execution) ⇒ Object
- .execute_reviewed_nested_execution(execution, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
- .execute_reviewed_nested_executions(executions, &callbacks_for_execution) ⇒ Object
- .execute_reviewed_nested_merge(review_state, family, applied_children, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
- .group_projected_child_review_cases(cases) ⇒ Object
- .import_conformance_manifest_review_state_envelope(envelope) ⇒ Object
- .import_review_replay_bundle_envelope(envelope) ⇒ Object
- .import_reviewed_nested_execution_envelope(envelope) ⇒ Object
- .import_structured_edit_application_envelope(envelope) ⇒ Object
- .import_structured_edit_batch_report_envelope(envelope) ⇒ Object
- .import_structured_edit_execution_report_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_dispatch_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_handoff_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_invocation_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_outcome_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_plan_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_provenance_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_application_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_session_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_result_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_receipt_replay_workflow_review_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_replay_bundle_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_report_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_batch_execution_run_result_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_application_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_dispatch_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_handoff_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_invocation_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_outcome_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_plan_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_provenance_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_application_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_session_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_result_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_apply_session_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_result_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_receipt_replay_workflow_review_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_replay_bundle_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_request_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_execution_run_result_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_executor_profile_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_executor_registry_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_executor_resolution_envelope(envelope) ⇒ Object
- .import_structured_edit_provider_executor_selection_policy_envelope(envelope) ⇒ Object
- .import_structured_edit_request_envelope(envelope) ⇒ Object
- .json_ready(value) ⇒ Object
- .normalize_template_replacements(replacements) ⇒ Object
- .normalize_template_source_path(path) ⇒ Object
- .normalize_value(value) ⇒ Object
- .parse_compact_ruleset(source) ⇒ Object
- .plan_conformance_suite(manifest, family, roles, family_profile, feature_profile = nil) ⇒ Object
- .plan_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil) ⇒ Object
- .plan_named_conformance_suite_entry(manifest, selector, context) ⇒ Object
- .plan_named_conformance_suites(manifest, contexts) ⇒ Object
- .plan_named_conformance_suites_with_diagnostics(manifest, options) ⇒ Object
- .plan_template_entries(template_source_paths, context = {}, default_strategy = "merge", overrides = []) ⇒ Object
- .plan_template_execution(entries, destination_contents) ⇒ Object
- .plan_template_tree_execution(template_source_paths, template_contents, existing_destination_paths, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) ⇒ Object
- .plan_template_tree_execution_from_directories(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) ⇒ Object
- .prepare_template_entries(entries, template_contents, replacements, config = nil) ⇒ Object
- .preview_template_execution(entries) ⇒ Object
- .projected_child_group_review_request(group, family) ⇒ Object
- .projected_child_review_case(case_id:, parent_operation_id:, child_operation_id:, surface_path:, delegated_case_id:, delegated_apply_group:, delegated_runtime_surface_path:) ⇒ Object
- .read_relative_file_tree(root) ⇒ Object
- .report_conformance_manifest(manifest, options, &execute) ⇒ Object
- .report_conformance_suite(results) ⇒ Object
- .report_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
- .report_named_conformance_suite_entry(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
- .report_named_conformance_suite_envelope(entries) ⇒ Object
- .report_named_conformance_suite_manifest(manifest, contexts, &execute) ⇒ Object
- .report_planned_conformance_suite(plan, &execute) ⇒ Object
- .report_planned_named_conformance_suites(entries, &execute) ⇒ Object
- .report_template_directory_apply(result) ⇒ Object
- .report_template_directory_plan(entries) ⇒ Object
- .report_template_directory_runner(entries, result = nil) ⇒ Object
- .report_template_tree_run(result) ⇒ Object
- .resolve_conformance_family_context(family, options) ⇒ Object
- .resolve_delegated_child_outputs(operations, nested_outputs, default_family:, request_id_prefix:) ⇒ Object
- .resolve_template_destination_path(path, context = {}) ⇒ Object
- .resolve_template_tokens(content, replacements = {}, config = nil) ⇒ Object
- .review_and_execute_conformance_manifest_with_replay_bundle_envelope(manifest, options, replay_bundle_envelope, execute:, reviewed_nested_execution:) ⇒ Object
- .review_conformance_family_context(family, options) ⇒ Object
- .review_conformance_manifest(manifest, options, &execute) ⇒ Object
- .review_conformance_manifest_with_replay_bundle_envelope(manifest, options, replay_bundle_envelope, &execute) ⇒ Object
- .review_projected_child_groups(groups, family, decisions) ⇒ Object
- .review_replay_bundle_envelope(bundle) ⇒ Object
- .review_replay_bundle_inputs(options) ⇒ Object
- .review_replay_context_compatible(current, candidate) ⇒ Object
- .review_request_id_for_family_context(family) ⇒ Object
- .review_request_id_for_projected_child_group(group) ⇒ Object
- .reviewed_nested_execution(family, review_state, applied_children) ⇒ Object
- .reviewed_nested_execution_envelope(execution) ⇒ Object
- .run_conformance_case(run, &execute) ⇒ Object
- .run_conformance_suite(runs, &execute) ⇒ Object
- .run_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
- .run_named_conformance_suite_entry(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
- .run_planned_conformance_suite(plan, &execute) ⇒ Object
- .run_planned_named_conformance_suites(entries, &execute) ⇒ Object
- .run_template_tree_execution(template_source_paths, template_contents, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) ⇒ Object
- .run_template_tree_execution_from_directories(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) ⇒ Object
- .select_conformance_case(ref, requirements, family_profile, feature_profile = nil) ⇒ Object
- .select_projected_child_review_groups_accepted_for_apply(groups, _family, decisions) ⇒ Object
- .select_projected_child_review_groups_ready_for_apply(groups, resolved_case_ids) ⇒ Object
- .select_template_strategy(path, default_strategy = "merge", overrides = []) ⇒ Object
- .structured_edit_application(request:, result:, metadata: nil) ⇒ Object
- .structured_edit_application_envelope(application) ⇒ Object
- .structured_edit_batch_report(reports:, diagnostics:, metadata: nil) ⇒ Object
- .structured_edit_batch_report_envelope(batch_report) ⇒ Object
- .structured_edit_batch_request(requests:, metadata: nil) ⇒ Object
- .structured_edit_crispr_example_parity_backend_note(backend:, scope:, notes:, metadata: nil) ⇒ Object
- .structured_edit_crispr_example_parity_report(scenarios:, remaining_gaps: nil, metadata: nil) ⇒ Object
- .structured_edit_crispr_example_parity_scenario(scenario:, family:, reproduced:, implementation_notes:, reference_backend: nil, backend_notes: nil, metadata: nil) ⇒ Object
- .structured_edit_destination_profile(resolution_kind:, resolution_source:, anchor_boundary:, resolution_family:, resolution_source_family:, anchor_boundary_family:, known_resolution_kind:, known_resolution_source:, known_anchor_boundary:, used_if_missing:, metadata: nil) ⇒ Object
- .structured_edit_execution_report(application:, provider_family:, diagnostics:, provider_backend: nil, metadata: nil) ⇒ Object
- .structured_edit_execution_report_envelope(report) ⇒ Object
- .structured_edit_kettle_jem_primitive_gap_report(reference_project:, scope:, product_target:, current_substrate:, required_primitives:, script_classifications:, non_goals: nil, next_slices: nil, metadata: nil) ⇒ Object
- .structured_edit_match_profile(start_boundary:, end_boundary:, payload_kind:, known_start_boundary:, known_end_boundary:, known_payload_kind:, comment_anchored:, trailing_gap_extended:, start_boundary_family: nil, end_boundary_family: nil, payload_family: nil, metadata: nil) ⇒ Object
- .structured_edit_operation_profile(operation_kind:, known_operation_kind:, source_requirement:, destination_requirement:, replacement_source:, captures_source_text:, supports_if_missing:, operation_family: nil, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_dispatch(dispatches:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_dispatch_envelope(batch_dispatch) ⇒ Object
- .structured_edit_provider_batch_execution_handoff(handoffs:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_handoff_envelope(batch_execution_handoff) ⇒ Object
- .structured_edit_provider_batch_execution_invocation(invocations:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_invocation_envelope(batch_execution_invocation) ⇒ Object
- .structured_edit_provider_batch_execution_outcome(outcomes:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_outcome_envelope(batch_outcome) ⇒ Object
- .structured_edit_provider_batch_execution_plan(plans:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_plan_envelope(batch_execution_plan) ⇒ Object
- .structured_edit_provider_batch_execution_provenance(provenances:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_provenance_envelope(batch_provenance) ⇒ Object
- .structured_edit_provider_batch_execution_receipt(receipts:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_envelope(batch_execution_receipt) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_application(applications:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_application_envelope(batch_receipt_replay_application) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_request(requests:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_request_envelope(batch_receipt_replay_request) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_session(sessions:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_session_envelope(batch_receipt_replay_session) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow(workflows:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision(apply_decisions:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report(closure_reports:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(batch_receipt_replay_workflow_apply_decision_closure_report) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation(apply_decision_confirmations:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(batch_receipt_replay_workflow_apply_decision_confirmation) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_envelope(batch_receipt_replay_workflow_apply_decision) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome(apply_decision_outcomes:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome_envelope(batch_receipt_replay_workflow_apply_decision_outcome) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement(apply_decision_settlements:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement_envelope(batch_receipt_replay_workflow_apply_decision_settlement) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request(apply_requests:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request_envelope(batch_receipt_replay_workflow_apply_request) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result(apply_results:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result_envelope(batch_receipt_replay_workflow_apply_result) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session(apply_sessions:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session_envelope(batch_receipt_replay_workflow_apply_session) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_envelope(batch_receipt_replay_workflow) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_result(receipt_replay_workflow_results:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_result_envelope(batch_receipt_replay_workflow_result) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_review_request(review_requests:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_receipt_replay_workflow_review_request_envelope(batch_receipt_replay_workflow_review_request) ⇒ Object
- .structured_edit_provider_batch_execution_replay_bundle(replay_bundles:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_replay_bundle_envelope(batch_replay_bundle) ⇒ Object
- .structured_edit_provider_batch_execution_report(applications:, diagnostics:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_report_envelope(batch_report) ⇒ Object
- .structured_edit_provider_batch_execution_request(requests:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_request_envelope(batch_execution_request) ⇒ Object
- .structured_edit_provider_batch_execution_run_result(run_results:, metadata: nil) ⇒ Object
- .structured_edit_provider_batch_execution_run_result_envelope(batch_execution_run_result) ⇒ Object
- .structured_edit_provider_execution_application(execution_request:, report:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_application_envelope(provider_execution_application) ⇒ Object
- .structured_edit_provider_execution_dispatch(execution_request:, resolved_provider_family:, resolved_provider_backend:, executor_label: nil, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_dispatch_envelope(provider_execution_dispatch) ⇒ Object
- .structured_edit_provider_execution_handoff(execution_plan:, execution_dispatch:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_handoff_envelope(execution_handoff) ⇒ Object
- .structured_edit_provider_execution_invocation(execution_handoff:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_invocation_envelope(execution_invocation) ⇒ Object
- .structured_edit_provider_execution_outcome(dispatch:, application:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_outcome_envelope(provider_execution_outcome) ⇒ Object
- .structured_edit_provider_execution_plan(execution_request:, executor_resolution:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_plan_envelope(execution_plan) ⇒ Object
- .structured_edit_provider_execution_provenance(dispatch:, outcome:, diagnostics:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_provenance_envelope(provenance) ⇒ Object
- .structured_edit_provider_execution_receipt(run_result:, provenance: nil, replay_bundle: nil, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_envelope(execution_receipt) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_application(receipt_replay_request:, run_result:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_application_envelope(receipt_replay_application) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_request(execution_receipt:, replay_mode:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_request_envelope(receipt_replay_request) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_session(receipt_replay_application:, execution_receipt:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_session_envelope(receipt_replay_session) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow(receipt_replay_session:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision(receipt_replay_workflow_apply_result:, decision:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_audit_record(receipt_replay_workflow_apply_decision_closure_report:, audit_record:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report(receipt_replay_workflow_apply_decision_confirmation:, closure_report:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(receipt_replay_workflow_apply_decision_closure_report) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation(receipt_replay_workflow_apply_decision_settlement:, confirmation:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(receipt_replay_workflow_apply_decision_confirmation) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_envelope(receipt_replay_workflow_apply_decision) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome(receipt_replay_workflow_apply_decision:, outcome:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome_envelope(receipt_replay_workflow_apply_decision_outcome) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement(receipt_replay_workflow_apply_decision_outcome:, settlement:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement_envelope(receipt_replay_workflow_apply_decision_settlement) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_request(receipt_replay_workflow_review_request:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_request_envelope(receipt_replay_workflow_apply_request) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_result(receipt_replay_workflow_apply_session:, receipt_replay_workflow_result:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_result_envelope(receipt_replay_workflow_apply_result) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_session(receipt_replay_workflow_apply_request:, receipt_replay_session:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_apply_session_envelope(receipt_replay_workflow_apply_session) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_envelope(receipt_replay_workflow) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_result(receipt_replay_workflow:, receipt_replay_application:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_result_envelope(receipt_replay_workflow_result) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_review_request(receipt_replay_workflow_result:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_receipt_replay_workflow_review_request_envelope(receipt_replay_workflow_review_request) ⇒ Object
- .structured_edit_provider_execution_replay_bundle(execution_request:, provenance:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_replay_bundle_envelope(replay_bundle) ⇒ Object
- .structured_edit_provider_execution_request(request:, provider_family:, provider_backend: nil, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_request_envelope(execution_request) ⇒ Object
- .structured_edit_provider_execution_run_result(execution_invocation:, outcome:, metadata: nil) ⇒ Object
- .structured_edit_provider_execution_run_result_envelope(execution_run_result) ⇒ Object
- .structured_edit_provider_executor_profile(provider_family:, provider_backend:, executor_label:, structure_profile:, selection_profile:, match_profile:, operation_profiles:, destination_profile:, metadata: nil) ⇒ Object
- .structured_edit_provider_executor_profile_envelope(executor_profile) ⇒ Object
- .structured_edit_provider_executor_registry(executor_profiles:, metadata: nil) ⇒ Object
- .structured_edit_provider_executor_registry_envelope(executor_registry) ⇒ Object
- .structured_edit_provider_executor_resolution(executor_registry:, selection_policy:, selected_executor_profile:, metadata: nil) ⇒ Object
- .structured_edit_provider_executor_resolution_envelope(executor_resolution) ⇒ Object
- .structured_edit_provider_executor_selection_policy(provider_family:, selection_mode:, allow_registry_fallback:, provider_backend: nil, executor_label: nil, metadata: nil) ⇒ Object
- .structured_edit_provider_executor_selection_policy_envelope(selection_policy) ⇒ Object
- .structured_edit_request(operation_kind:, content:, source_label:, target_selector: nil, target_selector_family: nil, destination_selector: nil, destination_selector_family: nil, payload_text: nil, if_missing: nil, callable_destination: nil, target_selection: nil, target_match: nil, metadata: nil) ⇒ Object
- .structured_edit_request_envelope(request) ⇒ Object
- .structured_edit_result(operation_kind:, updated_content:, changed:, operation_profile:, captured_text: nil, match_count: nil, destination_profile: nil, metadata: nil) ⇒ Object
- .structured_edit_selection_profile(owner_scope:, owner_selector:, selector_kind:, selection_intent:, known_selection_intent:, include_trailing_gap:, comment_anchored:, owner_selector_family: nil, selection_intent_family: nil, comment_region: nil, metadata: nil) ⇒ Object
- .structured_edit_structure_profile(owner_scope:, owner_selector:, known_owner_selector:, supported_comment_regions:, owner_selector_family: nil, metadata: nil) ⇒ Object
- .structured_edit_target_match(start_boundary:, end_boundary:, payload_kind:, known_start_boundary:, known_end_boundary:, known_payload_kind:, comment_anchored:, trailing_gap_extended:, start_boundary_family: nil, end_boundary_family: nil, payload_family: nil, metadata: nil) ⇒ Object
- .structured_edit_target_selection(selector_kind:, selection_intent:, known_selection_intent:, include_trailing_gap:, comment_anchored:, selection_intent_family: nil, comment_region: nil, metadata: nil) ⇒ Object
- .summarize_conformance_results(results) ⇒ Object
- .summarize_named_conformance_suite_reports(entries) ⇒ Object
- .summarize_projected_child_review_group_progress(groups, resolved_case_ids) ⇒ Object
- .surface_owner_ref(kind:, address:) ⇒ Object
- .surface_span(start_line:, end_line:) ⇒ Object
- .template_target_classification(path, file_type, family, dialect) ⇒ Object
- .template_token_keys(content, config = nil) ⇒ Object
- .token_resolver_config(config) ⇒ Object
- .unresolved_template_token_keys(content, replacements = {}, config = nil) ⇒ Object
- .write_relative_file_tree(root, files) ⇒ Object
Class Method Details
.apply_template_execution(entries) ⇒ Object
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/ast/merge.rb', line 393 def apply_template_execution(entries) result = { result_files: {}, created_paths: [], updated_paths: [], kept_paths: [], blocked_paths: [], omitted_paths: [], diagnostics: [] } entries.each do |entry| destination_path = entry[:destination_path] || entry["destination_path"] execution_action = (entry[:execution_action] || entry["execution_action"]).to_s destination_exists = entry[:destination_exists] destination_exists = entry["destination_exists"] if destination_exists.nil? prepared_template_content = entry[:prepared_template_content] || entry["prepared_template_content"] destination_content = entry[:destination_content] || entry["destination_content"] case execution_action when "blocked" result[:blocked_paths] << destination_path if destination_path when "omit" result[:omitted_paths] << (entry[:logical_destination_path] || entry["logical_destination_path"]) when "keep" next unless destination_path && !destination_content.nil? result[:result_files][destination_path] = destination_content result[:kept_paths] << destination_path when "raw_copy", "write_prepared_content" next unless destination_path && !prepared_template_content.nil? record_template_apply_output(result, destination_path, destination_exists, destination_content, prepared_template_content) when "merge_prepared_content" next unless destination_path && !prepared_template_content.nil? if destination_content.nil? record_template_apply_output(result, destination_path, destination_exists, destination_content, prepared_template_content) next end merge_result = yield(deep_dup(entry)) result[:diagnostics].concat(Array(merge_result[:diagnostics] || merge_result["diagnostics"])) ok = merge_result[:ok] ok = merge_result["ok"] if ok.nil? output = merge_result[:output] output = merge_result["output"] if output.nil? unless ok && !output.nil? result[:blocked_paths] << destination_path next end record_template_apply_output(result, destination_path, destination_exists, destination_content, output) end end result end |
.apply_template_tree_execution_to_directory(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) ⇒ Object
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
# File 'lib/ast/merge.rb', line 576 def apply_template_tree_execution_to_directory(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) run_result = run_template_tree_execution_from_directories( template_root, destination_root, context, default_strategy, overrides, replacements, config, &merge_prepared_content ) files_to_write = {} Array(run_result.dig(:apply_result, :created_paths) || run_result.dig("apply_result", "created_paths")).each do |path| files_to_write[path] = run_result.dig(:apply_result, :result_files, path) || run_result.dig("apply_result", "result_files", path) end Array(run_result.dig(:apply_result, :updated_paths) || run_result.dig("apply_result", "updated_paths")).each do |path| files_to_write[path] = run_result.dig(:apply_result, :result_files, path) || run_result.dig("apply_result", "result_files", path) end write_relative_file_tree(destination_root, files_to_write) run_result end |
.classify_template_target_path(path) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/ast/merge.rb', line 110 def classify_template_target_path(path) normalized_path = path.to_s.delete_prefix("./") base = File.basename(normalized_path) lower_path = normalized_path.downcase lower_base = base.downcase return template_target_classification(path, "ruby", "ruby", "ruby") if normalized_path == ".git-hooks/commit-msg" return template_target_classification(path, "bash", "bash", "bash") if normalized_path == ".git-hooks/prepare-commit-msg" case base when "Gemfile", "Appraisal.root.gemfile" return template_target_classification(path, "gemfile", "ruby", "ruby") when "Appraisals" return template_target_classification(path, "appraisals", "ruby", "ruby") when "Rakefile", ".simplecov" return template_target_classification(path, "ruby", "ruby", "ruby") when ".envrc" return template_target_classification(path, "bash", "bash", "bash") when ".tool-versions" return template_target_classification(path, "tool_versions", "text", "tool_versions") when "CITATION.cff" return template_target_classification(path, "yaml", "yaml", "yaml") end return template_target_classification(path, "gemspec", "ruby", "ruby") if lower_base.end_with?(".gemspec") return template_target_classification(path, "gemfile", "ruby", "ruby") if lower_base.end_with?(".gemfile") return template_target_classification(path, "ruby", "ruby", "ruby") if lower_base.end_with?(".rb", ".rake") return template_target_classification(path, "yaml", "yaml", "yaml") if lower_path.end_with?(".yml", ".yaml") return template_target_classification(path, "markdown", "markdown", "markdown") if lower_path.end_with?(".md", ".markdown") return template_target_classification(path, "bash", "bash", "bash") if lower_path.end_with?(".sh", ".bash") return template_target_classification(path, "dotenv", "dotenv", "dotenv") if lower_base == ".env" || lower_base.start_with?(".env.") return template_target_classification(path, "json", "json", "jsonc") if lower_path.end_with?(".jsonc") return template_target_classification(path, "json", "json", "json") if lower_path.end_with?(".json") return template_target_classification(path, "toml", "toml", "toml") if lower_path.end_with?(".toml") return template_target_classification(path, "rbs", "rbs", "rbs") if lower_path.end_with?(".rbs") template_target_classification(path, "text", "text", "text") end |
.conformance_family_entries(manifest, family) ⇒ Object
26 27 28 29 |
# File 'lib/ast/merge.rb', line 26 def conformance_family_entries(manifest, family) families = manifest.fetch(:families, {}) (families[family.to_sym] || families[family.to_s] || []).map { |entry| deep_dup(entry) } end |
.conformance_family_feature_profile_path(manifest, family) ⇒ Object
36 37 38 39 |
# File 'lib/ast/merge.rb', line 36 def conformance_family_feature_profile_path(manifest, family) entry = manifest.fetch(:family_feature_profiles, []).find { |candidate| candidate[:family] == family.to_s } entry && deep_dup(entry[:path]) end |
.conformance_fixture_path(manifest, family, role) ⇒ Object
31 32 33 34 |
# File 'lib/ast/merge.rb', line 31 def conformance_fixture_path(manifest, family, role) entry = conformance_family_entries(manifest, family).find { |candidate| candidate[:role] == role } entry && deep_dup(entry[:path]) end |
.conformance_manifest_replay_context(manifest, options) ⇒ Object
2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 |
# File 'lib/ast/merge.rb', line 2787 def conformance_manifest_replay_context(manifest, ) seen = {} families = conformance_suite_selectors(manifest).filter_map do |selector| definition = conformance_suite_definition(manifest, selector) next unless definition family = definition.dig(:subject, :grammar) next if seen[family] seen[family] = true family end { surface: "conformance_manifest", families: families, require_explicit_contexts: .fetch(:require_explicit_contexts, false) } end |
.conformance_manifest_review_request_ids(manifest, options) ⇒ Object
2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 |
# File 'lib/ast/merge.rb', line 2814 def conformance_manifest_review_request_ids(manifest, ) return [] unless .fetch(:require_explicit_contexts, false) seen = {} conformance_suite_selectors(manifest).filter_map do |selector| definition = conformance_suite_definition(manifest, selector) next unless definition family = definition.dig(:subject, :grammar) next if seen[family] seen[family] = true contexts = .fetch(:contexts, {}) family_profiles = .fetch(:family_profiles, {}) next if contexts.key?(family.to_sym) || contexts.key?(family) next unless family_profiles.key?(family.to_sym) || family_profiles.key?(family) review_request_id_for_family_context(family) end end |
.conformance_manifest_review_state_envelope(state) ⇒ Object
2843 2844 2845 2846 2847 2848 2849 |
# File 'lib/ast/merge.rb', line 2843 def conformance_manifest_review_state_envelope(state) { kind: "conformance_manifest_review_state", version: REVIEW_TRANSPORT_VERSION, state: deep_dup(state) } end |
.conformance_review_host_hints(options) ⇒ Object
799 800 801 802 803 804 |
# File 'lib/ast/merge.rb', line 799 def conformance_review_host_hints() { interactive: .fetch(:interactive, false), require_explicit_contexts: .fetch(:require_explicit_contexts, false) } end |
.conformance_suite_definition(manifest, selector) ⇒ Object
745 746 747 748 749 750 751 752 |
# File 'lib/ast/merge.rb', line 745 def conformance_suite_definition(manifest, selector) manifest.fetch(:suite_descriptors, []).find do |definition| conformance_suite_selectors_equal?( { kind: definition[:kind], subject: deep_dup(definition[:subject]) }, selector ) end&.then { |definition| deep_dup(definition) } end |
.conformance_suite_descriptor_string(definition) ⇒ Object
787 788 789 |
# File 'lib/ast/merge.rb', line 787 def conformance_suite_descriptor_string(definition) JSON.generate(json_ready(definition)) end |
.conformance_suite_selectors(manifest) ⇒ Object
772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/ast/merge.rb', line 772 def conformance_suite_selectors(manifest) manifest.fetch(:suite_descriptors, []).map do |definition| { kind: definition[:kind], subject: deep_dup(definition[:subject]) } end.sort_by do |selector| [ selector[:kind].to_s, selector.dig(:subject, :grammar).to_s, selector.dig(:subject, :variant).to_s ] end end |
.deep_dup(value) ⇒ Object
3285 3286 3287 |
# File 'lib/ast/merge.rb', line 3285 def deep_dup(value) Marshal.load(Marshal.dump(value)) end |
.deep_symbolize(value) ⇒ Object
3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 |
# File 'lib/ast/merge.rb', line 3298 def deep_symbolize(value) case value when Array value.map { |item| deep_symbolize(item) } when Hash value.each_with_object({}) do |(key, item), memo| memo[key.to_sym] = deep_symbolize(item) end else value end end |
.default_conformance_family_context(family_profile) ⇒ Object
791 792 793 |
# File 'lib/ast/merge.rb', line 791 def default_conformance_family_context(family_profile) { family_profile: deep_dup(family_profile) } end |
.default_template_token_config ⇒ Object
165 166 167 168 169 170 171 172 173 174 |
# File 'lib/ast/merge.rb', line 165 def default_template_token_config { pre: TEMPLATE_TOKEN_CONFIG.pre, post: TEMPLATE_TOKEN_CONFIG.post, separators: TEMPLATE_TOKEN_CONFIG.separators, min_segments: TEMPLATE_TOKEN_CONFIG.min_segments, max_segments: TEMPLATE_TOKEN_CONFIG.max_segments, segment_pattern: TEMPLATE_TOKEN_CONFIG.segment_pattern } end |
.delegated_child_apply_plan(state, family) ⇒ Object
2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 |
# File 'lib/ast/merge.rb', line 2583 def delegated_child_apply_plan(state, family) entries = state.fetch(:accepted_groups, []).filter_map do |group| request_id = review_request_id_for_projected_child_group(group) decision = state.fetch(:applied_decisions, []).find do |candidate| candidate[:request_id] == request_id end next unless decision { request_id: request_id, family: family, delegated_group: deep_dup(group), decision: deep_dup(decision) } end { entries: entries } end |
.delegated_child_operation(operation_id:, parent_operation_id:, requested_strategy:, language_chain:, surface:) ⇒ Object
836 837 838 839 840 841 842 843 844 |
# File 'lib/ast/merge.rb', line 836 def delegated_child_operation(operation_id:, parent_operation_id:, requested_strategy:, language_chain:, surface:) { operation_id: operation_id, parent_operation_id: parent_operation_id, requested_strategy: requested_strategy.to_s, language_chain: deep_dup(language_chain), surface: deep_dup(surface) } end |
.discovered_surface(surface_kind:, effective_language:, address:, owner:, declared_language: nil, parent_address: nil, span: nil, reconstruction_strategy:, metadata: nil) ⇒ Object
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/ast/merge.rb', line 820 def discovered_surface(surface_kind:, effective_language:, address:, owner:, declared_language: nil, parent_address: nil, span: nil, reconstruction_strategy:, metadata: nil) surface = { surface_kind: surface_kind.to_s, effective_language: effective_language.to_s, address: address, owner: deep_dup(owner), reconstruction_strategy: reconstruction_strategy.to_s } surface[:declared_language] = declared_language.to_s if declared_language surface[:parent_address] = parent_address if parent_address surface[:span] = deep_dup(span) if span surface[:metadata] = deep_dup() if surface end |
.enrich_template_plan_entries(entries, existing_destination_paths) ⇒ Object
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/ast/merge.rb', line 219 def enrich_template_plan_entries(entries, existing_destination_paths) existing = existing_destination_paths.each_with_object({}) { |path, memo| memo[path] = true } entries.map do |entry| destination_path = entry[:destination_path] || entry["destination_path"] strategy = (entry[:strategy] || entry["strategy"]).to_s destination_exists = destination_path ? existing.fetch(destination_path, false) : false write_action = if destination_path.nil? "omit" elsif strategy == "keep_destination" "keep" elsif destination_exists "update" else "create" end deep_dup(entry).merge( destination_exists: destination_exists, write_action: write_action ) end end |
.enrich_template_plan_entries_with_token_state(entries, template_contents, replacements, config = nil) ⇒ Object
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/ast/merge.rb', line 242 def enrich_template_plan_entries_with_token_state(entries, template_contents, replacements, config = nil) normalized_replacements = normalize_template_replacements(replacements) entries.map do |entry| source_path = entry[:template_source_path] || entry["template_source_path"] destination_path = entry[:destination_path] || entry["destination_path"] strategy = (entry[:strategy] || entry["strategy"]).to_s content = template_contents[source_path] || template_contents[source_path.to_s] || template_contents[source_path.to_sym] || "" token_keys = template_token_keys(content, config) unresolved_token_keys = token_keys.reject { |key| normalized_replacements.key?(key) } token_resolution_required = !destination_path.nil? && strategy != "keep_destination" && strategy != "raw_copy" blocked = token_resolution_required && !unresolved_token_keys.empty? deep_dup(entry).merge( token_keys: token_keys, unresolved_token_keys: unresolved_token_keys, token_resolution_required: token_resolution_required, blocked: blocked, block_reason: blocked ? "unresolved_tokens" : nil ) end end |
.evaluate_template_tree_convergence(template_source_paths, template_contents, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) ⇒ Object
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/ast/merge.rb', line 454 def evaluate_template_tree_convergence(template_source_paths, template_contents, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) execution_plan = plan_template_tree_execution( template_source_paths, template_contents, destination_contents.keys.sort, destination_contents, context, default_strategy, overrides, replacements, config ) pending_paths = execution_plan.filter_map do |entry| blocked = entry[:blocked] blocked = entry["blocked"] if blocked.nil? if blocked next entry[:destination_path] || entry["destination_path"] || entry[:logical_destination_path] || entry["logical_destination_path"] end ready = entry[:ready] ready = entry["ready"] if ready.nil? next unless ready destination_content = entry[:destination_content] destination_content = entry["destination_content"] if destination_content.nil? prepared_template_content = entry[:prepared_template_content] prepared_template_content = entry["prepared_template_content"] if prepared_template_content.nil? next if !destination_content.nil? && !prepared_template_content.nil? && destination_content == prepared_template_content entry[:destination_path] || entry["destination_path"] || entry[:logical_destination_path] || entry["logical_destination_path"] end { converged: pending_paths.empty?, pending_paths: pending_paths } end |
.execute_delegated_child_apply_plan(apply_plan, applied_children, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 |
# File 'lib/ast/merge.rb', line 2680 def execute_delegated_child_apply_plan(apply_plan, applied_children, merge_parent:, discover_operations:, apply_resolved_outputs:) merged = merge_parent.call return merged unless merged[:ok] && merged.key?(:output) discovery = discover_operations.call(merged[:output]) return { ok: false, diagnostics: discovery[:diagnostics] || [], policies: [] } unless discovery[:ok] && discovery[:operations] apply_resolved_outputs.call( merged[:output], discovery[:operations], apply_plan, applied_children ) end |
.execute_nested_merge(nested_outputs, default_family:, request_id_prefix:, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 |
# File 'lib/ast/merge.rb', line 2657 def execute_nested_merge(nested_outputs, default_family:, request_id_prefix:, merge_parent:, discover_operations:, apply_resolved_outputs:) merged = merge_parent.call return merged unless merged[:ok] && merged.key?(:output) discovery = discover_operations.call(merged[:output]) return { ok: false, diagnostics: discovery[:diagnostics] || [], policies: [] } unless discovery[:ok] && discovery[:operations] resolution = resolve_delegated_child_outputs( discovery[:operations], nested_outputs, default_family: default_family, request_id_prefix: request_id_prefix ) return resolution.merge(policies: []) unless resolution[:ok] apply_resolved_outputs.call( merged[:output], discovery[:operations], resolution[:apply_plan], resolution[:applied_children] ) end |
.execute_review_replay_bundle_envelope_reviewed_nested_executions(envelope, &callbacks_for_execution) ⇒ Object
2743 2744 2745 2746 2747 2748 2749 2750 2751 |
# File 'lib/ast/merge.rb', line 2743 def execute_review_replay_bundle_envelope_reviewed_nested_executions(envelope, &callbacks_for_execution) bundle, import_error = import_review_replay_bundle_envelope(envelope) return { diagnostics: [diagnostic("error", import_error[:category], import_error[:message])], results: [] } if import_error { diagnostics: [], results: execute_review_replay_bundle_reviewed_nested_executions(bundle, &callbacks_for_execution) } end |
.execute_review_replay_bundle_reviewed_nested_executions(bundle, &callbacks_for_execution) ⇒ Object
2739 2740 2741 |
# File 'lib/ast/merge.rb', line 2739 def execute_review_replay_bundle_reviewed_nested_executions(bundle, &callbacks_for_execution) execute_reviewed_nested_executions(bundle.fetch(:reviewed_nested_executions, []), &callbacks_for_execution) end |
.execute_review_state_envelope_reviewed_nested_executions(envelope, &callbacks_for_execution) ⇒ Object
2757 2758 2759 2760 2761 2762 2763 2764 2765 |
# File 'lib/ast/merge.rb', line 2757 def execute_review_state_envelope_reviewed_nested_executions(envelope, &callbacks_for_execution) state, import_error = import_conformance_manifest_review_state_envelope(envelope) return { diagnostics: [diagnostic("error", import_error[:category], import_error[:message])], results: [] } if import_error { diagnostics: [], results: execute_review_state_reviewed_nested_executions(state, &callbacks_for_execution) } end |
.execute_review_state_reviewed_nested_executions(state, &callbacks_for_execution) ⇒ Object
2753 2754 2755 |
# File 'lib/ast/merge.rb', line 2753 def execute_review_state_reviewed_nested_executions(state, &callbacks_for_execution) execute_reviewed_nested_executions(state.fetch(:reviewed_nested_executions, []), &callbacks_for_execution) end |
.execute_reviewed_nested_execution(execution, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 |
# File 'lib/ast/merge.rb', line 2713 def execute_reviewed_nested_execution(execution, merge_parent:, discover_operations:, apply_resolved_outputs:) execute_reviewed_nested_merge( execution[:review_state], execution[:family], execution[:applied_children], merge_parent: merge_parent, discover_operations: discover_operations, apply_resolved_outputs: apply_resolved_outputs ) end |
.execute_reviewed_nested_executions(executions, &callbacks_for_execution) ⇒ Object
2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 |
# File 'lib/ast/merge.rb', line 2724 def execute_reviewed_nested_executions(executions, &callbacks_for_execution) executions.each_with_index.map do |execution, index| callbacks = callbacks_for_execution.call(execution, index) { execution: deep_dup(execution), result: execute_reviewed_nested_execution( execution, merge_parent: callbacks.fetch(:merge_parent), discover_operations: callbacks.fetch(:discover_operations), apply_resolved_outputs: callbacks.fetch(:apply_resolved_outputs) ) } end end |
.execute_reviewed_nested_merge(review_state, family, applied_children, merge_parent:, discover_operations:, apply_resolved_outputs:) ⇒ Object
2695 2696 2697 2698 2699 2700 2701 2702 2703 |
# File 'lib/ast/merge.rb', line 2695 def execute_reviewed_nested_merge(review_state, family, applied_children, merge_parent:, discover_operations:, apply_resolved_outputs:) execute_delegated_child_apply_plan( delegated_child_apply_plan(review_state, family), applied_children, merge_parent: merge_parent, discover_operations: discover_operations, apply_resolved_outputs: apply_resolved_outputs ) end |
.group_projected_child_review_cases(cases) ⇒ Object
2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 |
# File 'lib/ast/merge.rb', line 2461 def group_projected_child_review_cases(cases) groups = [] cases.each do |entry| existing = groups.find { |group| group[:delegated_apply_group] == entry[:delegated_apply_group] } if existing existing[:case_ids] << entry[:case_id] existing[:delegated_case_ids] << entry[:delegated_case_id] next end groups << { delegated_apply_group: entry[:delegated_apply_group], parent_operation_id: entry[:parent_operation_id], child_operation_id: entry[:child_operation_id], delegated_runtime_surface_path: entry[:delegated_runtime_surface_path], case_ids: [entry[:case_id]], delegated_case_ids: [entry[:delegated_case_id]] } end groups end |
.import_conformance_manifest_review_state_envelope(envelope) ⇒ Object
2867 2868 2869 2870 2871 2872 |
# File 'lib/ast/merge.rb', line 2867 def import_conformance_manifest_review_state_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected conformance_manifest_review_state envelope kind." }] unless envelope[:kind] == "conformance_manifest_review_state" return [nil, { category: "unsupported_version", message: "unsupported conformance_manifest_review_state envelope version #{envelope[:version]}." }] unless envelope[:version] == REVIEW_TRANSPORT_VERSION [deep_dup(envelope[:state]), nil] end |
.import_review_replay_bundle_envelope(envelope) ⇒ Object
2874 2875 2876 2877 2878 2879 |
# File 'lib/ast/merge.rb', line 2874 def import_review_replay_bundle_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected review_replay_bundle envelope kind." }] unless envelope[:kind] == "review_replay_bundle" return [nil, { category: "unsupported_version", message: "unsupported review_replay_bundle envelope version #{envelope[:version]}." }] unless envelope[:version] == REVIEW_TRANSPORT_VERSION [deep_dup(envelope[:replay_bundle]), nil] end |
.import_reviewed_nested_execution_envelope(envelope) ⇒ Object
2881 2882 2883 2884 2885 2886 |
# File 'lib/ast/merge.rb', line 2881 def import_reviewed_nested_execution_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected reviewed_nested_execution envelope kind." }] unless envelope[:kind] == "reviewed_nested_execution" return [nil, { category: "unsupported_version", message: "unsupported reviewed_nested_execution envelope version #{envelope[:version]}." }] unless envelope[:version] == REVIEW_TRANSPORT_VERSION [deep_dup(envelope[:execution]), nil] end |
.import_structured_edit_application_envelope(envelope) ⇒ Object
1023 1024 1025 1026 1027 1028 |
# File 'lib/ast/merge.rb', line 1023 def import_structured_edit_application_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_application envelope kind." }] unless envelope[:kind] == "structured_edit_application" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_application envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:application]), nil] end |
.import_structured_edit_batch_report_envelope(envelope) ⇒ Object
2441 2442 2443 2444 2445 2446 |
# File 'lib/ast/merge.rb', line 2441 def import_structured_edit_batch_report_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_batch_report envelope kind." }] unless envelope[:kind] == "structured_edit_batch_report" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_batch_report envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_report]), nil] end |
.import_structured_edit_execution_report_envelope(envelope) ⇒ Object
2339 2340 2341 2342 2343 2344 |
# File 'lib/ast/merge.rb', line 2339 def import_structured_edit_execution_report_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_execution_report envelope kind." }] unless envelope[:kind] == "structured_edit_execution_report" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_execution_report envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:report]), nil] end |
.import_structured_edit_provider_batch_execution_dispatch_envelope(envelope) ⇒ Object
2393 2394 2395 2396 2397 2398 |
# File 'lib/ast/merge.rb', line 2393 def import_structured_edit_provider_batch_execution_dispatch_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_dispatch envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_dispatch" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_dispatch envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_dispatch]), nil] end |
.import_structured_edit_provider_batch_execution_handoff_envelope(envelope) ⇒ Object
1984 1985 1986 1987 1988 1989 |
# File 'lib/ast/merge.rb', line 1984 def import_structured_edit_provider_batch_execution_handoff_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_handoff envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_handoff" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_handoff envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_execution_handoff]), nil] end |
.import_structured_edit_provider_batch_execution_invocation_envelope(envelope) ⇒ Object
1202 1203 1204 1205 1206 1207 |
# File 'lib/ast/merge.rb', line 1202 def import_structured_edit_provider_batch_execution_invocation_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_invocation envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_invocation" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_invocation envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_execution_invocation]), nil] end |
.import_structured_edit_provider_batch_execution_outcome_envelope(envelope) ⇒ Object
2105 2106 2107 2108 2109 2110 |
# File 'lib/ast/merge.rb', line 2105 def import_structured_edit_provider_batch_execution_outcome_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_outcome envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_outcome" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_outcome envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_outcome]), nil] end |
.import_structured_edit_provider_batch_execution_plan_envelope(envelope) ⇒ Object
2022 2023 2024 2025 2026 2027 |
# File 'lib/ast/merge.rb', line 2022 def import_structured_edit_provider_batch_execution_plan_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_plan envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_plan" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_plan envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_execution_plan]), nil] end |
.import_structured_edit_provider_batch_execution_provenance_envelope(envelope) ⇒ Object
2153 2154 2155 2156 2157 2158 |
# File 'lib/ast/merge.rb', line 2153 def import_structured_edit_provider_batch_execution_provenance_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_provenance envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_provenance" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_provenance envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_provenance]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_envelope(envelope) ⇒ Object
1297 1298 1299 1300 1301 1302 |
# File 'lib/ast/merge.rb', line 1297 def import_structured_edit_provider_batch_execution_receipt_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_execution_receipt]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_application_envelope(envelope) ⇒ Object
1391 1392 1393 1394 1395 1396 |
# File 'lib/ast/merge.rb', line 1391 def import_structured_edit_provider_batch_execution_receipt_replay_application_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_application envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_application" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_application envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_application]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_request_envelope(envelope) ⇒ Object
1344 1345 1346 1347 1348 1349 |
# File 'lib/ast/merge.rb', line 1344 def import_structured_edit_provider_batch_execution_receipt_replay_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_request]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_session_envelope(envelope) ⇒ Object
1438 1439 1440 1441 1442 1443 |
# File 'lib/ast/merge.rb', line 1438 def import_structured_edit_provider_batch_execution_receipt_replay_session_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_session envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_session" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_session envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_session]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(envelope) ⇒ Object
1710 1711 1712 1713 1714 1715 |
# File 'lib/ast/merge.rb', line 1710 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_decision_closure_report]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(envelope) ⇒ Object
1695 1696 1697 1698 1699 1700 |
# File 'lib/ast/merge.rb', line 1695 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_decision_confirmation]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_envelope(envelope) ⇒ Object
1885 1886 1887 1888 1889 1890 |
# File 'lib/ast/merge.rb', line 1885 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_decision]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome_envelope(envelope) ⇒ Object
1900 1901 1902 1903 1904 1905 |
# File 'lib/ast/merge.rb', line 1900 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_decision_outcome]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement_envelope(envelope) ⇒ Object
1664 1665 1666 1667 1668 1669 |
# File 'lib/ast/merge.rb', line 1664 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_decision_settlement]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request_envelope(envelope) ⇒ Object
1840 1841 1842 1843 1844 1845 |
# File 'lib/ast/merge.rb', line 1840 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_request]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result_envelope(envelope) ⇒ Object
1870 1871 1872 1873 1874 1875 |
# File 'lib/ast/merge.rb', line 1870 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_result]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session_envelope(envelope) ⇒ Object
1855 1856 1857 1858 1859 1860 |
# File 'lib/ast/merge.rb', line 1855 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_apply_session]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_envelope(envelope) ⇒ Object
1484 1485 1486 1487 1488 1489 |
# File 'lib/ast/merge.rb', line 1484 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_result_envelope(envelope) ⇒ Object
1961 1962 1963 1964 1965 1966 |
# File 'lib/ast/merge.rb', line 1961 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_result_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_result envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_result" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_result envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_result]), nil] end |
.import_structured_edit_provider_batch_execution_receipt_replay_workflow_review_request_envelope(envelope) ⇒ Object
1938 1939 1940 1941 1942 1943 |
# File 'lib/ast/merge.rb', line 1938 def import_structured_edit_provider_batch_execution_receipt_replay_workflow_review_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_receipt_replay_workflow_review_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_receipt_replay_workflow_review_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_receipt_replay_workflow_review_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_receipt_replay_workflow_review_request]), nil] end |
.import_structured_edit_provider_batch_execution_replay_bundle_envelope(envelope) ⇒ Object
2200 2201 2202 2203 2204 2205 |
# File 'lib/ast/merge.rb', line 2200 def import_structured_edit_provider_batch_execution_replay_bundle_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_replay_bundle envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_replay_bundle" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_replay_bundle envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_replay_bundle]), nil] end |
.import_structured_edit_provider_batch_execution_report_envelope(envelope) ⇒ Object
2417 2418 2419 2420 2421 2422 |
# File 'lib/ast/merge.rb', line 2417 def import_structured_edit_provider_batch_execution_report_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_report envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_report" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_report envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_report]), nil] end |
.import_structured_edit_provider_batch_execution_request_envelope(envelope) ⇒ Object
2370 2371 2372 2373 2374 2375 |
# File 'lib/ast/merge.rb', line 2370 def import_structured_edit_provider_batch_execution_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_execution_request]), nil] end |
.import_structured_edit_provider_batch_execution_run_result_envelope(envelope) ⇒ Object
1249 1250 1251 1252 1253 1254 |
# File 'lib/ast/merge.rb', line 1249 def import_structured_edit_provider_batch_execution_run_result_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_batch_execution_run_result envelope kind." }] unless envelope[:kind] == "structured_edit_provider_batch_execution_run_result" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_batch_execution_run_result envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:batch_execution_run_result]), nil] end |
.import_structured_edit_provider_execution_application_envelope(envelope) ⇒ Object
2324 2325 2326 2327 2328 2329 |
# File 'lib/ast/merge.rb', line 2324 def import_structured_edit_provider_execution_application_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_application envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_application" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_application envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:provider_execution_application]), nil] end |
.import_structured_edit_provider_execution_dispatch_envelope(envelope) ⇒ Object
2058 2059 2060 2061 2062 2063 |
# File 'lib/ast/merge.rb', line 2058 def import_structured_edit_provider_execution_dispatch_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_dispatch envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_dispatch" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_dispatch envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:provider_execution_dispatch]), nil] end |
.import_structured_edit_provider_execution_handoff_envelope(envelope) ⇒ Object
1156 1157 1158 1159 1160 1161 |
# File 'lib/ast/merge.rb', line 1156 def import_structured_edit_provider_execution_handoff_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_handoff envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_handoff" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_handoff envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:execution_handoff]), nil] end |
.import_structured_edit_provider_execution_invocation_envelope(envelope) ⇒ Object
1179 1180 1181 1182 1183 1184 |
# File 'lib/ast/merge.rb', line 1179 def import_structured_edit_provider_execution_invocation_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_invocation envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_invocation" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_invocation envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:execution_invocation]), nil] end |
.import_structured_edit_provider_execution_outcome_envelope(envelope) ⇒ Object
2082 2083 2084 2085 2086 2087 |
# File 'lib/ast/merge.rb', line 2082 def import_structured_edit_provider_execution_outcome_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_outcome envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_outcome" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_outcome envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:provider_execution_outcome]), nil] end |
.import_structured_edit_provider_execution_plan_envelope(envelope) ⇒ Object
1999 2000 2001 2002 2003 2004 |
# File 'lib/ast/merge.rb', line 1999 def import_structured_edit_provider_execution_plan_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_plan envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_plan" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_plan envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:execution_plan]), nil] end |
.import_structured_edit_provider_execution_provenance_envelope(envelope) ⇒ Object
2130 2131 2132 2133 2134 2135 |
# File 'lib/ast/merge.rb', line 2130 def import_structured_edit_provider_execution_provenance_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_provenance envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_provenance" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_provenance envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:provenance]), nil] end |
.import_structured_edit_provider_execution_receipt_envelope(envelope) ⇒ Object
1274 1275 1276 1277 1278 1279 |
# File 'lib/ast/merge.rb', line 1274 def import_structured_edit_provider_execution_receipt_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:execution_receipt]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_application_envelope(envelope) ⇒ Object
1368 1369 1370 1371 1372 1373 |
# File 'lib/ast/merge.rb', line 1368 def import_structured_edit_provider_execution_receipt_replay_application_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_application envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_application" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_application envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_application]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_request_envelope(envelope) ⇒ Object
1321 1322 1323 1324 1325 1326 |
# File 'lib/ast/merge.rb', line 1321 def import_structured_edit_provider_execution_receipt_replay_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_request]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_session_envelope(envelope) ⇒ Object
1415 1416 1417 1418 1419 1420 |
# File 'lib/ast/merge.rb', line 1415 def import_structured_edit_provider_execution_receipt_replay_session_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_session envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_session" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_session envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_session]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(envelope) ⇒ Object
1641 1642 1643 1644 1645 1646 |
# File 'lib/ast/merge.rb', line 1641 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_decision_closure_report]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(envelope) ⇒ Object
1626 1627 1628 1629 1630 1631 |
# File 'lib/ast/merge.rb', line 1626 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_decision_confirmation]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_envelope(envelope) ⇒ Object
1740 1741 1742 1743 1744 1745 |
# File 'lib/ast/merge.rb', line 1740 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_decision envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_decision" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_decision envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_decision]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome_envelope(envelope) ⇒ Object
1725 1726 1727 1728 1729 1730 |
# File 'lib/ast/merge.rb', line 1725 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_decision_outcome]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement_envelope(envelope) ⇒ Object
1611 1612 1613 1614 1615 1616 |
# File 'lib/ast/merge.rb', line 1611 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_decision_settlement]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_request_envelope(envelope) ⇒ Object
1785 1786 1787 1788 1789 1790 |
# File 'lib/ast/merge.rb', line 1785 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_request]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_result_envelope(envelope) ⇒ Object
1755 1756 1757 1758 1759 1760 |
# File 'lib/ast/merge.rb', line 1755 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_result_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_result envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_result" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_result envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_result]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_apply_session_envelope(envelope) ⇒ Object
1770 1771 1772 1773 1774 1775 |
# File 'lib/ast/merge.rb', line 1770 def import_structured_edit_provider_execution_receipt_replay_workflow_apply_session_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_apply_session envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_apply_session" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_apply_session envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_apply_session]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_envelope(envelope) ⇒ Object
1461 1462 1463 1464 1465 1466 |
# File 'lib/ast/merge.rb', line 1461 def import_structured_edit_provider_execution_receipt_replay_workflow_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_result_envelope(envelope) ⇒ Object
1508 1509 1510 1511 1512 1513 |
# File 'lib/ast/merge.rb', line 1508 def import_structured_edit_provider_execution_receipt_replay_workflow_result_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_result envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_result" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_result envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_result]), nil] end |
.import_structured_edit_provider_execution_receipt_replay_workflow_review_request_envelope(envelope) ⇒ Object
1915 1916 1917 1918 1919 1920 |
# File 'lib/ast/merge.rb', line 1915 def import_structured_edit_provider_execution_receipt_replay_workflow_review_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_receipt_replay_workflow_review_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_receipt_replay_workflow_review_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_receipt_replay_workflow_review_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:receipt_replay_workflow_review_request]), nil] end |
.import_structured_edit_provider_execution_replay_bundle_envelope(envelope) ⇒ Object
2177 2178 2179 2180 2181 2182 |
# File 'lib/ast/merge.rb', line 2177 def import_structured_edit_provider_execution_replay_bundle_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_replay_bundle envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_replay_bundle" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_replay_bundle envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:replay_bundle]), nil] end |
.import_structured_edit_provider_execution_request_envelope(envelope) ⇒ Object
1123 1124 1125 1126 1127 1128 |
# File 'lib/ast/merge.rb', line 1123 def import_structured_edit_provider_execution_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_request envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:execution_request]), nil] end |
.import_structured_edit_provider_execution_run_result_envelope(envelope) ⇒ Object
1226 1227 1228 1229 1230 1231 |
# File 'lib/ast/merge.rb', line 1226 def import_structured_edit_provider_execution_run_result_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_execution_run_result envelope kind." }] unless envelope[:kind] == "structured_edit_provider_execution_run_result" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_execution_run_result envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:execution_run_result]), nil] end |
.import_structured_edit_provider_executor_profile_envelope(envelope) ⇒ Object
2232 2233 2234 2235 2236 2237 |
# File 'lib/ast/merge.rb', line 2232 def import_structured_edit_provider_executor_profile_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_executor_profile envelope kind." }] unless envelope[:kind] == "structured_edit_provider_executor_profile" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_executor_profile envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:executor_profile]), nil] end |
.import_structured_edit_provider_executor_registry_envelope(envelope) ⇒ Object
2309 2310 2311 2312 2313 2314 |
# File 'lib/ast/merge.rb', line 2309 def import_structured_edit_provider_executor_registry_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_executor_registry envelope kind." }] unless envelope[:kind] == "structured_edit_provider_executor_registry" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_executor_registry envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:executor_registry]), nil] end |
.import_structured_edit_provider_executor_resolution_envelope(envelope) ⇒ Object
2294 2295 2296 2297 2298 2299 |
# File 'lib/ast/merge.rb', line 2294 def import_structured_edit_provider_executor_resolution_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_executor_resolution envelope kind." }] unless envelope[:kind] == "structured_edit_provider_executor_resolution" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_executor_resolution envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:executor_resolution]), nil] end |
.import_structured_edit_provider_executor_selection_policy_envelope(envelope) ⇒ Object
2279 2280 2281 2282 2283 2284 |
# File 'lib/ast/merge.rb', line 2279 def import_structured_edit_provider_executor_selection_policy_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_provider_executor_selection_policy envelope kind." }] unless envelope[:kind] == "structured_edit_provider_executor_selection_policy" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_provider_executor_selection_policy envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:selection_policy]), nil] end |
.import_structured_edit_request_envelope(envelope) ⇒ Object
1038 1039 1040 1041 1042 1043 |
# File 'lib/ast/merge.rb', line 1038 def import_structured_edit_request_envelope(envelope) return [nil, { category: "kind_mismatch", message: "expected structured_edit_request envelope kind." }] unless envelope[:kind] == "structured_edit_request" return [nil, { category: "unsupported_version", message: "unsupported structured_edit_request envelope version #{envelope[:version]}." }] unless envelope[:version] == STRUCTURED_EDIT_TRANSPORT_VERSION [deep_dup(envelope[:request]), nil] end |
.json_ready(value) ⇒ Object
3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 |
# File 'lib/ast/merge.rb', line 3311 def json_ready(value) case value when Array value.map { |item| json_ready(item) } when Hash value.each_with_object({}) do |(key, item), memo| memo[key.to_s] = json_ready(item) end else value end end |
.normalize_template_replacements(replacements) ⇒ Object
766 767 768 769 770 |
# File 'lib/ast/merge.rb', line 766 def normalize_template_replacements(replacements) (replacements || {}).each_with_object({}) do |(key, value), memo| memo[key.to_s] = value end end |
.normalize_template_source_path(path) ⇒ Object
103 104 105 106 107 108 |
# File 'lib/ast/merge.rb', line 103 def normalize_template_source_path(path) return path.delete_suffix(".no-osc.example") if path.end_with?(".no-osc.example") return path.delete_suffix(".example") if path.end_with?(".example") path end |
.normalize_value(value) ⇒ Object
3281 3282 3283 |
# File 'lib/ast/merge.rb', line 3281 def normalize_value(value) deep_symbolize(value) end |
.parse_compact_ruleset(source) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/ast/merge.rb', line 41 def parse_compact_ruleset(source) ruleset = { directives: [], comments: [] } diagnostics = [] seen_directives = {} seen_repeatable_keys = {} source.to_s.split("\n").each_with_index do |raw_line, index| line_number = index + 1 line = raw_line.strip next if line.empty? if line.start_with?("#") ruleset[:comments] << line next end name, *arguments = line.split(/\s+/) path = line_number.to_s unless compact_ruleset_identifier?(name) diagnostics << compact_ruleset_diagnostic("invalid directive token #{name.inspect}", path) next end unless compact_ruleset_known_directive?(name) diagnostics << compact_ruleset_diagnostic("unknown directive #{name.inspect}", path) next end if arguments.empty? diagnostics << compact_ruleset_diagnostic("directive #{name.inspect} requires at least one argument", path) next end arguments.each do |argument| next if %w[true false].include?(argument) || compact_ruleset_identifier?(argument) || compact_ruleset_token?(argument) diagnostics << compact_ruleset_diagnostic("invalid argument token #{argument.inspect}", path) end if COMPACT_RULESET_SINGLETON_DIRECTIVES.include?(name) && seen_directives.key?(name) diagnostics << compact_ruleset_diagnostic( "repeated singleton directive #{name.inspect} first seen on line #{seen_directives.fetch(name)}", path ) end if COMPACT_RULESET_REPEATABLE_KEYED_DIRECTIVES.include?(name) key = [name, arguments.fetch(0)] diagnostics << compact_ruleset_diagnostic("repeated #{name.inspect} key #{arguments.fetch(0).inspect}", path) if seen_repeatable_keys[key] seen_repeatable_keys[key] = true end diagnostics << compact_ruleset_diagnostic("unknown read value #{arguments.fetch(0).inspect}", path) if name == "read" && !COMPACT_RULESET_READ_VALUES.include?(arguments.fetch(0)) diagnostics << compact_ruleset_diagnostic("unknown attach value #{arguments.fetch(0).inspect}", path) if name == "attach" && !COMPACT_RULESET_ATTACH_VALUES.include?(arguments.fetch(0)) seen_directives[name] = line_number ruleset[:directives] << { name: name, arguments: arguments, line: line_number } end COMPACT_RULESET_REQUIRED_DIRECTIVES.each do |required| diagnostics << compact_ruleset_diagnostic("missing required directive #{required.inspect}") unless seen_directives.key?(required) end diagnostics.empty? ? { ok: true, diagnostics: [], analysis: ruleset, policies: [] } : { ok: false, diagnostics: diagnostics, policies: [] } end |
.plan_conformance_suite(manifest, family, roles, family_profile, feature_profile = nil) ⇒ Object
3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 |
# File 'lib/ast/merge.rb', line 3193 def plan_conformance_suite(manifest, family, roles, family_profile, feature_profile = nil) entries = [] missing_roles = [] roles.each do |role| entry = conformance_family_entries(manifest, family).find { |candidate| candidate[:role] == role } unless entry missing_roles << role next end ref = { family: family, role: role, case: role } run = { ref: ref, requirements: deep_dup(entry[:requirements] || {}), family_profile: deep_dup(family_profile) } run[:feature_profile] = deep_dup(feature_profile) if feature_profile entries << { ref: ref, path: deep_dup(entry[:path]), run: run } end { family: family, entries: entries, missing_roles: missing_roles } end |
.plan_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil) ⇒ Object
3221 3222 3223 3224 3225 3226 |
# File 'lib/ast/merge.rb', line 3221 def plan_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil) definition = conformance_suite_definition(manifest, selector) return nil unless definition plan_conformance_suite(manifest, definition.dig(:subject, :grammar), definition[:roles], family_profile, feature_profile) end |
.plan_named_conformance_suite_entry(manifest, selector, context) ⇒ Object
3228 3229 3230 3231 3232 |
# File 'lib/ast/merge.rb', line 3228 def plan_named_conformance_suite_entry(manifest, selector, context) plan = plan_named_conformance_suite(manifest, selector, context[:family_profile], context[:feature_profile]) definition = conformance_suite_definition(manifest, selector) plan && definition && { suite: definition, plan: plan } end |
.plan_named_conformance_suites(manifest, contexts) ⇒ Object
3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 |
# File 'lib/ast/merge.rb', line 3234 def plan_named_conformance_suites(manifest, contexts) conformance_suite_selectors(manifest).filter_map do |selector| definition = conformance_suite_definition(manifest, selector) next unless definition family = definition.dig(:subject, :grammar) family_key = family.to_sym next unless contexts.key?(family_key) || contexts.key?(family) plan_named_conformance_suite_entry(manifest, selector, contexts[family_key] || contexts[family]) end end |
.plan_named_conformance_suites_with_diagnostics(manifest, options) ⇒ Object
3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 |
# File 'lib/ast/merge.rb', line 3246 def plan_named_conformance_suites_with_diagnostics(manifest, ) entries = [] diagnostics = [] resolved_contexts = {} conformance_suite_selectors(manifest).each do |selector| definition = conformance_suite_definition(manifest, selector) next unless definition family = definition.dig(:subject, :grammar) context = if resolved_contexts.key?(family) resolved_contexts[family] else resolved_context, resolved_diagnostics = resolve_conformance_family_context(family, ) diagnostics.concat(resolved_diagnostics) resolved_contexts[family] = resolved_context resolved_context end next unless context entry = plan_named_conformance_suite_entry(manifest, selector, context) next unless entry if entry[:plan][:missing_roles].any? diagnostics << diagnostic("error", "configuration_error", "suite #{conformance_suite_descriptor_string(entry[:suite])} declares missing roles: #{join_comma(entry[:plan][:missing_roles])}.") next end entries << entry end { entries: entries, diagnostics: diagnostics } end |
.plan_template_entries(template_source_paths, context = {}, default_strategy = "merge", overrides = []) ⇒ Object
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/ast/merge.rb', line 203 def plan_template_entries(template_source_paths, context = {}, default_strategy = "merge", overrides = []) template_source_paths.map do |template_source_path| logical_destination_path = normalize_template_source_path(template_source_path) destination_path = resolve_template_destination_path(logical_destination_path, context) strategy = select_template_strategy(logical_destination_path, default_strategy, overrides) { template_source_path: template_source_path, logical_destination_path: logical_destination_path, destination_path: destination_path, classification: classify_template_target_path(logical_destination_path), strategy: strategy, action: destination_path.nil? ? "omit" : strategy } end end |
.plan_template_execution(entries, destination_contents) ⇒ Object
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/ast/merge.rb', line 296 def plan_template_execution(entries, destination_contents) entries.map do |entry| destination_path = entry[:destination_path] || entry["destination_path"] strategy = (entry[:strategy] || entry["strategy"]).to_s write_action = (entry[:write_action] || entry["write_action"]).to_s blocked = entry[:blocked] blocked = entry["blocked"] if blocked.nil? destination_content = if destination_path destination_contents[destination_path] || destination_contents[destination_path.to_s] || destination_contents[destination_path.to_sym] end execution_action = if blocked "blocked" elsif destination_path.nil? "omit" elsif write_action == "keep" "keep" elsif strategy == "raw_copy" "raw_copy" elsif strategy == "accept_template" "write_prepared_content" else "merge_prepared_content" end deep_dup(entry).merge( execution_action: execution_action, ready: !%w[blocked omit keep].include?(execution_action), destination_content: destination_content ) end end |
.plan_template_tree_execution(template_source_paths, template_contents, existing_destination_paths, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) ⇒ Object
330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/ast/merge.rb', line 330 def plan_template_tree_execution(template_source_paths, template_contents, existing_destination_paths, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) planned_entries = plan_template_entries(template_source_paths, context, default_strategy, overrides) stateful_entries = enrich_template_plan_entries(planned_entries, existing_destination_paths) token_state_entries = enrich_template_plan_entries_with_token_state( stateful_entries, template_contents, replacements, config ) prepared_entries = prepare_template_entries(token_state_entries, template_contents, replacements, config) plan_template_execution(prepared_entries, destination_contents) end |
.plan_template_tree_execution_from_directories(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) ⇒ Object
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/ast/merge.rb', line 558 def plan_template_tree_execution_from_directories(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil) template_contents = read_relative_file_tree(template_root) destination_contents = read_relative_file_tree(destination_root) plan_template_tree_execution( template_contents.keys.sort, template_contents, destination_contents.keys.sort, destination_contents, context, default_strategy, overrides, replacements, config ) end |
.prepare_template_entries(entries, template_contents, replacements, config = nil) ⇒ Object
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/ast/merge.rb', line 266 def prepare_template_entries(entries, template_contents, replacements, config = nil) entries.map do |entry| source_path = entry[:template_source_path] || entry["template_source_path"] template_content = template_contents[source_path] || template_contents[source_path.to_s] || template_contents[source_path.to_sym] || "" if entry[:blocked] || entry["blocked"] next deep_dup(entry).merge( template_content: template_content, prepared_template_content: nil, preparation_action: "blocked" ) end token_resolution_required = entry[:token_resolution_required] token_resolution_required = entry["token_resolution_required"] if token_resolution_required.nil? prepared_template_content = if token_resolution_required resolve_template_tokens(template_content, replacements, config) else template_content end deep_dup(entry).merge( template_content: template_content, prepared_template_content: prepared_template_content, preparation_action: token_resolution_required ? "resolve_tokens" : "pass_through" ) end end |
.preview_template_execution(entries) ⇒ Object
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/ast/merge.rb', line 345 def preview_template_execution(entries) result = { result_files: {}, created_paths: [], updated_paths: [], kept_paths: [], blocked_paths: [], omitted_paths: [] } entries.each do |entry| destination_path = entry[:destination_path] || entry["destination_path"] execution_action = (entry[:execution_action] || entry["execution_action"]).to_s destination_exists = entry[:destination_exists] destination_exists = entry["destination_exists"] if destination_exists.nil? prepared_template_content = entry[:prepared_template_content] || entry["prepared_template_content"] destination_content = entry[:destination_content] || entry["destination_content"] case execution_action when "blocked" result[:blocked_paths] << destination_path if destination_path when "omit" result[:omitted_paths] << (entry[:logical_destination_path] || entry["logical_destination_path"]) when "keep" next unless destination_path && !destination_content.nil? result[:result_files][destination_path] = destination_content result[:kept_paths] << destination_path when "raw_copy", "write_prepared_content" next unless destination_path && !prepared_template_content.nil? result[:result_files][destination_path] = prepared_template_content if destination_exists && destination_content == prepared_template_content result[:kept_paths] << destination_path else (destination_exists ? result[:updated_paths] : result[:created_paths]) << destination_path end when "merge_prepared_content" next unless destination_path && !prepared_template_content.nil? && destination_content.nil? result[:result_files][destination_path] = prepared_template_content (destination_exists ? result[:updated_paths] : result[:created_paths]) << destination_path end end result end |
.projected_child_group_review_request(group, family) ⇒ Object
2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 |
# File 'lib/ast/merge.rb', line 2512 def projected_child_group_review_request(group, family) { id: review_request_id_for_projected_child_group(group), kind: "delegated_child_group", family: family, message: "delegated child group #{group[:delegated_apply_group]} is ready to apply for #{family}.", blocking: true, delegated_group: deep_dup(group), action_offers: [ { action: "apply_delegated_child_group", requires_context: false } ], default_action: "apply_delegated_child_group" } end |
.projected_child_review_case(case_id:, parent_operation_id:, child_operation_id:, surface_path:, delegated_case_id:, delegated_apply_group:, delegated_runtime_surface_path:) ⇒ Object
2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 |
# File 'lib/ast/merge.rb', line 2448 def projected_child_review_case(case_id:, parent_operation_id:, child_operation_id:, surface_path:, delegated_case_id:, delegated_apply_group:, delegated_runtime_surface_path:) { case_id: case_id, parent_operation_id: parent_operation_id, child_operation_id: child_operation_id, surface_path: surface_path, delegated_case_id: delegated_case_id, delegated_apply_group: delegated_apply_group, delegated_runtime_surface_path: delegated_runtime_surface_path } end |
.read_relative_file_tree(root) ⇒ Object
517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/ast/merge.rb', line 517 def read_relative_file_tree(root) root = Pathname(root). return {} unless root.exist? raise ArgumentError, "#{root} is not a directory" unless root.directory? root.find.each_with_object({}) do |path, files| next if path.directory? files[path.relative_path_from(root).to_s] = path.read end end |
.report_conformance_manifest(manifest, options, &execute) ⇒ Object
3070 3071 3072 3073 3074 3075 3076 |
# File 'lib/ast/merge.rb', line 3070 def report_conformance_manifest(manifest, , &execute) planned = plan_named_conformance_suites_with_diagnostics(manifest, ) { report: report_named_conformance_suite_envelope(report_planned_named_conformance_suites(planned[:entries], &execute)), diagnostics: planned[:diagnostics] } end |
.report_conformance_suite(results) ⇒ Object
3189 3190 3191 |
# File 'lib/ast/merge.rb', line 3189 def report_conformance_suite(results) { results: deep_dup(results), summary: summarize_conformance_results(results) } end |
.report_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
3032 3033 3034 3035 |
# File 'lib/ast/merge.rb', line 3032 def report_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil, &execute) plan = plan_named_conformance_suite(manifest, selector, family_profile, feature_profile) plan && report_planned_conformance_suite(plan, &execute) end |
.report_named_conformance_suite_entry(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
3037 3038 3039 3040 3041 |
# File 'lib/ast/merge.rb', line 3037 def report_named_conformance_suite_entry(manifest, selector, family_profile, feature_profile = nil, &execute) report = report_named_conformance_suite(manifest, selector, family_profile, feature_profile, &execute) definition = conformance_suite_definition(manifest, selector) report && definition && { suite: definition, report: report } end |
.report_named_conformance_suite_envelope(entries) ⇒ Object
3057 3058 3059 |
# File 'lib/ast/merge.rb', line 3057 def report_named_conformance_suite_envelope(entries) { entries: deep_dup(entries), summary: summarize_named_conformance_suite_reports(entries) } end |
.report_named_conformance_suite_manifest(manifest, contexts, &execute) ⇒ Object
3061 3062 3063 3064 3065 3066 3067 3068 |
# File 'lib/ast/merge.rb', line 3061 def report_named_conformance_suite_manifest(manifest, contexts, &execute) report_named_conformance_suite_envelope( report_planned_named_conformance_suites( plan_named_conformance_suites(manifest, contexts), &execute ) ) end |
.report_planned_conformance_suite(plan, &execute) ⇒ Object
3028 3029 3030 |
# File 'lib/ast/merge.rb', line 3028 def report_planned_conformance_suite(plan, &execute) report_conformance_suite(run_planned_conformance_suite(plan, &execute)) end |
.report_planned_named_conformance_suites(entries, &execute) ⇒ Object
3043 3044 3045 |
# File 'lib/ast/merge.rb', line 3043 def report_planned_named_conformance_suites(entries, &execute) entries.map { |entry| { suite: entry[:suite], report: report_planned_conformance_suite(entry[:plan], &execute) } } end |
.report_template_directory_apply(result) ⇒ Object
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 |
# File 'lib/ast/merge.rb', line 647 def report_template_directory_apply(result) run_report = report_template_tree_run(result) created = Array(result.dig(:apply_result, :created_paths) || result.dig("apply_result", "created_paths")) updated = Array(result.dig(:apply_result, :updated_paths) || result.dig("apply_result", "updated_paths")) entries = run_report[:entries].map do |entry| destination_path = entry[:destination_path] || entry["destination_path"] written = destination_path && (created.include?(destination_path) || updated.include?(destination_path)) { template_source_path: entry[:template_source_path] || entry["template_source_path"], logical_destination_path: entry[:logical_destination_path] || entry["logical_destination_path"], destination_path: destination_path, execution_action: entry[:execution_action] || entry["execution_action"], status: entry[:status] || entry["status"], written: !!written } end { entries: entries, summary: { created: entries.count { |entry| entry[:status] == "created" }, updated: entries.count { |entry| entry[:status] == "updated" }, kept: entries.count { |entry| entry[:status] == "kept" }, blocked: entries.count { |entry| entry[:status] == "blocked" }, omitted: entries.count { |entry| entry[:status] == "omitted" }, written: entries.count { |entry| entry[:written] } } } end |
.report_template_directory_plan(entries) ⇒ Object
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 |
# File 'lib/ast/merge.rb', line 679 def report_template_directory_plan(entries) report_entries = Array(entries).map do |entry| execution_action = (entry[:execution_action] || entry["execution_action"]).to_s write_action = (entry[:write_action] || entry["write_action"]).to_s status, previewable = case execution_action when "blocked" ["blocked", false] when "omit" ["omitted", true] when "keep" ["keep", true] when "raw_copy", "write_prepared_content" [write_action == "create" ? "create" : "update", true] else [write_action == "create" ? "create" : "update", write_action == "create"] end { template_source_path: entry[:template_source_path] || entry["template_source_path"], logical_destination_path: entry[:logical_destination_path] || entry["logical_destination_path"], destination_path: entry[:destination_path] || entry["destination_path"], execution_action: execution_action, write_action: write_action, status: status, previewable: previewable } end { entries: report_entries, summary: { create: report_entries.count { |entry| entry[:status] == "create" }, update: report_entries.count { |entry| entry[:status] == "update" }, keep: report_entries.count { |entry| entry[:status] == "keep" }, blocked: report_entries.count { |entry| entry[:status] == "blocked" }, omitted: report_entries.count { |entry| entry[:status] == "omitted" } } } end |
.report_template_directory_runner(entries, result = nil) ⇒ Object
720 721 722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/ast/merge.rb', line 720 def report_template_directory_runner(entries, result = nil) report = { plan_report: report_template_directory_plan(entries), preview: preview_template_execution(entries), run_report: nil, apply_report: nil } return report if result.nil? report[:run_report] = report_template_tree_run(result) report[:apply_report] = report_template_directory_apply(result) report end |
.report_template_tree_run(result) ⇒ Object
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/ast/merge.rb', line 603 def report_template_tree_run(result) created = Array(result.dig(:apply_result, :created_paths) || result.dig("apply_result", "created_paths")) updated = Array(result.dig(:apply_result, :updated_paths) || result.dig("apply_result", "updated_paths")) kept = Array(result.dig(:apply_result, :kept_paths) || result.dig("apply_result", "kept_paths")) blocked = Array(result.dig(:apply_result, :blocked_paths) || result.dig("apply_result", "blocked_paths")) omitted = Array(result.dig(:apply_result, :omitted_paths) || result.dig("apply_result", "omitted_paths")) entries = Array(result[:execution_plan] || result["execution_plan"]).map do |entry| destination_path = entry[:destination_path] || entry["destination_path"] logical_destination_path = entry[:logical_destination_path] || entry["logical_destination_path"] execution_action = (entry[:execution_action] || entry["execution_action"]).to_s status = if execution_action == "omit" || omitted.include?(logical_destination_path) "omitted" elsif destination_path && blocked.include?(destination_path) "blocked" elsif destination_path && kept.include?(destination_path) "kept" elsif destination_path && updated.include?(destination_path) "updated" else "created" end { template_source_path: entry[:template_source_path] || entry["template_source_path"], logical_destination_path: logical_destination_path, destination_path: destination_path, execution_action: execution_action, status: status } end { entries: entries, summary: { created: entries.count { |entry| entry[:status] == "created" }, updated: entries.count { |entry| entry[:status] == "updated" }, kept: entries.count { |entry| entry[:status] == "kept" }, blocked: entries.count { |entry| entry[:status] == "blocked" }, omitted: entries.count { |entry| entry[:status] == "omitted" } } } end |
.resolve_conformance_family_context(family, options) ⇒ Object
2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 |
# File 'lib/ast/merge.rb', line 2888 def resolve_conformance_family_context(family, ) contexts = .fetch(:contexts, {}) key = family.to_sym return [deep_dup(contexts[key] || contexts[family.to_s]), []] if contexts.key?(key) || contexts.key?(family.to_s) if .fetch(:require_explicit_contexts, false) return [nil, [diagnostic("error", "configuration_error", "missing explicit family context for #{family}.")]] end family_profiles = .fetch(:family_profiles, {}) if family_profiles.key?(key) || family_profiles.key?(family.to_s) context = default_conformance_family_context(family_profiles[key] || family_profiles[family.to_s]) diagnostics = [diagnostic("warning", "assumed_default", "using default family context for #{family}.")] return [context, diagnostics] end [nil, [diagnostic("error", "configuration_error", "missing family context for #{family} and no default family profile is available.")]] end |
.resolve_delegated_child_outputs(operations, nested_outputs, default_family:, request_id_prefix:) ⇒ Object
2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 |
# File 'lib/ast/merge.rb', line 2602 def resolve_delegated_child_outputs(operations, nested_outputs, default_family:, request_id_prefix:) operations_by_surface_address = operations.each_with_object({}) do |operation, memo| memo[operation.dig(:surface, :address)] = operation end nested_outputs.each do |entry| next if operations_by_surface_address.key?(entry[:surface_address]) return { ok: false, diagnostics: [ diagnostic( "error", "configuration_error", "missing delegated child surface #{entry[:surface_address]}." ) ] } end { ok: true, diagnostics: [], apply_plan: { entries: nested_outputs.each_with_index.map do |entry, index| operation = operations_by_surface_address.fetch(entry[:surface_address]) request_id = "#{request_id_prefix}:#{index}" { request_id: request_id, family: operation.dig(:surface, :metadata, :family) || default_family, delegated_group: { delegated_apply_group: request_id, parent_operation_id: operation[:parent_operation_id], child_operation_id: operation[:operation_id], delegated_runtime_surface_path: entry[:surface_address], case_ids: [], delegated_case_ids: [] }, decision: { request_id: request_id, action: "apply_delegated_child_group" } } end }, applied_children: nested_outputs.map do |entry| operation = operations_by_surface_address.fetch(entry[:surface_address]) { operation_id: operation[:operation_id], output: entry[:output] } end } end |
.resolve_template_destination_path(path, context = {}) ⇒ Object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/ast/merge.rb', line 149 def resolve_template_destination_path(path, context = {}) case path.to_s when ".kettle-jem.yml" nil when ".env.local" ".env.local.example" when "gem.gemspec" project_name = context[:project_name] || context["project_name"] return "#{project_name.to_s.strip}.gemspec" unless project_name.to_s.strip.empty? path else path end end |
.resolve_template_tokens(content, replacements = {}, config = nil) ⇒ Object
186 187 188 189 190 |
# File 'lib/ast/merge.rb', line 186 def resolve_template_tokens(content, replacements = {}, config = nil) resolver = Token::Resolver::Resolve.new(on_missing: :keep) document = Token::Resolver::Document.new(content.to_s, config: token_resolver_config(config)) resolver.resolve(document, normalize_template_replacements(replacements)) end |
.review_and_execute_conformance_manifest_with_replay_bundle_envelope(manifest, options, replay_bundle_envelope, execute:, reviewed_nested_execution:) ⇒ Object
2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 |
# File 'lib/ast/merge.rb', line 2767 def review_and_execute_conformance_manifest_with_replay_bundle_envelope( manifest, , replay_bundle_envelope, execute:, reviewed_nested_execution: ) state = review_conformance_manifest_with_replay_bundle_envelope( manifest, , replay_bundle_envelope, &execute ) { state: state, results: execute_review_state_reviewed_nested_executions(state, &reviewed_nested_execution) } end |
.review_conformance_family_context(family, options) ⇒ Object
2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 |
# File 'lib/ast/merge.rb', line 2907 def review_conformance_family_context(family, ) contexts = .fetch(:contexts, {}) key = family.to_sym return [deep_dup(contexts[key] || contexts[family.to_s]), [], [], []] if contexts.key?(key) || contexts.key?(family.to_s) unless .fetch(:require_explicit_contexts, false) context, diagnostics = resolve_conformance_family_context( family, contexts: .fetch(:contexts, {}), family_profiles: .fetch(:family_profiles, {}), require_explicit_contexts: false ) return [context, diagnostics, [], []] end family_profiles = .fetch(:family_profiles, {}) family_profile = family_profiles[key] || family_profiles[family.to_s] unless family_profile return [nil, [diagnostic("error", "configuration_error", "missing family context for #{family} and no default family profile is available.")], [], []] end context, applied_decision, assumed_default, decision_diagnostics = review_decision_for_family_context(family, ) if applied_decision diagnostics = assumed_default ? [diagnostic("warning", "assumed_default", "using default family context for #{family}.")] : [] return [context, diagnostics, [], [applied_decision]] end request = family_context_review_request(family, family_profile) return [nil, decision_diagnostics, [request], []] unless decision_diagnostics.empty? [ nil, [diagnostic("error", "configuration_error", "missing explicit family context for #{family}.")], [request], [] ] end |
.review_conformance_manifest(manifest, options, &execute) ⇒ Object
3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 |
# File 'lib/ast/merge.rb', line 3078 def review_conformance_manifest(manifest, , &execute) replay_context = conformance_manifest_replay_context(manifest, ) entries = [] diagnostics = [] requests = [] applied_decisions = [] = deep_dup() replay_input_context, replay_input_decisions, reviewed_nested_executions = review_replay_bundle_inputs() if replay_input_decisions.any? if replay_input_context.nil? diagnostics << diagnostic("error", "replay_rejected", "review decisions were provided without replay context.") [:review_replay_bundle] = nil [:review_replay_context] = nil [:review_decisions] = [] reviewed_nested_executions = [] elsif !review_replay_context_compatible(replay_context, replay_input_context) diagnostics << diagnostic("error", "replay_rejected", "review replay context does not match the current conformance manifest state.") [:review_replay_bundle] = nil [:review_replay_context] = nil [:review_decisions] = [] reviewed_nested_executions = [] else allowed_request_ids = conformance_manifest_review_request_ids(manifest, ).to_h { |request_id| [request_id, true] } accepted_decisions = [] replay_input_decisions.each do |decision| if allowed_request_ids[decision[:request_id]] accepted_decisions << deep_dup(decision) else diagnostics << diagnostic( "error", "replay_rejected", "review decision #{decision[:request_id]} does not match any current review request.", review: { request_id: decision[:request_id], action: decision[:action], reason: "request_not_found" } ) end end [:review_replay_bundle] = nil [:review_replay_context] = deep_dup(replay_input_context) [:review_decisions] = accepted_decisions end end resolved_contexts = {} conformance_suite_selectors(manifest).each do |selector| definition = conformance_suite_definition(manifest, selector) next unless definition family = definition.dig(:subject, :grammar) context = if resolved_contexts.key?(family) resolved_contexts[family] else resolved_context, resolved_diagnostics, resolved_requests, resolved_applied_decisions = review_conformance_family_context(family, ) diagnostics.concat(resolved_diagnostics) requests.concat(resolved_requests) applied_decisions.concat(resolved_applied_decisions) resolved_contexts[family] = resolved_context resolved_context end next unless context entry = plan_named_conformance_suite_entry(manifest, selector, context) next unless entry if entry[:plan][:missing_roles].any? diagnostics << diagnostic("error", "configuration_error", "suite #{conformance_suite_descriptor_string(entry[:suite])} declares missing roles: #{join_comma(entry[:plan][:missing_roles])}.") next end entries << entry end { report: report_named_conformance_suite_envelope(report_planned_named_conformance_suites(entries, &execute)), diagnostics: diagnostics, requests: requests, applied_decisions: applied_decisions, host_hints: conformance_review_host_hints(), replay_context: replay_context }.tap do |state| state[:reviewed_nested_executions] = deep_dup(reviewed_nested_executions) unless reviewed_nested_executions.empty? end end |
.review_conformance_manifest_with_replay_bundle_envelope(manifest, options, replay_bundle_envelope, &execute) ⇒ Object
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 |
# File 'lib/ast/merge.rb', line 3170 def review_conformance_manifest_with_replay_bundle_envelope(manifest, , replay_bundle_envelope, &execute) replay_bundle, import_error = import_review_replay_bundle_envelope(replay_bundle_envelope) if import_error.nil? return review_conformance_manifest( manifest, deep_dup().merge(review_replay_bundle: replay_bundle), &execute ) end state = review_conformance_manifest( manifest, deep_dup().merge(review_replay_bundle: nil), &execute ) state[:diagnostics] << diagnostic("error", import_error[:category], import_error[:message]) state end |
.review_projected_child_groups(groups, family, decisions) ⇒ Object
2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 |
# File 'lib/ast/merge.rb', line 2537 def review_projected_child_groups(groups, family, decisions) request_ids = groups.map { |group| review_request_id_for_projected_child_group(group) } applied_decisions = [] diagnostics = [] decisions.each do |decision| next unless decision[:action] == "apply_delegated_child_group" if request_ids.include?(decision[:request_id]) applied_decisions << deep_dup(decision) else diagnostics << diagnostic( "error", "replay_rejected", "review decision #{decision[:request_id]} does not match any current delegated child review request.", review: { request_id: decision[:request_id], action: decision[:action], reason: "request_not_found" } ) end end accepted_groups = select_projected_child_review_groups_accepted_for_apply( groups, family, applied_decisions ) accepted_request_ids = accepted_groups.map do |group| review_request_id_for_projected_child_group(group) end requests = groups.reject do |group| accepted_request_ids.include?(review_request_id_for_projected_child_group(group)) end.map do |group| projected_child_group_review_request(group, family) end { requests: requests, accepted_groups: accepted_groups, applied_decisions: applied_decisions, diagnostics: diagnostics } end |
.review_replay_bundle_envelope(bundle) ⇒ Object
2851 2852 2853 2854 2855 2856 2857 |
# File 'lib/ast/merge.rb', line 2851 def review_replay_bundle_envelope(bundle) { kind: "review_replay_bundle", version: REVIEW_TRANSPORT_VERSION, replay_bundle: deep_dup(bundle) } end |
.review_replay_bundle_inputs(options) ⇒ Object
2834 2835 2836 2837 2838 2839 2840 2841 |
# File 'lib/ast/merge.rb', line 2834 def review_replay_bundle_inputs() if [:review_replay_bundle] bundle = [:review_replay_bundle] [bundle[:replay_context], bundle[:decisions] || [], bundle[:reviewed_nested_executions] || []] else [[:review_replay_context], [:review_decisions] || [], []] end end |
.review_replay_context_compatible(current, candidate) ⇒ Object
2806 2807 2808 2809 2810 2811 2812 |
# File 'lib/ast/merge.rb', line 2806 def review_replay_context_compatible(current, candidate) return false unless candidate current[:surface] == candidate[:surface] && current[:require_explicit_contexts] == candidate[:require_explicit_contexts] && current[:families] == candidate[:families] end |
.review_request_id_for_family_context(family) ⇒ Object
795 796 797 |
# File 'lib/ast/merge.rb', line 795 def review_request_id_for_family_context(family) "family_context:#{family}" end |
.review_request_id_for_projected_child_group(group) ⇒ Object
2508 2509 2510 |
# File 'lib/ast/merge.rb', line 2508 def review_request_id_for_projected_child_group(group) "projected_child_group:#{group[:delegated_apply_group]}" end |
.reviewed_nested_execution(family, review_state, applied_children) ⇒ Object
2705 2706 2707 2708 2709 2710 2711 |
# File 'lib/ast/merge.rb', line 2705 def reviewed_nested_execution(family, review_state, applied_children) { family: family, review_state: deep_dup(review_state), applied_children: deep_dup(applied_children) } end |
.reviewed_nested_execution_envelope(execution) ⇒ Object
2859 2860 2861 2862 2863 2864 2865 |
# File 'lib/ast/merge.rb', line 2859 def reviewed_nested_execution_envelope(execution) { kind: "reviewed_nested_execution", version: REVIEW_TRANSPORT_VERSION, execution: deep_dup(execution) } end |
.run_conformance_case(run, &execute) ⇒ Object
2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 |
# File 'lib/ast/merge.rb', line 2993 def run_conformance_case(run, &execute) selection = select_conformance_case(run[:ref], run[:requirements], run[:family_profile], run[:feature_profile]) return { ref: deep_dup(run[:ref]), outcome: "skipped", messages: selection[:messages] } if selection[:status] == "skipped" execution = execute.call(run) { ref: deep_dup(run[:ref]), outcome: execution[:outcome], messages: deep_dup(execution[:messages] || []) } end |
.run_conformance_suite(runs, &execute) ⇒ Object
3005 3006 3007 |
# File 'lib/ast/merge.rb', line 3005 def run_conformance_suite(runs, &execute) runs.map { |run| run_conformance_case(run, &execute) } end |
.run_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
3013 3014 3015 3016 |
# File 'lib/ast/merge.rb', line 3013 def run_named_conformance_suite(manifest, selector, family_profile, feature_profile = nil, &execute) plan = plan_named_conformance_suite(manifest, selector, family_profile, feature_profile) plan && run_planned_conformance_suite(plan, &execute) end |
.run_named_conformance_suite_entry(manifest, selector, family_profile, feature_profile = nil, &execute) ⇒ Object
3018 3019 3020 3021 3022 |
# File 'lib/ast/merge.rb', line 3018 def run_named_conformance_suite_entry(manifest, selector, family_profile, feature_profile = nil, &execute) results = run_named_conformance_suite(manifest, selector, family_profile, feature_profile, &execute) definition = conformance_suite_definition(manifest, selector) results && definition && { suite: definition, results: results } end |
.run_planned_conformance_suite(plan, &execute) ⇒ Object
3009 3010 3011 |
# File 'lib/ast/merge.rb', line 3009 def run_planned_conformance_suite(plan, &execute) plan[:entries].map { |entry| run_conformance_case(entry[:run], &execute) } end |
.run_planned_named_conformance_suites(entries, &execute) ⇒ Object
3024 3025 3026 |
# File 'lib/ast/merge.rb', line 3024 def run_planned_named_conformance_suites(entries, &execute) entries.map { |entry| { suite: entry[:suite], results: run_planned_conformance_suite(entry[:plan], &execute) } } end |
.run_template_tree_execution(template_source_paths, template_contents, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) ⇒ Object
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/ast/merge.rb', line 497 def run_template_tree_execution(template_source_paths, template_contents, destination_contents, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) execution_plan = plan_template_tree_execution( template_source_paths, template_contents, destination_contents.keys.sort, destination_contents, context, default_strategy, overrides, replacements, config ) { execution_plan: execution_plan, apply_result: apply_template_execution(execution_plan, &merge_prepared_content) } end |
.run_template_tree_execution_from_directories(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) ⇒ Object
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'lib/ast/merge.rb', line 540 def run_template_tree_execution_from_directories(template_root, destination_root, context = {}, default_strategy = "merge", overrides = [], replacements = {}, config = nil, &merge_prepared_content) template_contents = read_relative_file_tree(template_root) destination_contents = read_relative_file_tree(destination_root) run_template_tree_execution( template_contents.keys.sort, template_contents, destination_contents, context, default_strategy, overrides, replacements, config, &merge_prepared_content ) end |
.select_conformance_case(ref, requirements, family_profile, feature_profile = nil) ⇒ Object
2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 |
# File 'lib/ast/merge.rb', line 2956 def select_conformance_case(ref, requirements, family_profile, feature_profile = nil) = [] if requirements[:backend] if feature_profile.nil? << "case requires backend #{requirements[:backend]} but no backend feature profile is available for family #{family_profile[:family]}." elsif feature_profile[:backend] != requirements[:backend] << "case requires backend #{requirements[:backend]} but backend #{feature_profile[:backend]} is active for family #{family_profile[:family]}." end end if requirements[:dialect] if !family_profile.fetch(:supported_dialects, []).include?(requirements[:dialect]) << "family #{family_profile[:family]} does not support dialect #{requirements[:dialect]}." elsif feature_profile && !feature_profile[:supports_dialects] && !default_dialect?(family_profile, requirements[:dialect]) << "backend #{feature_profile[:backend]} does not support dialect #{requirements[:dialect]} for family #{family_profile[:family]}." end end requirements.fetch(:policies, []).each do |policy| unless includes_policy?(family_profile.fetch(:supported_policies, []), policy) << "family #{family_profile[:family]} does not support policy #{policy[:name]}." next end if feature_profile && !includes_policy?(feature_profile.fetch(:supported_policies, []), policy) << "backend #{feature_profile[:backend]} does not support policy #{policy[:name]}." end end { ref: deep_dup(ref), status: .empty? ? "selected" : "skipped", messages: } end |
.select_projected_child_review_groups_accepted_for_apply(groups, _family, decisions) ⇒ Object
2527 2528 2529 2530 2531 2532 2533 2534 2535 |
# File 'lib/ast/merge.rb', line 2527 def select_projected_child_review_groups_accepted_for_apply(groups, _family, decisions) accepted_request_ids = decisions .select { |decision| decision[:action] == "apply_delegated_child_group" } .map { |decision| decision[:request_id] } groups.select do |group| accepted_request_ids.include?(review_request_id_for_projected_child_group(group)) end end |
.select_projected_child_review_groups_ready_for_apply(groups, resolved_case_ids) ⇒ Object
2502 2503 2504 2505 2506 |
# File 'lib/ast/merge.rb', line 2502 def select_projected_child_review_groups_ready_for_apply(groups, resolved_case_ids) groups.select do |group| group[:case_ids].all? { |case_id| resolved_case_ids.include?(case_id) } end end |
.select_template_strategy(path, default_strategy = "merge", overrides = []) ⇒ Object
192 193 194 195 196 197 198 199 200 201 |
# File 'lib/ast/merge.rb', line 192 def select_template_strategy(path, default_strategy = "merge", overrides = []) normalized_path = path.to_s.delete_prefix("./") override = overrides.find do |entry| candidate = entry[:path] || entry["path"] candidate.to_s.delete_prefix("./") == normalized_path end return (override[:strategy] || override["strategy"]).to_s if override default_strategy.to_s end |
.structured_edit_application(request:, result:, metadata: nil) ⇒ Object
1006 1007 1008 1009 1010 1011 1012 1013 |
# File 'lib/ast/merge.rb', line 1006 def structured_edit_application(request:, result:, metadata: nil) application = { request: deep_dup(request), result: deep_dup(result) } application[:metadata] = deep_dup() if application end |
.structured_edit_application_envelope(application) ⇒ Object
1015 1016 1017 1018 1019 1020 1021 |
# File 'lib/ast/merge.rb', line 1015 def structured_edit_application_envelope(application) { kind: "structured_edit_application", version: STRUCTURED_EDIT_TRANSPORT_VERSION, application: deep_dup(application) } end |
.structured_edit_batch_report(reports:, diagnostics:, metadata: nil) ⇒ Object
2424 2425 2426 2427 2428 2429 2430 2431 |
# File 'lib/ast/merge.rb', line 2424 def structured_edit_batch_report(reports:, diagnostics:, metadata: nil) batch = { reports: deep_dup(reports), diagnostics: deep_dup(diagnostics) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_batch_report_envelope(batch_report) ⇒ Object
2433 2434 2435 2436 2437 2438 2439 |
# File 'lib/ast/merge.rb', line 2433 def structured_edit_batch_report_envelope(batch_report) { kind: "structured_edit_batch_report", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_report: deep_dup(batch_report) } end |
.structured_edit_batch_request(requests:, metadata: nil) ⇒ Object
2346 2347 2348 2349 2350 2351 2352 |
# File 'lib/ast/merge.rb', line 2346 def structured_edit_batch_request(requests:, metadata: nil) batch = { requests: deep_dup(requests) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_crispr_example_parity_backend_note(backend:, scope:, notes:, metadata: nil) ⇒ Object
1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File 'lib/ast/merge.rb', line 1056 def structured_edit_crispr_example_parity_backend_note(backend:, scope:, notes:, metadata: nil) backend_note = { backend: backend.to_s, scope: scope.to_s, notes: Array(notes).map(&:to_s) } backend_note[:metadata] = deep_dup() if backend_note end |
.structured_edit_crispr_example_parity_report(scenarios:, remaining_gaps: nil, metadata: nil) ⇒ Object
1080 1081 1082 1083 1084 1085 1086 1087 |
# File 'lib/ast/merge.rb', line 1080 def structured_edit_crispr_example_parity_report(scenarios:, remaining_gaps: nil, metadata: nil) report = { scenarios: deep_dup(scenarios) } report[:remaining_gaps] = Array(remaining_gaps).map(&:to_s) if remaining_gaps report[:metadata] = deep_dup() if report end |
.structured_edit_crispr_example_parity_scenario(scenario:, family:, reproduced:, implementation_notes:, reference_backend: nil, backend_notes: nil, metadata: nil) ⇒ Object
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/ast/merge.rb', line 1066 def structured_edit_crispr_example_parity_scenario(scenario:, family:, reproduced:, implementation_notes:, reference_backend: nil, backend_notes: nil, metadata: nil) parity_scenario = { scenario: scenario.to_s, family: family.to_s, reproduced: reproduced ? true : false, implementation_notes: Array(implementation_notes).map(&:to_s) } parity_scenario[:reference_backend] = reference_backend.to_s if reference_backend parity_scenario[:backend_notes] = deep_dup(backend_notes) if backend_notes parity_scenario[:metadata] = deep_dup() if parity_scenario end |
.structured_edit_destination_profile(resolution_kind:, resolution_source:, anchor_boundary:, resolution_family:, resolution_source_family:, anchor_boundary_family:, known_resolution_kind:, known_resolution_source:, known_anchor_boundary:, used_if_missing:, metadata: nil) ⇒ Object
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 |
# File 'lib/ast/merge.rb', line 950 def structured_edit_destination_profile(resolution_kind:, resolution_source:, anchor_boundary:, resolution_family:, resolution_source_family:, anchor_boundary_family:, known_resolution_kind:, known_resolution_source:, known_anchor_boundary:, used_if_missing:, metadata: nil) profile = { resolution_kind: resolution_kind.to_s, resolution_source: resolution_source.to_s, anchor_boundary: anchor_boundary.to_s, resolution_family: resolution_family.to_s, resolution_source_family: resolution_source_family.to_s, anchor_boundary_family: anchor_boundary_family.to_s, known_resolution_kind: known_resolution_kind ? true : false, known_resolution_source: known_resolution_source ? true : false, known_anchor_boundary: known_anchor_boundary ? true : false, used_if_missing: used_if_missing ? true : false } profile[:metadata] = deep_dup() if profile end |
.structured_edit_execution_report(application:, provider_family:, diagnostics:, provider_backend: nil, metadata: nil) ⇒ Object
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 |
# File 'lib/ast/merge.rb', line 1045 def structured_edit_execution_report(application:, provider_family:, diagnostics:, provider_backend: nil, metadata: nil) report = { application: deep_dup(application), provider_family: provider_family.to_s, diagnostics: deep_dup(diagnostics) } report[:provider_backend] = provider_backend.to_s if provider_backend report[:metadata] = deep_dup() if report end |
.structured_edit_execution_report_envelope(report) ⇒ Object
2331 2332 2333 2334 2335 2336 2337 |
# File 'lib/ast/merge.rb', line 2331 def structured_edit_execution_report_envelope(report) { kind: "structured_edit_execution_report", version: STRUCTURED_EDIT_TRANSPORT_VERSION, report: deep_dup(report) } end |
.structured_edit_kettle_jem_primitive_gap_report(reference_project:, scope:, product_target:, current_substrate:, required_primitives:, script_classifications:, non_goals: nil, next_slices: nil, metadata: nil) ⇒ Object
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/ast/merge.rb', line 1089 def structured_edit_kettle_jem_primitive_gap_report(reference_project:, scope:, product_target:, current_substrate:, required_primitives:, script_classifications:, non_goals: nil, next_slices: nil, metadata: nil) report = { reference_project: reference_project.to_s, scope: scope.to_s, product_target: product_target.to_s, current_substrate: deep_dup(current_substrate), required_primitives: deep_dup(required_primitives), script_classifications: deep_dup(script_classifications) } report[:non_goals] = Array(non_goals).map(&:to_s) if non_goals report[:next_slices] = Array(next_slices).map(&:to_s) if next_slices report[:metadata] = deep_dup() if report end |
.structured_edit_match_profile(start_boundary:, end_boundary:, payload_kind:, known_start_boundary:, known_end_boundary:, known_payload_kind:, comment_anchored:, trailing_gap_extended:, start_boundary_family: nil, end_boundary_family: nil, payload_family: nil, metadata: nil) ⇒ Object
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/ast/merge.rb', line 894 def structured_edit_match_profile(start_boundary:, end_boundary:, payload_kind:, known_start_boundary:, known_end_boundary:, known_payload_kind:, comment_anchored:, trailing_gap_extended:, start_boundary_family: nil, end_boundary_family: nil, payload_family: nil, metadata: nil) profile = { start_boundary: start_boundary.to_s, known_start_boundary: known_start_boundary ? true : false, end_boundary: end_boundary.to_s, known_end_boundary: known_end_boundary ? true : false, payload_kind: payload_kind.to_s, known_payload_kind: known_payload_kind ? true : false, comment_anchored: comment_anchored ? true : false, trailing_gap_extended: trailing_gap_extended ? true : false } profile[:start_boundary_family] = start_boundary_family.to_s if start_boundary_family profile[:end_boundary_family] = end_boundary_family.to_s if end_boundary_family profile[:payload_family] = payload_family.to_s if payload_family profile[:metadata] = deep_dup() if profile end |
.structured_edit_operation_profile(operation_kind:, known_operation_kind:, source_requirement:, destination_requirement:, replacement_source:, captures_source_text:, supports_if_missing:, operation_family: nil, metadata: nil) ⇒ Object
933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
# File 'lib/ast/merge.rb', line 933 def structured_edit_operation_profile(operation_kind:, known_operation_kind:, source_requirement:, destination_requirement:, replacement_source:, captures_source_text:, supports_if_missing:, operation_family: nil, metadata: nil) profile = { operation_kind: operation_kind.to_s, known_operation_kind: known_operation_kind ? true : false, source_requirement: source_requirement.to_s, destination_requirement: destination_requirement.to_s, replacement_source: replacement_source.to_s, captures_source_text: captures_source_text ? true : false, supports_if_missing: supports_if_missing ? true : false } profile[:operation_family] = operation_family.to_s if operation_family profile[:metadata] = deep_dup() if profile end |
.structured_edit_provider_batch_execution_dispatch(dispatches:, metadata: nil) ⇒ Object
2377 2378 2379 2380 2381 2382 2383 |
# File 'lib/ast/merge.rb', line 2377 def structured_edit_provider_batch_execution_dispatch(dispatches:, metadata: nil) batch = { dispatches: deep_dup(dispatches) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_provider_batch_execution_dispatch_envelope(batch_dispatch) ⇒ Object
2385 2386 2387 2388 2389 2390 2391 |
# File 'lib/ast/merge.rb', line 2385 def structured_edit_provider_batch_execution_dispatch_envelope(batch_dispatch) { kind: "structured_edit_provider_batch_execution_dispatch", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_dispatch: deep_dup(batch_dispatch) } end |
.structured_edit_provider_batch_execution_handoff(handoffs:, metadata: nil) ⇒ Object
1968 1969 1970 1971 1972 1973 1974 |
# File 'lib/ast/merge.rb', line 1968 def structured_edit_provider_batch_execution_handoff(handoffs:, metadata: nil) batch_execution_handoff = { handoffs: deep_dup(handoffs) } batch_execution_handoff[:metadata] = deep_dup() if batch_execution_handoff end |
.structured_edit_provider_batch_execution_handoff_envelope(batch_execution_handoff) ⇒ Object
1976 1977 1978 1979 1980 1981 1982 |
# File 'lib/ast/merge.rb', line 1976 def structured_edit_provider_batch_execution_handoff_envelope(batch_execution_handoff) { kind: "structured_edit_provider_batch_execution_handoff", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_execution_handoff: deep_dup(batch_execution_handoff) } end |
.structured_edit_provider_batch_execution_invocation(invocations:, metadata: nil) ⇒ Object
1186 1187 1188 1189 1190 1191 1192 |
# File 'lib/ast/merge.rb', line 1186 def structured_edit_provider_batch_execution_invocation(invocations:, metadata: nil) batch_execution_invocation = { invocations: deep_dup(invocations) } batch_execution_invocation[:metadata] = deep_dup() if batch_execution_invocation end |
.structured_edit_provider_batch_execution_invocation_envelope(batch_execution_invocation) ⇒ Object
1194 1195 1196 1197 1198 1199 1200 |
# File 'lib/ast/merge.rb', line 1194 def structured_edit_provider_batch_execution_invocation_envelope(batch_execution_invocation) { kind: "structured_edit_provider_batch_execution_invocation", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_execution_invocation: deep_dup(batch_execution_invocation) } end |
.structured_edit_provider_batch_execution_outcome(outcomes:, metadata: nil) ⇒ Object
2089 2090 2091 2092 2093 2094 2095 |
# File 'lib/ast/merge.rb', line 2089 def structured_edit_provider_batch_execution_outcome(outcomes:, metadata: nil) batch = { outcomes: deep_dup(outcomes) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_provider_batch_execution_outcome_envelope(batch_outcome) ⇒ Object
2097 2098 2099 2100 2101 2102 2103 |
# File 'lib/ast/merge.rb', line 2097 def structured_edit_provider_batch_execution_outcome_envelope(batch_outcome) { kind: "structured_edit_provider_batch_execution_outcome", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_outcome: deep_dup(batch_outcome) } end |
.structured_edit_provider_batch_execution_plan(plans:, metadata: nil) ⇒ Object
2006 2007 2008 2009 2010 2011 2012 |
# File 'lib/ast/merge.rb', line 2006 def structured_edit_provider_batch_execution_plan(plans:, metadata: nil) batch_execution_plan = { plans: deep_dup(plans) } batch_execution_plan[:metadata] = deep_dup() if batch_execution_plan end |
.structured_edit_provider_batch_execution_plan_envelope(batch_execution_plan) ⇒ Object
2014 2015 2016 2017 2018 2019 2020 |
# File 'lib/ast/merge.rb', line 2014 def structured_edit_provider_batch_execution_plan_envelope(batch_execution_plan) { kind: "structured_edit_provider_batch_execution_plan", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_execution_plan: deep_dup(batch_execution_plan) } end |
.structured_edit_provider_batch_execution_provenance(provenances:, metadata: nil) ⇒ Object
2137 2138 2139 2140 2141 2142 2143 |
# File 'lib/ast/merge.rb', line 2137 def structured_edit_provider_batch_execution_provenance(provenances:, metadata: nil) batch = { provenances: deep_dup(provenances) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_provider_batch_execution_provenance_envelope(batch_provenance) ⇒ Object
2145 2146 2147 2148 2149 2150 2151 |
# File 'lib/ast/merge.rb', line 2145 def structured_edit_provider_batch_execution_provenance_envelope(batch_provenance) { kind: "structured_edit_provider_batch_execution_provenance", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_provenance: deep_dup(batch_provenance) } end |
.structured_edit_provider_batch_execution_receipt(receipts:, metadata: nil) ⇒ Object
1281 1282 1283 1284 1285 1286 1287 |
# File 'lib/ast/merge.rb', line 1281 def structured_edit_provider_batch_execution_receipt(receipts:, metadata: nil) batch_execution_receipt = { receipts: deep_dup(receipts) } batch_execution_receipt[:metadata] = deep_dup() if batch_execution_receipt end |
.structured_edit_provider_batch_execution_receipt_envelope(batch_execution_receipt) ⇒ Object
1289 1290 1291 1292 1293 1294 1295 |
# File 'lib/ast/merge.rb', line 1289 def structured_edit_provider_batch_execution_receipt_envelope(batch_execution_receipt) { kind: "structured_edit_provider_batch_execution_receipt", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_execution_receipt: deep_dup(batch_execution_receipt) } end |
.structured_edit_provider_batch_execution_receipt_replay_application(applications:, metadata: nil) ⇒ Object
1375 1376 1377 1378 1379 1380 1381 |
# File 'lib/ast/merge.rb', line 1375 def structured_edit_provider_batch_execution_receipt_replay_application(applications:, metadata: nil) batch_receipt_replay_application = { applications: deep_dup(applications) } batch_receipt_replay_application[:metadata] = deep_dup() if batch_receipt_replay_application end |
.structured_edit_provider_batch_execution_receipt_replay_application_envelope(batch_receipt_replay_application) ⇒ Object
1383 1384 1385 1386 1387 1388 1389 |
# File 'lib/ast/merge.rb', line 1383 def structured_edit_provider_batch_execution_receipt_replay_application_envelope(batch_receipt_replay_application) { kind: "structured_edit_provider_batch_execution_receipt_replay_application", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_application: deep_dup(batch_receipt_replay_application) } end |
.structured_edit_provider_batch_execution_receipt_replay_request(requests:, metadata: nil) ⇒ Object
1328 1329 1330 1331 1332 1333 1334 |
# File 'lib/ast/merge.rb', line 1328 def structured_edit_provider_batch_execution_receipt_replay_request(requests:, metadata: nil) batch_receipt_replay_request = { requests: deep_dup(requests) } batch_receipt_replay_request[:metadata] = deep_dup() if batch_receipt_replay_request end |
.structured_edit_provider_batch_execution_receipt_replay_request_envelope(batch_receipt_replay_request) ⇒ Object
1336 1337 1338 1339 1340 1341 1342 |
# File 'lib/ast/merge.rb', line 1336 def structured_edit_provider_batch_execution_receipt_replay_request_envelope(batch_receipt_replay_request) { kind: "structured_edit_provider_batch_execution_receipt_replay_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_request: deep_dup(batch_receipt_replay_request) } end |
.structured_edit_provider_batch_execution_receipt_replay_session(sessions:, metadata: nil) ⇒ Object
1422 1423 1424 1425 1426 1427 1428 |
# File 'lib/ast/merge.rb', line 1422 def structured_edit_provider_batch_execution_receipt_replay_session(sessions:, metadata: nil) batch_receipt_replay_session = { sessions: deep_dup(sessions) } batch_receipt_replay_session[:metadata] = deep_dup() if batch_receipt_replay_session end |
.structured_edit_provider_batch_execution_receipt_replay_session_envelope(batch_receipt_replay_session) ⇒ Object
1430 1431 1432 1433 1434 1435 1436 |
# File 'lib/ast/merge.rb', line 1430 def structured_edit_provider_batch_execution_receipt_replay_session_envelope(batch_receipt_replay_session) { kind: "structured_edit_provider_batch_execution_receipt_replay_session", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_session: deep_dup(batch_receipt_replay_session) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow(workflows:, metadata: nil) ⇒ Object
1468 1469 1470 1471 1472 1473 1474 |
# File 'lib/ast/merge.rb', line 1468 def structured_edit_provider_batch_execution_receipt_replay_workflow(workflows:, metadata: nil) batch_receipt_replay_workflow = { workflows: deep_dup(workflows) } batch_receipt_replay_workflow[:metadata] = deep_dup() if batch_receipt_replay_workflow end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision(apply_decisions:, metadata: nil) ⇒ Object
1816 1817 1818 1819 1820 1821 1822 |
# File 'lib/ast/merge.rb', line 1816 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision(apply_decisions:, metadata: nil) batch_apply_decision = { apply_decisions: deep_dup(apply_decisions) } batch_apply_decision[:metadata] = deep_dup() if batch_apply_decision end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report(closure_reports:, metadata: nil) ⇒ Object
1679 1680 1681 1682 1683 1684 1685 |
# File 'lib/ast/merge.rb', line 1679 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report(closure_reports:, metadata: nil) batch_apply_decision_closure_report = { closure_reports: deep_dup(closure_reports) } batch_apply_decision_closure_report[:metadata] = deep_dup() if batch_apply_decision_closure_report end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(batch_receipt_replay_workflow_apply_decision_closure_report) ⇒ Object
1702 1703 1704 1705 1706 1707 1708 |
# File 'lib/ast/merge.rb', line 1702 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(batch_receipt_replay_workflow_apply_decision_closure_report) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_closure_report", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_decision_closure_report: deep_dup(batch_receipt_replay_workflow_apply_decision_closure_report) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation(apply_decision_confirmations:, metadata: nil) ⇒ Object
1671 1672 1673 1674 1675 1676 1677 |
# File 'lib/ast/merge.rb', line 1671 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation(apply_decision_confirmations:, metadata: nil) batch_apply_decision_confirmation = { apply_decision_confirmations: deep_dup(apply_decision_confirmations) } batch_apply_decision_confirmation[:metadata] = deep_dup() if batch_apply_decision_confirmation end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(batch_receipt_replay_workflow_apply_decision_confirmation) ⇒ Object
1687 1688 1689 1690 1691 1692 1693 |
# File 'lib/ast/merge.rb', line 1687 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(batch_receipt_replay_workflow_apply_decision_confirmation) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_confirmation", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_decision_confirmation: deep_dup(batch_receipt_replay_workflow_apply_decision_confirmation) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_envelope(batch_receipt_replay_workflow_apply_decision) ⇒ Object
1877 1878 1879 1880 1881 1882 1883 |
# File 'lib/ast/merge.rb', line 1877 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_envelope(batch_receipt_replay_workflow_apply_decision) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_decision: deep_dup(batch_receipt_replay_workflow_apply_decision) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome(apply_decision_outcomes:, metadata: nil) ⇒ Object
1824 1825 1826 1827 1828 1829 1830 |
# File 'lib/ast/merge.rb', line 1824 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome(apply_decision_outcomes:, metadata: nil) batch_apply_decision_outcome = { apply_decision_outcomes: deep_dup(apply_decision_outcomes) } batch_apply_decision_outcome[:metadata] = deep_dup() if batch_apply_decision_outcome end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome_envelope(batch_receipt_replay_workflow_apply_decision_outcome) ⇒ Object
1892 1893 1894 1895 1896 1897 1898 |
# File 'lib/ast/merge.rb', line 1892 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome_envelope(batch_receipt_replay_workflow_apply_decision_outcome) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_outcome", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_decision_outcome: deep_dup(batch_receipt_replay_workflow_apply_decision_outcome) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement(apply_decision_settlements:, metadata: nil) ⇒ Object
1648 1649 1650 1651 1652 1653 1654 |
# File 'lib/ast/merge.rb', line 1648 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement(apply_decision_settlements:, metadata: nil) batch_apply_decision_settlement = { apply_decision_settlements: deep_dup(apply_decision_settlements) } batch_apply_decision_settlement[:metadata] = deep_dup() if batch_apply_decision_settlement end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement_envelope(batch_receipt_replay_workflow_apply_decision_settlement) ⇒ Object
1656 1657 1658 1659 1660 1661 1662 |
# File 'lib/ast/merge.rb', line 1656 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement_envelope(batch_receipt_replay_workflow_apply_decision_settlement) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_decision_settlement", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_decision_settlement: deep_dup(batch_receipt_replay_workflow_apply_decision_settlement) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request(apply_requests:, metadata: nil) ⇒ Object
1792 1793 1794 1795 1796 1797 1798 |
# File 'lib/ast/merge.rb', line 1792 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request(apply_requests:, metadata: nil) batch_apply_request = { apply_requests: deep_dup(apply_requests) } batch_apply_request[:metadata] = deep_dup() if batch_apply_request end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request_envelope(batch_receipt_replay_workflow_apply_request) ⇒ Object
1832 1833 1834 1835 1836 1837 1838 |
# File 'lib/ast/merge.rb', line 1832 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request_envelope(batch_receipt_replay_workflow_apply_request) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_request: deep_dup(batch_receipt_replay_workflow_apply_request) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result(apply_results:, metadata: nil) ⇒ Object
1808 1809 1810 1811 1812 1813 1814 |
# File 'lib/ast/merge.rb', line 1808 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result(apply_results:, metadata: nil) batch_apply_result = { apply_results: deep_dup(apply_results) } batch_apply_result[:metadata] = deep_dup() if batch_apply_result end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result_envelope(batch_receipt_replay_workflow_apply_result) ⇒ Object
1862 1863 1864 1865 1866 1867 1868 |
# File 'lib/ast/merge.rb', line 1862 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result_envelope(batch_receipt_replay_workflow_apply_result) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_result", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_result: deep_dup(batch_receipt_replay_workflow_apply_result) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session(apply_sessions:, metadata: nil) ⇒ Object
1800 1801 1802 1803 1804 1805 1806 |
# File 'lib/ast/merge.rb', line 1800 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session(apply_sessions:, metadata: nil) batch_apply_session = { apply_sessions: deep_dup(apply_sessions) } batch_apply_session[:metadata] = deep_dup() if batch_apply_session end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session_envelope(batch_receipt_replay_workflow_apply_session) ⇒ Object
1847 1848 1849 1850 1851 1852 1853 |
# File 'lib/ast/merge.rb', line 1847 def structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session_envelope(batch_receipt_replay_workflow_apply_session) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_apply_session", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_apply_session: deep_dup(batch_receipt_replay_workflow_apply_session) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_envelope(batch_receipt_replay_workflow) ⇒ Object
1476 1477 1478 1479 1480 1481 1482 |
# File 'lib/ast/merge.rb', line 1476 def structured_edit_provider_batch_execution_receipt_replay_workflow_envelope(batch_receipt_replay_workflow) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow: deep_dup(batch_receipt_replay_workflow) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_result(receipt_replay_workflow_results:, metadata: nil) ⇒ Object
1945 1946 1947 1948 1949 1950 1951 |
# File 'lib/ast/merge.rb', line 1945 def structured_edit_provider_batch_execution_receipt_replay_workflow_result(receipt_replay_workflow_results:, metadata: nil) batch_replay_workflow_result = { receipt_replay_workflow_results: deep_dup(receipt_replay_workflow_results) } batch_replay_workflow_result[:metadata] = deep_dup() if batch_replay_workflow_result end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_result_envelope(batch_receipt_replay_workflow_result) ⇒ Object
1953 1954 1955 1956 1957 1958 1959 |
# File 'lib/ast/merge.rb', line 1953 def structured_edit_provider_batch_execution_receipt_replay_workflow_result_envelope(batch_receipt_replay_workflow_result) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_result", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_result: deep_dup(batch_receipt_replay_workflow_result) } end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_review_request(review_requests:, metadata: nil) ⇒ Object
1922 1923 1924 1925 1926 1927 1928 |
# File 'lib/ast/merge.rb', line 1922 def structured_edit_provider_batch_execution_receipt_replay_workflow_review_request(review_requests:, metadata: nil) batch_review_request = { review_requests: deep_dup(review_requests) } batch_review_request[:metadata] = deep_dup() if batch_review_request end |
.structured_edit_provider_batch_execution_receipt_replay_workflow_review_request_envelope(batch_receipt_replay_workflow_review_request) ⇒ Object
1930 1931 1932 1933 1934 1935 1936 |
# File 'lib/ast/merge.rb', line 1930 def structured_edit_provider_batch_execution_receipt_replay_workflow_review_request_envelope(batch_receipt_replay_workflow_review_request) { kind: "structured_edit_provider_batch_execution_receipt_replay_workflow_review_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_receipt_replay_workflow_review_request: deep_dup(batch_receipt_replay_workflow_review_request) } end |
.structured_edit_provider_batch_execution_replay_bundle(replay_bundles:, metadata: nil) ⇒ Object
2184 2185 2186 2187 2188 2189 2190 |
# File 'lib/ast/merge.rb', line 2184 def structured_edit_provider_batch_execution_replay_bundle(replay_bundles:, metadata: nil) batch = { replay_bundles: deep_dup(replay_bundles) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_provider_batch_execution_replay_bundle_envelope(batch_replay_bundle) ⇒ Object
2192 2193 2194 2195 2196 2197 2198 |
# File 'lib/ast/merge.rb', line 2192 def structured_edit_provider_batch_execution_replay_bundle_envelope(batch_replay_bundle) { kind: "structured_edit_provider_batch_execution_replay_bundle", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_replay_bundle: deep_dup(batch_replay_bundle) } end |
.structured_edit_provider_batch_execution_report(applications:, diagnostics:, metadata: nil) ⇒ Object
2400 2401 2402 2403 2404 2405 2406 2407 |
# File 'lib/ast/merge.rb', line 2400 def structured_edit_provider_batch_execution_report(applications:, diagnostics:, metadata: nil) batch = { applications: deep_dup(applications), diagnostics: deep_dup(diagnostics) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_provider_batch_execution_report_envelope(batch_report) ⇒ Object
2409 2410 2411 2412 2413 2414 2415 |
# File 'lib/ast/merge.rb', line 2409 def structured_edit_provider_batch_execution_report_envelope(batch_report) { kind: "structured_edit_provider_batch_execution_report", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_report: deep_dup(batch_report) } end |
.structured_edit_provider_batch_execution_request(requests:, metadata: nil) ⇒ Object
2354 2355 2356 2357 2358 2359 2360 |
# File 'lib/ast/merge.rb', line 2354 def structured_edit_provider_batch_execution_request(requests:, metadata: nil) batch = { requests: deep_dup(requests) } batch[:metadata] = deep_dup() if batch end |
.structured_edit_provider_batch_execution_request_envelope(batch_execution_request) ⇒ Object
2362 2363 2364 2365 2366 2367 2368 |
# File 'lib/ast/merge.rb', line 2362 def structured_edit_provider_batch_execution_request_envelope(batch_execution_request) { kind: "structured_edit_provider_batch_execution_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_execution_request: deep_dup(batch_execution_request) } end |
.structured_edit_provider_batch_execution_run_result(run_results:, metadata: nil) ⇒ Object
1233 1234 1235 1236 1237 1238 1239 |
# File 'lib/ast/merge.rb', line 1233 def structured_edit_provider_batch_execution_run_result(run_results:, metadata: nil) batch_execution_run_result = { run_results: deep_dup(run_results) } batch_execution_run_result[:metadata] = deep_dup() if batch_execution_run_result end |
.structured_edit_provider_batch_execution_run_result_envelope(batch_execution_run_result) ⇒ Object
1241 1242 1243 1244 1245 1246 1247 |
# File 'lib/ast/merge.rb', line 1241 def structured_edit_provider_batch_execution_run_result_envelope(batch_execution_run_result) { kind: "structured_edit_provider_batch_execution_run_result", version: STRUCTURED_EDIT_TRANSPORT_VERSION, batch_execution_run_result: deep_dup(batch_execution_run_result) } end |
.structured_edit_provider_execution_application(execution_request:, report:, metadata: nil) ⇒ Object
2029 2030 2031 2032 2033 2034 2035 2036 |
# File 'lib/ast/merge.rb', line 2029 def structured_edit_provider_execution_application(execution_request:, report:, metadata: nil) application = { execution_request: deep_dup(execution_request), report: deep_dup(report) } application[:metadata] = deep_dup() if application end |
.structured_edit_provider_execution_application_envelope(provider_execution_application) ⇒ Object
2316 2317 2318 2319 2320 2321 2322 |
# File 'lib/ast/merge.rb', line 2316 def structured_edit_provider_execution_application_envelope(provider_execution_application) { kind: "structured_edit_provider_execution_application", version: STRUCTURED_EDIT_TRANSPORT_VERSION, provider_execution_application: deep_dup(provider_execution_application) } end |
.structured_edit_provider_execution_dispatch(execution_request:, resolved_provider_family:, resolved_provider_backend:, executor_label: nil, metadata: nil) ⇒ Object
2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 |
# File 'lib/ast/merge.rb', line 2038 def structured_edit_provider_execution_dispatch(execution_request:, resolved_provider_family:, resolved_provider_backend:, executor_label: nil, metadata: nil) dispatch = { execution_request: deep_dup(execution_request), resolved_provider_family: resolved_provider_family.to_s, resolved_provider_backend: resolved_provider_backend.to_s } dispatch[:executor_label] = executor_label.to_s if executor_label dispatch[:metadata] = deep_dup() if dispatch end |
.structured_edit_provider_execution_dispatch_envelope(provider_execution_dispatch) ⇒ Object
2050 2051 2052 2053 2054 2055 2056 |
# File 'lib/ast/merge.rb', line 2050 def structured_edit_provider_execution_dispatch_envelope(provider_execution_dispatch) { kind: "structured_edit_provider_execution_dispatch", version: STRUCTURED_EDIT_TRANSPORT_VERSION, provider_execution_dispatch: deep_dup(provider_execution_dispatch) } end |
.structured_edit_provider_execution_handoff(execution_plan:, execution_dispatch:, metadata: nil) ⇒ Object
1139 1140 1141 1142 1143 1144 1145 1146 |
# File 'lib/ast/merge.rb', line 1139 def structured_edit_provider_execution_handoff(execution_plan:, execution_dispatch:, metadata: nil) execution_handoff = { execution_plan: deep_dup(execution_plan), execution_dispatch: deep_dup(execution_dispatch) } execution_handoff[:metadata] = deep_dup() if execution_handoff end |
.structured_edit_provider_execution_handoff_envelope(execution_handoff) ⇒ Object
1148 1149 1150 1151 1152 1153 1154 |
# File 'lib/ast/merge.rb', line 1148 def structured_edit_provider_execution_handoff_envelope(execution_handoff) { kind: "structured_edit_provider_execution_handoff", version: STRUCTURED_EDIT_TRANSPORT_VERSION, execution_handoff: deep_dup(execution_handoff) } end |
.structured_edit_provider_execution_invocation(execution_handoff:, metadata: nil) ⇒ Object
1163 1164 1165 1166 1167 1168 1169 |
# File 'lib/ast/merge.rb', line 1163 def structured_edit_provider_execution_invocation(execution_handoff:, metadata: nil) execution_invocation = { execution_handoff: deep_dup(execution_handoff) } execution_invocation[:metadata] = deep_dup() if execution_invocation end |
.structured_edit_provider_execution_invocation_envelope(execution_invocation) ⇒ Object
1171 1172 1173 1174 1175 1176 1177 |
# File 'lib/ast/merge.rb', line 1171 def structured_edit_provider_execution_invocation_envelope(execution_invocation) { kind: "structured_edit_provider_execution_invocation", version: STRUCTURED_EDIT_TRANSPORT_VERSION, execution_invocation: deep_dup(execution_invocation) } end |
.structured_edit_provider_execution_outcome(dispatch:, application:, metadata: nil) ⇒ Object
2065 2066 2067 2068 2069 2070 2071 2072 |
# File 'lib/ast/merge.rb', line 2065 def structured_edit_provider_execution_outcome(dispatch:, application:, metadata: nil) outcome = { dispatch: deep_dup(dispatch), application: deep_dup(application) } outcome[:metadata] = deep_dup() if outcome end |
.structured_edit_provider_execution_outcome_envelope(provider_execution_outcome) ⇒ Object
2074 2075 2076 2077 2078 2079 2080 |
# File 'lib/ast/merge.rb', line 2074 def structured_edit_provider_execution_outcome_envelope(provider_execution_outcome) { kind: "structured_edit_provider_execution_outcome", version: STRUCTURED_EDIT_TRANSPORT_VERSION, provider_execution_outcome: deep_dup(provider_execution_outcome) } end |
.structured_edit_provider_execution_plan(execution_request:, executor_resolution:, metadata: nil) ⇒ Object
1130 1131 1132 1133 1134 1135 1136 1137 |
# File 'lib/ast/merge.rb', line 1130 def structured_edit_provider_execution_plan(execution_request:, executor_resolution:, metadata: nil) execution_plan = { execution_request: deep_dup(execution_request), executor_resolution: deep_dup(executor_resolution) } execution_plan[:metadata] = deep_dup() if execution_plan end |
.structured_edit_provider_execution_plan_envelope(execution_plan) ⇒ Object
1991 1992 1993 1994 1995 1996 1997 |
# File 'lib/ast/merge.rb', line 1991 def structured_edit_provider_execution_plan_envelope(execution_plan) { kind: "structured_edit_provider_execution_plan", version: STRUCTURED_EDIT_TRANSPORT_VERSION, execution_plan: deep_dup(execution_plan) } end |
.structured_edit_provider_execution_provenance(dispatch:, outcome:, diagnostics:, metadata: nil) ⇒ Object
2112 2113 2114 2115 2116 2117 2118 2119 2120 |
# File 'lib/ast/merge.rb', line 2112 def structured_edit_provider_execution_provenance(dispatch:, outcome:, diagnostics:, metadata: nil) provenance = { dispatch: deep_dup(dispatch), outcome: deep_dup(outcome), diagnostics: deep_dup(diagnostics) } provenance[:metadata] = deep_dup() if provenance end |
.structured_edit_provider_execution_provenance_envelope(provenance) ⇒ Object
2122 2123 2124 2125 2126 2127 2128 |
# File 'lib/ast/merge.rb', line 2122 def structured_edit_provider_execution_provenance_envelope(provenance) { kind: "structured_edit_provider_execution_provenance", version: STRUCTURED_EDIT_TRANSPORT_VERSION, provenance: deep_dup(provenance) } end |
.structured_edit_provider_execution_receipt(run_result:, provenance: nil, replay_bundle: nil, metadata: nil) ⇒ Object
1256 1257 1258 1259 1260 1261 1262 1263 1264 |
# File 'lib/ast/merge.rb', line 1256 def structured_edit_provider_execution_receipt(run_result:, provenance: nil, replay_bundle: nil, metadata: nil) execution_receipt = { run_result: deep_dup(run_result) } execution_receipt[:provenance] = deep_dup(provenance) if provenance execution_receipt[:replay_bundle] = deep_dup(replay_bundle) if replay_bundle execution_receipt[:metadata] = deep_dup() if execution_receipt end |
.structured_edit_provider_execution_receipt_envelope(execution_receipt) ⇒ Object
1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/ast/merge.rb', line 1266 def structured_edit_provider_execution_receipt_envelope(execution_receipt) { kind: "structured_edit_provider_execution_receipt", version: STRUCTURED_EDIT_TRANSPORT_VERSION, execution_receipt: deep_dup(execution_receipt) } end |
.structured_edit_provider_execution_receipt_replay_application(receipt_replay_request:, run_result:, metadata: nil) ⇒ Object
1351 1352 1353 1354 1355 1356 1357 1358 |
# File 'lib/ast/merge.rb', line 1351 def structured_edit_provider_execution_receipt_replay_application(receipt_replay_request:, run_result:, metadata: nil) replay_application = { receipt_replay_request: deep_dup(receipt_replay_request), run_result: deep_dup(run_result) } replay_application[:metadata] = deep_dup() if replay_application end |
.structured_edit_provider_execution_receipt_replay_application_envelope(receipt_replay_application) ⇒ Object
1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/ast/merge.rb', line 1360 def structured_edit_provider_execution_receipt_replay_application_envelope(receipt_replay_application) { kind: "structured_edit_provider_execution_receipt_replay_application", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_application: deep_dup(receipt_replay_application) } end |
.structured_edit_provider_execution_receipt_replay_request(execution_receipt:, replay_mode:, metadata: nil) ⇒ Object
1304 1305 1306 1307 1308 1309 1310 1311 |
# File 'lib/ast/merge.rb', line 1304 def structured_edit_provider_execution_receipt_replay_request(execution_receipt:, replay_mode:, metadata: nil) replay_request = { execution_receipt: deep_dup(execution_receipt), replay_mode: replay_mode } replay_request[:metadata] = deep_dup() if replay_request end |
.structured_edit_provider_execution_receipt_replay_request_envelope(receipt_replay_request) ⇒ Object
1313 1314 1315 1316 1317 1318 1319 |
# File 'lib/ast/merge.rb', line 1313 def structured_edit_provider_execution_receipt_replay_request_envelope(receipt_replay_request) { kind: "structured_edit_provider_execution_receipt_replay_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_request: deep_dup(receipt_replay_request) } end |
.structured_edit_provider_execution_receipt_replay_session(receipt_replay_application:, execution_receipt:, metadata: nil) ⇒ Object
1398 1399 1400 1401 1402 1403 1404 1405 |
# File 'lib/ast/merge.rb', line 1398 def structured_edit_provider_execution_receipt_replay_session(receipt_replay_application:, execution_receipt:, metadata: nil) replay_session = { receipt_replay_application: deep_dup(receipt_replay_application), execution_receipt: deep_dup(execution_receipt) } replay_session[:metadata] = deep_dup() if replay_session end |
.structured_edit_provider_execution_receipt_replay_session_envelope(receipt_replay_session) ⇒ Object
1407 1408 1409 1410 1411 1412 1413 |
# File 'lib/ast/merge.rb', line 1407 def structured_edit_provider_execution_receipt_replay_session_envelope(receipt_replay_session) { kind: "structured_edit_provider_execution_receipt_replay_session", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_session: deep_dup(receipt_replay_session) } end |
.structured_edit_provider_execution_receipt_replay_workflow(receipt_replay_session:, metadata: nil) ⇒ Object
1445 1446 1447 1448 1449 1450 1451 |
# File 'lib/ast/merge.rb', line 1445 def structured_edit_provider_execution_receipt_replay_workflow(receipt_replay_session:, metadata: nil) replay_workflow = { receipt_replay_session: deep_dup(receipt_replay_session) } replay_workflow[:metadata] = deep_dup() if replay_workflow end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision(receipt_replay_workflow_apply_result:, decision:, metadata: nil) ⇒ Object
1549 1550 1551 1552 1553 1554 1555 1556 |
# File 'lib/ast/merge.rb', line 1549 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision(receipt_replay_workflow_apply_result:, decision:, metadata: nil) apply_decision = { receipt_replay_workflow_apply_result: deep_dup(receipt_replay_workflow_apply_result), decision: decision } apply_decision[:metadata] = deep_dup() if apply_decision end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_audit_record(receipt_replay_workflow_apply_decision_closure_report:, audit_record:, metadata: nil) ⇒ Object
1594 1595 1596 1597 1598 1599 1600 1601 |
# File 'lib/ast/merge.rb', line 1594 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_audit_record(receipt_replay_workflow_apply_decision_closure_report:, audit_record:, metadata: nil) apply_decision_audit_record = { receipt_replay_workflow_apply_decision_closure_report: deep_dup(receipt_replay_workflow_apply_decision_closure_report), audit_record: audit_record } apply_decision_audit_record[:metadata] = deep_dup() if apply_decision_audit_record end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report(receipt_replay_workflow_apply_decision_confirmation:, closure_report:, metadata: nil) ⇒ Object
1585 1586 1587 1588 1589 1590 1591 1592 |
# File 'lib/ast/merge.rb', line 1585 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report(receipt_replay_workflow_apply_decision_confirmation:, closure_report:, metadata: nil) apply_decision_closure_report = { receipt_replay_workflow_apply_decision_confirmation: deep_dup(receipt_replay_workflow_apply_decision_confirmation), closure_report: closure_report } apply_decision_closure_report[:metadata] = deep_dup() if apply_decision_closure_report end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(receipt_replay_workflow_apply_decision_closure_report) ⇒ Object
1633 1634 1635 1636 1637 1638 1639 |
# File 'lib/ast/merge.rb', line 1633 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report_envelope(receipt_replay_workflow_apply_decision_closure_report) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_closure_report", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_decision_closure_report: deep_dup(receipt_replay_workflow_apply_decision_closure_report) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation(receipt_replay_workflow_apply_decision_settlement:, confirmation:, metadata: nil) ⇒ Object
1576 1577 1578 1579 1580 1581 1582 1583 |
# File 'lib/ast/merge.rb', line 1576 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation(receipt_replay_workflow_apply_decision_settlement:, confirmation:, metadata: nil) apply_decision_confirmation = { receipt_replay_workflow_apply_decision_settlement: deep_dup(receipt_replay_workflow_apply_decision_settlement), confirmation: confirmation } apply_decision_confirmation[:metadata] = deep_dup() if apply_decision_confirmation end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(receipt_replay_workflow_apply_decision_confirmation) ⇒ Object
1618 1619 1620 1621 1622 1623 1624 |
# File 'lib/ast/merge.rb', line 1618 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation_envelope(receipt_replay_workflow_apply_decision_confirmation) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_confirmation", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_decision_confirmation: deep_dup(receipt_replay_workflow_apply_decision_confirmation) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_envelope(receipt_replay_workflow_apply_decision) ⇒ Object
1732 1733 1734 1735 1736 1737 1738 |
# File 'lib/ast/merge.rb', line 1732 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_envelope(receipt_replay_workflow_apply_decision) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_decision", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_decision: deep_dup(receipt_replay_workflow_apply_decision) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome(receipt_replay_workflow_apply_decision:, outcome:, metadata: nil) ⇒ Object
1558 1559 1560 1561 1562 1563 1564 1565 |
# File 'lib/ast/merge.rb', line 1558 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome(receipt_replay_workflow_apply_decision:, outcome:, metadata: nil) apply_decision_outcome = { receipt_replay_workflow_apply_decision: deep_dup(receipt_replay_workflow_apply_decision), outcome: outcome } apply_decision_outcome[:metadata] = deep_dup() if apply_decision_outcome end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome_envelope(receipt_replay_workflow_apply_decision_outcome) ⇒ Object
1717 1718 1719 1720 1721 1722 1723 |
# File 'lib/ast/merge.rb', line 1717 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome_envelope(receipt_replay_workflow_apply_decision_outcome) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_outcome", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_decision_outcome: deep_dup(receipt_replay_workflow_apply_decision_outcome) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement(receipt_replay_workflow_apply_decision_outcome:, settlement:, metadata: nil) ⇒ Object
1567 1568 1569 1570 1571 1572 1573 1574 |
# File 'lib/ast/merge.rb', line 1567 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement(receipt_replay_workflow_apply_decision_outcome:, settlement:, metadata: nil) apply_decision_settlement = { receipt_replay_workflow_apply_decision_outcome: deep_dup(receipt_replay_workflow_apply_decision_outcome), settlement: settlement } apply_decision_settlement[:metadata] = deep_dup() if apply_decision_settlement end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement_envelope(receipt_replay_workflow_apply_decision_settlement) ⇒ Object
1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/ast/merge.rb', line 1603 def structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement_envelope(receipt_replay_workflow_apply_decision_settlement) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_decision_settlement", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_decision_settlement: deep_dup(receipt_replay_workflow_apply_decision_settlement) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_request(receipt_replay_workflow_review_request:, metadata: nil) ⇒ Object
1523 1524 1525 1526 1527 1528 1529 |
# File 'lib/ast/merge.rb', line 1523 def structured_edit_provider_execution_receipt_replay_workflow_apply_request(receipt_replay_workflow_review_request:, metadata: nil) apply_request = { receipt_replay_workflow_review_request: deep_dup(receipt_replay_workflow_review_request) } apply_request[:metadata] = deep_dup() if apply_request end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_request_envelope(receipt_replay_workflow_apply_request) ⇒ Object
1777 1778 1779 1780 1781 1782 1783 |
# File 'lib/ast/merge.rb', line 1777 def structured_edit_provider_execution_receipt_replay_workflow_apply_request_envelope(receipt_replay_workflow_apply_request) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_request: deep_dup(receipt_replay_workflow_apply_request) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_result(receipt_replay_workflow_apply_session:, receipt_replay_workflow_result:, metadata: nil) ⇒ Object
1540 1541 1542 1543 1544 1545 1546 1547 |
# File 'lib/ast/merge.rb', line 1540 def structured_edit_provider_execution_receipt_replay_workflow_apply_result(receipt_replay_workflow_apply_session:, receipt_replay_workflow_result:, metadata: nil) apply_result = { receipt_replay_workflow_apply_session: deep_dup(receipt_replay_workflow_apply_session), receipt_replay_workflow_result: deep_dup(receipt_replay_workflow_result) } apply_result[:metadata] = deep_dup() if apply_result end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_result_envelope(receipt_replay_workflow_apply_result) ⇒ Object
1747 1748 1749 1750 1751 1752 1753 |
# File 'lib/ast/merge.rb', line 1747 def structured_edit_provider_execution_receipt_replay_workflow_apply_result_envelope(receipt_replay_workflow_apply_result) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_result", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_result: deep_dup(receipt_replay_workflow_apply_result) } end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_session(receipt_replay_workflow_apply_request:, receipt_replay_session:, metadata: nil) ⇒ Object
1531 1532 1533 1534 1535 1536 1537 1538 |
# File 'lib/ast/merge.rb', line 1531 def structured_edit_provider_execution_receipt_replay_workflow_apply_session(receipt_replay_workflow_apply_request:, receipt_replay_session:, metadata: nil) apply_session = { receipt_replay_workflow_apply_request: deep_dup(receipt_replay_workflow_apply_request), receipt_replay_session: deep_dup(receipt_replay_session) } apply_session[:metadata] = deep_dup() if apply_session end |
.structured_edit_provider_execution_receipt_replay_workflow_apply_session_envelope(receipt_replay_workflow_apply_session) ⇒ Object
1762 1763 1764 1765 1766 1767 1768 |
# File 'lib/ast/merge.rb', line 1762 def structured_edit_provider_execution_receipt_replay_workflow_apply_session_envelope(receipt_replay_workflow_apply_session) { kind: "structured_edit_provider_execution_receipt_replay_workflow_apply_session", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_apply_session: deep_dup(receipt_replay_workflow_apply_session) } end |
.structured_edit_provider_execution_receipt_replay_workflow_envelope(receipt_replay_workflow) ⇒ Object
1453 1454 1455 1456 1457 1458 1459 |
# File 'lib/ast/merge.rb', line 1453 def structured_edit_provider_execution_receipt_replay_workflow_envelope(receipt_replay_workflow) { kind: "structured_edit_provider_execution_receipt_replay_workflow", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow: deep_dup(receipt_replay_workflow) } end |
.structured_edit_provider_execution_receipt_replay_workflow_result(receipt_replay_workflow:, receipt_replay_application:, metadata: nil) ⇒ Object
1491 1492 1493 1494 1495 1496 1497 1498 |
# File 'lib/ast/merge.rb', line 1491 def structured_edit_provider_execution_receipt_replay_workflow_result(receipt_replay_workflow:, receipt_replay_application:, metadata: nil) replay_workflow_result = { receipt_replay_workflow: deep_dup(receipt_replay_workflow), receipt_replay_application: deep_dup(receipt_replay_application) } replay_workflow_result[:metadata] = deep_dup() if replay_workflow_result end |
.structured_edit_provider_execution_receipt_replay_workflow_result_envelope(receipt_replay_workflow_result) ⇒ Object
1500 1501 1502 1503 1504 1505 1506 |
# File 'lib/ast/merge.rb', line 1500 def structured_edit_provider_execution_receipt_replay_workflow_result_envelope(receipt_replay_workflow_result) { kind: "structured_edit_provider_execution_receipt_replay_workflow_result", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_result: deep_dup(receipt_replay_workflow_result) } end |
.structured_edit_provider_execution_receipt_replay_workflow_review_request(receipt_replay_workflow_result:, metadata: nil) ⇒ Object
1515 1516 1517 1518 1519 1520 1521 |
# File 'lib/ast/merge.rb', line 1515 def structured_edit_provider_execution_receipt_replay_workflow_review_request(receipt_replay_workflow_result:, metadata: nil) review_request = { receipt_replay_workflow_result: deep_dup(receipt_replay_workflow_result) } review_request[:metadata] = deep_dup() if review_request end |
.structured_edit_provider_execution_receipt_replay_workflow_review_request_envelope(receipt_replay_workflow_review_request) ⇒ Object
1907 1908 1909 1910 1911 1912 1913 |
# File 'lib/ast/merge.rb', line 1907 def structured_edit_provider_execution_receipt_replay_workflow_review_request_envelope(receipt_replay_workflow_review_request) { kind: "structured_edit_provider_execution_receipt_replay_workflow_review_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, receipt_replay_workflow_review_request: deep_dup(receipt_replay_workflow_review_request) } end |
.structured_edit_provider_execution_replay_bundle(execution_request:, provenance:, metadata: nil) ⇒ Object
2160 2161 2162 2163 2164 2165 2166 2167 |
# File 'lib/ast/merge.rb', line 2160 def structured_edit_provider_execution_replay_bundle(execution_request:, provenance:, metadata: nil) replay_bundle = { execution_request: deep_dup(execution_request), provenance: deep_dup(provenance) } replay_bundle[:metadata] = deep_dup() if replay_bundle end |
.structured_edit_provider_execution_replay_bundle_envelope(replay_bundle) ⇒ Object
2169 2170 2171 2172 2173 2174 2175 |
# File 'lib/ast/merge.rb', line 2169 def structured_edit_provider_execution_replay_bundle_envelope(replay_bundle) { kind: "structured_edit_provider_execution_replay_bundle", version: STRUCTURED_EDIT_TRANSPORT_VERSION, replay_bundle: deep_dup(replay_bundle) } end |
.structured_edit_provider_execution_request(request:, provider_family:, provider_backend: nil, metadata: nil) ⇒ Object
1105 1106 1107 1108 1109 1110 1111 1112 1113 |
# File 'lib/ast/merge.rb', line 1105 def structured_edit_provider_execution_request(request:, provider_family:, provider_backend: nil, metadata: nil) execution_request = { request: deep_dup(request), provider_family: provider_family.to_s } execution_request[:provider_backend] = provider_backend.to_s if provider_backend execution_request[:metadata] = deep_dup() if execution_request end |
.structured_edit_provider_execution_request_envelope(execution_request) ⇒ Object
1115 1116 1117 1118 1119 1120 1121 |
# File 'lib/ast/merge.rb', line 1115 def structured_edit_provider_execution_request_envelope(execution_request) { kind: "structured_edit_provider_execution_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, execution_request: deep_dup(execution_request) } end |
.structured_edit_provider_execution_run_result(execution_invocation:, outcome:, metadata: nil) ⇒ Object
1209 1210 1211 1212 1213 1214 1215 1216 |
# File 'lib/ast/merge.rb', line 1209 def structured_edit_provider_execution_run_result(execution_invocation:, outcome:, metadata: nil) execution_run_result = { execution_invocation: deep_dup(execution_invocation), outcome: deep_dup(outcome) } execution_run_result[:metadata] = deep_dup() if execution_run_result end |
.structured_edit_provider_execution_run_result_envelope(execution_run_result) ⇒ Object
1218 1219 1220 1221 1222 1223 1224 |
# File 'lib/ast/merge.rb', line 1218 def structured_edit_provider_execution_run_result_envelope(execution_run_result) { kind: "structured_edit_provider_execution_run_result", version: STRUCTURED_EDIT_TRANSPORT_VERSION, execution_run_result: deep_dup(execution_run_result) } end |
.structured_edit_provider_executor_profile(provider_family:, provider_backend:, executor_label:, structure_profile:, selection_profile:, match_profile:, operation_profiles:, destination_profile:, metadata: nil) ⇒ Object
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 |
# File 'lib/ast/merge.rb', line 2207 def structured_edit_provider_executor_profile(provider_family:, provider_backend:, executor_label:, structure_profile:, selection_profile:, match_profile:, operation_profiles:, destination_profile:, metadata: nil) executor_profile = { provider_family: provider_family.to_s, provider_backend: provider_backend.to_s, executor_label: executor_label.to_s, structure_profile: deep_dup(structure_profile), selection_profile: deep_dup(selection_profile), match_profile: deep_dup(match_profile), operation_profiles: deep_dup(operation_profiles), destination_profile: deep_dup(destination_profile) } executor_profile[:metadata] = deep_dup() if executor_profile end |
.structured_edit_provider_executor_profile_envelope(executor_profile) ⇒ Object
2224 2225 2226 2227 2228 2229 2230 |
# File 'lib/ast/merge.rb', line 2224 def structured_edit_provider_executor_profile_envelope(executor_profile) { kind: "structured_edit_provider_executor_profile", version: STRUCTURED_EDIT_TRANSPORT_VERSION, executor_profile: deep_dup(executor_profile) } end |
.structured_edit_provider_executor_registry(executor_profiles:, metadata: nil) ⇒ Object
2239 2240 2241 2242 2243 2244 2245 |
# File 'lib/ast/merge.rb', line 2239 def structured_edit_provider_executor_registry(executor_profiles:, metadata: nil) executor_registry = { executor_profiles: deep_dup(executor_profiles) } executor_registry[:metadata] = deep_dup() if executor_registry end |
.structured_edit_provider_executor_registry_envelope(executor_registry) ⇒ Object
2301 2302 2303 2304 2305 2306 2307 |
# File 'lib/ast/merge.rb', line 2301 def structured_edit_provider_executor_registry_envelope(executor_registry) { kind: "structured_edit_provider_executor_registry", version: STRUCTURED_EDIT_TRANSPORT_VERSION, executor_registry: deep_dup(executor_registry) } end |
.structured_edit_provider_executor_resolution(executor_registry:, selection_policy:, selected_executor_profile:, metadata: nil) ⇒ Object
2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 |
# File 'lib/ast/merge.rb', line 2260 def structured_edit_provider_executor_resolution(executor_registry:, selection_policy:, selected_executor_profile:, metadata: nil) executor_resolution = { executor_registry: deep_dup(executor_registry), selection_policy: deep_dup(selection_policy), selected_executor_profile: deep_dup(selected_executor_profile) } executor_resolution[:metadata] = deep_dup() if executor_resolution end |
.structured_edit_provider_executor_resolution_envelope(executor_resolution) ⇒ Object
2286 2287 2288 2289 2290 2291 2292 |
# File 'lib/ast/merge.rb', line 2286 def structured_edit_provider_executor_resolution_envelope(executor_resolution) { kind: "structured_edit_provider_executor_resolution", version: STRUCTURED_EDIT_TRANSPORT_VERSION, executor_resolution: deep_dup(executor_resolution) } end |
.structured_edit_provider_executor_selection_policy(provider_family:, selection_mode:, allow_registry_fallback:, provider_backend: nil, executor_label: nil, metadata: nil) ⇒ Object
2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 |
# File 'lib/ast/merge.rb', line 2247 def structured_edit_provider_executor_selection_policy(provider_family:, selection_mode:, allow_registry_fallback:, provider_backend: nil, executor_label: nil, metadata: nil) selection_policy = { provider_family: provider_family.to_s, selection_mode: selection_mode.to_s, allow_registry_fallback: allow_registry_fallback ? true : false } selection_policy[:provider_backend] = provider_backend.to_s if provider_backend selection_policy[:executor_label] = executor_label.to_s if executor_label selection_policy[:metadata] = deep_dup() if selection_policy end |
.structured_edit_provider_executor_selection_policy_envelope(selection_policy) ⇒ Object
2271 2272 2273 2274 2275 2276 2277 |
# File 'lib/ast/merge.rb', line 2271 def structured_edit_provider_executor_selection_policy_envelope(selection_policy) { kind: "structured_edit_provider_executor_selection_policy", version: STRUCTURED_EDIT_TRANSPORT_VERSION, selection_policy: deep_dup(selection_policy) } end |
.structured_edit_request(operation_kind:, content:, source_label:, target_selector: nil, target_selector_family: nil, destination_selector: nil, destination_selector_family: nil, payload_text: nil, if_missing: nil, callable_destination: nil, target_selection: nil, target_match: nil, metadata: nil) ⇒ Object
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 |
# File 'lib/ast/merge.rb', line 969 def structured_edit_request(operation_kind:, content:, source_label:, target_selector: nil, target_selector_family: nil, destination_selector: nil, destination_selector_family: nil, payload_text: nil, if_missing: nil, callable_destination: nil, target_selection: nil, target_match: nil, metadata: nil) request = { operation_kind: operation_kind.to_s, content: content.to_s, source_label: source_label.to_s } request[:target_selector] = target_selector.to_s if target_selector request[:target_selector_family] = target_selector_family.to_s if target_selector_family request[:target_selection] = deep_dup(target_selection) if target_selection request[:target_match] = deep_dup(target_match) if target_match request[:destination_selector] = destination_selector.to_s if destination_selector request[:destination_selector_family] = destination_selector_family.to_s if destination_selector_family request[:payload_text] = payload_text.to_s unless payload_text.nil? request[:if_missing] = if_missing.to_s unless if_missing.nil? request[:callable_destination] = deep_dup(callable_destination) if callable_destination request[:metadata] = deep_dup() if request end |
.structured_edit_request_envelope(request) ⇒ Object
1030 1031 1032 1033 1034 1035 1036 |
# File 'lib/ast/merge.rb', line 1030 def structured_edit_request_envelope(request) { kind: "structured_edit_request", version: STRUCTURED_EDIT_TRANSPORT_VERSION, request: deep_dup(request) } end |
.structured_edit_result(operation_kind:, updated_content:, changed:, operation_profile:, captured_text: nil, match_count: nil, destination_profile: nil, metadata: nil) ⇒ Object
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/ast/merge.rb', line 991 def structured_edit_result(operation_kind:, updated_content:, changed:, operation_profile:, captured_text: nil, match_count: nil, destination_profile: nil, metadata: nil) result = { operation_kind: operation_kind.to_s, updated_content: updated_content.to_s, changed: changed ? true : false, operation_profile: deep_dup(operation_profile) } result[:captured_text] = captured_text.to_s unless captured_text.nil? result[:match_count] = match_count.to_i unless match_count.nil? result[:destination_profile] = deep_dup(destination_profile) if destination_profile result[:metadata] = deep_dup() if result end |
.structured_edit_selection_profile(owner_scope:, owner_selector:, selector_kind:, selection_intent:, known_selection_intent:, include_trailing_gap:, comment_anchored:, owner_selector_family: nil, selection_intent_family: nil, comment_region: nil, metadata: nil) ⇒ Object
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/ast/merge.rb', line 859 def structured_edit_selection_profile(owner_scope:, owner_selector:, selector_kind:, selection_intent:, known_selection_intent:, include_trailing_gap:, comment_anchored:, owner_selector_family: nil, selection_intent_family: nil, comment_region: nil, metadata: nil) profile = { owner_scope: owner_scope.to_s, owner_selector: owner_selector.to_s, selector_kind: selector_kind.to_s, selection_intent: selection_intent.to_s, known_selection_intent: known_selection_intent ? true : false, include_trailing_gap: include_trailing_gap ? true : false, comment_anchored: comment_anchored ? true : false } profile[:owner_selector_family] = owner_selector_family.to_s if owner_selector_family profile[:selection_intent_family] = selection_intent_family.to_s if selection_intent_family profile[:comment_region] = comment_region.nil? ? nil : comment_region.to_s profile[:metadata] = deep_dup() if profile end |
.structured_edit_structure_profile(owner_scope:, owner_selector:, known_owner_selector:, supported_comment_regions:, owner_selector_family: nil, metadata: nil) ⇒ Object
846 847 848 849 850 851 852 853 854 855 856 857 |
# File 'lib/ast/merge.rb', line 846 def structured_edit_structure_profile(owner_scope:, owner_selector:, known_owner_selector:, supported_comment_regions:, owner_selector_family: nil, metadata: nil) profile = { owner_scope: owner_scope.to_s, owner_selector: owner_selector.to_s, known_owner_selector: known_owner_selector ? true : false, supported_comment_regions: deep_dup(supported_comment_regions).map(&:to_s) } profile[:owner_selector_family] = owner_selector_family.to_s if owner_selector_family profile[:metadata] = deep_dup() if profile end |
.structured_edit_target_match(start_boundary:, end_boundary:, payload_kind:, known_start_boundary:, known_end_boundary:, known_payload_kind:, comment_anchored:, trailing_gap_extended:, start_boundary_family: nil, end_boundary_family: nil, payload_family: nil, metadata: nil) ⇒ Object
914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 |
# File 'lib/ast/merge.rb', line 914 def structured_edit_target_match(start_boundary:, end_boundary:, payload_kind:, known_start_boundary:, known_end_boundary:, known_payload_kind:, comment_anchored:, trailing_gap_extended:, start_boundary_family: nil, end_boundary_family: nil, payload_family: nil, metadata: nil) structured_edit_match_profile( start_boundary: start_boundary, end_boundary: end_boundary, payload_kind: payload_kind, known_start_boundary: known_start_boundary, known_end_boundary: known_end_boundary, known_payload_kind: known_payload_kind, comment_anchored: comment_anchored, trailing_gap_extended: trailing_gap_extended, start_boundary_family: start_boundary_family, end_boundary_family: end_boundary_family, payload_family: payload_family, metadata: ) end |
.structured_edit_target_selection(selector_kind:, selection_intent:, known_selection_intent:, include_trailing_gap:, comment_anchored:, selection_intent_family: nil, comment_region: nil, metadata: nil) ⇒ Object
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 |
# File 'lib/ast/merge.rb', line 878 def structured_edit_target_selection(selector_kind:, selection_intent:, known_selection_intent:, include_trailing_gap:, comment_anchored:, selection_intent_family: nil, comment_region: nil, metadata: nil) selection = { selector_kind: selector_kind.to_s, selection_intent: selection_intent.to_s, known_selection_intent: known_selection_intent ? true : false, include_trailing_gap: include_trailing_gap ? true : false, comment_anchored: comment_anchored ? true : false } selection[:selection_intent_family] = selection_intent_family.to_s if selection_intent_family selection[:comment_region] = comment_region.nil? ? nil : comment_region.to_s selection[:metadata] = deep_dup() if selection end |
.summarize_conformance_results(results) ⇒ Object
2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 |
# File 'lib/ast/merge.rb', line 2945 def summarize_conformance_results(results) results.each_with_object({ total: 0, passed: 0, failed: 0, skipped: 0 }) do |result, summary| summary[:total] += 1 case result[:outcome] when "passed" then summary[:passed] += 1 when "failed" then summary[:failed] += 1 when "skipped" then summary[:skipped] += 1 end end end |
.summarize_named_conformance_suite_reports(entries) ⇒ Object
3047 3048 3049 3050 3051 3052 3053 3054 3055 |
# File 'lib/ast/merge.rb', line 3047 def summarize_named_conformance_suite_reports(entries) entries.each_with_object({ total: 0, passed: 0, failed: 0, skipped: 0 }) do |entry, summary| report_summary = entry.dig(:report, :summary) || {} summary[:total] += report_summary.fetch(:total, 0) summary[:passed] += report_summary.fetch(:passed, 0) summary[:failed] += report_summary.fetch(:failed, 0) summary[:skipped] += report_summary.fetch(:skipped, 0) end end |
.summarize_projected_child_review_group_progress(groups, resolved_case_ids) ⇒ Object
2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 |
# File 'lib/ast/merge.rb', line 2485 def summarize_projected_child_review_group_progress(groups, resolved_case_ids) groups.map do |group| resolved = group[:case_ids].select { |case_id| resolved_case_ids.include?(case_id) } pending = group[:case_ids].reject { |case_id| resolved_case_ids.include?(case_id) } { delegated_apply_group: group[:delegated_apply_group], parent_operation_id: group[:parent_operation_id], child_operation_id: group[:child_operation_id], delegated_runtime_surface_path: group[:delegated_runtime_surface_path], resolved_case_ids: resolved, pending_case_ids: pending, complete: pending.empty? } end end |
.surface_owner_ref(kind:, address:) ⇒ Object
806 807 808 809 810 811 |
# File 'lib/ast/merge.rb', line 806 def surface_owner_ref(kind:, address:) { kind: kind.to_s, address: address } end |
.surface_span(start_line:, end_line:) ⇒ Object
813 814 815 816 817 818 |
# File 'lib/ast/merge.rb', line 813 def surface_span(start_line:, end_line:) { start_line: start_line, end_line: end_line } end |
.template_target_classification(path, file_type, family, dialect) ⇒ Object
3289 3290 3291 3292 3293 3294 3295 3296 |
# File 'lib/ast/merge.rb', line 3289 def template_target_classification(path, file_type, family, dialect) { destination_path: path, file_type: file_type, family: family, dialect: dialect } end |
.template_token_keys(content, config = nil) ⇒ Object
176 177 178 179 |
# File 'lib/ast/merge.rb', line 176 def template_token_keys(content, config = nil) document = Token::Resolver::Document.new(content.to_s, config: token_resolver_config(config)) document.token_keys end |
.token_resolver_config(config) ⇒ Object
754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/ast/merge.rb', line 754 def token_resolver_config(config) normalized = default_template_token_config.merge(normalize_value(config || {})) Token::Resolver::Config.new( pre: normalized[:pre], post: normalized[:post], separators: normalized[:separators], min_segments: normalized[:min_segments], max_segments: normalized[:max_segments], segment_pattern: normalized[:segment_pattern] ) end |
.unresolved_template_token_keys(content, replacements = {}, config = nil) ⇒ Object
181 182 183 184 |
# File 'lib/ast/merge.rb', line 181 def unresolved_template_token_keys(content, replacements = {}, config = nil) replacement_keys = normalize_template_replacements(replacements) template_token_keys(content, config).reject { |key| replacement_keys.key?(key) } end |
.write_relative_file_tree(root, files) ⇒ Object
529 530 531 532 533 534 535 536 537 538 |
# File 'lib/ast/merge.rb', line 529 def write_relative_file_tree(root, files) root = Pathname(root). root.mkpath files.keys.sort.each do |relative_path| path = root.join(*relative_path.split("/")) path.dirname.mkpath path.write(files.fetch(relative_path)) end end |