Skip to content

Instantly share code, notes, and snippets.

@jleechan2015
Created May 21, 2026 10:41
Show Gist options
  • Select an option

  • Save jleechan2015/989afc2a03749ff808e15238929110bb to your computer and use it in GitHub Desktop.

Select an option

Save jleechan2015/989afc2a03749ff808e15238929110bb to your computer and use it in GitHub Desktop.
PR #6969 evidence: 42/42 tests at HEAD 1d14690
PR #6969 evidence: 42/42 tests passed at HEAD 1d14690920
## PR #6969 Evidence — Gemini Homunculus Digital Twin
### Test Run: 2026-05-21, HEAD 1d1469092095974caa42ec76981362ab62c9ab9b
```
============================= test session starts ==============================
platform darwin -- Python 3.13.7, pytest-9.0.3, pluggy-1.6.0
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /Users/jleechan/.worktrees/worldarchitect/wa-1550/mvp_site
configfile: pytest.ini
plugins: hypothesis-6.152.5, anyio-4.13.0
collecting ... collected 42 items
mvp_site/tests/test_gemini_native_tools.py::TestGeminiNativeTools::test_native_tools_does_not_force_tool_calling PASSED [ 2%]
mvp_site/tests/test_gemini_native_tools.py::TestGeminiNativeTools::test_native_tools_no_function_calls_still_returns_json PASSED [ 4%]
mvp_site/tests/test_gemini_native_tools.py::TestGeminiNativeToolLoop::test_tool_result_mismatch_builds_from_results_only PASSED [ 7%]
mvp_site/tests/test_gemini_native_tools.py::TestGeminiNativeToolLoop::test_tool_result_mismatch_raises_runtime_error PASSED [ 9%]
mvp_site/tests/test_gemini_native_tools.py::TestHomunculusResponse::test_response_has_text PASSED [ 11%]
mvp_site/tests/test_gemini_native_tools.py::TestHomunculusResponse::test_response_candidates_has_content_with_parts PASSED [ 14%]
mvp_site/tests/test_gemini_native_tools.py::TestHomunculusResponse::test_response_usage_metadata PASSED [ 16%]
mvp_site/tests/test_gemini_native_tools.py::TestHomunculusResponse::test_response_default_token_count PASSED [ 19%]
mvp_site/tests/test_gemini_native_tools.py::TestRequestTranslation::test_simple_text_request PASSED [ 21%]
mvp_site/tests/test_gemini_native_tools.py::TestRequestTranslation::test_system_instruction_becomes_system_message PASSED [ 23%]
mvp_site/tests/test_gemini_native_tools.py::TestRequestTranslation::test_json_mode_sets_format PASSED [ 26%]
mvp_site/tests/test_gemini_native_tools.py::TestRequestTranslation::test_temperature_passed PASSED [ 28%]
mvp_site/tests/test_gemini_native_tools.py::TestRequestTranslation::test_model_mapping PASSED [ 30%]
mvp_site/tests/test_gemini_native_tools.py::TestRequestTranslation::test_function_declarations_become_ollama_tools PASSED [ 33%]
mvp_site/tests/test_gemini_native_tools.py::TestCodeExecutionFailClosed::test_code_execution_tool_raises_runtime_error PASSED [ 35%]
mvp_site/tests/test_gemini_native_tools.py::TestCodeExecutionFailClosed::test_code_execution_with_function_tools_also_raises PASSED [ 38%]
mvp_site/tests/test_gemini_native_tools.py::TestCodeExecutionFailClosed::test_no_code_execution_tool_works_normally PASSED [ 40%]
mvp_site/tests/test_gemini_native_tools.py::TestResponseTranslation::test_simple_text_response PASSED [ 42%]
mvp_site/tests/test_gemini_native_tools.py::TestResponseTranslation::test_token_counts_from_ollama PASSED [ 45%]
mvp_site/tests/test_gemini_native_tools.py::TestResponseTranslation::test_tool_calls_in_response PASSED [ 47%]
mvp_site/tests/test_gemini_native_tools.py::TestTokenCounting::test_count_tokens_heuristic PASSED [ 50%]
mvp_site/tests/test_gemini_native_tools.py::TestTokenCounting::test_count_tokens_empty PASSED [ 52%]
mvp_site/tests/test_gemini_native_tools.py::TestHomunculusClient::test_client_models_generate_content PASSED [ 54%]
mvp_site/tests/test_gemini_native_tools.py::TestHomunculusClient::test_client_models_count_tokens PASSED [ 57%]
mvp_site/tests/test_gemini_native_tools.py::TestIsHomunculusMode::test_default_off_no_env_var PASSED [ 59%]
mvp_site/tests/test_gemini_native_tools.py::TestIsHomunculusMode::test_enabled_with_env_var PASSED [ 61%]
mvp_site/tests/test_gemini_native_tools.py::TestIsHomunculusMode::test_case_insensitive_env_var PASSED [ 64%]
mvp_site/tests/test_gemini_native_tools.py::TestIsHomunculusMode::test_not_enabled_with_wrong_value PASSED [ 66%]
mvp_site/tests/test_gemini_native_tools.py::TestModelMapping::test_flash_models_map_to_12b PASSED [ 69%]
mvp_site/tests/test_gemini_native_tools.py::TestModelMapping::test_pro_models_map_to_27b PASSED [ 71%]
mvp_site/tests/test_gemini_native_tools.py::TestModelMapping::test_unknown_model_defaults_to_12b PASSED [ 73%]
mvp_site/tests/test_gemini_native_tools.py::TestModelMapping::test_custom_model_override PASSED [ 76%]
mvp_site/tests/test_gemini_native_tools.py::TestToolHistoryTranslation::test_function_call_in_history PASSED [ 78%]
mvp_site/tests/test_gemini_native_tools.py::TestToolHistoryTranslation::test_function_response_in_history PASSED [ 80%]
mvp_site/tests/test_gemini_native_tools.py::TestToolHistoryTranslation::test_text_and_tool_history_combined PASSED [ 83%]
mvp_site/tests/test_gemini_native_tools.py::TestCachedContent::test_cached_content_prepended PASSED [ 85%]
mvp_site/tests/test_gemini_native_tools.py::TestCachedContent::test_no_cached_content PASSED [ 88%]
mvp_site/tests/test_gemini_native_tools.py::TestCachedContent::test_string_cached_content_raises_valueerror PASSED [ 90%]
mvp_site/tests/test_gemini_native_tools.py::TestMalformedToolCallArgs::test_malformed_json_raises_valueerror PASSED [ 92%]
mvp_site/tests/test_gemini_native_tools.py::TestMalformedToolCallArgs::test_non_dict_args_raises_valueerror PASSED [ 95%]
mvp_site/tests/test_gemini_native_tools.py::TestNormalizeContents::test_string_content_wrapped PASSED [ 97%]
mvp_site/tests/test_gemini_native_tools.py::TestNormalizeContents::test_content_objects_passed_through PASSED [100%]
============================== 42 passed in 1.08s ==============================
```
### Coverage Summary
**gemini_homunculus.py** coverage (38 tests): DTUResponse shape, request translation (text/system/json/temp/model/tools), code execution fail-closed, response translation, token counting heuristic, client wiring, env gating (default OFF), model mapping, tool history, cached content handling, malformed args, normalize contents
**gemini_provider.py** coverage (4 tests): native tools no-force-tool-calling, no-calls-returns-JSON, tool_result mismatch fail-closed (RuntimeError), mismatch builds from results only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment