Orchestrata Ultimate › Tests › Reference › agents › swarm
Tests reference — tests/agents/swarm
tests/agents/swarm — 5 test modules, 108 test functions. Source tree: tests/agents/swarm at commit 8a2cb42ad. Generated from the tests AST snapshot by scripts/gen-data-pages.py.
Prose pending.
Modules
| Module | Tests | Covers |
|---|---|---|
test_coordinator.py |
84 | 2 |
test_coordinator_extended.py |
20 | 1 |
test_coordinator_kg_registry_concurrency_regression.py |
2 | 1 |
test_types.py |
2 | 1 |
Module details
tests/agents/swarm/test_coordinator.py
source · 84 tests · 838 lines
Tests for orchestrata_ultimate.agents.swarm.coordinator.
Covers: agents.swarm.coordinator, agents.swarm.types
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_is_source_file_accepts_python_module |
27 | |
| function | test_is_source_file_accepts_nested_py_path |
31 | |
| function | test_is_source_file_rejects_text_extension |
35 | |
| function | test_is_source_file_rejects_init_py |
39 | |
| function | test_is_source_file_rejects_conftest_py |
43 | |
| function | test_is_source_file_rejects_test_prefix |
47 | |
| function | test_is_source_file_nested_test_file_rejected |
51 | |
| function | test_is_source_file_accepts_uppercase_name |
56 | |
| function | test_is_source_file_rejects_empty_extension |
60 | |
| function | test_copy_workspace_copies_files |
65 | |
| function | test_copy_workspace_ignores_pycache |
80 | |
| function | test_shard_result_defaults |
99 | |
| function | test_shard_result_success |
109 | |
| function | test_coordinator_default_init |
121 | |
| function | test_coordinator_custom_init |
132 | |
| function | test_coordinator_none_requirements_becomes_empty |
149 | |
| function | test_build_shard_prompt_includes_file_path |
159 | |
| function | test_build_shard_prompt_includes_task_summary |
166 | |
| function | test_build_shard_prompt_includes_api_spec |
172 | |
| function | test_build_shard_prompt_includes_skeleton_contents |
178 | |
| function | test_build_shard_prompt_skips_missing_skeleton |
185 | |
| function | test_build_shard_prompt_contains_critical_footer |
193 | |
| function | test_get_file_requirements_empty |
205 | |
| function | test_get_file_requirements_matches_basename_in_dict |
210 | |
| function | test_get_file_requirements_string_items |
218 | |
| function | test_get_file_requirements_no_match_returns_reference |
225 | |
| function | test_get_file_requirements_empty_text_matches |
236 | |
| function | test_has_traces_decorator_plain_name |
249 | |
| function | test_has_traces_decorator_call_name |
259 | |
| function | test_has_traces_decorator_attribute |
269 | |
| function | test_has_traces_decorator_call_attribute |
279 | |
| function | test_has_traces_decorator_missing |
289 | |
| function | test_has_traces_decorator_no_decorators |
299 | |
| function | test_check_traceability_skips_init_py |
314 | |
| function | test_check_traceability_skips_conftest |
319 | |
| function | test_check_traceability_skips_test_files |
324 | |
| function | test_check_traceability_missing_traces_import |
329 | |
| function | test_check_traceability_flags_public_function_without_traces |
336 | |
| function | test_check_traceability_accepts_private_function |
343 | |
| function | test_check_traceability_flags_public_class_without_traces |
350 | |
| function | test_check_traceability_passes_decorated_function |
357 | |
| function | test_check_traceability_invalid_syntax_returns_empty |
368 | |
| function | test_check_interface_compliance_empty_spec |
380 | |
| function | test_check_interface_compliance_no_spec_attribute |
385 | |
| function | test_check_interface_compliance_invalid_syntax |
391 | |
| function | test_check_interface_compliance_flags_missing_name |
396 | |
| function | test_check_interface_compliance_passes_when_defined |
406 | |
| function | test_check_syntax_valid_file |
420 | |
| function | test_check_syntax_invalid_file |
429 | |
| function | test_check_syntax_nonexistent_file |
438 | |
| function | test_check_syntax_non_py_ignored |
446 | |
| function | test_check_lint_missing_file_returns_empty |
459 | |
| function | test_check_lint_non_py_returns_empty |
466 | |
| function | test_sync_file_to_registry_extracts_classes |
479 | |
| function | test_sync_file_to_registry_extracts_functions |
501 | |
| function | test_sync_file_to_registry_import_path_strips_src_prefix |
513 | |
| function | test_sync_file_to_registry_skips_missing_file |
526 | |
| function | test_sync_file_to_registry_skips_non_py |
533 | |
| function | test_get_kg_import_context_empty |
540 | |
| function | test_get_kg_import_context_with_entries |
545 | |
| function | test_build_fix_prompt_includes_issues |
569 | |
| function | test_build_fix_prompt_includes_current_source |
576 | |
| function | test_build_fix_prompt_handles_missing_file |
583 | |
| function | test_scan_workspace_lists_relative_paths |
596 | |
| function | test_scan_workspace_skips_hidden_files |
606 | |
| function | test_scan_workspace_skips_venv_and_cache |
615 | |
| function | test_scan_workspace_sorted |
628 | |
| function | test_create_shard_workspace_copies_files |
642 | |
| function | test_create_shard_workspace_is_fresh |
656 | |
| function | test_copy_file_back_copies_to_workspace |
672 | |
| function | test_copy_file_back_missing_src_is_noop |
687 | |
| function | test_review_file_skips_non_py |
704 | |
| function | test_review_file_skips_missing |
711 | |
| function | test_review_file_flags_syntax_error |
717 | |
| function | test_review_file_flags_banned_imports |
725 | |
| function | test_review_file_includes_trace_check |
735 | |
| function | test_execute_swarm_empty_skeleton |
749 | |
| function | test_execute_swarm_no_source_files_among_skeleton |
757 | |
| function | test_build_shard_prompt_includes_kg_context |
773 | |
| function | test_build_shard_prompt_includes_matched_requirements |
786 | |
| function | test_copy_file_back_same_file_is_noop |
799 | |
| function | test_check_interface_compliance_closes_file_section_on_blank |
813 | |
| function | test_get_file_requirements_explicit_empty_list |
829 | |
| function | test_get_file_requirements_matched_includes_traces_hint |
834 |
tests/agents/swarm/test_coordinator_extended.py
source · 20 tests · 517 lines
Extended tests for agents.swarm.coordinator — coverage gaps and error paths.
Covers: agents.swarm.coordinator
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_build_shard_prompt_read_exception |
123 | Lines 237-238: OSError while reading skeleton is logged and skipped. |
| function | test_get_file_requirements_all_ids_empty |
138 | Line 328: requirements with no id field produce empty reference. |
| function | test_check_traceability_decorated_class_passes |
151 | Line 630: public class with @traces passes traceability check. |
| function | test_check_traceability_skips_private_class |
164 | Line 630: private class starting with _ is skipped. |
| function | test_check_lint_ruff_finds_issues |
178 | Lines 790-811: ruff catches unused import. |
| function | test_check_lint_ruff_clean_file |
188 | Lines 790-811: clean file returns empty issues. |
| function | test_review_file_interface_compliance_missing_class |
202 | Lines 543-546, 695: api_spec class mismatch is reported. |
| function | test_review_file_interface_compliance_passes_with_class |
214 | Lines 543-546, 695: matching api_spec class passes review. |
| function | test_build_fix_prompt_read_exception |
232 | Lines 933-934: OSError while reading file for fix is logged. |
| function | test_execute_shard_success_all_gates_pass |
248 | Lines 360-459: shard succeeds when all gates pass. |
| function | test_execute_shard_driver_returns_false |
274 | Lines 360-459: driver returns False → final failure. |
| function | test_execute_shard_driver_raises_exception |
297 | Lines 360-459: driver raises → caught, final failure. |
| function | test_execute_shard_syntax_retry_then_success |
320 | Lines 360-459: syntax error on first attempt, fixed on retry. |
| function | test_execute_shard_syntax_retry_exhausted |
347 | Lines 360-459: syntax error persists after all retries. |
| function | test_execute_shard_lint_retry_then_success |
367 | Lines 360-459: lint issues on first attempt, fixed on retry. |
| function | test_execute_shard_lint_retry_exhausted |
394 | Lines 360-459: lint issues persist after all retries. |
| function | test_execute_shard_review_retry_then_success |
414 | Lines 360-459: review issues on first attempt, fixed on retry. |
| function | test_execute_shard_review_retry_exhausted |
442 | Lines 360-459: review issues persist after all retries. |
| function | test_execute_swarm_multiple_source_files |
467 | Lines 159-219: execute_swarm fans out shards via TaskGroup. |
| function | test_execute_swarm_mixed_results |
490 | Lines 159-219: execute_swarm collects success and failure results. |
tests/agents/swarm/test_coordinator_kg_registry_concurrency_regression.py
source · 2 tests · 128 lines
Regression / hardening test: SwarmCoordinator's KG registry access.
Covers: agents.swarm.coordinator
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_threadsafe_write_and_read |
56 | Real-thread writers + _get_kg_import_context readers must not raise. |
| function | test_concurrent_sync_via_taskgroup |
113 | Real TaskGroup fan-out of _sync_file_to_registry stays consistent. |
tests/agents/swarm/test_types.py
source · 2 tests · 27 lines
Tests for agents.swarm.types.
Covers: agents.swarm.types
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestShardResult |
6 | |
| method | TestShardResult.test_defaults |
7 | |
| method | TestShardResult.test_all_fields |
16 |
Support files
Fixtures, package markers and helpers without test functions.