Files
freecad-robust-mcp-fc111/.coderabbit.yaml
T
cd77560297 ci: Add CI and Release workflows and other test fixes (#7)
* ci: add caching and fix workflow failures

- Add UV package caching to all workflows for faster dependency installation
- Add pre-commit hook caching with OS-specific cache keys
- Skip no-commit-to-branch hook in CI (fails on main branch)
- Remove broken apt cache action (doesn't work with PPAs)
- Simplify FreeCAD command detection (PPA installs to standard PATH)
- Add FreeCAD Python version logging for debugging

* ci: Add code Rabbit configuration file

* ci: fix issues in CI workflows

* ci: add uv.lock

* ci: tweaks

* ci: Fix errors and add UUID generation and checking

* ci: Use the GitHub FreeCAD release latest stables

* ci: skip macro test for now, due to headless mode

* feat: Add a multi export macro

* ci: Fix tests

* ci: fix docker build workflow

* ci: skip trufflehog in GitHub Actions due to wasm panic bug

TruffleHog has a known wasm/go-re2 panic bug that causes failures
in GitHub Actions environment. The hook still runs locally during
development for secrets detection.

- Add trufflehog to SKIP env var in pre-commit.yaml
- Update trufflehog to v3.88.7 (latest)
- Add reference to upstream issue #3321

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: use boolean holes instead of PartDesign::Hole in CI

PartDesign::Hole has a CADKernelError bug in FreeCAD AppImage headless
mode on Linux (used in GitHub Actions) where it fails with "Cannot make
face from profile". The SmartCutter class already supports boolean holes
as an alternative.

Changes:
- Modify SmartCutter.execute() to use boolean holes by default
- Update all test assertions for Part::Feature output type
- Update test docstrings and class descriptions
- Remove PartDesign-specific checks (Group, Sketcher::SketchObject)
- Update workflow comment explaining the CI limitation

Boolean holes work reliably in both GUI and headless mode across all
FreeCAD configurations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* ci: clean up GitHub Actions workflows

* ci: Dependabot improvements

* ci: add CodeQL scanning workflow

* ci: AI review suggested improvements

* ci: add coderabbit updates for intentional decisions

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 19:29:25 -08:00

164 lines
5.0 KiB
YAML

# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# CodeRabbit Configuration
# https://docs.coderabbit.ai/guides/configure-coderabbit
language: en-US
# Tone instructions for reviews
tone_instructions: >
Be concise and direct. Focus on actionable feedback.
This is a Python project using modern tooling (uv, ruff, mypy).
The codebase integrates with FreeCAD CAD software via MCP protocol.
early_access: false
# Enable or disable reviews
reviews:
# Enable automated code reviews
auto_review:
enabled: true
# Don't review drafts until ready
drafts: false
# Review base branches (PRs to main)
base_branches:
- main
- master
# Review profile - assertive catches more issues
profile: assertive
# Request changes when issues found
request_changes_workflow: true
# High-level summary in PR comments
high_level_summary: true
high_level_summary_placeholder: "@coderabbitai summary"
# Add poem to review (disabled - keep it professional)
poem: false
# Collapse walkthrough in large PRs
collapse_walkthrough: true
# Review labeling
labeling_instructions:
- label: "security"
instructions: "Apply when security vulnerabilities are found"
- label: "breaking-change"
instructions: "Apply when changes break backward compatibility"
- label: "documentation"
instructions: "Apply when documentation changes are needed"
# Paths to always review carefully
path_instructions:
- path: "src/freecad_mcp/**/*.py"
instructions: >
This is the core MCP server code. Pay attention to:
- Async/await patterns
- Error handling for FreeCAD operations
- Type hints and Pydantic models
- Security of execute_python functionality
- path: "src/freecad_mcp/tools/**/*.py"
instructions: >
These are MCP tool implementations. Ensure:
- Proper docstrings for tool discovery
- Consistent error handling patterns
- GUI-safe checks (FreeCAD.GuiUp) for view operations
- path: "src/freecad_mcp/freecad_plugin/**/*.py"
instructions: >
This code runs inside FreeCAD's Python environment.
It cannot import packages from the project's virtualenv (mcp, pydantic).
Watch for accidental imports of project dependencies.
- path: "macros/**/*.FCMacro"
instructions: >
FreeCAD macro files. These are standalone Python scripts.
They run in FreeCAD's environment with access to FreeCAD, Part, etc.
- path: "tests/**/*.py"
instructions: >
Test files. Ensure good test coverage and clear assertions.
Integration tests require FreeCAD MCP bridge to be running.
- path: ".github/workflows/**/*.yaml"
instructions: >
GitHub Actions workflows. Check for:
- Proper caching configuration
- Security of secrets handling
- Correct job dependencies
INTENTIONAL PATTERNS (do not flag as issues):
- continue-on-error: true on test steps is intentional during stabilization
- upload-artifact@v6 and download-artifact@v7 work on GitHub-hosted runners
- Actions version jumps (v4 to v6/v7) are intentional Dependabot updates
- path: "pyproject.toml"
instructions: >
Project configuration. Watch for:
- Dependency version constraints
- Tool configuration consistency (ruff, mypy, pytest)
CRITICAL: Python 3.11 is required - FreeCAD bundles libpython3.11.
Using a different Python version causes ABI incompatibility crashes.
- path: ".mise.toml"
instructions: >
Tool version management via mise. All versions use fuzzy matching:
- "0.9" means "0.9.x" (allows patch updates)
- "1.43" means "1.43.x" (allows patch updates)
This is consistent and intentional. Do not flag as inconsistent pinning.
CRITICAL: Python must stay at 3.11 to match FreeCAD's bundled Python.
# Tools to use for analysis
tools:
# Python-specific tools
ruff:
enabled: true
# General tools
shellcheck:
enabled: true
markdownlint:
enabled: true
yamllint:
enabled: true
hadolint:
enabled: true
# Files and paths to ignore in reviews (! prefix = exclude)
path_filters:
# Lock files - auto-generated
- "!uv.lock"
- "!poetry.lock"
- "!package-lock.json"
# Generated/cached files
- "!**/.mypy_cache/**"
- "!**/.pytest_cache/**"
- "!**/.ruff_cache/**"
- "!**/__pycache__/**"
- "!**/*.pyc"
# Virtual environments
- "!.venv/**"
- "!venv/**"
# IDE settings (except shared configs)
- "!.idea/**"
# Build artifacts
- "!dist/**"
- "!build/**"
- "!*.egg-info/**"
# Documentation build output
- "!site/**"
# Secrets baseline (reviewed separately)
- "!.secrets.baseline"
# Chat configuration
chat:
auto_reply: true
# Knowledge base for context
knowledge_base:
opt_out: false
learnings:
scope: auto
issues:
scope: auto
jira:
project_keys: []
pull_requests:
scope: auto