============================= test session starts ==============================
platform darwin -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0 -- /Users/dondoe/coding/zeroth/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/dondoe/coding/zeroth
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, langsmith-0.7.20, asyncio-1.3.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collecting ... collected 179 items

tests/agent_runtime/test_agent_runtime.py::test_prompt_assembly_redacts_sensitive_values PASSED [  0%]
tests/agent_runtime/test_agent_runtime.py::test_agent_runner_validates_output_and_checkpoints_thread_state PASSED [  1%]
tests/agent_runtime/test_agent_runtime.py::test_agent_runner_retries_on_validation_error_then_succeeds PASSED [  1%]
tests/agent_runtime/test_agent_runtime.py::test_agent_runner_times_out_and_retries PASSED [  2%]
tests/agent_runtime/test_agent_runtime.py::test_agent_audit_serializer_redacts_sensitive_metadata PASSED [  2%]
tests/agent_runtime/test_runner_integration.py::test_repository_thread_state_store_integrates_with_agent_runner PASSED [  3%]
tests/agent_runtime/test_runner_integration.py::test_agent_runner_executes_governai_style_tool_calls_through_executable_units PASSED [  3%]
tests/agent_runtime/test_runner_tools.py::test_agent_runner_executes_declared_tool_calls PASSED [  4%]
tests/agent_runtime/test_runner_tools.py::test_agent_runner_rejects_undeclared_tool_calls PASSED [  5%]
tests/agent_runtime/test_thread_store.py::test_thread_resolver_creates_and_continues_thread PASSED [  5%]
tests/agent_runtime/test_thread_store.py::test_thread_state_store_checkpoints_and_loads_latest_state PASSED [  6%]
tests/agent_runtime/test_thread_store.py::test_thread_store_noop_helpers_without_thread_id PASSED [  6%]
tests/agent_runtime/test_tools.py::test_tool_attachment_registry_resolves_aliases_and_normalizes_refs PASSED [  7%]
tests/agent_runtime/test_tools.py::test_tool_attachment_bridge_rejects_undeclared_tool_requests PASSED [  7%]
tests/agent_runtime/test_tools.py::test_tool_attachment_bridge_enforces_permissions PASSED [  8%]
tests/agent_runtime/test_tools.py::test_tool_attachment_audit_helpers_capture_timeout_and_side_effect_metadata PASSED [  8%]
tests/approvals/test_service.py::test_approval_service_creates_and_queries_pending_records PASSED [  9%]
tests/approvals/test_service.py::test_approval_service_resolves_and_is_idempotent PASSED [ 10%]
tests/audit/test_audit_repository.py::test_audit_repository_writes_queries_and_assembles_timeline PASSED [ 10%]
tests/audit/test_audit_repository.py::test_payload_sanitizer_redacts_keys_and_omits_fields PASSED [ 11%]
tests/conditions/test_branch.py::test_condition_binder_projects_graph_edges PASSED [ 11%]
tests/conditions/test_branch.py::test_branch_resolver_supports_one_to_one_and_fan_out PASSED [ 12%]
tests/conditions/test_branch.py::test_branch_resolver_suppresses_false_conditions PASSED [ 12%]
tests/conditions/test_branch.py::test_branch_resolver_allows_cycle_traversal_with_safeguard PASSED [ 13%]
tests/conditions/test_branch.py::test_next_step_planner_wraps_branch_resolution PASSED [ 13%]
tests/conditions/test_evaluator.py::test_condition_evaluator_handles_nested_paths_and_metadata PASSED [ 14%]
tests/conditions/test_evaluator.py::test_condition_evaluator_supports_operand_refs PASSED [ 15%]
tests/conditions/test_evaluator.py::test_condition_evaluator_rejects_unsupported_calls PASSED [ 15%]
tests/conditions/test_recorder.py::test_condition_result_recorder_appends_to_run_state PASSED [ 16%]
tests/contracts/test_registry.py::test_registry_crud_and_versioning PASSED [ 16%]
tests/contracts/test_registry.py::test_registry_supports_nested_optional_enum_and_array_schema PASSED [ 17%]
tests/contracts/test_registry.py::test_registry_raises_for_missing_versions PASSED [ 17%]
tests/contracts/test_registry.py::test_registry_binds_governai_tool_and_step_specs PASSED [ 18%]
tests/deployments/test_service.py::test_deploy_published_graph_succeeds PASSED [ 18%]
tests/deployments/test_service.py::test_deploy_draft_graph_fails PASSED  [ 19%]
tests/deployments/test_service.py::test_unversioned_deploy_selects_latest_published_version_when_newer_draft_exists PASSED [ 20%]
tests/deployments/test_service.py::test_snapshot_integrity_is_preserved PASSED [ 20%]
tests/deployments/test_service.py::test_deploy_rejects_missing_entry_contract_registration PASSED [ 21%]
tests/deployments/test_service.py::test_rollback_creates_new_deployment_version_for_older_published_graph PASSED [ 21%]
tests/deployments/test_service.py::test_reusing_existing_deployment_ref_for_different_graph_is_rejected PASSED [ 22%]
tests/deployments/test_service.py::test_deploy_retries_when_version_insert_races PASSED [ 22%]
tests/execution_units/test_adapters.py::test_python_runtime_adapter_materializes_and_executes_tool PASSED [ 23%]
tests/execution_units/test_adapters.py::test_command_runtime_adapter_materializes_and_executes_cli_tool PASSED [ 24%]
tests/execution_units/test_io.py::test_input_injection_modes_render_structured_payload[json_stdin-expected_stdin0-expected_argv0-None-None] PASSED [ 24%]
tests/execution_units/test_io.py::test_input_injection_modes_render_structured_payload[cli_args-None-expected_argv1-None-None] PASSED [ 25%]
tests/execution_units/test_io.py::test_input_injection_modes_render_structured_payload[env_vars-None-expected_argv2-ZEROTH_INPUT_API_KEY-"secret"] PASSED [ 25%]
tests/execution_units/test_io.py::test_input_file_json_mode_writes_payload PASSED [ 26%]
tests/execution_units/test_io.py::test_output_extraction_modes_normalize_payload[json_stdout-  {"answer": "done", "score": 7}\n-None-None-expected_payload0] PASSED [ 26%]
tests/execution_units/test_io.py::test_output_extraction_modes_normalize_payload[tagged_stdout_json-log line\nZEROTH_OUTPUT_JSON={"answer":"done","score":7}\n-None-None-expected_payload1] PASSED [ 27%]
tests/execution_units/test_io.py::test_output_extraction_modes_normalize_payload[text_stdout-plain text output\n-None-None-expected_payload2] PASSED [ 27%]
tests/execution_units/test_io.py::test_output_extraction_modes_normalize_payload[exit_code_only--17-None-expected_payload3] PASSED [ 28%]
tests/execution_units/test_io.py::test_output_file_json_mode_reads_json_payload PASSED [ 29%]
tests/execution_units/test_io.py::test_output_conversion_validates_typed_model PASSED [ 29%]
tests/execution_units/test_io.py::test_input_injection_requires_input_file_path_for_file_mode PASSED [ 30%]
tests/execution_units/test_io.py::test_output_extraction_rejects_invalid_json_stdout PASSED [ 30%]
tests/execution_units/test_io.py::test_output_extraction_rejects_missing_tagged_json_line PASSED [ 31%]
tests/execution_units/test_io.py::test_output_extraction_rejects_missing_output_file PASSED [ 31%]
tests/execution_units/test_io.py::test_output_extraction_requires_exit_code_for_exit_code_mode PASSED [ 32%]
tests/execution_units/test_io.py::test_output_conversion_rejects_invalid_payload PASSED [ 32%]
tests/execution_units/test_manifest.py::test_manifest_validator_accepts_each_onboarding_mode PASSED [ 33%]
tests/execution_units/test_manifest.py::test_manifest_validator_rejects_missing_required_wrapped_command PASSED [ 34%]
tests/execution_units/test_runner.py::test_wrapped_command_runner_supports_cli_args_and_json_stdout PASSED [ 34%]
tests/execution_units/test_runner.py::test_wrapped_command_runner_supports_env_vars_and_tagged_stdout PASSED [ 35%]
tests/execution_units/test_runner.py::test_project_runner_builds_once_per_cache_key PASSED [ 35%]
tests/execution_units/test_runner.py::test_native_runner_uses_governai_python_tool_for_native_units PASSED [ 36%]
tests/execution_units/test_runner.py::test_runner_allows_exit_code_only_for_non_zero_exit PASSED [ 36%]
tests/execution_units/test_sandbox.py::test_sandbox_manager_runs_in_temp_workdir_and_filters_environment PASSED [ 37%]
tests/execution_units/test_sandbox.py::test_sandbox_manager_times_out_and_raises PASSED [ 37%]
tests/execution_units/test_sandbox.py::test_environment_cache_manager_hits_misses_and_cache_keys_are_stable PASSED [ 38%]
tests/execution_units/test_sandbox.py::test_sandbox_manager_auto_selects_provisioned_docker_backend PASSED [ 39%]
tests/execution_units/test_sandbox.py::test_sandbox_manager_raises_when_docker_backend_is_requested_but_missing PASSED [ 39%]
tests/graph/test_models.py::test_graph_serialization_round_trip_preserves_governai_shape PASSED [ 40%]
tests/graph/test_models.py::test_graph_compiles_to_governai_flow_spec PASSED [ 40%]
tests/graph/test_models.py::test_graph_lifecycle_transitions PASSED      [ 41%]
tests/graph/test_models.py::test_graph_rejects_invalid_entry_step PASSED [ 41%]
tests/graph/test_repository.py::test_graph_repository_round_trip_and_schema_version PASSED [ 42%]
tests/graph/test_repository.py::test_graph_repository_updates_status PASSED [ 43%]
tests/graph/test_repository.py::test_graph_repository_clone_published_to_new_draft_and_preserve_history PASSED [ 43%]
tests/graph/test_repository.py::test_graph_repository_rejects_mutating_published_graph PASSED [ 44%]
tests/graph/test_repository.py::test_graph_repository_diff_detects_semantic_changes PASSED [ 44%]
tests/graph/test_validation.py::test_validator_accepts_well_formed_cyclic_graph_with_safeguard PASSED [ 45%]
tests/graph/test_validation.py::test_validator_rejects_cyclic_graph_without_safeguard PASSED [ 45%]
tests/graph/test_validation.py::test_validator_reports_entrypoint_and_edge_errors PASSED [ 46%]
tests/graph/test_validation.py::test_validator_reports_contract_attachment_and_condition_errors PASSED [ 46%]
tests/graph/test_validation.py::test_validator_reports_invalid_mapping_and_raise_helper PASSED [ 47%]
tests/live_scenarios/test_research_audit.py::test_research_audit_bootstrap_and_api_flow PASSED [ 48%]
tests/live_scenarios/test_research_audit.py::test_research_audit_approval_pause_and_resume PASSED [ 48%]
tests/live_scenarios/test_research_audit.py::test_research_audit_thread_continuity_across_runs PASSED [ 49%]
tests/live_scenarios/test_research_audit.py::test_research_audit_strict_policy_mode_terminates_run PASSED [ 49%]
tests/mappings/test_executor.py::test_mapping_executor_applies_nested_operations PASSED [ 50%]
tests/mappings/test_executor.py::test_mapping_executor_uses_source_value_before_default PASSED [ 50%]
tests/mappings/test_validator.py::test_mapping_validator_accepts_valid_mapping PASSED [ 51%]
tests/mappings/test_validator.py::test_mapping_validator_rejects_duplicate_targets PASSED [ 51%]
tests/mappings/test_validator.py::test_mapping_validator_rejects_empty_paths PASSED [ 52%]
tests/memory/test_connectors.py::test_shared_memory_instance_is_visible_across_agents PASSED [ 53%]
tests/memory/test_connectors.py::test_ephemeral_memory_isolated_per_run PASSED [ 53%]
tests/memory/test_connectors.py::test_thread_memory_persists_across_runs_and_updates_thread_bindings PASSED [ 54%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_executes_linear_graph PASSED [ 54%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_resolves_conditional_branch PASSED [ 55%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_stops_cycle_with_max_total_steps PASSED [ 55%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_pauses_on_human_approval PASSED [ 56%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_continues_after_approval_resolution PASSED [ 56%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_blocks_policy_violation_and_records_audit PASSED [ 57%]
tests/orchestrator/test_runtime.py::test_runtime_orchestrator_resumes_persisted_run PASSED [ 58%]
tests/policy/test_guard.py::test_policy_guard_allows_declared_capabilities PASSED [ 58%]
tests/policy/test_guard.py::test_policy_guard_denies_node_when_capability_is_denied PASSED [ 59%]
tests/policy/test_guard.py::test_apply_secret_policy_filters_environment_by_allowlist PASSED [ 59%]
tests/policy/test_guard.py::test_policy_guard_rejects_unknown_capability_ref PASSED [ 60%]
tests/runs/test_models.py::test_run_model_round_trips_json_serialization PASSED [ 60%]
tests/runs/test_models.py::test_thread_model_round_trips_json_serialization PASSED [ 61%]
tests/runs/test_models.py::test_run_status_enum_covers_phase_states PASSED [ 62%]
tests/runs/test_repository.py::test_run_repository_crud_round_trip PASSED [ 62%]
tests/runs/test_repository.py::test_run_repository_transitions_and_validation PASSED [ 63%]
tests/runs/test_repository.py::test_run_repository_terminal_failure_state_round_trip PASSED [ 63%]
tests/runs/test_repository.py::test_run_repository_checkpoint_semantics PASSED [ 64%]
tests/runs/test_repository.py::test_thread_repository_create_and_continue PASSED [ 64%]
tests/runs/test_repository.py::test_thread_repository_attach_run_updates_existing_thread PASSED [ 65%]
tests/runs/test_repository.py::test_thread_repository_thread_aware_run_indexing PASSED [ 65%]
tests/service/test_app.py::test_bootstrap_service_loads_valid_deployment PASSED [ 66%]
tests/service/test_app.py::test_bootstrap_service_accepts_injected_runners PASSED [ 67%]
tests/service/test_app.py::test_bootstrap_app_forwards_injected_runners PASSED [ 67%]
tests/service/test_app.py::test_bootstrap_service_fails_for_missing_deployment PASSED [ 68%]
tests/service/test_app.py::test_bootstrap_service_rejects_mismatched_graph_snapshot PASSED [ 68%]
tests/service/test_app.py::test_health_endpoint_returns_success PASSED   [ 69%]
tests/service/test_approval_api.py::test_approval_api_queries_pending_approvals_by_id_run_thread_and_scope PASSED [ 69%]
tests/service/test_approval_api.py::test_approval_api_resolves_all_decisions_and_resumes_when_appropriate[approve-None-succeeded-expected_output0] PASSED [ 70%]
tests/service/test_approval_api.py::test_approval_api_resolves_all_decisions_and_resumes_when_appropriate[reject-None-failed-None] PASSED [ 70%]
tests/service/test_approval_api.py::test_approval_api_resolves_all_decisions_and_resumes_when_appropriate[edit_and_approve-edited_payload2-succeeded-expected_output2] PASSED [ 71%]
tests/service/test_approval_api.py::test_approval_api_duplicate_resolution_is_idempotent PASSED [ 72%]
tests/service/test_contract_api.py::test_input_contract_endpoint_returns_deployed_contract_version PASSED [ 72%]
tests/service/test_contract_api.py::test_output_contract_endpoint_returns_deployed_contract_version PASSED [ 73%]
tests/service/test_contract_api.py::test_result_error_state_schema_endpoint_exposes_output_contract_and_error_schema PASSED [ 73%]
tests/service/test_contract_api.py::test_deployment_metadata_endpoint_returns_version_snapshot PASSED [ 74%]
tests/service/test_contract_api.py::test_schema_serialization_round_trip PASSED [ 74%]
tests/service/test_contract_api.py::test_contract_endpoints_use_deployed_contract_versions PASSED [ 75%]
tests/service/test_contract_api.py::test_contract_endpoints_fail_closed_for_legacy_unpinned_deployment PASSED [ 75%]
tests/service/test_contract_api.py::test_contract_endpoint_returns_404_for_unknown_deployment PASSED [ 76%]
tests/service/test_e2e_phase4.py::test_phase4_end_to_end_deploy_invoke_resume_thread_and_rollback PASSED [ 77%]
tests/service/test_e2e_phase5.py::test_phase5_linear_graph_runs_agent_to_eu_to_agent_via_api PASSED [ 77%]
tests/service/test_e2e_phase5.py::test_phase5_cyclic_graph_stops_at_loop_guard_via_api PASSED [ 78%]
tests/service/test_e2e_phase5.py::test_phase5_conditional_branching_fans_out_via_api PASSED [ 78%]
tests/service/test_e2e_phase5.py::test_phase5_approval_pause_and_resume_via_api PASSED [ 79%]
tests/service/test_e2e_phase5.py::test_phase5_thread_continuity_across_runs_via_api PASSED [ 79%]
tests/service/test_e2e_phase5.py::test_phase5_shared_memory_connector_between_agents_via_api PASSED [ 80%]
tests/service/test_e2e_phase5.py::test_phase5_deploy_and_invoke_via_service_wrapper_api PASSED [ 81%]
tests/service/test_e2e_phase5.py::test_phase5_policy_violation_fails_execution_and_records_audit PASSED [ 81%]
tests/service/test_run_api.py::test_run_creation_accepts_input_and_supplied_thread_id PASSED [ 82%]
tests/service/test_run_api.py::test_run_creation_without_thread_id_returns_new_thread_linkage PASSED [ 82%]
tests/service/test_run_api.py::test_run_creation_rejects_invalid_input PASSED [ 83%]
tests/service/test_run_api.py::test_run_creation_validates_against_deployed_input_contract_version PASSED [ 83%]
tests/service/test_run_api.py::test_run_creation_rejects_foreign_thread_id PASSED [ 84%]
tests/service/test_run_api.py::test_run_status_reports_running_and_completed_state PASSED [ 84%]
tests/service/test_run_api.py::test_run_status_returns_404_for_unknown_run PASSED [ 85%]
tests/service/test_run_api.py::test_run_status_does_not_expose_runs_from_other_deployments PASSED [ 86%]
tests/service/test_run_api.py::test_run_status_does_not_expose_runs_from_other_deployment_versions PASSED [ 86%]
tests/service/test_run_api.py::test_run_status_reports_failed_state PASSED [ 87%]
tests/service/test_run_api.py::test_run_creation_returns_404_when_pinned_input_contract_is_missing PASSED [ 87%]
tests/service/test_run_api.py::test_run_status_reports_approval_paused_state PASSED [ 88%]
tests/service/test_run_api.py::test_run_status_reports_policy_and_loop_guard_termination PASSED [ 88%]
tests/service/test_run_api.py::test_run_api_models_validate_expected_shapes PASSED [ 89%]
tests/service/test_thread_api.py::test_thread_api_creates_new_thread_when_thread_id_is_omitted PASSED [ 89%]
tests/service/test_thread_api.py::test_thread_api_continues_existing_thread_for_same_deployment_snapshot PASSED [ 90%]
tests/service/test_thread_api.py::test_thread_api_accepts_new_explicit_thread_id_as_fresh_context PASSED [ 91%]
tests/service/test_thread_api.py::test_thread_api_rejects_thread_from_other_deployment PASSED [ 91%]
tests/service/test_thread_api.py::test_thread_api_rejects_thread_from_other_deployment_version PASSED [ 92%]
tests/service/test_thread_api.py::test_thread_api_keeps_thread_linkage_visible_in_run_state_and_audits PASSED [ 92%]
tests/storage/test_json.py::test_to_json_value_round_trips_model PASSED  [ 93%]
tests/storage/test_json.py::test_load_model_round_trips_structured_payload PASSED [ 93%]
tests/storage/test_json.py::test_load_typed_value_supports_generic_annotations PASSED [ 94%]
tests/storage/test_redis.py::test_local_redis_config_builds_default_url PASSED [ 94%]
tests/storage/test_redis.py::test_remote_redis_config_masks_credentials PASSED [ 95%]
tests/storage/test_redis.py::test_docker_redis_config_uses_provisioned_container_host PASSED [ 96%]
tests/storage/test_redis.py::test_docker_redis_config_raises_when_container_is_required_but_missing PASSED [ 96%]
tests/storage/test_redis.py::test_redis_config_from_env PASSED           [ 97%]
tests/storage/test_redis.py::test_build_governai_redis_runtime_uses_resolved_prefixes PASSED [ 97%]
tests/storage/test_sqlite.py::test_apply_migrations_updates_schema_version PASSED [ 98%]
tests/storage/test_sqlite.py::test_apply_migrations_is_idempotent PASSED [ 98%]
tests/storage/test_sqlite.py::test_apply_migrations_requires_contiguous_versions PASSED [ 99%]
tests/test_smoke.py::test_import PASSED                                  [100%]

============================= 179 passed in 6.11s ==============================
