You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(tools): cover execute_menu_item payload and response normalization - #1478
Adds unit coverage for the execute_menu_item MCP tool, which was previously
quarantined in KNOWN_UNTESTED. No production code changes.
Type of Change
Bug fix (non-breaking change that fixes an issue)
New feature (non-breaking change that adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Documentation update
Refactoring (no functional changes)
Test update
Changes Made
New Server/tests/test_execute_menu_item.py with 8 tests covering:
camelCase menuPath forwarding (a snake_case key would be silently
ignored by Unity)
None/absent menu_path is omitted instead of sent as null
the resolved unity_instance reaches the transport helper
dict responses are wrapped in MCPResponse even when Unity adds extra status / result keys
error payloads stay failures, and non-dict payloads pass through unchanged
registration stays in the core group with destructiveHint=True
Removed execute_menu_item from KNOWN_UNTESTED in Server/tests/test_tool_test_symmetry.py (the guard fails on stale entries).
Compatibility / Package Source
Unity version(s) tested: N/A — Python-only test change
Package source used (#beta, #main, tag, branch, or file:): N/A
Resolved commit hash from Packages/packages-lock.json (if using a Git package URL): N/A
Testing/Screenshots/Recordings
Python tests (cd Server && uv run pytest tests/ -v)
Unity EditMode tests
Unity PlayMode tests
Package import/compile check
Not applicable (explain why in Additional Notes)
Result: 1599 passed, 2 skipped. The new file alone: 8 passed.
Documentation Updates
I have added/removed/modified tools or resources
If yes, I have updated all documentation files using:
The LLM prompt at tools/UPDATE_DOCS_PROMPT.md (recommended)
Manual review of the generated changes
No docs change: tool signatures and the generated reference are untouched.
Related Issues
N/A — small test-only change, no tracking issue.
Additional Notes
Unity EditMode/PlayMode/package-import checks are not applicable: this PR only
touches Server/tests/** and no MCPForUnity/** files, so no Editor is required.
CI will therefore only run python-tests (and skip unity-tests / e2e-bridge
by path filter), which is expected rather than a failure.
Summary by CodeRabbit
Tests
Expanded automated coverage for menu-item execution, including path handling, instance forwarding, response formats, and failure behavior.
Added this functionality to the tool-coverage checks, helping detect regressions in menu actions.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 0cef870b-50c6-463e-8f54-3fe95ca55685
📥 Commits
Reviewing files that changed from the base of the PR and between 308efc0 and 48da676.
📒 Files selected for processing: 2
Server/tests/test_execute_menu_item.py
Server/tests/test_tool_test_symmetry.py
💤 Files with no reviewable changes: 1
Server/tests/test_tool_test_symmetry.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
The pull request adds tests for execute_menu_item argument forwarding, response handling, and registration metadata. It also removes the tool from the untested-tool quarantine.
Changes: Execute Menu Item Test Coverage
Layer / File(s)
Summary
Execute menu item behavior and coverage Server/tests/test_execute_menu_item.py, Server/tests/test_tool_test_symmetry.py
Tests check path and Unity-instance forwarding, response normalization, failure propagation, unchanged string responses, and registration metadata. The tool is removed from KNOWN_UNTESTED.
The new tests and coverage-list update are ready to merge after normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 1 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description check
The description follows the repository template. It identifies the test-only change, lists the covered cases, records the Python test results, explains why Unity checks do not apply, and addresses doc…
Title check
The title clearly and concisely describes the main change: adding test coverage for execute_menu_item payload handling and response normalization.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description follows the repository template. It identifies the test-only change, lists the covered cases, records the Python test results, explains why Unity checks do not apply, and addresses documentation and related issues.
Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds unit coverage for the
execute_menu_itemMCP tool, which was previouslyquarantined in
KNOWN_UNTESTED. No production code changes.Type of Change
Changes Made
Server/tests/test_execute_menu_item.pywith 8 tests covering:menuPathforwarding (a snake_case key would be silentlyignored by Unity)
None/absentmenu_pathis omitted instead of sent asnullunity_instancereaches the transport helperMCPResponseeven when Unity adds extrastatus/resultkeyscoregroup withdestructiveHint=Trueexecute_menu_itemfromKNOWN_UNTESTEDinServer/tests/test_tool_test_symmetry.py(the guard fails on stale entries).Compatibility / Package Source
#beta,#main, tag, branch, orfile:): N/APackages/packages-lock.json(if using a Git package URL): N/ATesting/Screenshots/Recordings
cd Server && uv run pytest tests/ -v)Result:
1599 passed, 2 skipped. The new file alone:8 passed.Documentation Updates
tools/UPDATE_DOCS_PROMPT.md(recommended)No docs change: tool signatures and the generated reference are untouched.
Related Issues
N/A — small test-only change, no tracking issue.
Additional Notes
Unity EditMode/PlayMode/package-import checks are not applicable: this PR only
touches
Server/tests/**and noMCPForUnity/**files, so no Editor is required.CI will therefore only run
python-tests(and skipunity-tests/e2e-bridgeby path filter), which is expected rather than a failure.
Summary by CodeRabbit