From cc9e03d03c9126ebdc817bfc1c9c575bdbc01930 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Sat, 30 Aug 2025 09:06:02 -0700 Subject: [PATCH] ci: Remove arbitrary type error threshold from MCP server lint workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove the 50-error threshold that allowed type errors to pass - Require 0 type errors for CI to pass (aiming for full type safety) - Only check src/ directory (tests have legacy issues to fix separately) - Update error messages to be clearer about requirements - Add helpful hint about running pyright locally This ensures all new code maintains strict type safety and prevents accumulation of type errors over time. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/mcp-server-lint.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mcp-server-lint.yml b/.github/workflows/mcp-server-lint.yml index dde55c99..51e7dbbf 100644 --- a/.github/workflows/mcp-server-lint.yml +++ b/.github/workflows/mcp-server-lint.yml @@ -69,13 +69,13 @@ jobs: - name: Run type checking with pyright run: | cd mcp_server - echo "🔍 Running type checking..." - # Run pyright and capture output - if uv run pyright . > pyright_output.txt 2>&1; then + echo "🔍 Running type checking on src/ directory..." + # Run pyright and capture output (only check src/ for now, tests have legacy issues) + if uv run pyright src/ > pyright_output.txt 2>&1; then echo "✅ Type checking passed with no errors" cat pyright_output.txt else - echo "⚠️ Type checking found issues:" + echo "❌ Type checking found issues:" cat pyright_output.txt # Count errors error_count=$(grep -c "error:" pyright_output.txt || echo "0") @@ -84,13 +84,10 @@ jobs: echo "📊 Type checking summary:" echo " - Errors: $error_count" echo " - Warnings: $warning_count" - # Only fail if there are more than 50 errors (current baseline) - if [ "$error_count" -gt 50 ]; then - echo "❌ Too many type errors (>50). Please fix critical issues." - exit 1 - else - echo "⚠️ Type errors under threshold, continuing..." - fi + echo "" + echo "❌ Type checking failed. All type errors must be fixed." + echo "💡 Run 'uv run pyright src/' in mcp_server/ to see type errors" + exit 1 fi - name: Check import sorting