phronomy 0.27.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.mutant.yml +9 -9
- data/CHANGELOG.md +52 -0
- data/CONTRIBUTING.md +8 -8
- data/README.md +28 -7
- data/benchmark/bench_agent_invoke.rb +25 -50
- data/benchmark/bench_context_assembler.rb +14 -11
- data/benchmark/bench_regression.rb +1 -1
- data/benchmark/bench_tool_schema.rb +1 -1
- data/docs/application-recipes.md +229 -0
- data/docs/architecture/agent-chat-and-state-ownership.md +7 -1
- data/docs/architecture/agent-transition-ownership.md +13 -89
- data/docs/architecture/backend-groups.md +152 -0
- data/docs/architecture/before-llm-input.md +3 -3
- data/docs/architecture/context-management.md +1 -1
- data/docs/architecture/dx05-agent-scope.md +119 -0
- data/docs/architecture/dx05-workflow-task-state.md +134 -0
- data/docs/architecture/error-api-review.md +245 -0
- data/docs/architecture/execution-abstraction-review.md +88 -0
- data/docs/architecture/execution-boundaries.md +28 -0
- data/docs/architecture/execution-metadata-and-values.md +6 -0
- data/docs/architecture/multi-agent-handoff.md +6 -5
- data/docs/architecture/persistence.md +27 -9
- data/docs/architecture/r8-unit1.md +104 -0
- data/docs/architecture/r8-unit10.md +72 -0
- data/docs/architecture/r8-unit11.md +71 -0
- data/docs/architecture/r8-unit12.md +67 -0
- data/docs/architecture/r8-unit13.md +61 -0
- data/docs/architecture/r8-unit14.md +72 -0
- data/docs/architecture/r8-unit15.md +65 -0
- data/docs/architecture/r8-unit16.md +54 -0
- data/docs/architecture/r8-unit17.md +73 -0
- data/docs/architecture/r8-unit18.md +92 -0
- data/docs/architecture/r8-unit19.md +61 -0
- data/docs/architecture/r8-unit2.md +55 -0
- data/docs/architecture/r8-unit20.md +51 -0
- data/docs/architecture/r8-unit21.md +79 -0
- data/docs/architecture/r8-unit22.md +74 -0
- data/docs/architecture/r8-unit23.md +81 -0
- data/docs/architecture/r8-unit3.md +130 -0
- data/docs/architecture/r8-unit4.md +79 -0
- data/docs/architecture/r8-unit5.md +115 -0
- data/docs/architecture/r8-unit6.md +71 -0
- data/docs/architecture/r8-unit7.md +70 -0
- data/docs/architecture/r8-unit8.md +78 -0
- data/docs/architecture/r8-unit9.md +73 -0
- data/docs/architecture/refactoring-closure.md +10 -1
- data/docs/architecture/remaining-refactoring-plan.md +16 -0
- data/docs/architecture/storage-execution-boundaries.md +54 -0
- data/docs/architecture/tool-schema-recording-gap.md +6 -0
- data/docs/architecture/tracing.md +1 -1
- data/docs/architecture/workflow-terminal-ownership-design.md +2 -2
- data/docs/architecture.md +24 -11
- data/docs/decisions/015-tool-public-facade-and-rbs-boundary.md +3 -3
- data/docs/decisions/027-llm-adapter-provider-boundary.md +2 -0
- data/docs/decisions/030-agent-handoff-domain-and-durable-responsibility.md +2 -0
- data/docs/decisions/031-durable-multi-agent-coordination.md +2 -0
- data/docs/decisions/032-storage-backend-composition.md +5 -0
- data/docs/decisions/034-handoff-runner-coordination-ownership.md +2 -0
- data/docs/decisions/035-tool-executor-capability-ownership.md +1 -1
- data/docs/decisions/038-responsibility-based-source-layout.md +14 -0
- data/docs/decisions/039-runtime-configuration-lifecycle-ownership.md +8 -0
- data/docs/decisions/040-configuration-default-composition.md +12 -1
- data/docs/decisions/045-worker-input-restriction-ownership.md +4 -0
- data/docs/decisions/051-execution-outcome-worker-ownership.md +2 -0
- data/docs/decisions/056-workflow-terminal-policy-ownership.md +1 -1
- data/docs/decisions/058-neutral-storage-primitives.md +5 -0
- data/docs/decisions/059-backend-contracts-and-async-clients.md +74 -0
- data/docs/decisions/060-runtime-settings-and-application-configuration.md +86 -0
- data/docs/decisions/061-persistence-failure-contracts.md +89 -0
- data/docs/decisions/062-content-store-service.md +52 -0
- data/docs/decisions/063-execution-contracts-and-services.md +88 -0
- data/docs/decisions/064-agent-execution-and-multi-agent-responsibility.md +36 -0
- data/docs/decisions/065-vector-and-embeddings-common-operations.md +38 -0
- data/docs/decisions/066-llm-and-tool-operation-contracts.md +20 -0
- data/docs/decisions/067-agent-progress-and-engine-connection.md +29 -0
- data/docs/decisions/068-agent-tool-child-progress-and-tool-operation.md +36 -0
- data/docs/decisions/README.md +18 -1
- data/docs/execution-boundaries-preview.md +45 -0
- data/docs/failure-reason-codes.md +45 -0
- data/docs/features.md +12 -4
- data/docs/getting-started.md +52 -48
- data/docs/migrations/0.22.md +2 -2
- data/docs/migrations/durable-semantic-coordination-v2.md +2 -0
- data/docs/migrations/handoff-runner-multi-agent.md +2 -0
- data/docs/migrations/persistence-failure-contracts.md +67 -0
- data/docs/migrations/r8-unit10.md +36 -0
- data/docs/migrations/r8-unit11.md +33 -0
- data/docs/migrations/r8-unit12.md +31 -0
- data/docs/migrations/r8-unit13.md +36 -0
- data/docs/migrations/r8-unit14.md +31 -0
- data/docs/migrations/r8-unit15.md +31 -0
- data/docs/migrations/r8-unit16.md +26 -0
- data/docs/migrations/r8-unit17.md +28 -0
- data/docs/migrations/r8-unit18.md +29 -0
- data/docs/migrations/r8-unit19.md +28 -0
- data/docs/migrations/r8-unit20.md +24 -0
- data/docs/migrations/r8-unit21.md +28 -0
- data/docs/migrations/r8-unit22.md +29 -0
- data/docs/migrations/r8-unit23.md +20 -0
- data/docs/migrations/r8-unit4.md +67 -0
- data/docs/migrations/r8-unit5.md +75 -0
- data/docs/migrations/r8-unit6.md +109 -0
- data/docs/migrations/r8-unit7.md +31 -0
- data/docs/migrations/r8-unit8.md +33 -0
- data/docs/migrations/r8-unit9.md +28 -0
- data/docs/migrations/storage-async-client.md +103 -0
- data/docs/migrations/vector-async-clients.md +110 -0
- data/docs/ordered-event-delivery.md +54 -0
- data/docs/persistence-backends.md +38 -21
- data/docs/runtime-and-concurrency.md +26 -1
- data/docs/workflow-completion.md +92 -0
- data/gemfiles/http_minimum.gemfile +5 -0
- data/lib/phronomy/agent/admission.rb +78 -0
- data/lib/phronomy/agent/{lifecycle_contract/agent_already_exists_error.rb → agent_already_exists_error.rb} +1 -1
- data/lib/phronomy/agent/{lifecycle_contract/agent_busy_error.rb → agent_busy_error.rb} +1 -1
- data/lib/phronomy/agent/agent_not_found_error.rb +16 -0
- data/lib/phronomy/agent/{lifecycle_contract/agent_purged_error.rb → agent_purged_error.rb} +1 -1
- data/lib/phronomy/agent/agent_unloaded_error.rb +14 -0
- data/lib/phronomy/agent/api/agent.rb +13 -0
- data/lib/phronomy/{recovery → agent/api}/execution_rehydration_required_error.rb +1 -1
- data/lib/phronomy/agent/async_event_api.rb +132 -103
- data/lib/phronomy/agent/base.rb +146 -113
- data/lib/phronomy/agent/before_llm_input.rb +70 -0
- data/lib/phronomy/agent/composition/run_once.rb +1 -1
- data/lib/phronomy/agent/{context_assembly/context_candidate_resolver.rb → context_candidate_resolver.rb} +2 -2
- data/lib/phronomy/agent/{context_assembly/context_assembler.rb → context_preparation.rb} +35 -221
- data/lib/phronomy/agent/control_request.rb +21 -0
- data/lib/phronomy/agent/execution/agent_execution.rb +1 -1
- data/lib/phronomy/agent/execution/agent_invocation.rb +27 -53
- data/lib/phronomy/agent/execution/approval_resume_commit.rb +1 -1
- data/lib/phronomy/agent/execution/dispatch_preparation.rb +17 -127
- data/lib/phronomy/agent/execution/exact_execution.rb +55 -32
- data/lib/phronomy/agent/execution/execution_cancellation.rb +8 -4
- data/lib/phronomy/agent/execution/execution_coordinator.rb +229 -407
- data/lib/phronomy/agent/execution/execution_metadata.rb +1 -0
- data/lib/phronomy/agent/execution/execution_outcome_committer.rb +71 -127
- data/lib/phronomy/agent/execution/execution_registry.rb +6 -2
- data/lib/phronomy/agent/execution/execution_session_runner.rb +22 -27
- data/lib/phronomy/agent/execution/initial_preparation.rb +19 -120
- data/lib/phronomy/agent/execution/{agent_invocation_session_builder.rb → invocation_actions.rb} +54 -194
- data/lib/phronomy/agent/execution/invocation_transitions.rb +39 -1
- data/lib/phronomy/agent/execution/runtime_record_encoder.rb +8 -11
- data/lib/phronomy/agent/execution_change.rb +161 -0
- data/lib/phronomy/agent/execution_environment.rb +36 -0
- data/lib/phronomy/agent/execution_extension_state.rb +21 -0
- data/lib/phronomy/agent/execution_observation.rb +35 -0
- data/lib/phronomy/agent/filterable.rb +188 -0
- data/lib/phronomy/agent/handoff/{handoff_context.rb → transfer_context.rb} +4 -4
- data/lib/phronomy/agent/handoff/{handoff_projection.rb → transfer_projection.rb} +14 -33
- data/lib/phronomy/{llm_contract/transport_error.rb → agent/handoff_error.rb} +1 -1
- data/lib/phronomy/agent/journal/journal_projection.rb +1 -1
- data/lib/phronomy/agent/knowledge_item.rb +13 -0
- data/lib/phronomy/agent/lifecycle/agent_root.rb +1 -1
- data/lib/phronomy/agent/lifecycle/lifetime_api.rb +76 -0
- data/lib/phronomy/agent/lifecycle/operation_lease.rb +33 -0
- data/lib/phronomy/agent/lifecycle/operation_result.rb +53 -0
- data/lib/phronomy/agent/lifecycle/ownership_registry.rb +117 -31
- data/lib/phronomy/agent/lifecycle/scope.rb +198 -0
- data/lib/phronomy/agent/lifecycle/scope_cleanup_error.rb +19 -0
- data/lib/phronomy/agent/lifecycle/unload_transition.rb +78 -0
- data/lib/phronomy/agent/persistence/agent_repository.rb +29 -21
- data/lib/phronomy/agent/persistence/cancellation_repository.rb +51 -0
- data/lib/phronomy/agent/persistence/codec.rb +1 -21
- data/lib/phronomy/agent/persistence/execution_repository.rb +57 -41
- data/lib/phronomy/agent/persistence/journal_repository.rb +27 -18
- data/lib/phronomy/agent/persistence/records.rb +33 -0
- data/lib/phronomy/agent/persistence/retention_repository.rb +70 -0
- data/lib/phronomy/agent/persistence/storage_schema.rb +7 -2
- data/lib/phronomy/agent/persistence/watermark.rb +13 -11
- data/lib/phronomy/agent/recovery/invocation_restorer.rb +13 -21
- data/lib/phronomy/agent/recovery/recovery_coordinator/continuation.rb +13 -12
- data/lib/phronomy/agent/recovery/recovery_coordinator/installation.rb +34 -34
- data/lib/phronomy/agent/recovery/recovery_coordinator/resolution.rb +33 -39
- data/lib/phronomy/agent/recovery/recovery_coordinator.rb +28 -25
- data/lib/phronomy/agent/recovery/recovery_rules.rb +119 -0
- data/lib/phronomy/agent/recovery/recovery_support.rb +10 -19
- data/lib/phronomy/agent/reserved_execution.rb +16 -0
- data/lib/phronomy/agent/retention.rb +17 -0
- data/lib/phronomy/agent/runtime_binding/engine_environment.rb +60 -0
- data/lib/phronomy/agent/runtime_binding/engine_session_builder.rb +34 -0
- data/lib/phronomy/agent/runtime_binding/phase_machine_builder.rb +64 -0
- data/lib/phronomy/agent/runtime_binding/tool_session_builder.rb +34 -0
- data/lib/phronomy/agent/{context_assembly/ruby_llm_materializer.rb → runtime_input.rb} +18 -35
- data/lib/phronomy/agent/{context_assembly/saved_context_reader.rb → saved_context_reader.rb} +6 -4
- data/lib/phronomy/agent/settings.rb +47 -0
- data/lib/phronomy/agent/{context_assembly/state_writer.rb → state_writer.rb} +4 -3
- data/lib/phronomy/agent/store.rb +253 -0
- data/lib/phronomy/agent/{lifecycle_contract/stream_callback_error.rb → stream_callback_error.rb} +3 -3
- data/lib/phronomy/agent/tool_execution/tool_binding.rb +4 -64
- data/lib/phronomy/agent/tool_execution/tool_invocation.rb +50 -219
- data/lib/phronomy/agent/tool_execution/tool_invocation_actions.rb +107 -0
- data/lib/phronomy/agent/tool_execution/tool_invocation_transitions.rb +70 -0
- data/lib/phronomy/common/error.rb +65 -1
- data/lib/phronomy/configuration/runtime_settings.rb +49 -0
- data/lib/phronomy/content_store/base.rb +7 -2
- data/lib/phronomy/content_store/storage_schema.rb +1 -0
- data/lib/phronomy/content_store/stored_contents.rb +2 -1
- data/lib/phronomy/context/assembly.rb +195 -0
- data/lib/phronomy/{llm_contract/context_budget_exceeded_error.rb → context/budget_exceeded_error.rb} +3 -1
- data/lib/phronomy/context/candidate.rb +51 -0
- data/lib/phronomy/context/constraint.rb +47 -0
- data/lib/phronomy/{agent/context_contract → context}/context_plan.rb +1 -1
- data/lib/phronomy/{agent/context_contract → context}/context_plan_validator.rb +3 -3
- data/lib/phronomy/{agent/context_contract → context}/context_policy.rb +1 -1
- data/lib/phronomy/{agent/context_contract → context}/context_policy_input.rb +1 -1
- data/lib/phronomy/{agent/context_assembly → context}/context_policy_input_builder.rb +1 -1
- data/lib/phronomy/context/default_policy.rb +140 -0
- data/lib/phronomy/context/final_budget_validator.rb +33 -0
- data/lib/phronomy/{agent/context_contract → context}/llm_input_build_context.rb +1 -1
- data/lib/phronomy/{agent/context_contract → context}/llm_input_manifest.rb +19 -19
- data/lib/phronomy/{agent/context_contract → context}/llm_input_patch.rb +1 -1
- data/lib/phronomy/context/manifest_error.rb +10 -0
- data/lib/phronomy/context/prompt_template.rb +98 -0
- data/lib/phronomy/{vector_store → documents}/loader/base.rb +1 -1
- data/lib/phronomy/{vector_store → documents}/loader/csv_loader.rb +2 -2
- data/lib/phronomy/{vector_store → documents}/loader/markdown_loader.rb +3 -3
- data/lib/phronomy/{vector_store → documents}/loader/plain_text_loader.rb +2 -2
- data/lib/phronomy/{vector_store → documents}/splitter/base.rb +1 -1
- data/lib/phronomy/{vector_store → documents}/splitter/fixed_size_splitter.rb +2 -2
- data/lib/phronomy/{vector_store → documents}/splitter/recursive_splitter.rb +2 -2
- data/lib/phronomy/embeddings/async/async_client.rb +44 -0
- data/lib/phronomy/embeddings/authentication_error.rb +11 -0
- data/lib/phronomy/embeddings/backends/ruby_llm_embeddings.rb +52 -0
- data/lib/phronomy/embeddings/base.rb +43 -0
- data/lib/phronomy/embeddings/invalid_result_error.rb +11 -0
- data/lib/phronomy/embeddings/rate_limit_error.rb +11 -0
- data/lib/phronomy/embeddings/transport_error.rb +11 -0
- data/lib/phronomy/engine/concurrency/offload_pool.rb +36 -21
- data/lib/phronomy/engine/concurrency/pool_registry.rb +47 -12
- data/lib/phronomy/engine/diagnostics.rb +1 -1
- data/lib/phronomy/engine/event_loop.rb +7 -7
- data/lib/phronomy/engine/execution_binding.rb +23 -0
- data/lib/phronomy/engine/execution_receiver_binding.rb +43 -0
- data/lib/phronomy/engine/fsm_protocol.rb +1 -6
- data/lib/phronomy/engine/fsm_session.rb +3 -3
- data/lib/phronomy/engine/metrics.rb +16 -14
- data/lib/phronomy/engine/runtime/timer_queue.rb +1 -1
- data/lib/phronomy/engine/runtime.rb +25 -12
- data/lib/phronomy/engine/terminal_decision.rb +7 -0
- data/lib/phronomy/execution/async_operation.rb +41 -0
- data/lib/phronomy/{engine → execution}/blocking.rb +2 -2
- data/lib/phronomy/{engine → execution}/concurrency/cancellation_token.rb +1 -1
- data/lib/phronomy/{engine → execution}/concurrency/deadline.rb +0 -17
- data/lib/phronomy/{engine → execution}/concurrency/physical_completion_task.rb +1 -1
- data/lib/phronomy/{engine → execution}/concurrency/result_collector.rb +1 -1
- data/lib/phronomy/{engine → execution}/concurrency/result_composition.rb +33 -12
- data/lib/phronomy/{engine/concurrency/subscriptions.rb → execution/concurrency/result_subscriptions.rb} +14 -18
- data/lib/phronomy/execution/concurrency/subscriptions.rb +25 -0
- data/lib/phronomy/{engine → execution}/execution.rb +61 -27
- data/lib/phronomy/{engine → execution}/execution_cancellation_error.rb +2 -2
- data/lib/phronomy/execution/execution_receiver.rb +78 -0
- data/lib/phronomy/execution/execution_scope_state.rb +35 -0
- data/lib/phronomy/{engine → execution}/execution_timeout_error.rb +2 -2
- data/lib/phronomy/{engine → execution}/invocation_context.rb +0 -15
- data/lib/phronomy/execution/invocation_controls.rb +73 -0
- data/lib/phronomy/execution/runnable.rb +24 -0
- data/lib/phronomy/{engine → execution}/task_result.rb +9 -4
- data/lib/phronomy/execution/wait_policy.rb +24 -0
- data/lib/phronomy/filter/{contract/filter_block_error.rb → filter_block_error.rb} +3 -3
- data/lib/phronomy/generation/generator_verifier/agent_operation.rb +65 -0
- data/lib/phronomy/generation/generator_verifier/default_parser.rb +27 -0
- data/lib/phronomy/generation/generator_verifier/workflow_builder.rb +2 -2
- data/lib/phronomy/generation/generator_verifier.rb +7 -7
- data/lib/phronomy/generation/low_confidence_error.rb +2 -2
- data/lib/phronomy/integrations/ordered_event_delivery.rb +208 -0
- data/lib/phronomy/llm_adapter/async/async_client.rb +47 -0
- data/lib/phronomy/{llm_contract → llm_adapter}/authentication_error.rb +3 -1
- data/lib/phronomy/llm_adapter/backends/ruby_llm.rb +183 -0
- data/lib/phronomy/llm_adapter/base.rb +49 -68
- data/lib/phronomy/{llm_contract → llm_adapter}/context_length_error.rb +3 -1
- data/lib/phronomy/llm_adapter/invalid_result_error.rb +10 -0
- data/lib/phronomy/llm_adapter/message.rb +62 -0
- data/lib/phronomy/{llm_contract → llm_adapter}/rate_limit_error.rb +3 -1
- data/lib/phronomy/llm_adapter/request.rb +79 -0
- data/lib/phronomy/llm_adapter/response.rb +36 -0
- data/lib/phronomy/llm_adapter/stream_chunk.rb +18 -0
- data/lib/phronomy/llm_adapter/token_usage.rb +64 -0
- data/lib/phronomy/llm_adapter/transport_error.rb +9 -0
- data/lib/phronomy/llm_adapter.rb +3 -16
- data/lib/phronomy/multi_agent/admission_registry.rb +1 -8
- data/lib/phronomy/multi_agent/durable_subagent_coordinator.rb +108 -84
- data/lib/phronomy/multi_agent/execution_environment.rb +29 -0
- data/lib/phronomy/{agent/handoff → multi_agent}/handoff.rb +2 -2
- data/lib/phronomy/{agent/handoff → multi_agent}/handoff_capability_factory.rb +21 -2
- data/lib/phronomy/multi_agent/handoff_participant.rb +79 -0
- data/lib/phronomy/{agent/handoff → multi_agent}/handoff_policy.rb +1 -1
- data/lib/phronomy/multi_agent/handoff_runner.rb +77 -100
- data/lib/phronomy/{agent/handoff → multi_agent}/handoff_state.rb +1 -1
- data/lib/phronomy/multi_agent/orchestrator.rb +61 -75
- data/lib/phronomy/multi_agent/persistence/codec.rb +20 -0
- data/lib/phronomy/multi_agent/persistence/handoff_state_repository.rb +77 -0
- data/lib/phronomy/multi_agent/persistence/records.rb +27 -0
- data/lib/phronomy/multi_agent/persistence/storage_schema.rb +21 -0
- data/lib/phronomy/multi_agent/persistence/team_execution_repository.rb +60 -44
- data/lib/phronomy/multi_agent/persistence/team_repository.rb +29 -21
- data/lib/phronomy/multi_agent/reserved_child_admission.rb +88 -0
- data/lib/phronomy/multi_agent/runtime_binding/engine_environment.rb +35 -0
- data/lib/phronomy/multi_agent/shared_state.rb +2 -2
- data/lib/phronomy/multi_agent/store.rb +156 -0
- data/lib/phronomy/multi_agent/team_busy_error.rb +18 -0
- data/lib/phronomy/multi_agent/team_coordinator.rb +99 -77
- data/lib/phronomy/multi_agent/team_not_found_error.rb +18 -0
- data/lib/phronomy/multi_agent/team_ownership_registry.rb +2 -12
- data/lib/phronomy/output_parser/parse_error.rb +7 -0
- data/lib/phronomy/persistence/content_repository.rb +26 -0
- data/lib/phronomy/persistence/errors.rb +16 -0
- data/lib/phronomy/persistence/migration/initial_format_migration.rb +2 -2
- data/lib/phronomy/persistence/persistence.rb +23 -0
- data/lib/phronomy/persistence/save_outcome.rb +24 -0
- data/lib/phronomy/persistence/snapshot_comparison.rb +81 -0
- data/lib/phronomy/persistence/storage_boundary.rb +32 -0
- data/lib/phronomy/persistence/transaction.rb +86 -0
- data/lib/phronomy/persistence_composition/storage_schema.rb +9 -4
- data/lib/phronomy/persistence_composition/stores.rb +34 -0
- data/lib/phronomy/persistence_composition/unit4_migration.rb +276 -0
- data/lib/phronomy/runtime_composition/agent_defaults.rb +5 -1
- data/lib/phronomy/runtime_composition/configuration.rb +146 -0
- data/lib/phronomy/runtime_composition/evaluation_defaults.rb +7 -0
- data/lib/phronomy/runtime_composition/execution_defaults.rb +5 -0
- data/lib/phronomy/runtime_composition/generation_defaults.rb +6 -0
- data/lib/phronomy/runtime_composition/global_configuration.rb +38 -0
- data/lib/phronomy/runtime_composition/multi_agent_defaults.rb +9 -0
- data/lib/phronomy/runtime_composition/workflow_defaults.rb +4 -0
- data/lib/phronomy/storage/async/async_client.rb +60 -0
- data/lib/phronomy/storage/backend.rb +8 -2
- data/lib/phronomy/storage/condition_failed_error.rb +2 -2
- data/lib/phronomy/storage/unique_constraint_error.rb +2 -2
- data/lib/phronomy/testing/eval/metrics.rb +1 -1
- data/lib/phronomy/testing/eval/scorer/llm_judge.rb +19 -3
- data/lib/phronomy/testing/persistence_contract/a_content_store.rb +2 -2
- data/lib/phronomy/testing/persistence_contract/a_journal_repository.rb +6 -6
- data/lib/phronomy/testing/persistence_contract/a_persistence_backend.rb +55 -52
- data/lib/phronomy/testing/persistence_contract/a_workflow_state_repository.rb +3 -3
- data/lib/phronomy/testing/persistence_contract/an_agent_repository.rb +7 -7
- data/lib/phronomy/testing/persistence_contract/an_execution_repository.rb +11 -11
- data/lib/phronomy/testing/persistence_contract/coordination_repositories.rb +57 -51
- data/lib/phronomy/testing/persistence_contract/neutral_storage_primitives.rb +1 -1
- data/lib/phronomy/testing/persistence_contract/storage_transaction_boundaries.rb +23 -22
- data/lib/phronomy/tool/authorization.rb +77 -0
- data/lib/phronomy/tool/base.rb +551 -9
- data/lib/phronomy/tool/call_request.rb +40 -0
- data/lib/phronomy/{agent/tool_execution/tool_definition_set.rb → tool/definition_set.rb} +7 -8
- data/lib/phronomy/tool/operation.rb +88 -0
- data/lib/phronomy/tool/schema.rb +214 -0
- data/lib/phronomy/tool/settings.rb +31 -0
- data/lib/phronomy/tool/tool_error.rb +7 -0
- data/lib/phronomy/tool/tool_executor.rb +58 -0
- data/lib/phronomy/tools/agent.rb +22 -90
- data/lib/phronomy/tools/mcp.rb +21 -14
- data/lib/phronomy/tools/vector_search.rb +4 -4
- data/lib/phronomy/tracing/automatic.rb +11 -6
- data/lib/phronomy/tracing/base.rb +36 -7
- data/lib/phronomy/tracing/observation.rb +37 -0
- data/lib/phronomy/tracing/open_telemetry_tracer.rb +4 -29
- data/lib/phronomy/tracing/settings.rb +36 -0
- data/lib/phronomy/vector_store/{async_backend.rb → async/async_client.rb} +35 -29
- data/lib/phronomy/vector_store/{in_memory.rb → backends/in_memory.rb} +12 -10
- data/lib/phronomy/vector_store/{pgvector.rb → backends/pgvector.rb} +44 -16
- data/lib/phronomy/vector_store/{redis_search.rb → backends/redis_search.rb} +74 -37
- data/lib/phronomy/vector_store/base.rb +118 -49
- data/lib/phronomy/vector_store/invalid_result_error.rb +12 -0
- data/lib/phronomy/vector_store.rb +2 -17
- data/lib/phronomy/version.rb +1 -1
- data/lib/phronomy/workflow/completion.rb +11 -0
- data/lib/phronomy/workflow/execution/workflow.rb +37 -9
- data/lib/phronomy/workflow/execution/workflow_action_rules.rb +67 -0
- data/lib/phronomy/workflow/execution/workflow_context.rb +2 -2
- data/lib/phronomy/workflow/execution/workflow_execution_environment.rb +28 -0
- data/lib/phronomy/workflow/execution/workflow_execution_registry.rb +77 -8
- data/lib/phronomy/workflow/execution/workflow_runner.rb +105 -92
- data/lib/phronomy/workflow/execution/workflow_settings.rb +28 -0
- data/lib/phronomy/workflow/execution/workflow_task_execution.rb +153 -0
- data/lib/phronomy/workflow/execution/workflow_task_reception.rb +72 -0
- data/lib/phronomy/workflow/execution/workflow_task_resume_error.rb +14 -0
- data/lib/phronomy/workflow/persistence/state_repository.rb +28 -22
- data/lib/phronomy/workflow/persistence/storage_schema.rb +13 -0
- data/lib/phronomy/workflow/runtime_binding/workflow_engine_environment.rb +61 -0
- data/lib/phronomy/workflow/runtime_binding/workflow_phase_machine_builder.rb +158 -0
- data/lib/phronomy/workflow/runtime_binding/workflow_task_session.rb +76 -0
- data/lib/phronomy/workflow/{execution → runtime_binding}/workflow_terminal_policy.rb +4 -4
- data/lib/phronomy.rb +63 -16
- data/scripts/api_snapshot.rb +47 -15
- data/scripts/check_readme_ruby.rb +24 -29
- data/scripts/check_readme_runnable.rb +92 -81
- data/sig/_private/phronomy/agent/settings.rbs +19 -0
- data/sig/_private/phronomy/configuration/runtime_settings.rbs +20 -0
- data/sig/_private/phronomy/llm_adapter/async/async_client.rbs +10 -0
- data/sig/_private/phronomy/multi_agent/store.rbs +8 -0
- data/sig/_private/phronomy/persistence/storage_boundary.rbs +7 -0
- data/sig/_private/phronomy/tool/settings.rbs +13 -0
- data/sig/_private/phronomy/tracing/settings.rbs +15 -0
- data/sig/_private/phronomy/workflow/execution/workflow_settings.rbs +13 -0
- data/sig/phronomy/agent/admission.rbs +19 -0
- data/sig/phronomy/agent/agent_not_found_error.rbs +6 -0
- data/sig/phronomy/agent/agent_unloaded_error.rbs +6 -0
- data/sig/phronomy/agent/execution_contract.rbs +132 -0
- data/sig/phronomy/agent/execution_environment.rbs +20 -0
- data/sig/phronomy/agent/store.rbs +73 -0
- data/sig/phronomy/agent/stream_callback_error.rbs +8 -0
- data/sig/phronomy/agent.rbs +29 -135
- data/sig/phronomy/common.rbs +7 -0
- data/sig/phronomy/content_store/contracts.rbs +13 -0
- data/sig/phronomy/context.rbs +152 -0
- data/sig/phronomy/embeddings/async/async_client.rbs +9 -0
- data/sig/phronomy/embeddings/base.rbs +23 -0
- data/sig/phronomy/engine/concurrency/timer_bindings.rbs +22 -0
- data/sig/phronomy/engine/control_bindings.rbs +11 -0
- data/sig/phronomy/engine/control_protocols.rbs +23 -0
- data/sig/phronomy/engine/execution_binding.rbs +6 -0
- data/sig/phronomy/engine/execution_receiver.rbs +15 -0
- data/sig/phronomy/engine/observability.rbs +13 -0
- data/sig/phronomy/execution/async_operation.rbs +7 -0
- data/sig/phronomy/execution/blocking.rbs +5 -0
- data/sig/phronomy/execution/concurrency/cancellation_token.rbs +13 -0
- data/sig/phronomy/execution/concurrency/deadline.rbs +10 -0
- data/sig/phronomy/execution/concurrency/result_composition.rbs +7 -0
- data/sig/phronomy/execution/control_protocols.rbs +18 -0
- data/sig/phronomy/execution/errors.rbs +7 -0
- data/sig/phronomy/execution/execution.rbs +41 -0
- data/sig/phronomy/execution/execution_receiver.rbs +40 -0
- data/sig/phronomy/execution/execution_scope_state.rbs +9 -0
- data/sig/phronomy/execution/invocation_context.rbs +18 -0
- data/sig/phronomy/execution/invocation_controls.rbs +13 -0
- data/sig/phronomy/execution/task_result.rbs +29 -0
- data/sig/phronomy/extensions.rbs +1 -21
- data/sig/phronomy/filter/filter_block_error.rbs +6 -0
- data/sig/phronomy/generation/low_confidence_error.rbs +6 -0
- data/sig/phronomy/handoff.rbs +10 -4
- data/sig/phronomy/integrations.rbs +14 -0
- data/sig/phronomy/llm_adapter/backends/ruby_llm.rbs +6 -0
- data/sig/phronomy/llm_adapter/base.rbs +14 -0
- data/sig/phronomy/llm_adapter/usage.rbs +14 -0
- data/sig/phronomy/llm_adapter/values.rbs +43 -0
- data/sig/phronomy/llm_context_window.rbs +10 -0
- data/sig/phronomy/multi_agent/reserved_child_admission.rbs +8 -0
- data/sig/phronomy/multi_agent/store.rbs +54 -0
- data/sig/phronomy/multi_agent/team_busy_error.rbs +8 -0
- data/sig/phronomy/multi_agent/team_not_found_error.rbs +8 -0
- data/sig/phronomy/multi_agent.rbs +6 -3
- data/sig/phronomy/persistence/errors.rbs +18 -0
- data/sig/phronomy/persistence/migration.rbs +13 -0
- data/sig/phronomy/persistence/transaction.rbs +19 -0
- data/sig/phronomy/persistence.rbs +1 -99
- data/sig/phronomy/persistence_composition.rbs +19 -0
- data/sig/phronomy/runtime_composition/configuration.rbs +36 -0
- data/sig/phronomy/storage/async/async_client.rbs +8 -0
- data/sig/phronomy/storage/backends/in_memory.rbs +9 -0
- data/sig/phronomy/{storage.rbs → storage/contracts.rbs} +4 -18
- data/sig/phronomy/tool.rbs +48 -4
- data/sig/phronomy/tracing/observation.rbs +7 -0
- data/sig/phronomy/vector_store/async/async_client.rbs +13 -0
- data/sig/phronomy/vector_store/base.rbs +23 -0
- data/sig/phronomy/workflow/execution/workflow_execution_environment.rbs +15 -0
- data/sig/phronomy/workflow/runtime_binding/workflow_terminal_policy.rbs +7 -0
- data/sig/phronomy/workflow/store.rbs +8 -0
- data/sig/phronomy/workflow.rbs +5 -1
- data/sig/phronomy.rbs +4 -49
- metadata +365 -117
- data/lib/phronomy/agent/concerns/before_llm_input.rb +0 -66
- data/lib/phronomy/agent/concerns/error_translation.rb +0 -45
- data/lib/phronomy/agent/concerns/filterable.rb +0 -184
- data/lib/phronomy/agent/context/capability/base.rb +0 -548
- data/lib/phronomy/agent/context/capability/tool_executor.rb +0 -62
- data/lib/phronomy/agent/context/instruction/prompt_template.rb +0 -102
- data/lib/phronomy/agent/context_assembly/runtime_chat_builder.rb +0 -36
- data/lib/phronomy/agent/context_assembly/token_budget_resolver.rb +0 -22
- data/lib/phronomy/agent/context_parts/validators/final_budget_validator.rb +0 -37
- data/lib/phronomy/agent/context_policies/default.rb +0 -142
- data/lib/phronomy/agent/execution/phase_machine_builder.rb +0 -101
- data/lib/phronomy/agent/execution/provider_call_outcome.rb +0 -106
- data/lib/phronomy/agent/handoff/handoff_execution_coordinator.rb +0 -15
- data/lib/phronomy/agent/handoff/handoff_outcome_committer.rb +0 -131
- data/lib/phronomy/agent/handoff/handoff_request.rb +0 -45
- data/lib/phronomy/agent/lifecycle_contract/handoff_error.rb +0 -7
- data/lib/phronomy/agent/persistence/handoff_state_repository.rb +0 -58
- data/lib/phronomy/agent/persistence/queries.rb +0 -61
- data/lib/phronomy/agent/selection/candidate.rb +0 -53
- data/lib/phronomy/agent/selection/constraint.rb +0 -49
- data/lib/phronomy/agent/tool_execution/tool_call_intercepted.rb +0 -29
- data/lib/phronomy/agent/tool_execution/tool_invocation_session_builder.rb +0 -276
- data/lib/phronomy/configuration/configuration.rb +0 -68
- data/lib/phronomy/configuration/global_configuration.rb +0 -26
- data/lib/phronomy/engine/concurrency/cancellation_scope.rb +0 -124
- data/lib/phronomy/engine/concurrency/operation_binding.rb +0 -43
- data/lib/phronomy/engine/execution_receiver.rb +0 -65
- data/lib/phronomy/engine/runnable.rb +0 -54
- data/lib/phronomy/llm_adapter/ruby_llm.rb +0 -47
- data/lib/phronomy/llm_contract/token_usage.rb +0 -85
- data/lib/phronomy/multi_agent/persistence/queries.rb +0 -30
- data/lib/phronomy/multi_agent/storage_contract/team_storage_schema.rb +0 -15
- data/lib/phronomy/output_parser/contract/parse_error.rb +0 -7
- data/lib/phronomy/persistence/api/persistence.rb +0 -140
- data/lib/phronomy/persistence_composition/repositories.rb +0 -77
- data/lib/phronomy/recovery/recovery.rb +0 -186
- data/lib/phronomy/tool/contract/tool_error.rb +0 -7
- data/lib/phronomy/vector_store/embeddings/base.rb +0 -44
- data/lib/phronomy/vector_store/embeddings/ruby_llm_embeddings.rb +0 -47
- data/lib/phronomy/workflow/phase_machine_builder.rb +0 -205
- data/lib/phronomy/workflow/storage_contract/workflow_storage_schema.rb +0 -9
- data/sig/phronomy/execution_receiver.rbs +0 -34
- data/sig/phronomy/llm_adapter.rbs +0 -11
- data/sig/phronomy/runtime.rbs +0 -76
- /data/lib/phronomy/agent/{context_assembly/context_importer.rb → context_importer.rb} +0 -0
- /data/lib/phronomy/{engine → execution}/backpressure_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/cancellation_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/concurrency/worker_input_restricted.rb +0 -0
- /data/lib/phronomy/{engine → execution}/event_loop_reentrancy_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/invalid_async_entry_action_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/invalid_async_transition_action_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/invalid_async_workflow_action_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/pool_shutdown_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/recursion_limit_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/runtime_shutdown_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/runtime_shutdown_reentrancy_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/scheduler_reentrancy_error.rb +0 -0
- /data/lib/phronomy/{engine → execution}/timeout_error.rb +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# Error API review (DX05-A / EA01–EA06)
|
|
2
|
+
|
|
3
|
+
Applications should branch on the meaning of a failed public operation without
|
|
4
|
+
knowing its backend or reconstructing it from an error message. The review uses
|
|
5
|
+
core `5b9d1047cc1351a935a7871ae7705c65166ea971` and examples
|
|
6
|
+
`5f4d58dc9432a84cb4421d3cc7dc2da92aee3c72` as its baseline.
|
|
7
|
+
|
|
8
|
+
The original DX05-A change implements the error API part of the follow-up design. DX05-B
|
|
9
|
+
(notification wiring), C (review result collection), D (`task_state`) and E
|
|
10
|
+
(Agent scope/unload) remain separate work. Their proposed APIs are not provided
|
|
11
|
+
by this patch. EA06's integration with D/E cannot be accepted before those APIs
|
|
12
|
+
exist. Live PostgreSQL, Redis, provider services and complete Rails execution
|
|
13
|
+
are separate acceptance gates; see the delivery's verification record.
|
|
14
|
+
|
|
15
|
+
The subsequent, unreleased DX05-D change now provides `task_state`; see
|
|
16
|
+
[its design and acceptance boundary](dx05-workflow-task-state.md).
|
|
17
|
+
Its error decision is included below. Agent scope/unload (DX05-E) remains
|
|
18
|
+
separate work. This does not change the historical DX05-A baseline above.
|
|
19
|
+
|
|
20
|
+
## Rules and ownership
|
|
21
|
+
|
|
22
|
+
* The owning Contract defines the failure category. A class is added only when
|
|
23
|
+
a caller has a distinct, stable decision to make. Detailed reasons use an
|
|
24
|
+
optional String `code`; they do not imply retry safety, rollback or worker exit.
|
|
25
|
+
* H00 owns the base Error and generic diagnostic projection/reconstruction.
|
|
26
|
+
It does not identify Agents, choose a retry policy or interpret domain codes.
|
|
27
|
+
* C07 Persistence and C12 Storage retain independent error hierarchies.
|
|
28
|
+
StorageBoundary translates only its existing known categories with an explicit
|
|
29
|
+
cause. A storage reason is not automatically a persistence reason.
|
|
30
|
+
* C13 transports the exception. It does not classify Agent, Team or Workflow
|
|
31
|
+
failures. `:cancelled` and a failed task carrying CancellationError remain
|
|
32
|
+
different facts. Partial `outcomes` remain on their existing execution errors.
|
|
33
|
+
* ArgumentError/TypeError describe Ruby/API input or mapping errors where already
|
|
34
|
+
documented. NotImplementedError marks an abstract extension point; it is not
|
|
35
|
+
converted into a provider failure.
|
|
36
|
+
* Existing message-only constructors remain valid. Seven public specialized
|
|
37
|
+
constructors now accept optional `code:` without changing their attributes.
|
|
38
|
+
New target-absence/busy constructors own fixed codes and object identities.
|
|
39
|
+
* Sync/async operation failures keep their category, reason and original cause.
|
|
40
|
+
Existing entry-time validation and submission rejection may still raise before
|
|
41
|
+
a TaskResult is returned. A TaskResult is not a promise of rollback.
|
|
42
|
+
|
|
43
|
+
## Operation decisions and acceptance
|
|
44
|
+
|
|
45
|
+
Each row names the operation family reviewed, its observed channel, the retained
|
|
46
|
+
asymmetry and the action. This is an evaluation of these operations, not a claim
|
|
47
|
+
that every possible backend failure has been injected.
|
|
48
|
+
|
|
49
|
+
| Owner | Public operations / failure meaning / channel | Decision and application effect | Acceptance evidence |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| C01 | TeamCoordinator.create/load: root absence, duplicate identity, uncertain create; direct raise | Add TeamNotFoundError only around the requested root load. Duplicate create retains Persistence conflict: a separate AlreadyExists class adds no necessary recovery choice here. A failed create readback keeps the original failure. | team_coordinator_spec; durable_coordination_spec |
|
|
52
|
+
| C01 | invoke/admission, TeamExecutionRepository.create_active/save/assert_idle!: active Team run | TeamBusyError with team_id and team.busy replaces AgentBusyError only for Team ownership. Child-Agent failures retain their own classes. No AgentBusy alias or inheritance. | execution_constraint_translation_spec; shared SQL coordination contract |
|
|
53
|
+
| C01 | HandoffRunner.invoke/cancel, Orchestrator fan-out, operation rejection | Retain ConfigurationError, HandoffError, StateConflictError, recovery requirements and on_error policy. Missing retained children are not missing Teams. Readback reconciliation may itself fail and does not prove absence. OperationRejected stays private; public code team.enqueue_after_finalize is unchanged. | durable_coordination_spec; integration/team_coordinator_spec; SQL reason diagnostics |
|
|
54
|
+
| C02 | Workflow definition/action, WorkflowContext writes, state CAS, waiting/resume | Retain ConfigurationError, WorkflowContextOwnershipError, WorkflowAsyncActionError and persistence conflict. Workflow has no equivalent target-root load API to justify another NotFound class. DX05-D adds WorkflowTaskResumeError with workflow.task_resume_unsupported only for unsupported restoration of a task-state phase, before any start side effect. Start/source/apply failures keep their original errors, and task cancellation remains distinct from a failed CancellationError. Agent scope is separate. | workflow and execution unit/integration suites; task_state_spec; shared SQL task-state contract (live PostgreSQL acceptance pending) |
|
|
55
|
+
| C03 | GeneratorVerifier.invoke; parse fallback and confidence decision | Preserve ParseError-only fallback and LowConfidenceError.result. Add optional constructor code; do not absorb provider/callback errors into a GenerationError. | generator_verifier specs; error_api_diagnostics_spec |
|
|
56
|
+
| C04 | Base.load, create/get, invoke/resume/purge | Add AgentNotFoundError only at the requested root. Journal/content/execution absence remains persistence failure. Preserve foreign AgentNotFound identity. AlreadyExists/Busy/Purged, uncertain purge and recovery-required retain their meaning. | error_api_boundaries_spec; Agent lifecycle/recovery suites |
|
|
57
|
+
| C04 | stream listener policy; result/failure persistence | StreamCallbackError keeps event_type/original_error/result, with optional code. Listener :fail_task versus :log_and_continue remains explicit; no unconditional callback swallowing. | stream_callback_error_policy_spec; error_api_diagnostics_spec |
|
|
58
|
+
| C05 | Assembly.prepare and policy invocation; plan/budget validation | Keep BudgetExceededError and ManifestError. Reuse C15 public trace_with, metadata only; a finish failure cannot mask policy failure or export the returned context. | error_api_boundaries_spec; Context suites |
|
|
59
|
+
| C06 | Tool.call / native async operation; schema, execution, async handle validity | Keep ToolError class; supply tool.invalid_arguments / tool.execution_failed / tool.invalid_async_result at owned conversion sites. Explicit async cause fixes delayed-failure information loss. Existing ToolError/cancellation pass through unchanged. :suppress survives logger failure. | tool/async_operation_spec; tool/base_spec; schema_error_spec |
|
|
60
|
+
| C07 | StorageBoundary, transaction, SaveOutcome, SnapshotComparison | Retain known-category mapping and original cause. Unknown I/O/application failures pass through. Keep committed/not_committed/unknown separately from exception class; no code-based reconciliation. | storage_boundary_spec; failure_contract_spec; snapshot_comparison_spec; SQL suites |
|
|
61
|
+
| C08 | fetch, fetch_text, fetch_json and content identity | Invalid requested JSON is IntegrityError with content.invalid_json and original ParserError; invalid UTF-8 is content.invalid_encoding. Raw fetch failures pass through; no dependency on OutputParser. Requesting JSON for plain text is also invalid representation, not proof of physical corruption. | error_api_boundaries_spec; content conformance; SQLite |
|
|
62
|
+
| C09 | LLM complete/stream, request/result checks, RubyLLM conversion | Keep Authentication/RateLimit/ContextLength as TransportError children and InvalidResult separate. Unknown exceptions, cancellation and callbacks retain identity. Existing SDK conversion is not an automatic retry policy. | LLMAdapter unit/integration suites |
|
|
63
|
+
| C10 | VectorStore add/search/remove/clear/size and AsyncClient | Keep InvalidResultError for invalid response and driver communication errors unchanged. Driver-specific transaction/effect uncertainty is not normalized without a backend-specific contract. No universal VectorStore TransportError or sibling-contract borrowing. | VectorStore and async-client suites; live PG/Redis pending |
|
|
64
|
+
| C11 | Embeddings.embed / AsyncClient; RubyLLM errors | Add owner-local AuthenticationError and RateLimitError under existing TransportError. Callers can request credentials versus surface quota refusal. Other SDK errors retain TransportError; arbitrary I/O failures, cancellation and programming errors are not guessed to be SDK failures. | error_api_boundaries_spec; embeddings/async_client_spec; RubyLLMEmbeddings specs |
|
|
65
|
+
| C12 | Records.read/fetch, conditions/unique constraints, streams/blobs, atomic views | Keep nil read versus raising fetch; preserve condition/resource/constraint. Add optional code to specialized constructors; SPI 2 and storage format unchanged. No Agent or Persistence semantics in the backend. | storage SPI snapshot; backend conformance; SQLite |
|
|
66
|
+
| C13 | TaskResult completion, map/flat_map/all_settled, wait/timeout/cancel | Transport errors unchanged. Observer failure leaves settled result intact and continues later observers even if logging fails. Transformation failure settles the derived task. Outcome attributes and physical completion remain separate. | task_result_spec; error_api_boundaries_spec; async composition suites |
|
|
67
|
+
| C15 | Base.trace, trace_with, OpenTelemetry.trace, Automatic | Explicit tracing propagates start/finish-only failure. After a primary business failure finish is attempted once and secondary report failure is suppressed. No finish after start failure. OpenTelemetry keeps with_span context. Automatic retains best-effort observation policy; Langfuse keeps its adapter-specific network suppression. | tracing/base_spec; open_telemetry_tracer_spec; automatic and extension specs |
|
|
68
|
+
| C16 | Filter.call/block!, PromptInjectionFilter | Keep explicit FilterBlockError and filter attribute; add optional constructor code. Implementation errors are not transformed into policy refusal. No unnecessary common rejection hierarchy. | filter specs; error_api_diagnostics_spec |
|
|
69
|
+
| C17 | JsonParser.parse, StructuredParser.parse | Keep ParseError for JSON and documented ArgumentError/TypeError schema-instantiation rejection. Other schema bugs pass through. User schemas should raise domain-specific errors when they must not be treated as mapping rejection. No blanket StandardError rescue added. | output_parser specs; schema integration |
|
|
70
|
+
| M91 | OrderedEventDelivery.publish/open/drain | ClosedError/OverflowError now inherit Phronomy::Error and report delivery.closed / delivery.capacity_exceeded. StandardError rescue still works; Phronomy::Error rescue now includes them. Reporting failure cannot replace an application error. No automatic resend. | ordered_event_delivery specs; error_api_boundaries_spec |
|
|
71
|
+
| I05/I06/I07/I09 | Concrete binding, AsyncClients, runtime admission/shutdown | Preserve backend-specific failures and execution admission/timeout categories. No new reverse references into domain contracts. | architecture gate; backend/execution integration |
|
|
72
|
+
| Other concrete helpers | Documents loaders, tools, evaluation and configuration | Preserve documented external operation errors and configuration checks; do not manufacture an application-wide ErrorTranslator. Generic Tool conversion applies when called through its public contract. | concrete tool/document/evaluation suites |
|
|
73
|
+
|
|
74
|
+
## Diagnostic format and recovery
|
|
75
|
+
|
|
76
|
+
Top-level `class`, `message` and optional `code` remain unchanged. An optional
|
|
77
|
+
`cause` object transports the same neutral fields. New cause data is bounded to
|
|
78
|
+
three ancestors and 2,048 characters per field. A further cause is represented
|
|
79
|
+
by `{ "truncated": true }`; an oversized code is omitted, never shortened into
|
|
80
|
+
another valid-looking code. Old top-level message behavior is unchanged.
|
|
81
|
+
Backtraces, arbitrary exception attributes and live objects are not serialized.
|
|
82
|
+
|
|
83
|
+
Agent and Team recovery use the same H00 decoder. It constructs only generic
|
|
84
|
+
Phronomy::Error values, including their optional causes, and never constantizes
|
|
85
|
+
saved names. Unknown/nil codes are retained. A restored cause is diagnostic data,
|
|
86
|
+
not the original exception object or its domain-specific attributes. Applications
|
|
87
|
+
may inspect `error.cause&.code` without depending on a storage exception class.
|
|
88
|
+
The live exception still retains its exact original cause.
|
|
89
|
+
|
|
90
|
+
## Migration and before/after use
|
|
91
|
+
|
|
92
|
+
Before, a broad Persistence/Storage NotFound rescue could mistake a broken
|
|
93
|
+
transcript for a missing Agent. After, limit creation to the requested identity:
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
begin
|
|
97
|
+
agent = ConversationAgent.load(agent_id, persistence: store)
|
|
98
|
+
rescue Phronomy::AgentNotFoundError => error
|
|
99
|
+
raise unless error.agent_id == agent_id.to_s
|
|
100
|
+
agent = ConversationAgent.create(agent_id: agent_id, persistence: store)
|
|
101
|
+
end
|
|
102
|
+
# A later transcript failure is not handled as Agent absence.
|
|
103
|
+
messages = PhronomyExamples::TranscriptMessages.read(agent)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Before, an application handled a busy Team by rescuing AgentBusyError. After:
|
|
107
|
+
|
|
108
|
+
```ruby
|
|
109
|
+
begin
|
|
110
|
+
team.invoke(input)
|
|
111
|
+
rescue Phronomy::MultiAgent::TeamBusyError => error
|
|
112
|
+
# Application decides whether to expose an existing run or defer new work.
|
|
113
|
+
show_active_team(error.team_id)
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Before, Embeddings::TransportError alone required SDK knowledge to distinguish
|
|
118
|
+
credentials and quota. After, both remain catchable through TransportError:
|
|
119
|
+
|
|
120
|
+
```ruby
|
|
121
|
+
begin
|
|
122
|
+
vector = embeddings.embed(text)
|
|
123
|
+
rescue Phronomy::Embeddings::AuthenticationError
|
|
124
|
+
request_credentials
|
|
125
|
+
rescue Phronomy::Embeddings::RateLimitError
|
|
126
|
+
display_limit
|
|
127
|
+
rescue Phronomy::Embeddings::TransportError => error
|
|
128
|
+
report_provider_failure(error)
|
|
129
|
+
end
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
These are application choices, not core-provided UI or automatic retry helpers.
|
|
133
|
+
For Tool failures the application code need not change: `error.cause` now works
|
|
134
|
+
for late async failures too. New reason codes are additive; custom ToolError
|
|
135
|
+
instances pass through with their original nil/unknown code.
|
|
136
|
+
|
|
137
|
+
| Existing consumer | Migration / compatibility |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Persistence::NotFoundError rescue around Agent/Team load | Still catches the new subclass; narrow it to the domain type and target ID for create-on-absence |
|
|
140
|
+
| Storage::NotFoundError rescue around Agent load | Already crossed the wrong boundary; update as the examples do |
|
|
141
|
+
| AgentBusyError rescue for Team's own admission | Change to MultiAgent::TeamBusyError; this is an intentional rescue-set change |
|
|
142
|
+
| JSON::ParserError rescue around content.fetch_json | Change to ContentStore::IntegrityError and inspect code; original ParserError is cause |
|
|
143
|
+
| Embeddings::TransportError rescue | Still catches both new subclasses |
|
|
144
|
+
| Phronomy::Error rescue around optional delivery | Now includes ClosedError/OverflowError; evaluate the application's handling |
|
|
145
|
+
| Exact equality of saved diagnostic hashes | Allow/test the optional cause object. Existing keys/codes and old JSON remain readable |
|
|
146
|
+
| Error message parsing or class-name constantization | Use public categories/codes for live failures; generic decoded diagnostics for recovery |
|
|
147
|
+
| Generic error logger retrying any error | Review separately; code/type does not prove rollback or idempotence |
|
|
148
|
+
|
|
149
|
+
## Dependency acceptance
|
|
150
|
+
|
|
151
|
+
No new Contract is introduced. New types live with C01/C04/C11; M91 remains an
|
|
152
|
+
optional consumer. C04/C01 specialize C07's absence category using existing
|
|
153
|
+
forward dependencies. H00 has no new domain reference. C05 uses C15's public
|
|
154
|
+
SPI wrapper rather than a private helper. C09/C10/C11 do not borrow each other's
|
|
155
|
+
error types. Ruby and RBS dependency graphs, not just Contract counts, are checked
|
|
156
|
+
by the existing architecture tool. See the generated audit for candidate tree
|
|
157
|
+
and exact deltas; the separate Contract diagram must describe the candidate as
|
|
158
|
+
unmerged until adoption is verified.
|
|
159
|
+
|
|
160
|
+
### Correction to the earlier Contract count
|
|
161
|
+
|
|
162
|
+
The baseline and candidate both have **32**, not 30, static Contract pairs.
|
|
163
|
+
The previous report omitted the existing RBS-only C01 → C08 references in
|
|
164
|
+
`sig/phronomy/multi_agent/store.rbs` (Store/_Records.contents) and C05 → C08
|
|
165
|
+
in `sig/phronomy/context.rbs` (Assembly.store). Both name the C08-owned
|
|
166
|
+
`_ContentRepository` interface. These are valid forward public-contract
|
|
167
|
+
references, not implementation dependencies introduced by this patch.
|
|
168
|
+
The candidate diagram restores these two edges and labels the correction.
|
|
169
|
+
|
|
170
|
+
At directory level the union still has 273 pairs, but two entries change:
|
|
171
|
+
M91 integrations → H00 common is added; multi_agent/persistence → agent is
|
|
172
|
+
removed because Team admission now owns its BusyError. Equal totals alone
|
|
173
|
+
would conceal this responsibility improvement. The 32 Contract pairs are
|
|
174
|
+
unchanged and acyclic; Ruby+RBS architecture validation passes.
|
|
175
|
+
|
|
176
|
+
## Static exception inventory
|
|
177
|
+
|
|
178
|
+
Ripper inspected 339 Ruby files. The following 63 definitions include base, private and optional-integration types; this is not a count of public APIs. Ruby declarations establish ownership. Existing RBS definitions and new owning-domain signatures are checked together.
|
|
179
|
+
|
|
180
|
+
| Class | Parent | Declaration |
|
|
181
|
+
|---|---|---|
|
|
182
|
+
| `Phronomy::AgentAlreadyExistsError` | `Phronomy::Error` | `lib/phronomy/agent/agent_already_exists_error.rb` |
|
|
183
|
+
| `Phronomy::AgentBusyError` | `Phronomy::Error` | `lib/phronomy/agent/agent_busy_error.rb` |
|
|
184
|
+
| `Phronomy::AgentNotFoundError` | `Phronomy::Persistence::NotFoundError` | `lib/phronomy/agent/agent_not_found_error.rb` |
|
|
185
|
+
| `Phronomy::AgentPurgedError` | `Phronomy::Error` | `lib/phronomy/agent/agent_purged_error.rb` |
|
|
186
|
+
| `Phronomy::ExecutionRehydrationRequiredError` | `Phronomy::Error` | `lib/phronomy/agent/api/execution_rehydration_required_error.rb` |
|
|
187
|
+
| `Phronomy::HandoffError` | `Phronomy::Error` | `lib/phronomy/agent/handoff_error.rb` |
|
|
188
|
+
| `Phronomy::Agent::RecoveryCoordinator::ResolutionOutcomeUnknownError` | `Phronomy::Error` | `lib/phronomy/agent/recovery/recovery_coordinator.rb` |
|
|
189
|
+
| `Phronomy::StreamCallbackError` | `Phronomy::Error` | `lib/phronomy/agent/stream_callback_error.rb` |
|
|
190
|
+
| `Phronomy::ConfigurationError` | `Phronomy::Error` | `lib/phronomy/common/configuration_error.rb` |
|
|
191
|
+
| `Phronomy::Error` | `StandardError` | `lib/phronomy/common/error.rb` |
|
|
192
|
+
| `Phronomy::ContentStore::IntegrityError` | `Phronomy::Error` | `lib/phronomy/content_store/base.rb` |
|
|
193
|
+
| `Phronomy::Context::BudgetExceededError` | `Phronomy::Error` | `lib/phronomy/context/budget_exceeded_error.rb` |
|
|
194
|
+
| `Phronomy::Context::ManifestError` | `Phronomy::Error` | `lib/phronomy/context/manifest_error.rb` |
|
|
195
|
+
| `Phronomy::Embeddings::AuthenticationError` | `Phronomy::Embeddings::TransportError` | `lib/phronomy/embeddings/authentication_error.rb` |
|
|
196
|
+
| `Phronomy::Embeddings::InvalidResultError` | `Phronomy::Error` | `lib/phronomy/embeddings/invalid_result_error.rb` |
|
|
197
|
+
| `Phronomy::Embeddings::RateLimitError` | `Phronomy::Embeddings::TransportError` | `lib/phronomy/embeddings/rate_limit_error.rb` |
|
|
198
|
+
| `Phronomy::Embeddings::TransportError` | `Phronomy::Error` | `lib/phronomy/embeddings/transport_error.rb` |
|
|
199
|
+
| `Phronomy::BackpressureError` | `Phronomy::Error` | `lib/phronomy/execution/backpressure_error.rb` |
|
|
200
|
+
| `Phronomy::CancellationError` | `Phronomy::Error` | `lib/phronomy/execution/cancellation_error.rb` |
|
|
201
|
+
| `Phronomy::EventLoopReentrancyError` | `Phronomy::Error` | `lib/phronomy/execution/event_loop_reentrancy_error.rb` |
|
|
202
|
+
| `Phronomy::ExecutionCancellationError` | `Phronomy::CancellationError` | `lib/phronomy/execution/execution_cancellation_error.rb` |
|
|
203
|
+
| `Phronomy::ExecutionTimeoutError` | `Phronomy::TimeoutError` | `lib/phronomy/execution/execution_timeout_error.rb` |
|
|
204
|
+
| `Phronomy::InvalidAsyncEntryActionError` | `Phronomy::InvalidAsyncWorkflowActionError` | `lib/phronomy/execution/invalid_async_entry_action_error.rb` |
|
|
205
|
+
| `Phronomy::InvalidAsyncTransitionActionError` | `Phronomy::InvalidAsyncWorkflowActionError` | `lib/phronomy/execution/invalid_async_transition_action_error.rb` |
|
|
206
|
+
| `Phronomy::InvalidAsyncWorkflowActionError` | `Phronomy::Error` | `lib/phronomy/execution/invalid_async_workflow_action_error.rb` |
|
|
207
|
+
| `Phronomy::PoolShutdownError` | `Phronomy::Error` | `lib/phronomy/execution/pool_shutdown_error.rb` |
|
|
208
|
+
| `Phronomy::RecursionLimitError` | `Phronomy::Error` | `lib/phronomy/execution/recursion_limit_error.rb` |
|
|
209
|
+
| `Phronomy::RuntimeShutdownError` | `Phronomy::Error` | `lib/phronomy/execution/runtime_shutdown_error.rb` |
|
|
210
|
+
| `Phronomy::RuntimeShutdownReentrancyError` | `Phronomy::RuntimeShutdownError` | `lib/phronomy/execution/runtime_shutdown_reentrancy_error.rb` |
|
|
211
|
+
| `Phronomy::SchedulerReentrancyError` | `Phronomy::EventLoopReentrancyError` | `lib/phronomy/execution/scheduler_reentrancy_error.rb` |
|
|
212
|
+
| `Phronomy::TimeoutError` | `Phronomy::Error` | `lib/phronomy/execution/timeout_error.rb` |
|
|
213
|
+
| `Phronomy::FilterBlockError` | `Phronomy::Error` | `lib/phronomy/filter/filter_block_error.rb` |
|
|
214
|
+
| `Phronomy::LowConfidenceError` | `Phronomy::Error` | `lib/phronomy/generation/low_confidence_error.rb` |
|
|
215
|
+
| `Phronomy::Integrations::OrderedEventDelivery::ClosedError` | `Phronomy::Error` | `lib/phronomy/integrations/ordered_event_delivery.rb` |
|
|
216
|
+
| `Phronomy::Integrations::OrderedEventDelivery::OverflowError` | `Phronomy::Error` | `lib/phronomy/integrations/ordered_event_delivery.rb` |
|
|
217
|
+
| `Phronomy::LLMAdapter::AuthenticationError` | `Phronomy::LLMAdapter::TransportError` | `lib/phronomy/llm_adapter/authentication_error.rb` |
|
|
218
|
+
| `Phronomy::LLMAdapter::RubyLLM::ToolsRequested` | `StandardError` | `lib/phronomy/llm_adapter/backends/ruby_llm.rb` |
|
|
219
|
+
| `Phronomy::LLMAdapter::ContextLengthError` | `Phronomy::Error` | `lib/phronomy/llm_adapter/context_length_error.rb` |
|
|
220
|
+
| `Phronomy::LLMAdapter::InvalidResultError` | `Phronomy::Error` | `lib/phronomy/llm_adapter/invalid_result_error.rb` |
|
|
221
|
+
| `Phronomy::LLMAdapter::RateLimitError` | `Phronomy::LLMAdapter::TransportError` | `lib/phronomy/llm_adapter/rate_limit_error.rb` |
|
|
222
|
+
| `Phronomy::LLMAdapter::TransportError` | `Phronomy::Error` | `lib/phronomy/llm_adapter/transport_error.rb` |
|
|
223
|
+
| `Phronomy::MultiAgent::TeamBusyError` | `Phronomy::Error` | `lib/phronomy/multi_agent/team_busy_error.rb` |
|
|
224
|
+
| `Phronomy::MultiAgent::TeamCoordinator::OperationRejected` | `Phronomy::ConfigurationError` | `lib/phronomy/multi_agent/team_coordinator.rb` |
|
|
225
|
+
| `Phronomy::MultiAgent::TeamNotFoundError` | `Phronomy::Persistence::NotFoundError` | `lib/phronomy/multi_agent/team_not_found_error.rb` |
|
|
226
|
+
| `Phronomy::ParseError` | `Phronomy::Error` | `lib/phronomy/output_parser/parse_error.rb` |
|
|
227
|
+
| `Phronomy::Persistence::Error` | `Phronomy::Error` | `lib/phronomy/persistence/errors.rb` |
|
|
228
|
+
| `Phronomy::Persistence::ConflictError` | `Phronomy::Persistence::Error` | `lib/phronomy/persistence/errors.rb` |
|
|
229
|
+
| `Phronomy::Persistence::StateConflictError` | `Phronomy::Persistence::ConflictError` | `lib/phronomy/persistence/errors.rb` |
|
|
230
|
+
| `Phronomy::Persistence::NotFoundError` | `Phronomy::Persistence::Error` | `lib/phronomy/persistence/errors.rb` |
|
|
231
|
+
| `Phronomy::Persistence::SerializationError` | `Phronomy::Persistence::Error` | `lib/phronomy/persistence/errors.rb` |
|
|
232
|
+
| `Phronomy::Persistence::UnsupportedBackendError` | `Phronomy::Persistence::Error` | `lib/phronomy/persistence/errors.rb` |
|
|
233
|
+
| `Phronomy::Persistence::TransactionError` | `Phronomy::Persistence::Error` | `lib/phronomy/persistence/errors.rb` |
|
|
234
|
+
| `Phronomy::Storage::BlobConflictError` | `Phronomy::Storage::ConflictError` | `lib/phronomy/storage/blob_conflict_error.rb` |
|
|
235
|
+
| `Phronomy::Storage::ConditionFailedError` | `Phronomy::Storage::ConflictError` | `lib/phronomy/storage/condition_failed_error.rb` |
|
|
236
|
+
| `Phronomy::Storage::ConflictError` | `Phronomy::Error` | `lib/phronomy/storage/conflict_error.rb` |
|
|
237
|
+
| `Phronomy::Storage::NotFoundError` | `Phronomy::Error` | `lib/phronomy/storage/not_found_error.rb` |
|
|
238
|
+
| `Phronomy::Storage::SerializationError` | `Phronomy::Error` | `lib/phronomy/storage/serialization_error.rb` |
|
|
239
|
+
| `Phronomy::Storage::TransactionError` | `Phronomy::Error` | `lib/phronomy/storage/transaction_error.rb` |
|
|
240
|
+
| `Phronomy::Storage::UniqueConstraintError` | `Phronomy::Storage::ConflictError` | `lib/phronomy/storage/unique_constraint_error.rb` |
|
|
241
|
+
| `Phronomy::Storage::UnsupportedBackendError` | `Phronomy::Error` | `lib/phronomy/storage/unsupported_backend_error.rb` |
|
|
242
|
+
| `Phronomy::ToolError` | `Phronomy::Error` | `lib/phronomy/tool/tool_error.rb` |
|
|
243
|
+
| `Phronomy::VectorStore::InvalidResultError` | `Phronomy::Error` | `lib/phronomy/vector_store/invalid_result_error.rb` |
|
|
244
|
+
| `Phronomy::WorkflowContextOwnershipError` | `Phronomy::Error` | `lib/phronomy/workflow/execution/workflow_context_ownership_error.rb` |
|
|
245
|
+
| `Phronomy::WorkflowTaskResumeError` (DX05-D) | `Phronomy::Error` | `lib/phronomy/workflow/execution/workflow_task_resume_error.rb` |
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Execution abstraction revision (local review candidate, 2026-09-29)
|
|
2
|
+
|
|
3
|
+
This candidate supersedes the unapplied Results split. It is based on main
|
|
4
|
+
653e255a, with the earlier execution-boundary prototype included. It is not a
|
|
5
|
+
record of application to main. The historical D02 reports describe their original
|
|
6
|
+
revisions; the control ownership decision below supersedes them for this candidate.
|
|
7
|
+
|
|
8
|
+
## Responsibilities
|
|
9
|
+
|
|
10
|
+
| Owner | Owns | Consumers should know |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Execution Contracts (G58, B5) | Context, TaskResult/Outcome, cancellation/deadline values, shared errors, neutral scope/result implementation | Public inputs, result handles and errors |
|
|
13
|
+
| Execution Services (G59, B4) | Fan-out, child control lifetime, invocation admission checks, completion adaptation, worker submission and deadline registration | Start/observe APIs and domain value/error policies |
|
|
14
|
+
| Engine Internals (G14, B5) | Runtime resources, EventLoop, FSMSession | Only runner/lifecycle/composition owners connect here |
|
|
15
|
+
| Engine Concurrency (G61, B5) | Pools and queues | Engine supplies scheduling and wait-policy context |
|
|
16
|
+
|
|
17
|
+
Bands are visual organization, not a dependency order. Backend Contracts remain
|
|
18
|
+
in B5. `execution_contract/errors`, `execution_result` and
|
|
19
|
+
`execution_result/concurrency` are removed. Their neutral implementation is
|
|
20
|
+
integrated into the existing `execution_contract` and its `concurrency` child.
|
|
21
|
+
M79/M80/M81 and G60 are retired. TaskResult is not returned to Services: doing so
|
|
22
|
+
would recreate Engine→Services. The two contract directories remain mutually
|
|
23
|
+
referencing within G58; the design does not claim zero cycles or pure declarations.
|
|
24
|
+
|
|
25
|
+
## Actual hiding, beyond renaming dependency hubs
|
|
26
|
+
|
|
27
|
+
| Consumer | Previous knowledge | Current entry point |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Agent::ExecutionCoordinator | Extracted context scope, checked open/cancelled state, selected scope error | InvocationControls.attach + check_start!; Agent still owns admission and its result production |
|
|
30
|
+
| MultiAgent::Orchestrator | Called Execution's private fan-out, constructed OperationBinding, linked tokens, selected context, closed subscriptions | Execution.run_async(max_concurrency:) + start_child; supplies child invocation |
|
|
31
|
+
| Tools::Agent / generated subagent tools | Created deferred result and relayed completion/failure callbacks | AsyncOperation.call/capture; supplies output/error policy |
|
|
32
|
+
| Agent::ToolBinding | Called TaskResult.__map_completion, a special internal composition path | AsyncOperation.map; supplies filters |
|
|
33
|
+
| Workflow builder (earlier included change) | Used FSM's finish vocabulary | Workflow::Completion; runner translates to FSM |
|
|
34
|
+
|
|
35
|
+
InvocationControls extends the existing service helper and absorbs the removed
|
|
36
|
+
OperationBinding's lifetime logic. It is not a pass-through factory that still
|
|
37
|
+
forces callers to manage cleanup. AsyncOperation encapsulates notification
|
|
38
|
+
multiplicity, startup/transformation failure, and physical completion. Domain
|
|
39
|
+
consumers still legitimately depend on TaskResult return types and cancellation
|
|
40
|
+
inputs; hiding those via aliases would not improve the abstraction.
|
|
41
|
+
|
|
42
|
+
ExecutionCoordinator, WorkflowRunner and durable reconciliation coordinators
|
|
43
|
+
remain result producers. Their lifecycle, registry and terminal policy code has
|
|
44
|
+
not all been turned into a generic facade. The public user-facing async APIs and
|
|
45
|
+
backend contracts retain their namespaces.
|
|
46
|
+
|
|
47
|
+
## Investigation heuristic
|
|
48
|
+
|
|
49
|
+
Detect each M0→M1, M1→M2, M0→M2 triangle in the complete Ruby + RBS graph.
|
|
50
|
+
Prioritize adjacent descending display bands, then other descending bands, then
|
|
51
|
+
all remaining graph triangles. Keep sidebar modules and visually hidden arrows.
|
|
52
|
+
Do not remove edges or make a triangle a CI violation solely on that basis.
|
|
53
|
+
|
|
54
|
+
For M0's direct M2 usage, inspect its actual source operation:
|
|
55
|
+
|
|
56
|
+
- Internal detail: Orchestrator linked child tokens and closed subscriptions;
|
|
57
|
+
Execution now owns this through start_child.
|
|
58
|
+
- Connection: a runner registers its session with Runtime; this can belong to
|
|
59
|
+
that runner. Move it only if its current owner mixes unrelated responsibilities.
|
|
60
|
+
- Shared/public contract: AsyncClient returns TaskResult and callers handle its
|
|
61
|
+
result. Keep the declared RBS dependency instead of erasing the type.
|
|
62
|
+
|
|
63
|
+
Multiple M1 paths may identify the same direct edge. Reports include both the
|
|
64
|
+
triangle count and the number of distinct M0→M2 pairs. RBS-only direct edges are
|
|
65
|
+
marked, not automatically accepted. Directory aggregation can combine different
|
|
66
|
+
classes/functions, so a graph path is not proof of a call chain. Dynamic dispatch
|
|
67
|
+
can also leak details without any constant-reference triangle.
|
|
68
|
+
|
|
69
|
+
`dependency_triangles.json` preserves all three edges' source evidence;
|
|
70
|
+
`dependency_triangles.csv` is the review queue. Entries start as unreviewed.
|
|
71
|
+
A separate narrow AST regression gate rejects the already-corrected private
|
|
72
|
+
scope methods and selected consumers' manual result settlement. It does not
|
|
73
|
+
purport to detect every possible abstraction leak.
|
|
74
|
+
|
|
75
|
+
## Compatibility and verification scope
|
|
76
|
+
|
|
77
|
+
Execution.run/run_async accept additive max_concurrency. No new backend methods
|
|
78
|
+
are required from application authors. The included earlier candidate removes
|
|
79
|
+
InvocationContext#effective_timeout_token/#effective_cancellation_token and the
|
|
80
|
+
internal Deadline#attach_to, CancellationScope, old FSM vocabulary ownership.
|
|
81
|
+
This revision removes internal OperationBinding and TaskResult.__map_completion.
|
|
82
|
+
There are no backward aliases that point neutral contracts back at services.
|
|
83
|
+
|
|
84
|
+
Tests cover bounded admission, cancellation before queued start, explicit child
|
|
85
|
+
context identity, cleanup after completion/start failure, duplicate callback
|
|
86
|
+
notifications, original error identity, recovery errors, and physical completion.
|
|
87
|
+
Existing Agent, Tool, Workflow, persistence/recovery and async tests remain gates.
|
|
88
|
+
The delivered evidence report records actual execution results and limitations.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Execution dependency ownership
|
|
2
|
+
|
|
3
|
+
Use the highest existing operation that expresses the caller's responsibility.
|
|
4
|
+
A facade is useful when it owns real coordination, not just because it reduces
|
|
5
|
+
arrows. These cases distinguish shared contracts from executable machinery.
|
|
6
|
+
|
|
7
|
+
| Caller / operation | Dependency after this change | Decision |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| ToolBinding result filter | TaskResult private completion mapping | Remove duplicate physical-completion handling; source completion alone must not finish the filtered result |
|
|
10
|
+
| Tracing span finish | Blocking.call_async | Generic default-pool work; observe rejection in the returned result |
|
|
11
|
+
| Approval listener dispatch | Blocking.call_async | Generic default-pool work; log admission and later callback errors |
|
|
12
|
+
| Agent/Workflow synchronous entry guard | Runtime.in_event_loop_context? | Query context without creating Runtime |
|
|
13
|
+
| Prompt parser, Runnable users | Execution Contracts | Public callable/value contract, not pool internals |
|
|
14
|
+
| Agent lifecycle/state, capability and journal input markers | Execution Contracts | Methodless classification; preserve direct include and validation |
|
|
15
|
+
| Tool and async-client RBS token/result references | Execution Contracts / Execution Services | Keep real public type use in the graph; do not invent a domain facade for a token |
|
|
16
|
+
| LLM, VectorStore, Embeddings and Storage AsyncClients | Contracts + TaskResult + Runtime/pools | Intended bridge; keep specialized submission, token and admission rules |
|
|
17
|
+
| Agent ExecutionCoordinator / MultiAgent binding | Concurrency operation binding | Own cancellation/deadline scope across an operation; generic Blocking is not equivalent |
|
|
18
|
+
| Agent and Workflow runners / execution registries | Runtime, FSM session and control delivery | Framework connection and single-writer ownership; retain these explicit dependencies |
|
|
19
|
+
| Engine worker pool | TaskResult and execution errors | Produces shared results; the service/Engine relationship is not acyclic |
|
|
20
|
+
|
|
21
|
+
The full dependency graph still includes references through shared error classes,
|
|
22
|
+
markers and RBS. Moving their source owners changes the interpretation of the
|
|
23
|
+
old Engine fan-in; it does not remove their actual use. The architecture gate
|
|
24
|
+
enforces Contracts-to-Contracts/Common only and rejects domain/backend/client
|
|
25
|
+
dependencies from Services or Engine. Layout is independent of those rules.
|
|
26
|
+
|
|
27
|
+
See [ADR-063](../decisions/063-execution-contracts-and-services.md) for the source
|
|
28
|
+
layout, behavior change and compatibility boundary.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Shared execution metadata and value conversion
|
|
2
2
|
|
|
3
|
+
> Current boundary: r8 unit 6 supersedes the historical Chat/SDK ownership and
|
|
4
|
+
> adapter extension SPI below. Agent uses LLMAdapter values; the backend owns SDK
|
|
5
|
+
> construction/interception; Tool owns canonical schema validation. See
|
|
6
|
+
> `docs/architecture/r8-unit6.md` and `docs/migrations/r8-unit6.md`.
|
|
7
|
+
|
|
8
|
+
|
|
3
9
|
Refactor 38 addresses the remaining R03 and R11 responsibilities against core
|
|
4
10
|
`e7e6618493df03c2eb386d78a9303796e1e13cdc`. The candidate must be applied and
|
|
5
11
|
verified before those items are closed. Tool restoration itself was completed
|
|
@@ -24,14 +24,14 @@ Normative Handoff intent is
|
|
|
24
24
|
with the Runner ownership amendment in
|
|
25
25
|
[ADR-034](../decisions/034-handoff-runner-coordination-ownership.md).
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
Agent
|
|
29
|
-
|
|
27
|
+
MultiAgent owns the cross-Agent turn, Handoff edges, Policy, routing and reservations.
|
|
28
|
+
Agent owns generic control requests, finalized Context projection and its own
|
|
29
|
+
execution commits. See [r8 unit 4](r8-unit4.md).
|
|
30
30
|
|
|
31
31
|
## 2. Public API
|
|
32
32
|
|
|
33
33
|
```ruby
|
|
34
|
-
handoff = Phronomy::
|
|
34
|
+
handoff = Phronomy::MultiAgent::Handoff.new(
|
|
35
35
|
source_agent: triage,
|
|
36
36
|
target_agent: billing,
|
|
37
37
|
description: "Transfer billing responsibility",
|
|
@@ -40,6 +40,7 @@ handoff = Phronomy::Agent::Handoff.new(
|
|
|
40
40
|
|
|
41
41
|
runner = Phronomy::MultiAgent::HandoffRunner.new(
|
|
42
42
|
main_agent: triage,
|
|
43
|
+
persistence: stores.multi_agent,
|
|
43
44
|
handoffs: [handoff]
|
|
44
45
|
)
|
|
45
46
|
|
|
@@ -56,7 +57,7 @@ schemas. The generated Tool name is private transport encoding, not Handoff
|
|
|
56
57
|
identity or public semantic contract.
|
|
57
58
|
|
|
58
59
|
Phronomy intercepts the Provider Tool Call into a typed private
|
|
59
|
-
`
|
|
60
|
+
`Agent::ControlRequest`. It does not execute an ordinary `ToolInvocation` or emit a
|
|
60
61
|
sentinel Tool result.
|
|
61
62
|
|
|
62
63
|
## 4. Handoff Policy
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
## 1. Durable boundary
|
|
11
11
|
|
|
12
|
-
`Phronomy::Persistence`
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
`Phronomy::Persistence` owns domain-neutral atomic scopes over a `Storage::Backend`.
|
|
13
|
+
`Agent::Store` and `MultiAgent::Store` own domain operations and result queries;
|
|
14
|
+
Workflow consumes its checkpoint repository directly. These roles share a
|
|
15
|
+
coordinator when operations must commit together. Storage implementations do not
|
|
16
|
+
inherit a domain service. See [r8 unit 3](r8-unit3.md) for construction and migration.
|
|
15
17
|
|
|
16
18
|
The `storage/` directory owns record carriers, portable errors, repository views,
|
|
17
19
|
and the Backend contract. `storage/backends/` owns physical storage implementations.
|
|
@@ -20,13 +22,29 @@ directories own their domain codecs and repositories. Agent and Team result
|
|
|
20
22
|
queries live with those domains. `storage/record_codec.rb` contains only shared
|
|
21
23
|
record-envelope and scalar validation; it does not select a domain schema.
|
|
22
24
|
`persistence_composition/` assembles the domain repositories over one raw view.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
`content_store/` is a content management service over Storage, not a physical
|
|
26
|
+
backend family. Its Base shares text/JSON conversion with StoredContents and
|
|
27
|
+
the Persistence content facade. StoredContents generates content IDs, verifies
|
|
28
|
+
digest identity and uses the injected view's Blobs. Its StorageSchema belongs
|
|
29
|
+
to this service. Storage owns byte immutability, transactions and physical I/O.
|
|
30
|
+
The service and its schema live together; there is no `content_store/backends/`
|
|
31
|
+
directory or backend-selection API. See [ADR-062](../decisions/062-content-store-service.md).
|
|
32
|
+
Domain stores receive their record adapters from `PersistenceComposition` and
|
|
33
|
+
retain their observation-thread guards. The common Persistence does not select
|
|
34
|
+
domains, assemble repositories, or delegate domain result queries. Domain-only
|
|
35
|
+
record protocols bind to the exact scope when participating; there is no shared
|
|
36
|
+
all-domain repository facade.
|
|
27
37
|
See [ADR-032](../decisions/032-storage-backend-composition.md) and
|
|
28
38
|
[ADR-033](../decisions/033-domain-persistence-ownership.md).
|
|
29
39
|
|
|
40
|
+
`persistence/errors.rb` owns the shared domain-facing failure classes. Repository
|
|
41
|
+
boundaries translate four known raw Storage categories to Persistence categories,
|
|
42
|
+
retaining the original exception as `cause`. Upper domain state contradictions
|
|
43
|
+
use `Persistence::StateConflictError < Persistence::ConflictError`. Unknown and
|
|
44
|
+
commit-outcome-uncertain exceptions are not reclassified. Backend contracts never
|
|
45
|
+
depend on these upper errors. See [ADR-061](../decisions/061-persistence-failure-contracts.md)
|
|
46
|
+
and the [rescue-clause migration](../migrations/persistence-failure-contracts.md).
|
|
47
|
+
|
|
30
48
|
Shared value copying belongs to `Values::Immutable` in `values/`. Agent records,
|
|
31
49
|
Team records, Recovery classifications, and Persistence result views use this
|
|
32
50
|
internal helper without borrowing an Agent implementation. It copies and freezes
|
|
@@ -41,7 +59,7 @@ does not change record formats, transaction ownership, or recovery guarantees.
|
|
|
41
59
|
| `agents` | AgentRoot |
|
|
42
60
|
| `journals` | Append-only Agent journal |
|
|
43
61
|
| `executions` | AgentExecution and owned child coordination |
|
|
44
|
-
|
|
|
62
|
+
| Workflow checkpoint repository | Workflow snapshots |
|
|
45
63
|
| `handoff_states` | Active responsibility and exact Target reservation |
|
|
46
64
|
| `teams` | TeamRoot |
|
|
47
65
|
| `team_executions` | Team tasks, assignments and outcomes |
|
|
@@ -93,7 +111,7 @@ Defined semantic durable transitions are atomic according to the Persistence
|
|
|
93
111
|
transaction contract and conforming backend.
|
|
94
112
|
|
|
95
113
|
Revision/watermark/CAS checks reject stale durable transitions with
|
|
96
|
-
`
|
|
114
|
+
`Persistence::ConflictError` rather than silently merging/reloading competing
|
|
97
115
|
state.
|
|
98
116
|
|
|
99
117
|
Conflict detection is not competing-execution exclusion and cannot undo an
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# r8第1適用版:Context/ToolとExecutionの共通基盤
|
|
2
|
+
|
|
3
|
+
> Current boundary: r8 unit 6 supersedes the historical Chat/SDK ownership and
|
|
4
|
+
> adapter extension SPI below. Agent uses LLMAdapter values; the backend owns SDK
|
|
5
|
+
> construction/interception; Tool owns canonical schema validation. See
|
|
6
|
+
> `docs/architecture/r8-unit6.md` and `docs/migrations/r8-unit6.md`.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
対象は2026-09-30に確認したmain `653e255a34fe4062d4beca47530e084fdd3a6ba9`。設計基準は同日更新のr8修正仕様・directory配置資料である。本変更はその第1適用単位であり、r8全体、S1全項目、S2/S3全受入条件の完了を意味しない。互換alias・転送だけの旧APIは残さない。
|
|
10
|
+
|
|
11
|
+
## 実装した責務と操作
|
|
12
|
+
|
|
13
|
+
| 所有者 | 共通基盤が実行すること | 利用側に残すこと |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `Context::Assembly` | Policyを一度呼びPlanを検証する。内容を正規化し、最終予算を検査してManifestを保存する | Agentはsnapshotを取得し、保存直前のwatermark再確認とAgent実行記録更新を行う |
|
|
16
|
+
| `Tool::DefinitionSet` | Tool定義の正規化、名前重複と保存済み定義の整合性を検証する | Agentは自身のTool alias・decorator・runtime実体を準備する |
|
|
17
|
+
| `Tool::Authorization` | 不変の引数・認可contextでfacts→requirement→policy→decisionを評価する | Agentは対象実行の照合、承認状態、受付結果、supervisionを管理する |
|
|
18
|
+
| `Tool::ToolExecutor` | cooperative/offloadedの実行規則と結果を扱う | Engineのpool選択はExecutionの機構接続へ委ねる |
|
|
19
|
+
| `LLMAdapter::Base` / `RubyLLM` | 同期生成とchat構築・設定・message/tool-call構築。RubyLLM実装がSDK失敗を変換する | Agentは自身の保存データ・Tool定義を検証してadapterへ渡す |
|
|
20
|
+
| `Execution` | submitの入口、fan-out/fan-in、結果合成、取消・期限・待機規則 | Engineはpool・timer・RuntimeとFSMの機構を実装する |
|
|
21
|
+
| `Tracing::Observation` | 明示的な観測とPII秘匿。実際の返り値は変えない | Runnableはinvoke/stream/batchの実行契約を持つ |
|
|
22
|
+
|
|
23
|
+
ContextとToolはAgentの薄い型定義の置場ではなく、実際の共通手順を所有する。ただし、Contextの現在の入力にはAgent由来の識別情報や由来情報が残る。完全に汎用の新domainモデルまで設計し直したものではない。ToolのDSL基底は引き続きRubyLLM::Toolを使用する。
|
|
24
|
+
|
|
25
|
+
`Context::Assembly#prepare(input:, policy:, adapter_identity:)` は保存transaction外でPolicyを呼ぶ。`#store(prepared, contents:)` は呼出側が渡す同じtransactionのcontents repositoryだけを使い、自分では独立transactionを開始しない。初回とfollow-upのAgent commitは既存transaction内でManifestとAgentExecutionの参照を保存する。後続書込に失敗したときManifestもrollbackされ、Policyは再実行されない。live projectionをcommit後に適用する既存順序を維持する。これはP02のAgent/Context部分の検証であり、任意domainの外側transaction参加を完成させたものではない。
|
|
26
|
+
|
|
27
|
+
Executionは`_ExecutionBackend`の操作に依存する。構成処理が遅延providerを設定し、Engineの`ExecutionBinding`がsubmit/afterを実装する。settled TaskResultの生成・map/flat_map/all_settled・待機制約の確認ではEngineを読み込まない。Runtime取得は実際のsubmit/タイマー登録時に行う。単なる名義移管に留めず、機構参照をここへ集約した。
|
|
28
|
+
|
|
29
|
+
WorkflowのFINISHと終了値は`Workflow::Completion`が所有し、WorkflowRunnerがFSM側へ変換する。FSMSession専用のEvent/FSMProtocol/TerminalDecisionはEngineに置く。Agent・MultiAgentのFSM専用接続の全面分離は残っている。
|
|
30
|
+
|
|
31
|
+
## 公開名・配置の変更
|
|
32
|
+
|
|
33
|
+
| 旧配置・API | 新配置・API | 判断 |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `agent/context_contract/` と `Agent::ContextPolicy` 等 | `context/`、`Context::ContextPolicy` 等 | Policy・Plan・Manifest・検証を共通操作と同じ所有者へ統合 |
|
|
36
|
+
| `agent/context_policies/default.rb` | `context/default_policy.rb`、`Context::DefaultPolicy` | 具体Policyも同domainに配置 |
|
|
37
|
+
| `Agent::Context::Instruction::PromptTemplate` | `Context::PromptTemplate` | Agent内の旧公開名を削除 |
|
|
38
|
+
| `Agent::Selection::{Candidate,Constraint}` | `Context::{Candidate,Constraint}` | 薄いSelection下位区分を削除 |
|
|
39
|
+
| `Agent::LLMInputPatch` / `LLMInputBuildContext` | `Context::LLMInputPatch` / `LLMInputBuildContext` | hook入力・返却値の所有を統一 |
|
|
40
|
+
| `ContextBudgetExceededError` | `Context::BudgetExceededError` | LLMのprovider失敗ではなくContext予算失敗 |
|
|
41
|
+
| `agent/context_assembly/` | `context/assembly.rb` とAgent直下の準備・状態・入力処理 | Context共通手順、Agent snapshot/state、LLM SDK処理を分離 |
|
|
42
|
+
| `Agent::Context::Capability::Base` | 実装本体の `Tool::Base` | 旧名とaliasを削除 |
|
|
43
|
+
| `agent/tool_execution/tool_definition_set.rb` | `tool/definition_set.rb` | 共通定義処理を移管。Agent固有生成はAgent内 |
|
|
44
|
+
| `execution_contract/` と `execution_services/` | `execution/` と必要な `execution/concurrency/` | 操作・値・共通規則を統合。`execution_result`等の薄い別分割を追加しない |
|
|
45
|
+
| `WorkerSubmission` | `Execution.submit` | 転送専用moduleを削除 |
|
|
46
|
+
| `Runnable#trace` | `Tracing::Observation.trace` | 実行基盤から観測への依存を除去 |
|
|
47
|
+
| `tool/contract`、`filter/contract`、`output_parser/contract`、`agent/lifecycle_contract` | 各所有domain配下の例外ファイル | 例外だけのdirectoryを削除。既存の意味を持つ例外定数名は実体として保持 |
|
|
48
|
+
|
|
49
|
+
独自LLM adapterはcomplete/streamだけでなく、`build_chat`、`configure_chat`、`message`、`tool_call`を実装する。`identity`には基底の既定値、`input_budget`にはnilの既定値がある。正確なkeywordと返却契約は`sig/phronomy/llm_adapter/base.rbs`を参照する。SDK固有例外はadapter操作の境界でLLM失敗へ変換し、元のcauseを保持する。アプリ例外・取消は無関係なprovider失敗へ変換しない。
|
|
50
|
+
|
|
51
|
+
既存設定APIの`tool_result_max_size`/loggerはアプリ構成から中立RuntimeSettingsへ供給する。Toolから構成factoryへの参照を除き、default・nil・scoped copyの意味を維持する。RBSは`sig/`と`sig/_private/`に置き、実装定数・宣言所有者に基づいて依存を解析する。
|
|
52
|
+
|
|
53
|
+
## r8項目別の到達点
|
|
54
|
+
|
|
55
|
+
| 項目 | この適用版 | 未完了部分 |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| DP01 Context集約 | 主対象を実装 | より広いdomain入力・公開操作レビューは残る |
|
|
58
|
+
| DP02 Tool共通基盤 | 定義・認可評価・呼出しの共通部分を実装 | Agent側FSM接続と全親子認可の整理はDP12/P04 |
|
|
59
|
+
| DP03 Execution統合 | 実装 | domain全体のFSM利用整理を完了としない |
|
|
60
|
+
| DP04 Persistence | 未着手 | facade除去、共通transaction/参加/成否照合API |
|
|
61
|
+
| DP05 domain保存schema | 未着手 | MultiAgent/Workflowのstorage_contract統合 |
|
|
62
|
+
| DP06 LLM集約 | 前提部分のみ | llm_contractとllm_adapterの全面統合 |
|
|
63
|
+
| DP07 薄い失敗directory統合 | 実装 | domainごとの失敗語彙全体の再設計ではない |
|
|
64
|
+
| DP08 composition集約 | 接続追加のみ | runtime/persistence/agent構成の物理統合 |
|
|
65
|
+
| DP09 Embeddings独立 | 未着手 | vector_storeからの独立配置 |
|
|
66
|
+
| DP10 Documents | 未着手 | loader/splitter再配置 |
|
|
67
|
+
| DP11 assembly/concerns分解 | 主対象を実装 | Agent固有処理はAgent直下に保持 |
|
|
68
|
+
| DP12 domain実行接続 | Workflow終了境界など一部 | Agent/ToolInvocation/Teamのdomain判断とFSM接続の全面分離 |
|
|
69
|
+
| DP13 Recovery/Handoff | 未着手 | domain復旧・Persistence成否照合・親子操作の所有整理 |
|
|
70
|
+
| P02保存参加 | Agent/Contextの既存transactionで検証 | 外側scope、savepoint、複数domainの公開参加API |
|
|
71
|
+
| P01/P03〜P06保存・親子連携 | 未着手 | 下記の原子性条件を確定する必要がある |
|
|
72
|
+
| 155組・393件の三角形レビュー | 再判定未完了 | 図の再解析は判定完了の代わりにはならない |
|
|
73
|
+
|
|
74
|
+
NC/F/RMの全項目を「対応済み」とする資料は作成していない。受入可否はこの表の実装単位と同梱テスト証拠に限定する。
|
|
75
|
+
|
|
76
|
+
## Persistenceをこの適用単位から外した理由
|
|
77
|
+
|
|
78
|
+
現在のAgent初回受付は保存transaction内でTeam予約を読む。AgentからTeam内部への参照は最終設計では解消すべきだが、検証を単純に先行呼出へ移すと次の競合が生じる。
|
|
79
|
+
|
|
80
|
+
1. 親側が予約の有効性を確認する。
|
|
81
|
+
2. 別の処理が予約を取り消す。
|
|
82
|
+
3. Agentが新しいtransactionで受付記録を保存し、取消済みの子を開始してしまう。
|
|
83
|
+
|
|
84
|
+
次の適用単位では、親が所有する予約確認とAgent受付記録を同一scopeで行う参加APIが必要である。親は予約規則、Agentは受付規則、Persistenceは参加とcommit境界を所有する。Agentが親kindをswitchしてTeamを選ぶ現在の逆依存を、新しいcallbackの裏へ隠すだけでは解決にならない。
|
|
85
|
+
|
|
86
|
+
具体的に未確定なのは、参加操作の公開keyword/返却値、取消との競合条件、commit後のRuntime admission、停止後の同じ子IDによる照会・再開である。Workflowのhalt/finish snapshotだけで任意action内の子実行が耐障害化されるとは扱わない。Workflow→Agent/Teamの具体経路、checkpoint、結果取込一回性をP05で定める。成否不明は単一record一致だけで成功にせず、複数domainの証拠をP06で定める。
|
|
87
|
+
|
|
88
|
+
そのため既存Persistence facade、Team受付検証、予約・子記録のtransaction境界を本変更では改変しない。保証を弱めた仮実装を入れず、次の仕様・実装単位として残す。
|
|
89
|
+
|
|
90
|
+
## 解析図の読み方
|
|
91
|
+
|
|
92
|
+
実ソースとRBSから再生成する。従来の水平帯・グループ色・個別module枠を維持し、文字の背景は透過。M33/M41/M44への矢印は表示のみ省略し、JSON・行列・境界判定にはすべて残す。旧IDは再利用せず退役させる。
|
|
93
|
+
|
|
94
|
+
これは修正版candidateの実測図であり、全r8完了時の構想図ではない。残る循環・逆依存もそのまま出力する。静的解析で見えない注入先・動的dispatchはRBSだけで完全に証明できない。Engine機構接続とdomain保存の実行テストを併用する。
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
bundle exec rbs -I sig validate
|
|
98
|
+
python -m pip install -r tools/architecture/tools/requirements.txt
|
|
99
|
+
python -m unittest discover -s tools/architecture/tests -v
|
|
100
|
+
# lib/sigをcommitした後、未公開candidateでは次の指定を用いる
|
|
101
|
+
python tools/architecture/refresh_diagram.py . tmp/architecture-r8-unit1 --candidate
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
同梱SVGのSHAは作成用のローカルcandidateを示す。利用者が適用してcommitしたSHAとは異なるため、適用後の図はそのcheckoutで再生成する。Rubyの検証環境、件数、skip理由、未検証環境と適用手順は配布パッケージの検証報告を参照する。
|