Skip to content

pyright gate resolves a different tree-sitter-language-pack than the documented dev install #253

Description

@cdeust

What

The pyright gate resolves a different tree-sitter-language-pack than the
documented developer install, so a contributor sees one diagnostic that CI never
reports.

Measurement (2026-07-29, worktree at f606c37)

Environment How it is built tree-sitter-language-pack pyright 1.1.410 mcp_server/
CI (ci.yml:430-437) python -m venv .venv + pip install -e ".[dev,postgresql,sqlite,codebase,otel]" flashrank 1.13.5 0 errors, 0 warnings, 0 informations
Developer (CLAUDE.md:21, uv sync) resolved from uv.lock 1.6.2 1 error

The diagnostic:

mcp_server/core/ast_parser.py:88:23 - error: Argument of type "str" cannot be
assigned to parameter "name" of type "SupportedLanguage" in function "get_parser"

Confirmed pre-existing by a paired control: it reproduces on an unmodified
origin/main tree in the same venv, and disappears on the same tree in the
CI-equivalent venv.

Why this matters

pyproject.toml:77 pins tree-sitter-language-pack>=0.24.0,<1.14, a range wide
enough that the two install paths land 7 minor versions apart. The pyright gate
is a zero-diagnostic gate (issue #197); a gate whose result depends on which
installer you used cannot be trusted in either direction — today it costs a
contributor a phantom error, tomorrow it can hide a real one.

Filed per coding-standards §14.3: outside the #239 DTZ family's blast radius —
ast_parser.py is untouched by that diff and the divergence is an environment
resolution issue, not a source defect.

Acceptance criteria

  1. The pyright job and the documented developer install resolve the same
    tree-sitter-language-pack (either CI installs from the lockfile, or the
    lockfile is refreshed and the pin narrowed).
  2. pyright mcp_server/ reports 0 errors in BOTH environments, evidenced by
    quoted output from each.
  3. mcp_server/core/ast_parser.py:88 narrows language to the
    SupportedLanguage literal, or documents why the widening is safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions