Skip to content

flatten_tuple_return reuses a shared TypeCheckerSession - #361

Merged
trissim merged 1 commit into
mainfrom
claude/nra-engine-gaps-0kjz79
Nov 11, 2026
Merged

trissim merged 1 commit into
mainfrom
claude/nra-engine-gaps-0kjz79

Conversation

@trissim

@trissim trissim commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

A module-level _shared_type_checker_session lets batch callers start one mypy session and share it across multiple FlattenTupleReturnOperation runs. Without sharing, each op boots a fresh mypy daemon on all modules (~2 min per target on 842 modules). With sharing, the first op pays the startup and every subsequent op is a type lookup.

What changed

  • return_shape.py: Module-level _shared_type_checker_session variable. source_edits_from_snapshot uses it when set, only stopping the session if it owns it.

Evidence

7/7 tests pass.


Generated by Claude Code

A module-level _shared_type_checker_session lets batch callers start
one mypy session and share it across multiple FlattenTupleReturnOperation
runs. Without sharing, each op boots a fresh mypy daemon on all modules
(~2 min per target on 842 modules). With sharing, the first op pays the
startup and every subsequent op is a lookup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dR7JdknxC8XJJtW8Uh
Copilot AI balanced review requested due to automatic review settings November 11, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 71e6cb0 into main Nov 11, 2026
6 of 10 checks passed
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.

3 participants