Skip to content

chore(infra): align pyright (LSP) with ty (validation) on MCP server scope #56

@dougborg

Description

@dougborg

Problem

pyright (used by the IDE/LSP via pyrightconfig.json) and ty (the project's actual type checker, via poe typecheck) disagree about whether statuspro_mcp_server/ is in scope:

  • pyrightconfig.json includes statuspro_mcp_server/ — the LSP surfaces type warnings on every edit there.
  • pyproject.toml poe typecheck runs ty check --exclude 'statuspro_mcp_server/' … — so those same warnings never block validation, never gate commits, never fail CI.

Net effect during today's MCP refactor work (PRs #51, #52): pyright noise lit up MCP files mid-edit, but couldn't actually be acted on because ty (which is what agent-check / check runs) wasn't checking the same files. Either the warnings are real and we should be enforcing them, or they're noise and the LSP shouldn't be surfacing them.

Options

  1. Bring MCP under ty — drop the --exclude 'statuspro_mcp_server/' and fix whatever surfaces. Aligns the two checkers; eliminates the silent-divergence trap. Likely some real fixes needed since the directory has been ungated for a while.
  2. Quiet pyright on MCP — add statuspro_mcp_server to pyrightconfig.json's exclude. Cheaper but leaves a directory with no static type checking at all.
  3. Switch the LSP to ty — once ty matures its LSP story (currently pre-alpha per the comments in pyproject.toml). One checker, one source of truth. Probably the long-term answer, but not today.

Recommend Option 1: align by tightening, not by loosening.

Acceptance

  • poe typecheck runs against statuspro_mcp_server/ with no errors
  • pyrightconfig.json and the ty task list match (or document why they intentionally diverge)
  • No new files added to either exclude list as a workaround

Context

Surfaced during PR #51/#52 refactor work. CLAUDE.md already calls out "ZERO TOLERANCE for ignoring errors" — an excluded directory is a quieter form of the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/infraRepo config, CI, labels, project setuparea/mcpTouches statuspro_mcp_server/ only

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions