phronomy 0.22.0 → 0.23.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 +3 -4
- data/CHANGELOG.md +200 -10
- data/CONTRIBUTING.md +81 -9
- data/README.md +15 -6
- data/VERIFY.sh +587 -0
- data/benchmark/bench_agent_invoke.rb +2 -2
- data/benchmark/bench_context_assembler.rb +39 -68
- data/benchmark/bench_regression.rb +2 -2
- data/docs/architecture/agent-context.md +174 -0
- data/docs/architecture/before-llm-input.md +78 -0
- data/docs/architecture/context-management.md +232 -0
- data/docs/architecture/knowledge-and-rag.md +130 -0
- data/docs/architecture/multi-agent-handoff.md +152 -0
- data/docs/architecture/persistence.md +175 -0
- data/docs/architecture/removed/agent-context.md +72 -0
- data/docs/architecture/security-boundaries.md +173 -0
- data/docs/architecture/tracing.md +194 -0
- data/docs/architecture.md +82 -0
- data/docs/archive/design/archived/04_api_design.md +507 -0
- data/docs/archive/design/archived/09_guardrails.md +186 -0
- data/docs/archive/design/archived/17_rails_integration.md +175 -0
- data/docs/archive/design/historical/00_design_philosophy.md +122 -0
- data/docs/archive/design/historical/01_rubyllm_evaluation.md +178 -0
- data/docs/archive/design/historical/06_design_decisions.md +143 -0
- data/docs/changelog/0.14-and-earlier.md +1 -1
- data/docs/decisions/001-rubyllm-as-provider-layer.md +6 -1
- data/docs/decisions/002-workflow-context-immutability.md +26 -1
- data/docs/decisions/006-no-built-in-guardrails.md +2 -1
- data/docs/decisions/012-canonical-execution-log-and-context-policy.md +120 -38
- data/docs/decisions/014-unified-persistence-durable-state.md +9 -2
- data/docs/decisions/016-semantic-multi-agent-handoff.md +112 -0
- data/docs/decisions/017-design-authority-and-adr-governance.md +200 -0
- data/docs/decisions/018-durability-guarantees-and-failure-model.md +488 -0
- data/docs/decisions/019-filter-contract-and-security-boundaries.md +229 -0
- data/docs/decisions/020-canonical-workflow-instance-identity.md +177 -0
- data/docs/decisions/021-generic-agent-invocation-identity-removal.md +119 -0
- data/docs/decisions/022-agent-execution-parent-identity-and-runtime-routing-boundary.md +193 -0
- data/docs/decisions/023-fsm-session-incarnation-identity-and-routing.md +139 -0
- data/docs/decisions/024-event-loop-single-writer-agent-runtime.md +188 -0
- data/docs/decisions/025-process-local-agent-ownership-and-runtime-admission.md +249 -0
- data/docs/decisions/026-workflow-runtime-admission-and-durable-terminal-barrier.md +257 -0
- data/docs/decisions/027-llm-adapter-provider-boundary.md +93 -0
- data/docs/decisions/README.md +172 -0
- data/docs/features.md +31 -11
- data/docs/getting-started.md +77 -45
- data/docs/migrations/0.19.md +14 -7
- data/docs/migrations/0.22.md +390 -0
- data/docs/persistence-backends.md +88 -38
- data/docs/runtime-and-concurrency.md +227 -33
- data/examples/README.md +13 -0
- data/lib/phronomy/agent/agent_execution.rb +19 -15
- data/lib/phronomy/agent/agent_invocation.rb +288 -93
- data/lib/phronomy/agent/agent_invocation_session_builder.rb +236 -202
- data/lib/phronomy/agent/agent_root.rb +3 -3
- data/lib/phronomy/agent/approval_evaluation_request.rb +37 -19
- data/lib/phronomy/agent/async_event_api.rb +145 -72
- data/lib/phronomy/agent/base.rb +388 -181
- data/lib/phronomy/agent/concerns/before_llm_input.rb +1 -1
- data/lib/phronomy/agent/context_assembler.rb +437 -178
- data/lib/phronomy/agent/context_candidate_resolver.rb +2 -2
- data/lib/phronomy/agent/context_plan.rb +18 -13
- data/lib/phronomy/agent/context_plan_validator.rb +246 -88
- data/lib/phronomy/agent/context_policies/default.rb +123 -34
- data/lib/phronomy/agent/context_policy.rb +109 -3
- data/lib/phronomy/agent/context_policy_input.rb +244 -0
- data/lib/phronomy/agent/context_policy_input_builder.rb +241 -0
- data/lib/phronomy/agent/execution_coordinator.rb +1975 -587
- data/lib/phronomy/agent/journal_record.rb +17 -4
- data/lib/phronomy/agent/llm_input_build_context.rb +1 -1
- data/lib/phronomy/agent/llm_input_manifest.rb +277 -2
- data/lib/phronomy/agent/llm_operation_result.rb +12 -7
- data/lib/phronomy/agent/phase_machine_builder.rb +19 -7
- data/lib/phronomy/agent/provider_call_outcome.rb +23 -7
- data/lib/phronomy/agent/recovery_coordinator/continuation.rb +271 -0
- data/lib/phronomy/agent/recovery_coordinator/installation.rb +427 -0
- data/lib/phronomy/agent/recovery_coordinator/resolution.rb +635 -0
- data/lib/phronomy/agent/recovery_coordinator.rb +211 -0
- data/lib/phronomy/agent/recovery_support.rb +512 -0
- data/lib/phronomy/agent/ruby_llm_materializer.rb +22 -13
- data/lib/phronomy/agent/selection/candidate.rb +53 -0
- data/lib/phronomy/agent/selection/constraint.rb +49 -0
- data/lib/phronomy/agent/shared_state.rb +38 -1
- data/lib/phronomy/agent/tool_approval_request.rb +33 -5
- data/lib/phronomy/agent/tool_definition_set.rb +49 -3
- data/lib/phronomy/agent/tool_invocation.rb +336 -102
- data/lib/phronomy/agent/tool_invocation_session_builder.rb +49 -45
- data/lib/phronomy/agent.rb +20 -2
- data/lib/phronomy/agent_already_exists_error.rb +5 -0
- data/lib/phronomy/agent_purged_error.rb +5 -0
- data/lib/phronomy/engine/concurrency/offload_pool.rb +17 -3
- data/lib/phronomy/engine/concurrency/physical_completion_task.rb +135 -0
- data/lib/phronomy/engine/event_loop.rb +622 -63
- data/lib/phronomy/engine/fsm_session.rb +194 -21
- data/lib/phronomy/engine/runtime/agent_ownership_registry.rb +352 -0
- data/lib/phronomy/engine/runtime.rb +77 -20
- data/lib/phronomy/generator_verifier.rb +12 -14
- data/lib/phronomy/invocation_context.rb +9 -29
- data/lib/phronomy/multi_agent/admission_registry.rb +51 -0
- data/lib/phronomy/multi_agent/coordination_state.rb +18 -0
- data/lib/phronomy/multi_agent/coordinator.rb +154 -0
- data/lib/phronomy/multi_agent/execution_coordinator.rb +116 -0
- data/lib/phronomy/multi_agent/fan_out_invocation.rb +24 -33
- data/lib/phronomy/multi_agent/fan_out_session_builder.rb +12 -19
- data/lib/phronomy/multi_agent/handoff.rb +24 -45
- data/lib/phronomy/multi_agent/handoff_capability_factory.rb +87 -0
- data/lib/phronomy/multi_agent/handoff_context.rb +95 -0
- data/lib/phronomy/multi_agent/handoff_policy.rb +137 -0
- data/lib/phronomy/multi_agent/handoff_projection.rb +191 -0
- data/lib/phronomy/multi_agent/handoff_request.rb +45 -0
- data/lib/phronomy/multi_agent/orchestrator.rb +12 -15
- data/lib/phronomy/multi_agent/runner.rb +98 -0
- data/lib/phronomy/persistence/durable_codec.rb +646 -0
- data/lib/phronomy/persistence/durable_record.rb +117 -0
- data/lib/phronomy/persistence/in_memory.rb +210 -134
- data/lib/phronomy/persistence/migration/initial_format_migration.rb +226 -0
- data/lib/phronomy/persistence/repository_facades.rb +316 -0
- data/lib/phronomy/persistence.rb +81 -41
- data/lib/phronomy/recovery.rb +186 -0
- data/lib/phronomy/testing/persistence_contract/a_journal_repository.rb +2 -2
- data/lib/phronomy/testing/persistence_contract/a_persistence_backend.rb +1 -1
- data/lib/phronomy/testing/persistence_contract/a_workflow_state_repository.rb +19 -19
- data/lib/phronomy/testing/persistence_contract/an_agent_repository.rb +3 -3
- data/lib/phronomy/testing/persistence_contract/an_execution_repository.rb +5 -5
- data/lib/phronomy/tracing/automatic.rb +176 -0
- data/lib/phronomy/tracing/base.rb +11 -2
- data/lib/phronomy/tracing/langfuse_tracer.rb +20 -12
- data/lib/phronomy/version.rb +1 -1
- data/lib/phronomy/workflow.rb +3 -6
- data/lib/phronomy/workflow_context.rb +14 -5
- data/lib/phronomy/workflow_recovery.rb +123 -0
- data/lib/phronomy/workflow_runner.rb +468 -256
- data/lib/phronomy.rb +6 -0
- data/scripts/api_snapshot.rb +12 -0
- data/sig/phronomy/agent.rbs +209 -7
- data/sig/phronomy/multi_agent.rbs +39 -0
- data/sig/phronomy/persistence.rbs +62 -4
- data/sig/phronomy/runtime.rbs +1 -4
- data/sig/phronomy/workflow.rbs +2 -2
- data/sig/phronomy.rbs +10 -0
- metadata +65 -17
- data/examples/workflows/agent_event_mapping.rb +0 -101
- data/examples/workflows/generic_task_event_mapping.rb +0 -66
- data/lib/phronomy/agent/activation_registry.rb +0 -28
- data/lib/phronomy/agent/agent_execution_activation.rb +0 -172
- data/lib/phronomy/agent/context_candidate.rb +0 -47
- data/lib/phronomy/agent/context_parts/budget/token_budget_packer.rb +0 -53
- data/lib/phronomy/agent/context_parts/requirements/required_context_resolver.rb +0 -56
- data/lib/phronomy/agent/context_parts/selectors/recent_first_selector.rb +0 -30
- data/lib/phronomy/agent/context_parts/unit_builders/dependency_aware_unit_builder.rb +0 -118
- data/lib/phronomy/agent/context_policy_descriptor.rb +0 -49
- data/lib/phronomy/agent/context_policy_registry.rb +0 -46
- data/lib/phronomy/agent/context_request.rb +0 -35
- data/lib/phronomy/agent/context_selection_unit.rb +0 -38
- data/lib/phronomy/agent/derived_content_spec.rb +0 -34
- data/lib/phronomy/agent/runner.rb +0 -97
data/VERIFY.sh
ADDED
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT="${1:-.}"
|
|
5
|
+
cd "$ROOT"
|
|
6
|
+
|
|
7
|
+
if [[ -e phronomy-0.16.0.gem ]]; then
|
|
8
|
+
echo "FAIL: remove phronomy-0.16.0.gem before validation" >&2
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
required_files=(
|
|
13
|
+
docs/decisions/README.md
|
|
14
|
+
docs/decisions/017-design-authority-and-adr-governance.md
|
|
15
|
+
docs/decisions/018-durability-guarantees-and-failure-model.md
|
|
16
|
+
docs/decisions/019-filter-contract-and-security-boundaries.md
|
|
17
|
+
docs/decisions/020-canonical-workflow-instance-identity.md
|
|
18
|
+
docs/decisions/021-generic-agent-invocation-identity-removal.md
|
|
19
|
+
docs/decisions/022-agent-execution-parent-identity-and-runtime-routing-boundary.md
|
|
20
|
+
docs/decisions/023-fsm-session-incarnation-identity-and-routing.md
|
|
21
|
+
docs/decisions/024-event-loop-single-writer-agent-runtime.md
|
|
22
|
+
docs/decisions/025-process-local-agent-ownership-and-runtime-admission.md
|
|
23
|
+
docs/decisions/026-workflow-runtime-admission-and-durable-terminal-barrier.md
|
|
24
|
+
lib/phronomy/workflow.rb
|
|
25
|
+
lib/phronomy/workflow_context.rb
|
|
26
|
+
lib/phronomy/workflow_runner.rb
|
|
27
|
+
lib/phronomy/engine/event_loop.rb
|
|
28
|
+
lib/phronomy/engine/fsm_session.rb
|
|
29
|
+
lib/phronomy/persistence/in_memory.rb
|
|
30
|
+
lib/phronomy/persistence/durable_record.rb
|
|
31
|
+
lib/phronomy/persistence/durable_codec.rb
|
|
32
|
+
lib/phronomy/persistence/repository_facades.rb
|
|
33
|
+
lib/phronomy/persistence/migration/initial_format_migration.rb
|
|
34
|
+
sig/phronomy/persistence.rbs
|
|
35
|
+
spec/phronomy/persistence/backend_spi_api_spec.rb
|
|
36
|
+
spec/phronomy/persistence/durable_codec_spec.rb
|
|
37
|
+
spec/phronomy/persistence/in_memory_spec.rb
|
|
38
|
+
spec/phronomy/persistence/initial_format_migration_spec.rb
|
|
39
|
+
lib/phronomy/testing/persistence_contract/a_workflow_state_repository.rb
|
|
40
|
+
spec/phronomy/workflow_identity_contract_spec.rb
|
|
41
|
+
lib/phronomy/invocation_context.rb
|
|
42
|
+
lib/phronomy/agent/async_event_api.rb
|
|
43
|
+
lib/phronomy/agent/execution_coordinator.rb
|
|
44
|
+
lib/phronomy/agent/journal_record.rb
|
|
45
|
+
lib/phronomy/agent/context_assembler.rb
|
|
46
|
+
lib/phronomy/agent/context_policy.rb
|
|
47
|
+
lib/phronomy/agent/context_policy_input.rb
|
|
48
|
+
lib/phronomy/agent/context_policy_input_builder.rb
|
|
49
|
+
lib/phronomy/agent/context_plan.rb
|
|
50
|
+
lib/phronomy/agent/context_plan_validator.rb
|
|
51
|
+
lib/phronomy/agent/context_policies/default.rb
|
|
52
|
+
spec/phronomy/agent/context_policy_architecture_regression_spec.rb
|
|
53
|
+
lib/phronomy/agent/agent_invocation.rb
|
|
54
|
+
lib/phronomy/multi_agent/orchestrator.rb
|
|
55
|
+
lib/phronomy/multi_agent/fan_out_invocation.rb
|
|
56
|
+
sig/phronomy/runtime.rbs
|
|
57
|
+
spec/phronomy/generic_invocation_identity_contract_spec.rb
|
|
58
|
+
spec/phronomy/agent/journal_record_llm_call_id_spec.rb
|
|
59
|
+
spec/phronomy/agent/approval_parent_identity_contract_spec.rb
|
|
60
|
+
spec/phronomy/fsm_session_identity_contract_spec.rb
|
|
61
|
+
lib/phronomy/agent/tool_invocation.rb
|
|
62
|
+
lib/phronomy/agent/tool_approval_request.rb
|
|
63
|
+
lib/phronomy/agent/approval_evaluation_request.rb
|
|
64
|
+
sig/phronomy/agent.rbs
|
|
65
|
+
docs/persistence-backends.md
|
|
66
|
+
spec/phronomy/invocation_context_spec.rb
|
|
67
|
+
spec/phronomy/agent/async_event_contract_spec.rb
|
|
68
|
+
spec/phronomy/workflow/admission_spec.rb
|
|
69
|
+
spec/phronomy/workflow/live_signal_spec.rb
|
|
70
|
+
spec/phronomy/workflow/transition_action_spec.rb
|
|
71
|
+
lib/phronomy/generator_verifier.rb
|
|
72
|
+
spec/phronomy/generator_verifier_spec.rb
|
|
73
|
+
spec/integration/subgraph_parallel_agent_tool_spec.rb
|
|
74
|
+
lib/phronomy/tracing/base.rb
|
|
75
|
+
lib/phronomy/tracing/langfuse_tracer.rb
|
|
76
|
+
spec/phronomy/tracing/extension_contract_spec.rb
|
|
77
|
+
spec/phronomy/tracing/open_telemetry_tracer_spec.rb
|
|
78
|
+
spec/phronomy/tracing/langfuse_tracer_spec.rb
|
|
79
|
+
spec/integration/tracing_adapters_spec.rb
|
|
80
|
+
spec/phronomy/architecture_governance_spec.rb
|
|
81
|
+
spec/phronomy/filter_architecture_regression_spec.rb
|
|
82
|
+
spec/phronomy/filter_blocking_spec.rb
|
|
83
|
+
spec/integration/tool_filter_spec.rb
|
|
84
|
+
spec/phronomy/guarantee_model_spec.rb
|
|
85
|
+
spec/phronomy/before_llm_input_rbs_contract_spec.rb
|
|
86
|
+
spec/phronomy/fault_injection_spec.rb
|
|
87
|
+
spec/phronomy/fault_injection_advanced_spec.rb
|
|
88
|
+
spec/phronomy/persistence_architecture_regression_spec.rb
|
|
89
|
+
lib/phronomy/agent/base.rb
|
|
90
|
+
lib/phronomy/agent_already_exists_error.rb
|
|
91
|
+
lib/phronomy/agent_purged_error.rb
|
|
92
|
+
lib/phronomy/engine/runtime/agent_ownership_registry.rb
|
|
93
|
+
lib/phronomy/agent/agent_root.rb
|
|
94
|
+
lib/phronomy/agent/llm_input_build_context.rb
|
|
95
|
+
lib/phronomy/agent/shared_state.rb
|
|
96
|
+
spec/phronomy/agent/base_spec.rb
|
|
97
|
+
spec/phronomy/agent_spec.rb
|
|
98
|
+
spec/phronomy/agent/before_llm_input_spec.rb
|
|
99
|
+
spec/phronomy/agent/agent_execution_codec_spec.rb
|
|
100
|
+
spec/phronomy/agent/shared_state_spec.rb
|
|
101
|
+
docs/migrations/0.22.md
|
|
102
|
+
docs/features.md
|
|
103
|
+
lib/phronomy/multi_agent/coordinator.rb
|
|
104
|
+
spec/phronomy/multi_agent/handoff_spec.rb
|
|
105
|
+
spec/phronomy/multi_agent/handoff_projection_spec.rb
|
|
106
|
+
spec/phronomy/multi_agent/handoff_architecture_regression_spec.rb
|
|
107
|
+
spec/phronomy/multi_agent/runner_spec.rb
|
|
108
|
+
spec/integration/multi_agent_handoff_spec.rb
|
|
109
|
+
spec/integration/multi_agent_handoff_followup_spec.rb
|
|
110
|
+
docs/decisions/016-semantic-multi-agent-handoff.md
|
|
111
|
+
spec/phronomy/agent/event_loop_single_writer_spec.rb
|
|
112
|
+
spec/phronomy/agent/tool_authorization_snapshot_boundary_spec.rb
|
|
113
|
+
spec/phronomy/agent/same_process_ownership_spec.rb
|
|
114
|
+
spec/phronomy/agent/runtime_admission_spec.rb
|
|
115
|
+
)
|
|
116
|
+
for path in "${required_files[@]}"; do
|
|
117
|
+
[[ -f "$path" ]] || { echo "FAIL: missing $path" >&2; exit 1; }
|
|
118
|
+
done
|
|
119
|
+
|
|
120
|
+
syntax_files=(
|
|
121
|
+
spec/phronomy/architecture_governance_spec.rb
|
|
122
|
+
lib/phronomy/workflow.rb
|
|
123
|
+
lib/phronomy/workflow_context.rb
|
|
124
|
+
lib/phronomy/workflow_runner.rb
|
|
125
|
+
lib/phronomy/engine/event_loop.rb
|
|
126
|
+
lib/phronomy/engine/fsm_session.rb
|
|
127
|
+
lib/phronomy/persistence/in_memory.rb
|
|
128
|
+
lib/phronomy/persistence/durable_record.rb
|
|
129
|
+
lib/phronomy/persistence/durable_codec.rb
|
|
130
|
+
lib/phronomy/persistence/repository_facades.rb
|
|
131
|
+
lib/phronomy/persistence/migration/initial_format_migration.rb
|
|
132
|
+
spec/phronomy/persistence/backend_spi_api_spec.rb
|
|
133
|
+
spec/phronomy/persistence/durable_codec_spec.rb
|
|
134
|
+
spec/phronomy/persistence/in_memory_spec.rb
|
|
135
|
+
spec/phronomy/persistence/initial_format_migration_spec.rb
|
|
136
|
+
lib/phronomy/testing/persistence_contract/a_workflow_state_repository.rb
|
|
137
|
+
spec/phronomy/workflow_identity_contract_spec.rb
|
|
138
|
+
lib/phronomy/invocation_context.rb
|
|
139
|
+
lib/phronomy/agent/async_event_api.rb
|
|
140
|
+
lib/phronomy/agent/execution_coordinator.rb
|
|
141
|
+
lib/phronomy/agent/journal_record.rb
|
|
142
|
+
lib/phronomy/agent/context_assembler.rb
|
|
143
|
+
lib/phronomy/agent/context_policy.rb
|
|
144
|
+
lib/phronomy/agent/context_policy_input.rb
|
|
145
|
+
lib/phronomy/agent/context_policy_input_builder.rb
|
|
146
|
+
lib/phronomy/agent/context_plan.rb
|
|
147
|
+
lib/phronomy/agent/context_plan_validator.rb
|
|
148
|
+
lib/phronomy/agent/context_policies/default.rb
|
|
149
|
+
spec/phronomy/agent/context_policy_architecture_regression_spec.rb
|
|
150
|
+
lib/phronomy/agent/agent_invocation.rb
|
|
151
|
+
lib/phronomy/multi_agent/orchestrator.rb
|
|
152
|
+
lib/phronomy/multi_agent/fan_out_invocation.rb
|
|
153
|
+
spec/phronomy/generic_invocation_identity_contract_spec.rb
|
|
154
|
+
spec/phronomy/agent/journal_record_llm_call_id_spec.rb
|
|
155
|
+
spec/phronomy/agent/approval_parent_identity_contract_spec.rb
|
|
156
|
+
spec/phronomy/fsm_session_identity_contract_spec.rb
|
|
157
|
+
lib/phronomy/agent/tool_invocation.rb
|
|
158
|
+
lib/phronomy/agent/tool_approval_request.rb
|
|
159
|
+
lib/phronomy/agent/approval_evaluation_request.rb
|
|
160
|
+
spec/phronomy/invocation_context_spec.rb
|
|
161
|
+
spec/phronomy/trace_context_task_tree_spec.rb
|
|
162
|
+
spec/phronomy/agent/async_event_contract_spec.rb
|
|
163
|
+
spec/phronomy/agent/persistence_logical_state_ownership_spec.rb
|
|
164
|
+
spec/phronomy/agent/agent_invocation_spec.rb
|
|
165
|
+
spec/phronomy/agent/agent_invocation_session_builder_spec.rb
|
|
166
|
+
spec/phronomy/agent/tool_authorization_snapshot_boundary_spec.rb
|
|
167
|
+
spec/phronomy/agent/same_process_ownership_spec.rb
|
|
168
|
+
spec/phronomy/agent/runtime_admission_spec.rb
|
|
169
|
+
spec/phronomy/concurrency/cancellation_token_spec.rb
|
|
170
|
+
spec/phronomy/fault_injection_spec.rb
|
|
171
|
+
spec/phronomy/multi_agent/team_coordinator_spec.rb
|
|
172
|
+
spec/phronomy/multi_agent/orchestrator_knowledge_inheritance_spec.rb
|
|
173
|
+
benchmark/bench_agent_invoke.rb
|
|
174
|
+
benchmark/bench_regression.rb
|
|
175
|
+
spec/phronomy/workflow_spec.rb
|
|
176
|
+
spec/phronomy/workflow_context_spec.rb
|
|
177
|
+
spec/phronomy/workflow/admission_spec.rb
|
|
178
|
+
spec/phronomy/workflow/live_signal_spec.rb
|
|
179
|
+
spec/phronomy/workflow/fsm_session_spec.rb
|
|
180
|
+
lib/phronomy/generator_verifier.rb
|
|
181
|
+
spec/phronomy/generator_verifier_spec.rb
|
|
182
|
+
spec/integration/subgraph_parallel_agent_tool_spec.rb
|
|
183
|
+
spec/phronomy/guarantee_model_spec.rb
|
|
184
|
+
spec/phronomy/before_llm_input_rbs_contract_spec.rb
|
|
185
|
+
lib/phronomy/tracing/base.rb
|
|
186
|
+
lib/phronomy/tracing/langfuse_tracer.rb
|
|
187
|
+
spec/phronomy/tracing/extension_contract_spec.rb
|
|
188
|
+
spec/phronomy/tracing/langfuse_tracer_spec.rb
|
|
189
|
+
spec/phronomy/filter_architecture_regression_spec.rb
|
|
190
|
+
spec/phronomy/filter_blocking_spec.rb
|
|
191
|
+
spec/phronomy/security_spec.rb
|
|
192
|
+
spec/phronomy/fault_injection_extended_spec.rb
|
|
193
|
+
spec/integration/tool_filter_spec.rb
|
|
194
|
+
spec/integration/support/factors.rb
|
|
195
|
+
spec/integration/streaming_spec.rb
|
|
196
|
+
spec/phronomy/fault_injection_spec.rb
|
|
197
|
+
spec/phronomy/fault_injection_advanced_spec.rb
|
|
198
|
+
spec/phronomy/persistence_architecture_regression_spec.rb
|
|
199
|
+
lib/phronomy/agent/base.rb
|
|
200
|
+
lib/phronomy/agent_already_exists_error.rb
|
|
201
|
+
lib/phronomy/agent_purged_error.rb
|
|
202
|
+
lib/phronomy/engine/runtime/agent_ownership_registry.rb
|
|
203
|
+
lib/phronomy/agent/agent_root.rb
|
|
204
|
+
lib/phronomy/agent/llm_input_build_context.rb
|
|
205
|
+
lib/phronomy/agent/shared_state.rb
|
|
206
|
+
lib/phronomy/agent/concerns/before_llm_input.rb
|
|
207
|
+
lib/phronomy/testing/persistence_contract/an_agent_repository.rb
|
|
208
|
+
lib/phronomy/testing/persistence_contract/an_execution_repository.rb
|
|
209
|
+
lib/phronomy/testing/persistence_contract/a_journal_repository.rb
|
|
210
|
+
lib/phronomy/testing/persistence_contract/a_persistence_backend.rb
|
|
211
|
+
spec/phronomy/agent/base_spec.rb
|
|
212
|
+
spec/phronomy/agent_spec.rb
|
|
213
|
+
spec/phronomy/agent/before_llm_input_spec.rb
|
|
214
|
+
spec/phronomy/agent/agent_execution_codec_spec.rb
|
|
215
|
+
spec/phronomy/agent/shared_state_spec.rb
|
|
216
|
+
spec/phronomy/agent/journal_projection_spec.rb
|
|
217
|
+
spec/phronomy/agent/stateful_followup_regression_spec.rb
|
|
218
|
+
spec/phronomy/persistence/in_memory_spec.rb
|
|
219
|
+
lib/phronomy/agent/context_assembler.rb
|
|
220
|
+
lib/phronomy/multi_agent/coordinator.rb
|
|
221
|
+
spec/phronomy/agent/context_policy_spec.rb
|
|
222
|
+
spec/phronomy/multi_agent/handoff_spec.rb
|
|
223
|
+
spec/phronomy/multi_agent/handoff_projection_spec.rb
|
|
224
|
+
spec/phronomy/multi_agent/handoff_architecture_regression_spec.rb
|
|
225
|
+
spec/phronomy/multi_agent/runner_spec.rb
|
|
226
|
+
spec/integration/multi_agent_handoff_spec.rb
|
|
227
|
+
spec/integration/multi_agent_handoff_followup_spec.rb
|
|
228
|
+
)
|
|
229
|
+
for path in "${syntax_files[@]}"; do
|
|
230
|
+
ruby -c "$path" >/dev/null
|
|
231
|
+
done
|
|
232
|
+
|
|
233
|
+
echo "== ACS-01 architecture governance =="
|
|
234
|
+
bundle exec rspec spec/phronomy/architecture_governance_spec.rb
|
|
235
|
+
|
|
236
|
+
echo "== ACS-03 Filter authority / terminology cleanup =="
|
|
237
|
+
bundle exec rspec \
|
|
238
|
+
spec/phronomy/filter_architecture_regression_spec.rb \
|
|
239
|
+
spec/phronomy/filter_spec.rb \
|
|
240
|
+
spec/phronomy/filter_blocking_spec.rb \
|
|
241
|
+
spec/phronomy/prompt_injection_defenses_spec.rb \
|
|
242
|
+
spec/phronomy/security_spec.rb \
|
|
243
|
+
spec/phronomy/fault_injection_extended_spec.rb \
|
|
244
|
+
spec/phronomy/fault_injection_advanced_spec.rb \
|
|
245
|
+
spec/integration/tool_filter_spec.rb
|
|
246
|
+
|
|
247
|
+
echo "== ACS-05 Tracing extension contract / coverage cleanup =="
|
|
248
|
+
bundle exec rspec \
|
|
249
|
+
spec/phronomy/tracing/extension_contract_spec.rb \
|
|
250
|
+
spec/phronomy/tracing/base_spec.rb \
|
|
251
|
+
spec/phronomy/tracing_spec.rb \
|
|
252
|
+
spec/phronomy/tracing/open_telemetry_tracer_spec.rb \
|
|
253
|
+
spec/phronomy/tracing/langfuse_tracer_spec.rb \
|
|
254
|
+
spec/integration/tracing_adapters_spec.rb
|
|
255
|
+
|
|
256
|
+
echo "== ACS-18 guarantee / failure taxonomy =="
|
|
257
|
+
bundle exec rspec \
|
|
258
|
+
spec/phronomy/guarantee_model_spec.rb \
|
|
259
|
+
spec/phronomy/fault_injection_spec.rb \
|
|
260
|
+
spec/phronomy/fault_injection_advanced_spec.rb \
|
|
261
|
+
spec/phronomy/persistence_architecture_regression_spec.rb
|
|
262
|
+
|
|
263
|
+
echo "== ACS-07 before_llm_input Stable typed contract =="
|
|
264
|
+
bundle exec rbs -I sig validate
|
|
265
|
+
bundle exec rspec \
|
|
266
|
+
spec/phronomy/before_llm_input_rbs_contract_spec.rb \
|
|
267
|
+
spec/phronomy/agent/before_llm_input_spec.rb \
|
|
268
|
+
spec/phronomy/public_api_spec.rb
|
|
269
|
+
|
|
270
|
+
echo "== CG-04 canonical vocabulary guards =="
|
|
271
|
+
legacy_source="$(
|
|
272
|
+
grep -RInE '\bdefinition_version\b' lib/phronomy sig/phronomy \
|
|
273
|
+
--include='*.rb' --include='*.rbs' || true
|
|
274
|
+
)"
|
|
275
|
+
if [[ -n "$legacy_source" ]]; then
|
|
276
|
+
echo "FAIL: active source/RBS still contains legacy definition_version:" >&2
|
|
277
|
+
printf '%s\n' "$legacy_source" >&2
|
|
278
|
+
exit 1
|
|
279
|
+
fi
|
|
280
|
+
|
|
281
|
+
legacy_usage="$(
|
|
282
|
+
grep -RInE '\.definition_version\b|(^|[^[:alnum:]_])definition_version:' \
|
|
283
|
+
lib/phronomy sig/phronomy spec \
|
|
284
|
+
--include='*.rb' --include='*.rbs' || true
|
|
285
|
+
)"
|
|
286
|
+
if [[ -n "$legacy_usage" ]]; then
|
|
287
|
+
echo "FAIL: executable code/spec still uses legacy definition_version accessor/keyword:" >&2
|
|
288
|
+
printf '%s\n' "$legacy_usage" >&2
|
|
289
|
+
exit 1
|
|
290
|
+
fi
|
|
291
|
+
|
|
292
|
+
echo "== CG-04 focused specs =="
|
|
293
|
+
bundle exec rspec \
|
|
294
|
+
spec/phronomy/agent/base_spec.rb \
|
|
295
|
+
spec/phronomy/agent_spec.rb \
|
|
296
|
+
spec/phronomy/agent/before_llm_input_spec.rb \
|
|
297
|
+
spec/phronomy/agent/agent_execution_codec_spec.rb \
|
|
298
|
+
spec/phronomy/agent/shared_state_spec.rb \
|
|
299
|
+
spec/phronomy/agent/journal_projection_spec.rb \
|
|
300
|
+
spec/phronomy/agent/stateful_followup_regression_spec.rb \
|
|
301
|
+
spec/phronomy/persistence/in_memory_spec.rb \
|
|
302
|
+
spec/phronomy/persistence/backend_contract_spec.rb
|
|
303
|
+
|
|
304
|
+
echo "== ACS-04 Context Policy four-category SPI =="
|
|
305
|
+
bundle exec rbs -I sig validate
|
|
306
|
+
bundle exec rspec \
|
|
307
|
+
spec/phronomy/agent/context_policy_spec.rb \
|
|
308
|
+
spec/phronomy/agent/context_policy_branch_coverage_spec.rb \
|
|
309
|
+
spec/phronomy/agent/context_policy_architecture_regression_spec.rb \
|
|
310
|
+
spec/phronomy/agent/knowledge_context_spec.rb \
|
|
311
|
+
spec/phronomy/agent/manifest_token_budget_spec.rb \
|
|
312
|
+
spec/phronomy/agent/stateful_followup_regression_spec.rb
|
|
313
|
+
|
|
314
|
+
echo "== CG-05 focused specs =="
|
|
315
|
+
bundle exec rspec \
|
|
316
|
+
spec/phronomy/agent/context_policy_spec.rb \
|
|
317
|
+
spec/phronomy/multi_agent/handoff_spec.rb \
|
|
318
|
+
spec/phronomy/multi_agent/handoff_projection_spec.rb \
|
|
319
|
+
spec/phronomy/multi_agent/handoff_architecture_regression_spec.rb \
|
|
320
|
+
spec/phronomy/multi_agent/runner_spec.rb \
|
|
321
|
+
spec/integration/multi_agent_handoff_spec.rb \
|
|
322
|
+
spec/integration/multi_agent_handoff_followup_spec.rb
|
|
323
|
+
|
|
324
|
+
echo "== ACS-06 / CG-07 durable format / record-oriented Persistence SPI =="
|
|
325
|
+
ruby -c lib/phronomy/persistence.rb >/dev/null
|
|
326
|
+
ruby -c lib/phronomy/persistence/durable_record.rb >/dev/null
|
|
327
|
+
ruby -c lib/phronomy/persistence/durable_codec.rb >/dev/null
|
|
328
|
+
ruby -c lib/phronomy/persistence/repository_facades.rb >/dev/null
|
|
329
|
+
ruby -c lib/phronomy/persistence/in_memory.rb >/dev/null
|
|
330
|
+
ruby -c lib/phronomy/persistence/migration/initial_format_migration.rb >/dev/null
|
|
331
|
+
ruby -c spec/phronomy/persistence/backend_spi_api_spec.rb >/dev/null
|
|
332
|
+
ruby -c spec/phronomy/persistence/durable_codec_spec.rb >/dev/null
|
|
333
|
+
ruby -c spec/phronomy/persistence/in_memory_spec.rb >/dev/null
|
|
334
|
+
ruby -c spec/phronomy/persistence/initial_format_migration_spec.rb >/dev/null
|
|
335
|
+
bundle exec rbs -I sig validate
|
|
336
|
+
bundle exec rspec \
|
|
337
|
+
spec/phronomy/persistence/backend_spi_api_spec.rb \
|
|
338
|
+
spec/phronomy/persistence/durable_codec_spec.rb \
|
|
339
|
+
spec/phronomy/persistence/in_memory_spec.rb \
|
|
340
|
+
spec/phronomy/persistence/initial_format_migration_spec.rb \
|
|
341
|
+
spec/phronomy/persistence/backend_contract_spec.rb \
|
|
342
|
+
spec/phronomy/agent/agent_execution_codec_spec.rb \
|
|
343
|
+
spec/phronomy/agent/llm_input_manifest_spec.rb \
|
|
344
|
+
spec/phronomy/agent/approval_parent_identity_contract_spec.rb \
|
|
345
|
+
spec/phronomy/persistence_architecture_regression_spec.rb
|
|
346
|
+
|
|
347
|
+
if grep -nE '\.payload([^[:alnum:]_]|$)' lib/phronomy/persistence/in_memory.rb; then
|
|
348
|
+
echo "FAIL: raw InMemory Backend reintroduced DurableRecord payload interpretation" >&2
|
|
349
|
+
exit 1
|
|
350
|
+
fi
|
|
351
|
+
|
|
352
|
+
echo "== CG-02 generic invocation identity / durable Journal compatibility =="
|
|
353
|
+
bundle exec rbs -I sig validate
|
|
354
|
+
bundle exec rspec spec/phronomy/generic_invocation_identity_contract_spec.rb spec/phronomy/agent/journal_record_llm_call_id_spec.rb spec/phronomy/agent/agent_execution_codec_spec.rb spec/phronomy/invocation_context_spec.rb spec/phronomy/trace_context_task_tree_spec.rb spec/phronomy/agent/base_spec.rb spec/phronomy/agent_spec.rb spec/phronomy/agent/async_event_contract_spec.rb spec/phronomy/agent/before_llm_input_spec.rb spec/phronomy/agent/persistence_logical_state_ownership_spec.rb spec/phronomy/agent/agent_invocation_spec.rb spec/phronomy/agent/agent_invocation_session_builder_spec.rb spec/phronomy/concurrency/cancellation_token_spec.rb spec/phronomy/fault_injection_spec.rb spec/phronomy/multi_agent/orchestrator_spec.rb spec/phronomy/multi_agent/team_coordinator_spec.rb spec/phronomy/multi_agent/orchestrator_knowledge_inheritance_spec.rb spec/integration/orchestrator_spec.rb spec/phronomy/api_compatibility_spec.rb
|
|
355
|
+
|
|
356
|
+
legacy_correlation_source="$(
|
|
357
|
+
grep -RInE '(^|[^[:alnum:]_])correlation_id:' lib/phronomy --include='*.rb' || true
|
|
358
|
+
)"
|
|
359
|
+
if [[ -n "$legacy_correlation_source" ]]; then
|
|
360
|
+
echo "FAIL: active source still writes generic correlation_id:" >&2
|
|
361
|
+
printf '%s\n' "$legacy_correlation_source" >&2
|
|
362
|
+
exit 1
|
|
363
|
+
fi
|
|
364
|
+
|
|
365
|
+
echo "== ACS-11 EventLoop single-writer Agent runtime =="
|
|
366
|
+
ruby -c lib/phronomy/agent/execution_coordinator.rb >/dev/null
|
|
367
|
+
ruby -c lib/phronomy/agent/agent_invocation.rb >/dev/null
|
|
368
|
+
ruby -c lib/phronomy/agent/agent_invocation_session_builder.rb >/dev/null
|
|
369
|
+
ruby -c lib/phronomy/agent/phase_machine_builder.rb >/dev/null
|
|
370
|
+
ruby -c lib/phronomy/agent/tool_invocation.rb >/dev/null
|
|
371
|
+
ruby -c lib/phronomy/agent/approval_evaluation_request.rb >/dev/null
|
|
372
|
+
ruby -c lib/phronomy/engine/event_loop.rb >/dev/null
|
|
373
|
+
ruby -c spec/phronomy/agent/event_loop_single_writer_spec.rb >/dev/null
|
|
374
|
+
ruby -c spec/phronomy/agent/tool_authorization_snapshot_boundary_spec.rb >/dev/null
|
|
375
|
+
bundle exec rbs -I sig validate
|
|
376
|
+
bundle exec rspec spec/phronomy/agent/event_loop_single_writer_spec.rb spec/phronomy/agent/tool_authorization_snapshot_boundary_spec.rb spec/phronomy/agent/tool_invocation_spec.rb spec/phronomy/agent/approval_parent_identity_contract_spec.rb spec/phronomy/api_compatibility_spec.rb spec/phronomy/agent/approve_async_spec.rb spec/phronomy/agent/canonical_execution_log_spec.rb spec/phronomy/agent/persistence_logical_state_ownership_spec.rb spec/phronomy/persistence_architecture_regression_spec.rb spec/phronomy/fsm_session_identity_contract_spec.rb
|
|
377
|
+
|
|
378
|
+
if grep -RInE 'AgentExecutionActivation|ActivationRegistry|__agent_activations|phronomy_activation' lib/phronomy --include='*.rb'; then
|
|
379
|
+
echo "FAIL: ACS-11 removed Activation model remains in active production source" >&2
|
|
380
|
+
exit 1
|
|
381
|
+
fi
|
|
382
|
+
|
|
383
|
+
echo "== ACS-12 process-local Agent ownership / Runtime admission =="
|
|
384
|
+
ruby -c lib/phronomy/engine/runtime/agent_ownership_registry.rb >/dev/null
|
|
385
|
+
ruby -c lib/phronomy/agent/base.rb >/dev/null
|
|
386
|
+
ruby -c lib/phronomy/agent/execution_coordinator.rb >/dev/null
|
|
387
|
+
ruby -c lib/phronomy/engine/event_loop.rb >/dev/null
|
|
388
|
+
ruby -c spec/phronomy/agent/same_process_ownership_spec.rb >/dev/null
|
|
389
|
+
ruby -c spec/phronomy/agent/runtime_admission_spec.rb >/dev/null
|
|
390
|
+
bundle exec rbs -I sig validate
|
|
391
|
+
bundle exec rspec \
|
|
392
|
+
spec/phronomy/agent/same_process_ownership_spec.rb \
|
|
393
|
+
spec/phronomy/agent/runtime_admission_spec.rb \
|
|
394
|
+
spec/phronomy/agent/persistence_logical_state_ownership_spec.rb \
|
|
395
|
+
spec/phronomy/agent/base_spec.rb \
|
|
396
|
+
spec/phronomy/api_compatibility_spec.rb \
|
|
397
|
+
spec/phronomy/persistence_architecture_regression_spec.rb
|
|
398
|
+
|
|
399
|
+
echo "== CG-03b / ACS-10 FSMSession routing foundation =="
|
|
400
|
+
bundle exec rspec \
|
|
401
|
+
spec/phronomy/fsm_session_identity_contract_spec.rb \
|
|
402
|
+
spec/phronomy/workflow/fsm_session_spec.rb \
|
|
403
|
+
spec/phronomy/workflow/transition_action_spec.rb \
|
|
404
|
+
spec/phronomy/workflow/live_signal_spec.rb \
|
|
405
|
+
spec/phronomy/workflow_identity_contract_spec.rb \
|
|
406
|
+
spec/phronomy/persistence_architecture_regression_spec.rb \
|
|
407
|
+
spec/phronomy/lifecycle_invariants_spec.rb \
|
|
408
|
+
spec/phronomy/event_loop_queue_observability_spec.rb \
|
|
409
|
+
spec/phronomy/architecture_regression_spec.rb \
|
|
410
|
+
spec/phronomy/generic_invocation_identity_contract_spec.rb \
|
|
411
|
+
spec/phronomy/agent/agent_invocation_spec.rb \
|
|
412
|
+
spec/phronomy/agent/agent_invocation_session_builder_spec.rb \
|
|
413
|
+
spec/phronomy/agent/tool_invocation_session_builder_spec.rb \
|
|
414
|
+
spec/phronomy/agent/tool_invocation_spec.rb \
|
|
415
|
+
spec/phronomy/agent/tool_call_async_compatibility_spec.rb \
|
|
416
|
+
spec/phronomy/agent/approval_parent_identity_contract_spec.rb \
|
|
417
|
+
spec/phronomy/agent/suspend_resume_spec.rb \
|
|
418
|
+
spec/phronomy/multi_agent/orchestrator_spec.rb
|
|
419
|
+
|
|
420
|
+
if grep -RIn 'parent_agent_invocation_id\|parent_fsm_session_id' \
|
|
421
|
+
lib/phronomy --include='*.rb'; then
|
|
422
|
+
echo "FAIL: long-lived Agent/Tool parent Runtime routing field remains" >&2
|
|
423
|
+
exit 1
|
|
424
|
+
fi
|
|
425
|
+
|
|
426
|
+
legacy_runtime_identity="$(
|
|
427
|
+
grep -RInE 'graph_thread_id|payload: [{]session_id:' \
|
|
428
|
+
lib/phronomy --include='*.rb' || true
|
|
429
|
+
)"
|
|
430
|
+
if [[ -n "$legacy_runtime_identity" ]]; then
|
|
431
|
+
echo "FAIL: active Runtime source still contains legacy generic routing bridge:" >&2
|
|
432
|
+
printf '%s\n' "$legacy_runtime_identity" >&2
|
|
433
|
+
exit 1
|
|
434
|
+
fi
|
|
435
|
+
|
|
436
|
+
python3 - <<'PY'
|
|
437
|
+
import pathlib, re
|
|
438
|
+
|
|
439
|
+
def fsm_new_has_id_kwarg(text):
|
|
440
|
+
"""Return True only if FSMSession.new(...) itself has an id: keyword argument."""
|
|
441
|
+
pos = 0
|
|
442
|
+
while True:
|
|
443
|
+
m = re.search(r'FSMSession\.new\(', text[pos:])
|
|
444
|
+
if not m:
|
|
445
|
+
return False
|
|
446
|
+
start = pos + m.end()
|
|
447
|
+
depth = 1
|
|
448
|
+
i = start
|
|
449
|
+
while i < len(text) and depth > 0:
|
|
450
|
+
if text[i] == '(':
|
|
451
|
+
depth += 1
|
|
452
|
+
elif text[i] == ')':
|
|
453
|
+
depth -= 1
|
|
454
|
+
i += 1
|
|
455
|
+
call_args = text[start:i - 1]
|
|
456
|
+
if re.search(r'\bid\s*:', call_args):
|
|
457
|
+
return True
|
|
458
|
+
pos = pos + m.end()
|
|
459
|
+
return False
|
|
460
|
+
|
|
461
|
+
for rel in [
|
|
462
|
+
"lib/phronomy/agent/agent_invocation_session_builder.rb",
|
|
463
|
+
"lib/phronomy/agent/tool_invocation_session_builder.rb",
|
|
464
|
+
"lib/phronomy/multi_agent/fan_out_session_builder.rb",
|
|
465
|
+
]:
|
|
466
|
+
text = pathlib.Path(rel).read_text()
|
|
467
|
+
if fsm_new_has_id_kwarg(text):
|
|
468
|
+
raise SystemExit(f"FAIL: {rel} still injects a domain/context ID as FSMSession id")
|
|
469
|
+
|
|
470
|
+
workflow = pathlib.Path("lib/phronomy/workflow_runner.rb").read_text()
|
|
471
|
+
event_loop = pathlib.Path("lib/phronomy/engine/event_loop.rb").read_text()
|
|
472
|
+
fsm = pathlib.Path("lib/phronomy/engine/fsm_session.rb").read_text()
|
|
473
|
+
|
|
474
|
+
if "Phronomy::FSMSession.reserve_identity" in workflow:
|
|
475
|
+
raise SystemExit("FAIL: ACS-13 Workflow still pre-reserves FSMSession identity for admission")
|
|
476
|
+
if "owner_fsm_session_id" in workflow or "owner_fsm_session_id" in event_loop:
|
|
477
|
+
raise SystemExit("FAIL: ACS-13 Workflow admission still conflates owner and routing identity")
|
|
478
|
+
for required in ["owner_token: Object.new.freeze", "bind_workflow_session"]:
|
|
479
|
+
if required not in workflow:
|
|
480
|
+
raise SystemExit(f"FAIL: WorkflowRunner missing ACS-13 invariant: {required}")
|
|
481
|
+
for required in ["WorkflowAdmission = Data.define", ":owner_token, :fsm_session_id, :state"]:
|
|
482
|
+
if required not in event_loop:
|
|
483
|
+
raise SystemExit(f"FAIL: EventLoop missing ACS-13 admission invariant: {required}")
|
|
484
|
+
for required in ["workflow_terminal_persistence_result", ":persisting_terminal", ":recovery_required"]:
|
|
485
|
+
if required not in fsm:
|
|
486
|
+
raise SystemExit(f"FAIL: FSMSession missing ACS-13 terminal barrier invariant: {required}")
|
|
487
|
+
PY
|
|
488
|
+
|
|
489
|
+
echo "== ACS-13 Workflow admission / durable terminal barrier =="
|
|
490
|
+
ruby -c lib/phronomy/workflow_runner.rb >/dev/null
|
|
491
|
+
ruby -c lib/phronomy/engine/event_loop.rb >/dev/null
|
|
492
|
+
ruby -c lib/phronomy/engine/fsm_session.rb >/dev/null
|
|
493
|
+
ruby -c spec/phronomy/workflow/admission_spec.rb >/dev/null
|
|
494
|
+
ruby -c spec/phronomy/workflow/transition_action_spec.rb >/dev/null
|
|
495
|
+
ruby -c spec/phronomy/fsm_session_identity_contract_spec.rb >/dev/null
|
|
496
|
+
bundle exec rspec \
|
|
497
|
+
spec/phronomy/workflow/admission_spec.rb \
|
|
498
|
+
spec/phronomy/workflow/live_signal_spec.rb \
|
|
499
|
+
spec/phronomy/workflow/transition_action_spec.rb \
|
|
500
|
+
spec/phronomy/fsm_session_identity_contract_spec.rb \
|
|
501
|
+
spec/phronomy/persistence_architecture_regression_spec.rb \
|
|
502
|
+
spec/integration/wait_state_spec.rb \
|
|
503
|
+
spec/integration/graph_spec.rb
|
|
504
|
+
|
|
505
|
+
echo "== CG-03a Agent execution parent identity =="
|
|
506
|
+
bundle exec rbs -I sig validate
|
|
507
|
+
bundle exec rspec \
|
|
508
|
+
spec/phronomy/agent/approval_parent_identity_contract_spec.rb \
|
|
509
|
+
spec/phronomy/agent/tool_invocation_spec.rb \
|
|
510
|
+
spec/phronomy/agent/tool_call_async_compatibility_spec.rb \
|
|
511
|
+
spec/phronomy/agent/agent_invocation_spec.rb \
|
|
512
|
+
spec/phronomy/agent/agent_invocation_session_builder_spec.rb \
|
|
513
|
+
spec/phronomy/agent/suspend_resume_spec.rb \
|
|
514
|
+
spec/integration/approval_resume_spec.rb \
|
|
515
|
+
spec/phronomy/agent/agent_execution_codec_spec.rb \
|
|
516
|
+
spec/phronomy/api_compatibility_spec.rb
|
|
517
|
+
|
|
518
|
+
legacy_approval_public="$(
|
|
519
|
+
grep -RInE 'agent_invocation_id' lib/phronomy/agent/tool_approval_request.rb lib/phronomy/agent/approval_evaluation_request.rb sig/phronomy/agent.rbs || true
|
|
520
|
+
)"
|
|
521
|
+
if [[ -n "$legacy_approval_public" ]]; then
|
|
522
|
+
echo "FAIL: public approval contract still contains agent_invocation_id:" >&2
|
|
523
|
+
printf '%s\n' "$legacy_approval_public" >&2
|
|
524
|
+
exit 1
|
|
525
|
+
fi
|
|
526
|
+
|
|
527
|
+
legacy_agent_invocation_identity="$(
|
|
528
|
+
grep -RInE '(^|[^[:alnum:]_])agent_invocation_id([^[:alnum:]_]|$)' lib/phronomy sig/phronomy --include='*.rb' --include='*.rbs' || true
|
|
529
|
+
)"
|
|
530
|
+
legacy_agent_invocation_identity="$(
|
|
531
|
+
printf '%s\n' "$legacy_agent_invocation_identity" |
|
|
532
|
+
grep -v 'lib/phronomy/agent/base.rb' |
|
|
533
|
+
grep -v 'lib/phronomy/agent/agent_execution.rb' |
|
|
534
|
+
grep -v 'lib/phronomy/persistence/migration/initial_format_migration.rb' || true
|
|
535
|
+
)"
|
|
536
|
+
if [[ -n "$legacy_agent_invocation_identity" ]]; then
|
|
537
|
+
echo "FAIL: active source/RBS reintroduced agent_invocation_id domain identity:" >&2
|
|
538
|
+
printf '%s\n' "$legacy_agent_invocation_identity" >&2
|
|
539
|
+
exit 1
|
|
540
|
+
fi
|
|
541
|
+
|
|
542
|
+
echo "== CG-01 Workflow identity =="
|
|
543
|
+
bundle exec rbs -I sig validate
|
|
544
|
+
bundle exec rspec \
|
|
545
|
+
spec/phronomy/workflow_identity_contract_spec.rb \
|
|
546
|
+
spec/phronomy/workflow_spec.rb \
|
|
547
|
+
spec/phronomy/workflow_context_spec.rb \
|
|
548
|
+
spec/phronomy/workflow/admission_spec.rb \
|
|
549
|
+
spec/phronomy/workflow/live_signal_spec.rb \
|
|
550
|
+
spec/phronomy/workflow/fsm_session_spec.rb \
|
|
551
|
+
spec/phronomy/generator_verifier_spec.rb \
|
|
552
|
+
spec/integration/subgraph_parallel_agent_tool_spec.rb \
|
|
553
|
+
spec/phronomy/persistence/backend_contract_spec.rb \
|
|
554
|
+
spec/phronomy/persistence_architecture_regression_spec.rb \
|
|
555
|
+
spec/integration/wait_state_spec.rb \
|
|
556
|
+
spec/integration/graph_spec.rb
|
|
557
|
+
|
|
558
|
+
echo "== API snapshot =="
|
|
559
|
+
bundle exec ruby scripts/api_snapshot.rb
|
|
560
|
+
|
|
561
|
+
echo "== RBS =="
|
|
562
|
+
bundle exec rbs -I sig validate
|
|
563
|
+
|
|
564
|
+
echo "== API annotations =="
|
|
565
|
+
ruby scripts/check_api_annotations.rb
|
|
566
|
+
|
|
567
|
+
echo "== Default test task =="
|
|
568
|
+
bundle exec rake
|
|
569
|
+
|
|
570
|
+
echo "== All stub-based integration specs =="
|
|
571
|
+
bundle exec rspec --tag integration --format progress
|
|
572
|
+
|
|
573
|
+
echo "== Gem package guard =="
|
|
574
|
+
rm -rf tmp/cg04-cg05-gem-unpack
|
|
575
|
+
mkdir -p tmp/cg04-cg05-gem-unpack
|
|
576
|
+
built_gem=$(gem build phronomy.gemspec | awk '/File: / {print $2}' | tail -n 1)
|
|
577
|
+
if [[ -z "${built_gem:-}" || ! -f "$built_gem" ]]; then
|
|
578
|
+
echo "FAIL: gem build did not produce a package" >&2
|
|
579
|
+
exit 1
|
|
580
|
+
fi
|
|
581
|
+
gem unpack "$built_gem" --target tmp/cg04-cg05-gem-unpack >/dev/null
|
|
582
|
+
if find tmp/cg04-cg05-gem-unpack -type f -name '*.gem' -print -quit | grep -q .; then
|
|
583
|
+
echo "FAIL: built gem contains a nested .gem artifact" >&2
|
|
584
|
+
exit 1
|
|
585
|
+
fi
|
|
586
|
+
|
|
587
|
+
echo "OK: ACS-13 + ACS-12 + CG-03b routing foundation + CG-03a + CG-02 + CG-01 + ACS-06 + ACS-05 + ACS-03 + ACS-07 + ACS-18 + ACS-01 + existing CG-04/CG-05 regression validation completed"
|
|
@@ -95,13 +95,13 @@ puts "=== bench_agent_invoke ==="
|
|
|
95
95
|
Benchmark.bm(50) do |x|
|
|
96
96
|
x.report("Agent#invoke — minimal (no tools), #{AGENT_INVOKE_ITERATIONS} iters") do
|
|
97
97
|
AGENT_INVOKE_ITERATIONS.times do
|
|
98
|
-
BENCH_AGENT_MINIMAL.invoke("ping"
|
|
98
|
+
BENCH_AGENT_MINIMAL.invoke("ping")
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
x.report("Agent#invoke — tool-aware, #{AGENT_INVOKE_ITERATIONS} iters") do
|
|
103
103
|
AGENT_INVOKE_ITERATIONS.times do
|
|
104
|
-
BENCH_AGENT_TOOLS.invoke("ping"
|
|
104
|
+
BENCH_AGENT_TOOLS.invoke("ping")
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
end
|