Skip to content

Conversation

@dsarno
Copy link
Owner

@dsarno dsarno commented Aug 27, 2025

…nit)

Summary by CodeRabbit

  • Tests

    • Introduced a Unity-integrated natural language test suite with a containerized bridge for more reliable runs.
    • Standardized reporting (JUnit XML and Markdown), with artifacts published for easier review.
    • Added readiness checks and fallback reporting to reduce flakiness and ensure results are captured.
  • Chores

    • Added a manually triggerable workflow and overhauled the existing pipeline for improved stability.
    • Enhanced diagnostics and job summaries with sanitized details and automatic cleanup at the end of runs.

@coderabbitai
Copy link

coderabbitai bot commented Aug 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces a new manual “Claude Mini NL Test Suite (Unity live)” workflow and overhauls the existing “Claude NL suite” workflow to run NL tests through a persistent Unity MCP bridge and a Python MCP server, add secrets gating, manage Unity licensing, execute tests via anthropics/claude-code-base-action, normalize/publish reports, upload artifacts, and perform cleanup.

Changes

Cohort / File(s) Summary of Changes
New mini Unity NL workflow
.github/workflows/claude-nl-suite-mini.yml
Adds a manual Unity-focused NL test workflow targeting Unity 2021.3.45f1. Provisions Docker-based Unity MCP bridge and Python MCP server, gates on secrets (unity_ok, anthropic_ok), writes MCP config, runs Claude NL suite with constraints, normalizes/publishes JUnit and Markdown reports, uploads artifacts, and tears down the Unity container.
Overhauled main Unity NL workflow
.github/workflows/claude-nl-suite.yml
Replaces prior NL/T invocation with Unity-backed pipeline. Adds environment/paths (UNITY_VERSION/IMAGE, cache roots, report outputs), secrets detection, host license priming, persistent Unity bridge container, readiness checks, MCP config creation, single-pass NL suite run via Claude action, report normalization/duplication, diagnostics, fallback JUnit, artifact uploads, and orderly shutdown. Removes older compile and NL/T steps.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Workflow Dispatch / Trigger
  participant GH as GitHub Actions Runner
  participant Sec as Secrets Check
  participant Lic as Unity License (GameCI/Host)
  participant Dock as Unity Bridge (Docker)
  participant MCP as Python MCP Server
  participant CLA as anthropics/claude-code-base-action
  participant Rep as Reports/Artifacts
  participant Sum as GitHub Job Summary

  Dev->>GH: Start workflow (mini or main)
  GH->>Sec: Detect secrets (unity_ok, anthropic_ok)
  Sec-->>GH: Gate results

  alt Secrets ok
    GH->>Lic: Prime/verify Unity license caches
    GH->>Dock: Start persistent unity-mcp container
    GH->>Dock: Wait for readiness (ports/status)
    GH->>MCP: Install/setup via Python (uv)
    GH->>GH: Write .claude/mcp.json config

    GH->>CLA: Run Claude NL suite (Unity params, model, tools)
    CLA-->>GH: Produce JUnit XML + Markdown

    GH->>GH: Normalize/duplicate JUnit, sanitize Markdown
    GH->>Sum: Append NL/T summary
    GH->>Rep: Publish JUnit for Actions
    GH->>Rep: Upload artifacts (reports/*)
  else Missing secrets
    GH-->>Sum: Note gated/Skipped steps
  end

  GH->>Dock: Stop Unity container (cleanup)
  GH-->>Dev: Workflow complete
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

I hop through logs where bridges spin,
A Unity world in Docker’s tin.
MCP whispers, Claude replies—
JUnit stars in midnight skies.
Artifacts packed, the run complete,
Thump-thump goes QA’s steady beat. 🐇🔧✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between eeb5889 and 1d7b07f.

📒 Files selected for processing (2)
  • .github/workflows/claude-nl-suite-mini.yml (1 hunks)
  • .github/workflows/claude-nl-suite.yml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/sync-ci-workflows

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dsarno dsarno merged commit 3d05d54 into main Aug 27, 2025
1 of 2 checks passed
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR introduces comprehensive CI workflows for automated testing of the Unity MCP bridge using Claude AI's natural language capabilities. The changes add two new GitHub Actions workflows that create sophisticated testing environments where Claude can perform automated code editing and validation on Unity C# scripts in real-time.

The implementation uses Docker containerization to run Unity Editor in headless mode with persistent MCP bridge connections, allowing Claude to interact with Unity projects through the Model Context Protocol. Both workflows (claude-nl-suite.yml and claude-nl-suite-mini.yml) follow the same architectural pattern but target different test suites - the full suite runs comprehensive tests while the mini version provides faster feedback for development.

Key technical components include:

  • GameCI-based Unity licensing and setup within Docker containers
  • Complex port discovery mechanisms to establish MCP bridge connectivity
  • Python-based MCP server configuration and management
  • Comprehensive logging with sensitive data sanitization
  • JUnit test report generation for GitHub integration
  • Robust error handling and cleanup procedures

The workflows integrate with the existing Unity MCP bridge infrastructure, leveraging the project's editor tools and runtime serialization components. This represents a significant enhancement to the project's testing capabilities, enabling automated validation of Unity-Claude interactions that would be difficult to test through traditional unit testing approaches.

Important Files Changed

Files Changed
Filename Score Overview
.github/workflows/claude-nl-suite-mini.yml 3/5 New mini test suite workflow with Docker Unity setup and Claude integration
.github/workflows/claude-nl-suite.yml 3/5 Major rewrite of full test suite workflow with comprehensive Docker and MCP infrastructure

Confidence score: 3/5

  • This PR introduces complex CI infrastructure that may have reliability issues in production environments
  • Score reflects concerns about Docker networking complexity, hardcoded paths, and references to non-existent prompt files
  • Pay close attention to both workflow files for potential runtime failures and path resolution issues

Sequence Diagram

sequenceDiagram
    participant User
    participant GitHub Actions
    participant Unity Container
    participant MCP Server
    participant Claude API
    participant GameCI

    User->>GitHub Actions: "Trigger workflow_dispatch"
    GitHub Actions->>GitHub Actions: "Detect secrets (Unity & Anthropic)"
    GitHub Actions->>GitHub Actions: "Checkout repository"
    
    GitHub Actions->>GitHub Actions: "Setup Python (uv)"
    GitHub Actions->>MCP Server: "Install MCP server dependencies"
    
    GitHub Actions->>GameCI: "Prime Unity license"
    GameCI->>GitHub Actions: "License activated"
    
    GitHub Actions->>GitHub Actions: "Clean old MCP status files"
    
    GitHub Actions->>Unity Container: "Start Unity (persistent bridge)"
    Unity Container->>Unity Container: "Initialize Unity Editor in batch mode"
    Unity Container->>Unity Container: "Execute StartAutoConnect method"
    Unity Container->>GitHub Actions: "Bridge listening/ready signals"
    
    GitHub Actions->>GitHub Actions: "Wait for Unity bridge (robust check)"
    GitHub Actions->>Unity Container: "Probe connection on detected port"
    Unity Container->>GitHub Actions: "Connection confirmed"
    
    GitHub Actions->>GitHub Actions: "Write MCP config (.claude/mcp.json)"
    GitHub Actions->>GitHub Actions: "Prepare reports directory"
    
    GitHub Actions->>Claude API: "Run Claude NL suite (single pass)"
    Claude API->>MCP Server: "Connect via stdio transport"
    MCP Server->>Unity Container: "Execute Unity tools and commands"
    Unity Container->>MCP Server: "Return Unity operation results"
    MCP Server->>Claude API: "Provide Unity context and responses"
    Claude API->>GitHub Actions: "Generate JUnit and markdown reports"
    
    GitHub Actions->>GitHub Actions: "Normalize JUnit for consumer actions"
    GitHub Actions->>GitHub Actions: "Sanitize markdown reports"
    GitHub Actions->>GitHub Actions: "Publish JUnit reports"
    GitHub Actions->>GitHub Actions: "Upload artifacts"
    
    GitHub Actions->>Unity Container: "Stop Unity container"
    Unity Container->>GitHub Actions: "Container stopped"
Loading

2 files reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Comment on lines +118 to +119
if [ -f "${UNITY_CACHE_ROOT}/.local/share/unity3d/Unity_lic.ulf" ]; then
MANUAL_ARG=(-manualLicenseFile /root/.local/share/unity3d/Unity_lic.ulf)
Copy link

Choose a reason for hiding this comment

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

logic: File path check uses hardcoded container path '/root/.local/share/unity3d/Unity_lic.ulf' but the license could be in host path '${UNITY_CACHE_ROOT}/.local/share/unity3d/Unity_lic.ulf'

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bugbot free trial expires on August 31, 2025
Learn more in the Cursor dashboard.

- name: NL/T details → Job Summary
if: always()
run: |
echo "## Unity NL/T Editing Suite — Full Coverage" >> $GITHUB_STEP_SUMMARY
Copy link

Choose a reason for hiding this comment

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

Bug: Workflow Summary Mismatch

The claude-nl-suite-mini.yml workflow's job summary incorrectly displays "Full Coverage." As this workflow is for the mini test suite, this claim is misleading about the actual scope of the tests.

Fix in Cursor Fix in Web

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