Skip to content

chore: add ty as supplemental type checker#594

Merged
phernandez merged 1 commit intomainfrom
codex/try-ty
Feb 21, 2026
Merged

chore: add ty as supplemental type checker#594
phernandez merged 1 commit intomainfrom
codex/try-ty

Conversation

@phernandez
Copy link
Member

Summary

  • add Astral ty to the dev dependency group
  • add just typecheck-ty (uv run ty check src/) so we can run ty alongside pyright
  • document incremental rollout in both README.md and AGENTS.md

Verification

  • just typecheck (passes)
  • just typecheck-ty (currently reports diagnostics; incremental adoption path)

Notes

  • this PR intentionally keeps pyright as the primary blocking type checker
  • ty is introduced as a supplemental checker so we can tighten over time

Signed-off-by: phernandez <paul@basicmachines.co>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2026

Claude finished @phernandez's task in 1m 33s —— View job


PR Review: chore: add ty as supplemental type checker

  • Gather context and read changed files
  • Review code quality & standards
  • Review testing & documentation
  • Review architecture considerations
  • Review security & performance
  • Review compatibility
  • Post final summary

Summary

This is a clean, minimal tooling PR. It adds Astral's ty as a non-blocking supplemental type checker alongside the existing Pyright setup. The incremental adoption strategy is well-reasoned given ty's pre-release status.


Checklist

Code Quality & Standards

  • Follows Basic Memory's coding conventions in CLAUDE.md
  • No commented-out code blocks
  • Line length limits — N/A (no source changes)
  • Python type annotations / async patterns — N/A (no source changes)

Testing & Documentation

  • 100% test coverage maintained — unaffected (tooling/docs only)
  • Documentation updated — README.md and AGENTS.md both updated clearly
  • CLAUDE.md (AGENTS.md) updated to document the new typecheck-ty command

Basic Memory Architecture

  • No database, MCP, or knowledge graph changes — N/A
  • Local-first architecture unaffected

Security & Performance

  • No secrets or credentials
  • uv.lock includes SHA-256 hashes for all ty wheels — supply chain integrity preserved
  • ty is dev-only; not present in production dependencies

Compatibility

  • ty wheels are provided for win32, win_amd64, and win_arm64 in the lock file — Windows coverage confirmed
  • No emoji or Unicode added to console/log output

Observations

Minor: Version pin is a loose lower-bound on a pre-release package

# pyproject.toml:99
"ty>=0.0.18",

ty is explicitly in pre-release (0.0.x), meaning its API/behavior may change significantly between versions. A loose >= bound means fresh installs could pick up a newer version whose diagnostics differ. Since uv.lock hard-pins 0.0.18 in practice, the risk is low for team members using uv — but if someone resolves dependencies outside the lock file (e.g., in a CI matrix that upgrades lockfiles), they may get surprising results. Consider ty~=0.0.18 (compatible release) as a tighter signal of intent while still allowing patch-level updates.

This is a minor point and does not block the PR.

typecheck-ty is intentionally not in fast-check or check — confirmed appropriate given the stated incremental adoption path. The just check gate remains lint format typecheck test (pyright-only), which is correct.

No CI enforcement — also intentional per the PR description. The diagnostic-first approach before enforcing in CI is sensible for an early-stage tool.


Verdict

Looks good to merge. The change is well-scoped, clearly documented, and doesn't affect existing type-checking gates or test coverage. The supplemental/non-blocking framing is the right call for a 0.0.x tool.

@phernandez phernandez merged commit bbe6c1e into main Feb 21, 2026
26 checks passed
@phernandez phernandez deleted the codex/try-ty branch February 21, 2026 02:14
@phernandez phernandez added this to the v0.19.0 milestone Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant