Repository navigation
Declared-receiver call-closure proofs for threaded_absence and zero_one_tuple - #640
Merged
Merged
Conversation
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.
Summary
MethodOwnerReceiverProof(nominal_refactor_advisor/probe_owner.py) to eliminate the duplicated mypy receiver-closure loop acrossrefactors/threaded_absence.pyandrefactors/zero_one_tuple.py(IMPL-12) and fall back toDeclaredReceiverTypingwhen mypy degrades unfollowed installed imports (follow_imports="skip") toAny/Unknown/object:DeclaredType.reaches_method_owner(reaching_symbols, reaching_ancestors, is_nominal_class)polymorphic dispatch onDeclaredScannedClassesandDeclaredForeignInstance.MethodOwnerReceiverProoftransitively closesreaching_ancestorsover installed bases and refuses to dismiss scanned or installedProtocols (typing.Protocol/typing_extensions.Protocol),builtins.object, orAny.DeclaredReceiverTyping.qualified(nominal_refactor_advisor/declared_receivers.py,class_index.py):InstalledClassDeclarations.import_aliases_map(module_name)andInstalledClassDeclarations.is_nominal_non_protocol_class(qualified_name, scan).Selfand imported annotations declared inside installed base classes (e.g.agent_comms.nominal.declared_family.DeclaredFamily.member_named(cls, name) -> type[Self]) to resolve when inherited by scanned classes.__init__self.<attr>: Tinstance attribute annotations (class_index.py,declared_receivers.py):self.<attr>: Tannotations inCompactIndexedClass.init_attribute_annotations._InstanceMemberRead(_MemberRead)so instance attribute reads resolve__init__annotations along the resolved MRO prefix (including subclasses of open bases) without leaking instance attributes ontoDeclaredClassObject.class_index.py,declared_receivers.py):is_async: bool = FalseonCompactAnnotatedMethodandCompactAnnotatedFunctionReturn, plusAwaitCallStep,AwaitedCalledReferenceRoot,_AwaitedMethodCall, andast.Awaithandling inReceiverPathBuilder. Non-async defcallables remainUndeclaredType.Live Toad-Bench Verification
Running
--codemod-synthesize-plan --codemod-goal-detector threaded_absence --codemod-goal-detector zero_one_tupleagainstOpenHCSDev/toad(472e6eb25):zero_one_tupleStructuredTag.decode_blockfindings (CtxTag.decode_block,ToolCallTag.decode_block,ThinkTag.decode_block) clearedstructured_context.py:587 accesses .decode_block on Anyand unlocked directly toOWNER_PICK(zero_one_tupleproofblockers5 -> 2,owner_pick0 -> 3).projection_attachment.py:199(self._session_id.acceptsonAcpSessionId | NoAcpSessionId) and bothlog_records.py:170(self.params.updateonacp.schema.SessionNotification)Anyblockers cleared.Tests
tests/test_declared_receivers.py,tests/test_threaded_absence.py,tests/test_zero_one_tuple.py,tests/test_installed_stubs.py,tests/test_installed_creation_proofs.py,tests/test_repository_architecture.py): 87 passed, 0 failed.REL_IMPORTS=0.