Skip to content

fix: keep Codecov outages out of the release gate; log unknown commands as a warning; fill manifest and CLI doc gaps - #1429

Merged
Scriptwonder merged 3 commits into
betafrom
fix/ci-codecov-console-doc-gaps
Oct 5, 2026
Merged

Scriptwonder merged 3 commits into
betafrom
fix/ci-codecov-console-doc-gaps

Conversation

@Scriptwonder

@Scriptwonder Scriptwonder commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Three small fixes, one commit each.

1. A Codecov outage fails the release gate (ci)

Beta Release run 37259884024 (the #1428 merge) failed with every test green:

  • Python job: 1519 passed / 18 skipped, plus 202 passed in the tools tests.
  • Unity: 1422 tests on each of 2021.3, 2022.3, 6000.0 and 6000.4, with 0 failures.
  • The failed step was Upload coverage reports. It crashed on a TLS error reaching cli.codecov.io, because Codecov's *.codecov.io certificate expired at 2026-10-04 23:59:59 GMT.
  • fail_ci_if_error: false did not help. codecov-action@v4 (v4.6.0) crashes on the https error before it reads that input.
  • This job gates both release pipelines, so c96a3b34 got no beta version bump and no PyPI pre-release.

Fix: continue-on-error: true on the upload step. tools/tests/test_python_tests_workflow.py pins it.

Notes:

  • On beta pushes the upload never worked anyway. The passing run logged Token required because branch is protected.
  • release.yml runs main's copy of python-tests.yml, so stable releases stay exposed until this reaches main.

2. An unknown command shows up as a red error in the Unity console (fix(transport))

A client can send a command the package has no handler for. This happens when the server or CLI is newer than the package (for example, manage_sprite against a package without it), or when a raw command has a typo.

Before: CommandRegistry threw, and the dispatcher logged Error processing command: Unknown or unsupported command type: … with a stack trace. To the user this reads as an Editor failure.

Now the dispatcher checks the new CommandRegistry.HasHandler first. It then:

  • replies with an error that names the command and says to update the package if the server or CLI is newer;
  • logs that one line as a warning.

Both transports (WebSocket and stdio) go through this dispatcher. TransportCommandDispatcherTests fails on the old code with the same unhandled error log, and passes now.

3. Doc gaps (docs)

  • manifest.json had no entries for the six asset_gen tools (blender_bridge, generate_audio, generate_image, generate_model, import_model, import_model_file). Server/tests/test_manifest_tools.py now compares the manifest with the tool registry.
  • CLI guides (website/docs/guides/cli.md, cli-examples.md, Server/src/cli/CLI_USAGE_GUIDE.md):
    • Fixed animation play and animation set-parameter, which are animation animator … now.
    • Added examples for build, physics, profiler, reflect, docs, asset-gen and blender.
    • Rebuilt the "Complete Command Reference" table from the Click command tree: 38 rows, against 27 before, several of them stale.

Interaction with #1338

Verification

  • Python: 1535 passed, 3 skipped. Tools tests: 203 passed. Docs drift check: clean.
  • EditMode (2021.3.45f2, batch mode): TransportCommandDispatcherTests and CommandRegistryTests, 4/4.
  • Each new test fails without its fix (workflow, manifest, dispatcher).
  • Roslyn compile check: 2021.3.45f2 and 2022.3.62f2 (win/osx/linux). Unity 6000.6.4f1 compiled the package in a local project with no errors.

Summary by CodeRabbit

  • New Features
    • Added tools for Blender integration, AI-assisted audio, image, and model generation, and importing models from online sources or local files.
    • Unknown commands now receive a clear error message with guidance to update the package.
  • Documentation
    • Expanded CLI guides with examples for animation, builds, physics, profiling, reflection, documentation lookup, asset generation, and Blender workflows.

Beta Release run 37259884024 (the #1428 merge) failed with every test
green: "Upload coverage reports" died on a TLS error reaching
cli.codecov.io (Codecov's *.codecov.io certificate expired 2026-10-04
23:59:59 GMT). fail_ci_if_error: false did not help, because
codecov-action v4 crashes on the https error before it reads that input.
This job gates both release pipelines, so the beta was not published.

continue-on-error on the upload step keeps a Codecov failure out of the
job result. tools/tests/test_python_tests_workflow.py pins that.
A server or CLI newer than the package (or a mistyped raw command) sends
a command the package has no handler for. CommandRegistry threw, and the
dispatcher logged it as "Error processing command: Unknown or
unsupported command type" with a stack trace, as if the Editor broke.

The dispatcher now checks CommandRegistry.HasHandler first. It replies
with an error that names the command and says to update the package if
the server or CLI is newer, and logs that one line as a warning. Both
transports (WebSocket and stdio) go through this dispatcher.

TransportCommandDispatcherTests fails on the old code with the same
unhandled error log and passes with this change.
manifest.json had no entry for the six asset_gen tools (blender_bridge,
generate_audio, generate_image, generate_model, import_model,
import_model_file). Server/tests/test_manifest_tools.py now compares it
with the tool registry, so the next new tool cannot be missed.

The CLI guides showed `animation play` and `animation set-parameter`,
which are `animation animator ...` now, and had no examples for build,
physics, profiler, reflect, docs, asset-gen or blender. The "Complete
Command Reference" table in website/docs/guides/cli.md is rebuilt from
the Click command tree: 38 rows, one per group or subgroup (it had 27,
several of them stale).
Copilot AI balanced review requested due to automatic review settings October 5, 2026 04:31
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
CLAUDE.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8f8a843-dd0a-4d23-ad70-966746413438
📥 Commits

Reviewing files that changed from the base of the PR and between c96a3b3 and f7839dc.

📒 Files selected for processing (11)
  • .github/workflows/python-tests.yml
  • MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs
  • MCPForUnity/Editor/Tools/CommandRegistry.cs
  • Server/src/cli/CLI_USAGE_GUIDE.md
  • Server/tests/test_manifest_tools.py
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/TransportCommandDispatcherTests.cs
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/TransportCommandDispatcherTests.cs.meta
  • manifest.json
  • tools/tests/test_python_tests_workflow.py
  • website/docs/guides/cli-examples.md
  • website/docs/guides/cli.md

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

Walkthrough

The dispatcher now handles commands without registered handlers. The manifest and CLI guides add tool entries, command examples, and reference information. The Python test workflow allows Codecov upload errors to continue without failing the job.

Changes

Unregistered command handling

Layer / File(s) Summary
Handler lookup and error response
MCPForUnity/Editor/Tools/CommandRegistry.cs, MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs, TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/TransportCommandDispatcherTests.cs, TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/TransportCommandDispatcherTests.cs.meta
CommandRegistry adds HasHandler. The dispatcher checks for a handler before availability checks; when none exists, it logs a warning, returns an error naming the command, and removes the pending command. The edit-mode test checks the warning and response.

CLI tools and documentation

Layer / File(s) Summary
Tool manifest entries and validation
manifest.json, Server/tests/test_manifest_tools.py
The manifest adds Blender, asset-generation, and model-import tool entries. A test checks that manifest entries match registered tools, without duplicates.
Animation command examples
Server/src/cli/CLI_USAGE_GUIDE.md, website/docs/guides/cli-examples.md, website/docs/guides/cli.md
The guides use animator-scoped playback and parameter commands and add animation clip and controller examples.
Additional CLI examples and reference
Server/src/cli/CLI_USAGE_GUIDE.md, website/docs/guides/cli-examples.md, website/docs/guides/cli.md
The guides add command examples and reference entries for build, physics, profiler, reflection, documentation, asset generation, and Blender operations.

Coverage upload workflow

Layer / File(s) Summary
Codecov upload failure handling
.github/workflows/python-tests.yml, tools/tests/test_python_tests_workflow.py
The Codecov upload step continues on error. A test checks that exactly one Codecov step exists and sets continue-on-error: true.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f7839

No actionable issue remains from this review; the change is ready for normal merge checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to f7839

The inspected changes do not demonstrate a new command-execution or authorization bypass. Unknown commands are rejected, existing tools are advertised, and coverage-upload failures become nonfatal without making test failures nonfatal. External catalog-client behavior and inherited shutdown cleanup remain partly uncertain.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed command path remains within an existing caller-to-Unity dispatch boundary. An unregistered command can produce a warning and error response but cannot invoke a handler through this branch. Manifest additions improve advertised discoverability without adding repository-local execution authority; behavior of external catalog clients remains outside the inspected evidence.

Trust Boundaries and Controls

  • observed — HasHandler checks registry membership only. Registered commands still pass through disabled-resource and disabled-tool checks before execution; unknown commands return before reaching any handler. The new membership check is not an authentication or authorization mechanism.

Resilience and Maintainability Implications

  • inferred — Step-local coverage failure tolerance contains an external reporting outage without converting failing tests into successful release prerequisites. The compared release workflows retain their existing write permissions and PyPI environment configuration; this change does not add publishing authority.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 5 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the three main changes: handling Codecov failures, warning on unknown commands, and filling manifest and CLI documentation gaps. It is long, but remains specific and reada…
Description check ✅ Passed The description explains the rationale, changes, related issue context, and verification results. It is mostly complete, though it does not fill in the template’s Type of Change, Compatibility / Packa…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 5 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused fixes are consistent with existing architecture and have targeted regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Prevents external Codecov failures from blocking releases, improves unknown-command handling, and synchronizes tool/CLI documentation.

Changes:

  • Makes Codecov uploads non-blocking.
  • Returns and logs unknown commands as warnings.
  • Completes manifest entries and CLI documentation.
File Description
.github/​workflows/​python-tests.yml Makes Codecov upload failures non-blocking.
tools/​tests/​test_python_tests_workflow.py Guards the non-blocking workflow setting.
MCPForUnity/​Editor/​Tools/​CommandRegistry.cs Adds handler-existence lookup.
MCPForUnity/​Editor/​Services/​Transport/​TransportCommandDispatcher.cs Handles unknown commands without error logs.
TestProjects/​UnityMCPTests/​Assets/​Tests/​EditMode/​Services/​TransportCommandDispatcherTests.cs Tests unknown-command responses and warnings.
TestProjects/​UnityMCPTests/​Assets/​Tests/​EditMode/​Services/​TransportCommandDispatcherTests.cs.meta Adds Unity metadata for the test.
manifest.json Adds six asset-generation tools.
Server/​tests/​test_manifest_tools.py Enforces manifest/registry parity.
Server/​src/​cli/​CLI_USAGE_GUIDE.md Corrects and expands CLI examples.
website/​docs/​guides/​cli.md Updates examples and command reference.
website/​docs/​guides/​cli-examples.md Adds examples for newly documented command groups.
Files not reviewed (1)
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/TransportCommandDispatcherTests.cs.meta: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Scriptwonder
Scriptwonder merged commit 625808d into beta Oct 5, 2026
16 checks passed
@Scriptwonder
Scriptwonder deleted the fix/ci-codecov-console-doc-gaps branch October 5, 2026 20:12
Scriptwonder added a commit to BurakErdemci/unity-mcp that referenced this pull request Oct 5, 2026
CoplayDev#1429 rebuilt the "Complete Command Reference" table in
website/docs/guides/cli.md from the Click command tree, before this
branch's `sprite` group was on beta. Rebuilt from this branch's tree, the
only change is the one `sprite` row. Both CLI guides also get a short
sprite section next to the texture one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants