Repository navigation
Build the surrogate probe with chr so mypy can cache it - #23
Merged
Merged
Conversation
CPythonClassConstructionField.DOCUMENTATION probed CPython with the literal "\ud800". Since py.typed, mypy analyses NRA for its users, infers Literal['\ud800'] for the enum value and crashes writing it to its UTF-8 cache (mypy 2.3.0, INTERNAL ERROR in cache.write_literal), which took agent-comms' TypeErrors measure down. chr(0xD800) is the same value and types as str. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q8rVa3cPyXzpCKyR8XvM8W
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #21 shipped
py.typed, mypy analyses NRA inside its users.CPythonClassConstructionField.DOCUMENTATION(native_compilation.py:4199) held the literal"\ud800". mypy 2.3.0 infersLiteral['\ud800'], then crashes writing it to its UTF-8 cache:That took down agent-comms' TypeErrors measure on OpenHCSDev/agent-comms#3170.
chr(0xD800)is the same value, and mypy types it asstr.Proof: reproduced from an empty cache with mypy 2.3.0 and NRA 3fc2f08. With this branch installed, mypy completes (no traceback), and
tests/test_native_class_metadata_values.pyplustests/test_documentation_store.pypass (29).🤖 Generated with Claude Code
https://claude.ai/code/session_01Q8rVa3cPyXzpCKyR8XvM8W