Skip to content

2026-08-27 Infrastructure ast grep blocking findings

Fixed all 43 error-level ast-grep findings in vxdata-api and opened mono PR 354.

Work Done

  • Created an isolated monorepo worktree and branch fix/ast-grep-blocking-findings from origin/main.
  • Replaced 30 Optional[T] annotations with T | None and 13 SQLAlchemy boolean/null equality expressions with .is_(...) in apps/vxdata-api.
  • Removed required stale E711/E712 suppressions and unused imports.
  • Validated zero ast-grep error-level findings while leaving 16 warnings and 5 hints unchanged.
  • Validated the changed files with Ruff, Nx lint, ty typecheck, and the full vxdata-api test suite (77 passed).
  • Opened mono PR 354 from commit c0cab869.

Lessons Learned: Pitfalls

  • The configured vxdata-api Ruff task reports success but also says No Python files found under the given path(s). Its [tool.ruff] include = ["src"] setting does not select the Python files with the current Ruff version. An explicit changed-file Ruff invocation was needed for real lint coverage.
  • PEP 604 and SQLAlchemy fixes exposed type-checker needs. SQLModel model attributes require # type: ignore[union-attr] on .is_(...) expressions for ty to accept them.

Lessons Learned: Improvements

  • Update the vxdata-api Ruff include configuration to a Python glob such as src/**/*.py, then verify the Nx lint target actually examines files. This should be a separate lint-infrastructure fix because it was outside this PR’s narrow scope.
  • Document that blocking ast-grep autofixes should be followed by unused-import cleanup, Ruff formatting of changed expressions, and ty suppression checks.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close