Problem
The prose gate's Python checks pass silently when the interpreter running prose_lint.py cannot parse a file that the repository's own interpreter can. .github/actions/prose-gate/prose_lint.py returns {} from its docstring extraction on a SyntaxError (around line 2180), so the docstring checks skip that file, and python_comments returns None (around line 1770), so its caller falls back to regex comment extraction. The gate then reports a pass with less coverage rather than failing.
Every local surface runs the gate on a host interpreter rather than the repository's own: the Husky snippet runs py -3 or python3, and the VS Code "Lint: Prose" task and the pre-commit snippet run uv run --no-project python, which ignores the repository's requires-python. A repository whose requires-python sits above that interpreter, and whose code uses newer syntax, such as a PEP 695 type statement read by Python 3.11, reaches the silent skip. For example, a constructed file holding type Alias = int above a function with a docstring, read by a 3.11 interpreter, gets no docstring check at all.
Done
A Python file the gate cannot parse is reported rather than skipped, or the gate states in its scope line that it skipped the file's AST-based checks, so a pass under a mismatched interpreter is distinguishable from a clean one.
Found by the local strict review of the #2148 fix (handoff #2162). The finding is on code that change did not touch.
Problem
The prose gate's Python checks pass silently when the interpreter running
prose_lint.pycannot parse a file that the repository's own interpreter can..github/actions/prose-gate/prose_lint.pyreturns{}from its docstring extraction on aSyntaxError(around line 2180), so the docstring checks skip that file, andpython_commentsreturnsNone(around line 1770), so its caller falls back to regex comment extraction. The gate then reports a pass with less coverage rather than failing.Every local surface runs the gate on a host interpreter rather than the repository's own: the Husky snippet runs
py -3orpython3, and the VS Code "Lint: Prose" task and the pre-commit snippet runuv run --no-project python, which ignores the repository'srequires-python. A repository whoserequires-pythonsits above that interpreter, and whose code uses newer syntax, such as a PEP 695typestatement read by Python 3.11, reaches the silent skip. For example, a constructed file holdingtype Alias = intabove a function with a docstring, read by a 3.11 interpreter, gets no docstring check at all.Done
A Python file the gate cannot parse is reported rather than skipped, or the gate states in its scope line that it skipped the file's AST-based checks, so a pass under a mismatched interpreter is distinguishable from a clean one.
Found by the local strict review of the #2148 fix (handoff #2162). The finding is on code that change did not touch.