Orchestrata Ultimate › Tests › Reference › drivers

Tests reference — tests/drivers

tests/drivers — 16 test modules, 276 test functions. Source tree: tests/drivers at commit 8a2cb42ad. Generated from the tests AST snapshot by scripts/gen-data-pages.py.

Prose pending.

Modules

Module Tests Covers
conftest.py 0 0
test_aider_driver.py 13 2
test_base.py 3 1
test_browser_driver.py 36 1
test_browser_driver_extended.py 17 2
test_browser_providers.py 8 1
test_claude_api_driver.py 18 1
test_claude_code_driver.py 48 3
test_claude_code_driver_live.py 1 2
test_claude_settings.py 6 1
test_deepseek_coder_driver.py 63 2
test_driver_factory.py 17 8
test_driver_factory_claude_code.py 4 3
test_extraction.py 24 1
test_playwright_free_threaded.py 1 0
test_qwen_driver.py 17 1

Module details

tests/drivers/conftest.py

source · 0 tests · 71 lines

Driver-suite conftest — self-healing Playwright browser provisioning.

tests/drivers/test_aider_driver.py

source · 13 tests · 233 lines

Tests for drivers.aider_driver — real implementations, no monkeypatch.

Covers: core.base.traces, drivers.aider_driver

Kind Name Line Description
class TestFindAider 33
method TestFindAider.test_returns_string 34
method TestFindAider.test_fallback_loop_when_not_on_path 38 PATH emptied so shutil.which("aider") misses, and HOME points
method TestFindAider.test_fallback_finds_home_local_bin 57 When PATH search misses but a real file exists at the first
class TestAiderDriverInit 73
method TestAiderDriverInit.test_custom_workspace 74
method TestAiderDriverInit.test_workspace_created 78
class TestAiderDriverRunProcess 84
method TestAiderDriverRunProcess.test_run_process_success 86
method TestAiderDriverRunProcess.test_run_process_failure 93
class TestAiderDriverExecute 99
method TestAiderDriverExecute.test_execute_returns_tuple 102 execute returns a (bool, str) tuple for a trivial task -- driven
method TestAiderDriverExecute.test_execute_returns_false_when_cli_missing 121 When _find_aider() cannot locate a binary anywhere (PATH
method TestAiderDriverExecute.test_execute_handles_stale_binary_file_not_found 143 aider_bin resolves (via PATH) to a real, executable-bit-set
method TestAiderDriverExecute.test_execute_times_out 166 A real subprocess that sleeps past a near-zero timeout override
method TestAiderDriverExecute.test_execute_appends_file_args_for_existing_files 189 Each path in files that exists under the workspace is
method TestAiderDriverExecute.test_execute_passes_aider_model_env_override 216 When AIDER_MODEL is set, execute() must append --model <value>

tests/drivers/test_base.py

source · 3 tests · 49 lines

Tests for drivers.base protocol.

Covers: drivers.base

Kind Name Line Description
function test_execute_default_body_returns_none 46
class TestAsyncCodeDriver 28
method TestAsyncCodeDriver.test_is_protocol 29
method TestAsyncCodeDriver.test_has_execute_method 34

tests/drivers/test_browser_driver.py

source · 36 tests · 458 lines

Tests for drivers.browser_driver.

Covers: drivers.browser_driver

Kind Name Line Description
class TestShouldInject 169
method TestShouldInject.test_qwen_browser 170
method TestShouldInject.test_deepseek_browser 173
method TestShouldInject.test_kimi_browser 176
method TestShouldInject.test_other_provider 179
class TestBrowserDriverInit 183
method TestBrowserDriverInit.test_default_workspace 184
method TestBrowserDriverInit.test_custom_params 190
method TestBrowserDriverInit.test_storage_path 198
class TestBrowserDriverSession 203
method TestBrowserDriverSession.test_is_session_expired_false_no_start 204
method TestBrowserDriverSession.test_is_session_expired_true 208
method TestBrowserDriverSession.test_is_session_expired_false 214
class TestBrowserDriverPrompt 221
method TestBrowserDriverPrompt.test_build_prompt_no_files 222
method TestBrowserDriverPrompt.test_build_prompt_with_files 228
method TestBrowserDriverPrompt.test_build_prompt_is_fix 236
method TestBrowserDriverPrompt.test_read_file_context_missing 244
method TestBrowserDriverPrompt.test_read_file_context_existing 249
method TestBrowserDriverPrompt.test_read_file_context_truncate 257
method TestBrowserDriverPrompt.test_read_file_context_os_error 264
class TestBrowserDriverResponse 272
method TestBrowserDriverResponse.test_process_response_no_blocks 273
method TestBrowserDriverResponse.test_process_response_markdown_blocks 279
method TestBrowserDriverResponse.test_process_response_with_file_blocks 286
method TestBrowserDriverResponse.test_write_file_blocks 293
method TestBrowserDriverResponse.test_write_file_blocks_os_error 299
class TestBrowserDriverExecute 307
method TestBrowserDriverExecute.test_execute_browser_init_fails 309
method TestBrowserDriverExecute.test_execute_success 316
method TestBrowserDriverExecute.test_execute_recovery_exhausted 323
class TestBrowserDriverClose 331
method TestBrowserDriverClose.test_close_no_browser 333
method TestBrowserDriverClose.test_close_saves_state 339 close() saves real storage state and clears the real browser.
method TestBrowserDriverClose.test_close_is_exception_safe_when_state_save_fails 351 close() swallows a real storage-state failure and still clears state.
class TestBrowserDriverRateLimit 370
method TestBrowserDriverRateLimit.test_enforce_rate_limit_first_call 372
method TestBrowserDriverRateLimit.test_enforce_rate_limit_wait 379
method TestBrowserDriverRateLimit.test_enforce_rate_limit_no_wait 389
class TestBrowserDriverRecover 399
method TestBrowserDriverRecover.test_recover_level_1 401 Level-1 recovery navigates the real page to the base URL.
method TestBrowserDriverRecover.test_recover_level_1_fails 416 A real failed level-1 navigation escalates to close + relaunch.
method TestBrowserDriverRecover.test_recover_level_2 430
class TestBrowserDriverSaveStorage 438
method TestBrowserDriverSaveStorage.test_save_storage_state 440 _save_storage_state persists real cookies/storage to disk.
method TestBrowserDriverSaveStorage.test_save_storage_state_error 451 _save_storage_state swallows a real storage failure (closed context).

tests/drivers/test_browser_driver_extended.py

source · 17 tests · 466 lines

Extended tests for drivers.browser_driver.

Covers: drivers.browser_driver, drivers.browser_providers

Kind Name Line Description
class TestBrowserDriverEnsureBrowser 109
method TestBrowserDriverEnsureBrowser.test_ensure_browser_already_running 111 _ensure_browser must be a no-op when browser + page already exist.
method TestBrowserDriverEnsureBrowser.test_ensure_browser_launches_when_missing 136 _ensure_browser must call _launch_browser when no browser is running.
class TestBrowserDriverLaunchBrowser 154
method TestBrowserDriverLaunchBrowser.test_launch_browser_without_storage_state 156 _launch_browser must create browser/page and navigate when no state file exists.
method TestBrowserDriverLaunchBrowser.test_launch_browser_with_storage_state 173 When a storage-state file exists, _launch_browser must reuse it via
class TestBrowserDriverSubmitAndWait 195
method TestBrowserDriverSubmitAndWait.test_submit_and_wait_with_response 197 _submit_and_wait must return the inner text of the last response element.
method TestBrowserDriverSubmitAndWait.test_submit_and_wait_no_response_elements 213 When no response elements exist, _submit_and_wait must return an empty string.
class TestBrowserDriverExecuteFullFlow 229
method TestBrowserDriverExecuteFullFlow.test_execute_with_expired_session_recovery 231 When the session is expired, execute must trigger level-2 recovery
class TestBrowserDriverProcessResponseEdgeCases 263
method TestBrowserDriverProcessResponseEdgeCases.test_process_response_file_blocks_all_fail 264 If every extracted file block fails to write, _process_response
method TestBrowserDriverProcessResponseEdgeCases.test_process_response_partial_file_write 279 If some file blocks write and others fail, _process_response
class TestBrowserDriverReadFileContext 299
method TestBrowserDriverReadFileContext.test_read_file_context_unicode_decode_error 300 A file with invalid UTF-8 bytes must be skipped via UnicodeDecodeError.
class TestBrowserDriverWriteFileBlocks 309
method TestBrowserDriverWriteFileBlocks.test_write_file_blocks_nested_dirs 310 _write_file_blocks must create nested directories automatically.
class TestBrowserDriverBuildPrompt 318
method TestBrowserDriverBuildPrompt.test_build_prompt_empty_files_list 319 Passing an empty files list should behave like passing None.
class TestBrowserDriverSubmitAndWaitTimeout 327
method TestBrowserDriverSubmitAndWaitTimeout.test_submit_and_wait_raises_timeout 329 When the completion indicator never appears, _submit_and_wait
class TestBrowserDriverRecoverEdgeCases 353
method TestBrowserDriverRecoverEdgeCases.test_recover_level_1_no_page 355 Level 1 recovery when _page is None must escalate to close+relaunch.
class TestBrowserDriverCloseEdgeCases 379
method TestBrowserDriverCloseEdgeCases.test_close_page_without_browser 381 When _page is set but _browser is None, close must not raise.
class TestBrowserDriverExecuteWithFiles 427
method TestBrowserDriverExecuteWithFiles.test_execute_with_files_full_flow 429 execute must include file context in the prompt and write generated files.
method TestBrowserDriverExecuteWithFiles.test_execute_is_fix_full_flow 449 When is_fix=True, file context must be omitted from the prompt

tests/drivers/test_browser_providers.py

source · 8 tests · 104 lines

Tests for drivers.browser_providers.

Covers: drivers.browser_providers

Kind Name Line Description
class TestBrowserProviderConfig 34
method TestBrowserProviderConfig.test_config_creation 35
method TestBrowserProviderConfig.test_config_is_frozen 53
class TestGetProviderConfig 71
method TestGetProviderConfig.test_get_qwen_chat 72
method TestGetProviderConfig.test_get_deepseek_chat 78
method TestGetProviderConfig.test_get_kimi 84
method TestGetProviderConfig.test_get_unknown_raises 90
class TestBrowserProvidersDict 95
method TestBrowserProvidersDict.test_has_all_providers 96
method TestBrowserProvidersDict.test_all_are_frozen_dataclasses 102

tests/drivers/test_claude_api_driver.py

source · 18 tests · 265 lines

Test Standards Compliance (see AGENTS.md § Test Standards):

Covers: drivers.claude_api_driver

Kind Name Line Description
class TestFindClaude 81
method TestFindClaude.test_returns_string 82
method TestFindClaude.test_not_found_anywhere 87 PATH has no claude, and none of the hardcoded fallback
method TestFindClaude.test_found_via_home_fallback 96 PATH lookup fails, but ~/.local/bin/claude exists -> the
class TestScanSourceFiles 107
method TestScanSourceFiles.test_scan_empty 108
method TestScanSourceFiles.test_scan_py_files 112
method TestScanSourceFiles.test_skip_venv 119
method TestScanSourceFiles.test_skip_hidden 125
method TestScanSourceFiles.test_skip_unknown_ext 130
method TestScanSourceFiles.test_nested_dirs 135
class TestClaudeAPIDriverInit 142
method TestClaudeAPIDriverInit.test_default_workspace 143
method TestClaudeAPIDriverInit.test_custom_workspace 147
class TestClaudeAPIDriverExecute 152
method TestClaudeAPIDriverExecute.test_execute_returns_tuple 154 execute returns a (bool, str) tuple for a trivial task -- driven
method TestClaudeAPIDriverExecute.test_claude_not_found_returns_error 171 When _find_claude() can locate no binary anywhere, execute()
method TestClaudeAPIDriverExecute.test_execute_success_with_generated_files 183 Full happy path: claude_bin resolved via PATH, task piped on
method TestClaudeAPIDriverExecute.test_execute_timeout_returns_false 205 A stand-in that outlives the configured timeout trips the
method TestClaudeAPIDriverExecute.test_execute_maps_unexpected_error 226 A resolved claude_bin that isn't actually executable makes the
class TestClaudeAPIDriverInitProject 248
method TestClaudeAPIDriverInitProject.test_skips_when_claude_md_already_exists 249 _init_project short-circuits without touching the subprocess
method TestClaudeAPIDriverInitProject.test_swallows_missing_binary 259 When CLAUDE.md is absent, _init_project tries to run init; a

tests/drivers/test_claude_code_driver.py

source · 48 tests · 793 lines

Tests for drivers.claude_code_driver — real implementations, no monkeypatch.

Covers: agents.volks.persona, drivers.claude_code_driver, llm.config

Kind Name Line Description
class TestFindClaude 94
method TestFindClaude.test_returns_string 95
method TestFindClaude.test_fallback_loop_when_not_on_path 99 PATH emptied so shutil.which("claude") misses, and HOME points
method TestFindClaude.test_fallback_finds_home_local_bin 116 When PATH search misses but a real file exists at the first
class TestClaudeCodeDriverInit 130
method TestClaudeCodeDriverInit.test_custom_workspace 131
method TestClaudeCodeDriverInit.test_workspace_created 135
method TestClaudeCodeDriverInit.test_volk_defaults_to_none 140
method TestClaudeCodeDriverInit.test_last_session_id_defaults_to_none 144
class TestResolveRepoRoot 149 Tests for _resolve_repo_root -- deliberately NOT core.paths.get_project_root
method TestResolveRepoRoot.test_derives_repo_root_from_file_location 155
method TestResolveRepoRoot.test_orchestrata_root_env_override_wins 161
class TestGovernanceSettingsAutoGeneration 166 Tests for the settled wiring decision: ClaudeCodeDriver.init auto-
method TestGovernanceSettingsAutoGeneration.test_generates_settings_when_governance_enabled_and_no_explicit_settings 172
method TestGovernanceSettingsAutoGeneration.test_generated_settings_reach_build_command 185
method TestGovernanceSettingsAutoGeneration.test_no_generation_without_governance_env 194
method TestGovernanceSettingsAutoGeneration.test_no_generation_when_governance_env_is_not_the_string_one 203 Only the exact string "1" opts in -- "true"/"yes" do not.
method TestGovernanceSettingsAutoGeneration.test_explicit_settings_env_wins_over_generation 211
method TestGovernanceSettingsAutoGeneration.test_governance_settings_generation_failure_is_logged_not_raised 228 A real filesystem failure (a plain file blocking the .claude/
class TestClaudeCodeDriverRunProcess 248
method TestClaudeCodeDriverRunProcess.test_run_process_success 250
method TestClaudeCodeDriverRunProcess.test_run_process_failure 257
method TestClaudeCodeDriverRunProcess.test_run_process_forwards_self_env_to_subprocess 263 self.env (not just the ambient os.environ) must reach the real
class TestBuildCommand 285 Unit tests for ClaudeCodeDriver._build_command — no subprocess needed.
method TestBuildCommand.test_output_format_json_always_present 288
method TestBuildCommand.test_task_is_final_argument 294
method TestBuildCommand.test_no_model_or_persona_when_volk_unset 299
method TestBuildCommand.test_model_and_persona_appended_when_volk_configured 305
method TestBuildCommand.test_model_omitted_but_persona_kept_when_config_resolution_raises 314 A volk absent from the active profile (which also has no 'default'
method TestBuildCommand.test_resume_used_when_is_fix_and_last_session_id_set 330
method TestBuildCommand.test_resume_omitted_when_not_is_fix 336
method TestBuildCommand.test_resume_omitted_when_no_last_session_id 342
method TestBuildCommand.test_settings_forwarded_from_env 347
method TestBuildCommand.test_settings_omitted_when_env_unset 356
class TestParseEnvelope 362 Unit tests for ClaudeCodeDriver._parse_envelope.
method TestParseEnvelope.test_success_envelope 365
method TestParseEnvelope.test_is_error_envelope 380
method TestParseEnvelope.test_non_json_falls_back_to_raw 395
method TestParseEnvelope.test_non_dict_json_falls_back_to_raw 402
method TestParseEnvelope.test_falls_back_to_proc_ok_on_parse_failure 408
method TestParseEnvelope.test_array_envelope_extracts_trailing_result_event 414 Claude Code CLI 2.1.207 (confirmed live) prints a JSON ARRAY of
method TestParseEnvelope.test_array_envelope_is_error_result 439
method TestParseEnvelope.test_array_envelope_without_result_event_falls_back_to_raw 458 An array with events but no trailing type=="result" element (a
class TestClaudeCodeDriverExecute 471
method TestClaudeCodeDriverExecute.test_execute_returns_tuple 473 execute returns a (bool, str) tuple for a trivial task -- driven
method TestClaudeCodeDriverExecute.test_execute_returns_false_when_cli_missing 496 When _find_claude() cannot locate a binary anywhere (PATH
method TestClaudeCodeDriverExecute.test_execute_handles_stale_binary_file_not_found 520 claude_bin resolves (via PATH) to a real, executable-bit-set
method TestClaudeCodeDriverExecute.test_execute_times_out 543 A real subprocess that sleeps past a near-zero timeout override
method TestClaudeCodeDriverExecute.test_execute_parses_json_success_envelope 567 A stub claude binary echoing a canned JSON envelope (as
method TestClaudeCodeDriverExecute.test_execute_parses_array_shaped_json_envelope 592 Claude Code CLI 2.1.207's real --output-format json output is a
method TestClaudeCodeDriverExecute.test_execute_is_error_envelope_reports_failure 624
method TestClaudeCodeDriverExecute.test_execute_non_json_stdout_falls_back_to_raw 645
method TestClaudeCodeDriverExecute.test_execute_full_command_reaches_binary_with_volk_flags 660 End-to-end: the volk-driven --model/--append-system-prompt flags
method TestClaudeCodeDriverExecute.test_execute_resume_reaches_binary_on_fix_round 698 A second execute() call with is_fix=True after a session_id was
method TestClaudeCodeDriverExecute.test_execute_settings_flag_reaches_binary 732
class TestRunProcessLargeSingleLineOutput 763
method TestRunProcessLargeSingleLineOutput.test_envelope_larger_than_64k_on_one_line 765 --output-format json emits the WHOLE session event array as one

tests/drivers/test_claude_code_driver_live.py

source · 1 tests · 275 lines

Two-round subprocess-mechanics smoke test for the Claude builder track

Covers: drivers.claude_code_driver, llm.config

Kind Name Line Description
function test_claude_code_driver_live_fizzbuzz_then_doctest_fix 188 Two-round subprocess-mechanics smoke, driven entirely by the shim

tests/drivers/test_claude_settings.py

source · 6 tests · 101 lines

Tests for drivers.claude_settings — the SPEC-025 Phase 2a governance

Covers: drivers.claude_settings

Kind Name Line Description
function test_write_governance_settings_creates_expected_file 22
function test_write_governance_settings_content_wires_pre_tool_use_hook 34
function test_write_governance_settings_is_idempotent 55
function test_write_governance_settings_sorted_keys_deterministic 70
function test_write_governance_settings_creates_claude_dir_if_missing 85
function test_write_governance_settings_accepts_env_seam 93 env is accepted (currently unused) for the project's uniform

tests/drivers/test_deepseek_coder_driver.py

source · 63 tests · 669 lines

Tests for drivers.deepseek_coder_driver — real implementations.

Covers: drivers.deepseek_coder_driver, llm.client

Kind Name Line Description
class TestNormalizePath 36
method TestNormalizePath.test_known_root_src 37
method TestNormalizePath.test_known_root_tests 40
method TestNormalizePath.test_strip_prefix 43
method TestNormalizePath.test_deep_path_truncated 46
method TestNormalizePath.test_simple_filename 50
method TestNormalizePath.test_unrecognized_short_prefix_returns_stripped_candidate 53 First segment isn't a known root and the remainder is short (<=4
class TestExtractCodeBlock 60
method TestExtractCodeBlock.test_basic_block 61
method TestExtractCodeBlock.test_no_block 65
method TestExtractCodeBlock.test_multiple_blocks 69
method TestExtractCodeBlock.test_empty_block 74
class TestExtractAndWriteFiles 79
method TestExtractAndWriteFiles.test_extract_single_file 80
method TestExtractAndWriteFiles.test_extract_multiple_files 86
method TestExtractAndWriteFiles.test_skip_syntax_error 96
method TestExtractAndWriteFiles.test_no_file_blocks 102
method TestExtractAndWriteFiles.test_creates_directories 107
method TestExtractAndWriteFiles.test_blank_filename_line_is_skipped 113 A FILE: header with nothing after it (the header regex's
method TestExtractAndWriteFiles.test_missing_code_block_is_skipped 124 A file header with no fenced code block extracts empty code and
class TestDestructiveReplacementGuard 150 Regression tests for the run-2 LRU-demo clobber (2026-07-13).
method TestDestructiveReplacementGuard.test_fragment_cannot_clobber_existing_implementation 160 The exact payload observed live: an import-only fix response
method TestDestructiveReplacementGuard.test_complete_rewrite_preserving_defs_is_written 173 A genuine fix that still defines the existing class replaces the
method TestDestructiveReplacementGuard.test_import_only_content_for_new_file_is_written 184 The guard only protects EXISTING files — a fresh def-less module
method TestDestructiveReplacementGuard.test_defless_existing_file_is_replaceable 191 An existing file with no defs (a stub left by an earlier fragment
method TestDestructiveReplacementGuard.test_larger_rewrite_without_shared_defs_is_written 202 A replacement that is LARGER than the existing file is a real
class TestReadFileTruncated 220
method TestReadFileTruncated.test_read_small_file 221
method TestReadFileTruncated.test_read_truncated 227
method TestReadFileTruncated.test_missing_file 235
class TestDeepSeekCoderDriverInit 240
method TestDeepSeekCoderDriverInit.test_default_workspace 241
method TestDeepSeekCoderDriverInit.test_custom_workspace 245
class TestDeepSeekCoderDriverBuildContext 250
method TestDeepSeekCoderDriverBuildContext.test_build_context 251
method TestDeepSeekCoderDriverBuildContext.test_skip_non_source 258
method TestDeepSeekCoderDriverBuildContext.test_skip_design_prefix 264
class TestDeepSeekCoderDriverBuildPrompt 272
method TestDeepSeekCoderDriverBuildPrompt.test_without_context 273
method TestDeepSeekCoderDriverBuildPrompt.test_with_context 279
class TestDeepSeekCoderDriverFindMissingFiles 286
method TestDeepSeekCoderDriverFindMissingFiles.test_no_design_dir 287
method TestDeepSeekCoderDriverFindMissingFiles.test_find_missing 292
method TestDeepSeekCoderDriverFindMissingFiles.test_skip_test_files 299
method TestDeepSeekCoderDriverFindMissingFiles.test_skip_init_py 306 __init__.py is always considered present — never reported
method TestDeepSeekCoderDriverFindMissingFiles.test_merges_syntax_skipped_into_missing 316
class TestDeepSeekCoderDriverFileExistsOnDisk 324
method TestDeepSeekCoderDriverFileExistsOnDisk.test_exists 325
method TestDeepSeekCoderDriverFileExistsOnDisk.test_not_exists 330
method TestDeepSeekCoderDriverFileExistsOnDisk.test_skip_venv 334
class TestDeepSeekCoderDriverBuildRecoveryContext 341
method TestDeepSeekCoderDriverBuildRecoveryContext.test_build_recovery 342
class TestDeepSeekCoderDriverExpectedDesignFiles 350
method TestDeepSeekCoderDriverExpectedDesignFiles.test_no_file_tree_returns_empty_set 351
method TestDeepSeekCoderDriverExpectedDesignFiles.test_parses_py_files_and_skips_tests 355
method TestDeepSeekCoderDriverExpectedDesignFiles.test_unreadable_file_tree_returns_empty_set 364 A file_tree.md that is not valid UTF-8 triggers a real
class TestDeepSeekCoderDriverMergeSyntaxSkipped 375
method TestDeepSeekCoderDriverMergeSyntaxSkipped.test_noop_when_syntax_skipped_falsy 376
method TestDeepSeekCoderDriverMergeSyntaxSkipped.test_appends_new_and_dedupes_by_basename 382
class TestAutofixLint 391
method TestAutofixLint.test_removes_unused_import_via_real_ruff 392 Real ruff --fix --select=F401 strips the unused import in place.
method TestAutofixLint.test_ignores_non_python_files 402 Non-.py files are filtered out before any subprocess is spawned.
method TestAutofixLint.test_empty_file_list_is_a_noop 409
class TestValidateWrittenFiles 414
method TestValidateWrittenFiles.test_clean_file_has_no_errors 415
method TestValidateWrittenFiles.test_syntax_error_is_reported 420
method TestValidateWrittenFiles.test_lint_violation_is_reported_via_real_ruff 426 A syntactically-valid file with an undefined name (F821) is
method TestValidateWrittenFiles.test_ignores_non_python_files 434
class TestDeepSeekCoderDriverRetryOnEmpty 440
method TestDeepSeekCoderDriverRetryOnEmpty.test_success_extracts_files_and_includes_context 441
method TestDeepSeekCoderDriverRetryOnEmpty.test_llm_failure_returns_empty_lists 471
class TestDeepSeekCoderDriverRecoverMissingFiles 487
method TestDeepSeekCoderDriverRecoverMissingFiles.test_no_missing_files_returns_written_unchanged 488 No design/file_tree.md at all -> nothing missing -> short-circuit
method TestDeepSeekCoderDriverRecoverMissingFiles.test_missing_files_trigger_recovery_retry 495
method TestDeepSeekCoderDriverRecoverMissingFiles.test_recovery_llm_failure_returns_written_unchanged 526
class TestDeepSeekCoderDriverExecute 544
method TestDeepSeekCoderDriverExecute.test_execute_returns_tuple 546 execute returns a (bool, str) tuple for a trivial task, writing
method TestDeepSeekCoderDriverExecute.test_execute_success_builds_context_and_reports_lint_errors 569 Full happy path: files= triggers _build_context, the LLM response
method TestDeepSeekCoderDriverExecute.test_execute_retries_on_empty_extraction_then_succeeds 609 First LLM response has no FILE: blocks (extraction fails) so
method TestDeepSeekCoderDriverExecute.test_execute_fails_when_no_files_ever_extracted 632 Both the original response and the strict retry fail to yield any
method TestDeepSeekCoderDriverExecute.test_execute_llm_raises_returns_false_without_propagating 650 The exact dogfood run-1 F1 shape: execute()'s own call_llm raises

tests/drivers/test_driver_factory.py

source · 17 tests · 235 lines

Tests for drivers.driver_factory — provider -> driver dispatch logic.

Covers: drivers.aider_driver, drivers.browser_driver, drivers.claude_api_driver, drivers.claude_code_driver, drivers.deepseek_coder_driver, drivers.driver_factory, drivers.qwen_driver, llm.config

Kind Name Line Description
function test_default_profile_deepseek_dispatches_to_deepseek_driver 74 default profile: every volk maps to provider=openrouter, which the
function test_claude_profile_dispatches_to_claude_api_driver 84 claude profile: provider=claude -> ClaudeAPIDriver.
function test_budget_profile_ollama_dispatches_to_qwen_driver 91 budget profile: provider=ollama shares the qwen branch -> QwenDriver.
function test_openrouter_provider_dispatches_to_deepseek_coder_driver 98 provider=openrouter (kimi/qwen/openrouter-cheap shipped profiles)
function test_anthropic_provider_dispatches_to_claude_api_driver 116
function test_aider_provider_dispatches_to_aider_driver 122
function test_bare_qwen_provider_dispatches_to_qwen_driver 128
function test_qwen_browser_provider_dispatches_to_browser_driver 134
function test_deepseek_browser_provider_dispatches_to_browser_driver 141
function test_kimi_browser_provider_dispatches_to_browser_driver 148
function test_unrecognized_provider_falls_back_to_claude_api_driver 155 Any provider string outside the dispatch table logs a warning and
function test_get_driver_passes_explicit_workspace_through 166
function test_get_driver_defaults_workspace_from_environment 173
function test_get_driver_threads_env_into_claude_api_driver 187 ClaudeAPIDriver reads ORCHESTRATA_CLAUDE_TIMEOUT_SECONDS from the env
function test_get_driver_threads_env_into_qwen_driver 202 QwenDriver picks up its env-derived config from the mapping passed to
function test_get_driver_threads_env_into_claude_code_driver 215 ClaudeCodeDriver receives the injected env mapping, not os.environ.
function test_get_driver_threads_env_into_browser_driver 227 BrowserDriver receives the injected env mapping as environ.

tests/drivers/test_driver_factory_claude_code.py

source · 4 tests · 70 lines

Wiring tests for A1: ClaudeCodeDriver registered in driver_factory dispatch.

Covers: drivers.claude_code_driver, drivers.driver_factory, llm.config

Kind Name Line Description
function test_get_claude_code_driver_helper_constructs_real_driver 29
function test_get_driver_dispatches_claude_code_provider_via_real_profile 35 The claude_cli profile's provider (claude_code) resolves to ClaudeCodeDriver.
function test_get_driver_threads_volk_into_claude_code_driver 51 SPEC-025 Phase 1: get_driver's volk argument reaches ClaudeCodeDriver.volk
function test_get_claude_code_driver_helper_accepts_volk_keyword 67

tests/drivers/test_extraction.py

source · 24 tests · 171 lines

Pure tests for drivers.extraction utilities.

Covers: drivers.extraction

Kind Name Line Description
class TestExtractFileBlocks 34
method TestExtractFileBlocks.test_empty_string_returns_empty 35
method TestExtractFileBlocks.test_no_file_blocks_returns_empty 38
method TestExtractFileBlocks.test_single_file_block 41
method TestExtractFileBlocks.test_multiple_file_blocks 50
method TestExtractFileBlocks.test_file_block_without_code_returns_empty 66
method TestExtractFileBlocks.test_file_block_with_empty_code_block 70
method TestExtractFileBlocks.test_leading_text_before_file_ignored 74
method TestExtractFileBlocks.test_preserves_indentation_inside_code 82
method TestExtractFileBlocks.test_file_block_no_language_tag 94
method TestExtractFileBlocks.test_filename_with_whitespace_stripped 101
class TestExtractMarkdownCodeBlocks 107
method TestExtractMarkdownCodeBlocks.test_empty_string 108
method TestExtractMarkdownCodeBlocks.test_single_block_with_language 111
method TestExtractMarkdownCodeBlocks.test_single_block_without_language 117
method TestExtractMarkdownCodeBlocks.test_multiple_blocks 123
method TestExtractMarkdownCodeBlocks.test_empty_block_skipped 130
method TestExtractMarkdownCodeBlocks.test_no_blocks_returns_empty 134
method TestExtractMarkdownCodeBlocks.test_block_with_multiple_lines 137
class TestExtractFencedCode 145
method TestExtractFencedCode.test_no_fence_returns_empty 146
method TestExtractFencedCode.test_opens_on_startswith_backticks 149
method TestExtractFencedCode.test_ignores_lines_before_open 153
method TestExtractFencedCode.test_closes_on_exact_backticks 157
method TestExtractFencedCode.test_preserves_indentation 161
method TestExtractFencedCode.test_no_close_returns_content 165
method TestExtractFencedCode.test_no_content_returns_empty 169

tests/drivers/test_playwright_free_threaded.py

source · 1 tests · 62 lines

Playwright's sync API on the free-threaded interpreter — the behaviour.

Kind Name Line Description
function test_sync_api_launches_chromium_without_aborting_the_interpreter 37

tests/drivers/test_qwen_driver.py

source · 17 tests · 268 lines

Test Standards Compliance (see AGENTS.md § Test Standards):

Covers: drivers.qwen_driver

Kind Name Line Description
class TestFindQwen 35
method TestFindQwen.test_returns_string 36
method TestFindQwen.test_fallback_loop_when_not_on_path 40 PATH emptied so shutil.which("qwen") misses, and HOME points
method TestFindQwen.test_fallback_finds_home_local_bin 59 When PATH search misses but a real file exists at the first
class TestScanSourceFiles 77
method TestScanSourceFiles.test_scan_empty 78
method TestScanSourceFiles.test_scan_py 82
method TestScanSourceFiles.test_skip_qwen_dir 87
method TestScanSourceFiles.test_skip_git_dir 93
method TestScanSourceFiles.test_skip_dotfile 99 Dotfiles (e.g. .env, .gitignore) at the top level must be
method TestScanSourceFiles.test_skip_non_source_extension 108
class TestQwenDriverInit 114
method TestQwenDriverInit.test_custom_workspace 115
method TestQwenDriverInit.test_workspace_created 119
class TestQwenDriverInitProject 125
method TestQwenDriverInitProject.test_skips_when_qwen_md_exists 127 If QWEN.md is already present, _init_project must return
class TestQwenDriverExecute 138
method TestQwenDriverExecute.test_execute_returns_tuple 141 execute returns a (bool, str) tuple for a trivial task -- driven
method TestQwenDriverExecute.test_execute_handles_stale_binary_error 166 qwen_bin resolves (via PATH) to a real, executable-bit-set
method TestQwenDriverExecute.test_execute_times_out 190 A real subprocess that sleeps past a near-zero timeout override
method TestQwenDriverExecute.test_execute_success_creates_files 220 A real, fast fake qwen binary that writes a source file into
method TestQwenDriverExecute.test_execute_no_files_created 250 A real fake qwen binary that runs successfully but writes no