unity-mcp/Server/tests/integration
dsarno b0f7a80df0
Codex/optimize and paginate read console tool (#511)
* Optimize read_console defaults and paging

* Fix read_console truncate test expectations

* Reduce read_console default count from 50 to 10

Further optimize token usage by reducing the default count from 50 to 10 entries. Even 10-20 messages with stack traces can be token-heavy. Added tests for default behavior and paging functionality. Updated tool description to document defaults and paging support.

* Fix ReadConsoleTests to include log type messages

The default types filter changed to ['error', 'warning'] (excluding 'log'), so tests using Debug.Log() need to explicitly request log messages. Also added format='detailed' to HandleCommand_Get_Works test since it accesses structured message fields.

* Address CodeRabbit review feedback

- Fix property naming consistency: next_cursor -> nextCursor (C# camelCase)
- Remove redundant EndGettingEntries call from catch block (already in finally)
- Extract stacktrace stripping to helper function (reduce duplication)
- Fix test mock to match actual C# response structure (items, nextCursor, truncated, total)

* perf: add early exit optimization for ReadConsole paging

- Add early exit in paging loop once page is filled, avoiding iteration
  through remaining console entries (total becomes 'at least N')
- Prefix unused mock arguments with underscores in test_read_console_truncate.py
  to suppress Ruff linter warnings

* refactor: give pageSize independent default, clarify count semantics

- Change pageSize resolution from 'pageSize ?? count ?? 50' to 'pageSize ?? 50'
  so pageSize has its own default independent of count
- count now only serves as the non-paging limit
- Add XML docs to GetConsoleEntries with clear parameter descriptions
- Update Python tool annotations to document pageSize default (50) and
  clarify that count is ignored when paging
2026-01-04 14:46:52 -08:00
..
__init__.py Update mirror backend with latest code 2025-11-05 16:08:59 -04:00
conftest.py ManageGameObject/Material + auto-select sole Unity instance (#502) 2026-01-01 21:04:10 -08:00
test_debug_request_context_diagnostics.py Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
test_domain_reload_resilience.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_edit_normalization_and_noop.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_edit_strict_and_warnings.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_editor_state_v2_contract.py Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
test_external_changes_scanner.py Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
test_find_in_file_minimal.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_get_sha.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_helpers.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_improved_anchor_matching.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_instance_autoselect.py ManageGameObject/Material + auto-select sole Unity instance (#502) 2026-01-01 21:04:10 -08:00
test_instance_routing_comprehensive.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_instance_targeting_resolution.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_json_parsing_simple.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_logging_stdout.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_manage_asset_json_parsing.py feat: Add `manage_material` tool for dedicated material manipulation (#440) 2025-12-07 19:39:52 -08:00
test_manage_asset_param_coercion.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_manage_gameobject_param_coercion.py Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
test_manage_scene_paging_params.py Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
test_manage_script_uri.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_manage_scriptable_object_tool.py feature/Add new manage_scriptable_object tool (#489) 2025-12-28 20:15:50 -08:00
test_read_console_truncate.py Codex/optimize and paginate read console tool (#511) 2026-01-04 14:46:52 -08:00
test_read_resource_minimal.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_refresh_unity_registration.py Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
test_refresh_unity_retry_recovery.py Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
test_resources_api.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_run_tests_busy_semantics.py Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
test_script_editing.py Update mirror backend with latest code 2025-11-05 16:08:59 -04:00
test_script_tools.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_telemetry_endpoint_validation.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_telemetry_queue_worker.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_telemetry_subaction.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_test_jobs_async.py Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
test_tool_signatures_paging.py Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
test_transport_framing.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
test_validate_script_summary.py HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00