Repository navigation
Check caller receiver hierarchy in parameter pushes/moves and descendant overrides in forwarding_facade - #641
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
Fixes two soundness defects caught on
OpenHCSDev/toad(#2327,47258924a):PushForeignAbsenceBranchOperationandMoveMethodToClassOperation(probe_owner.py:345-355,refactors/foreign_absence_branch.py:2152-2335,refactors/member_move.py:552-575):6358df80a,ReadMarkedHistory.retain_painted(self, fragment: EvidencedFragment)had a narrowed parameter annotation whileHistoryFragmentownedevidence = Noneand callers (qt/history.py:2255,widgets/wire_history.py:72) passedHistoryFragmentinstances. Pushingretain_paintedontoEvidencedFragmentalone causedAttributeErroron the first non-evidenced fragment insideVirtualRowCanvas.paintEvent, blanking every Qt DM view.DeclaredPathProbeOwner.outside_family_symbolsand_require_parameter_callers_within_owner(plusDestinationInstanceMethod._require_argument_within_destination): checks every scanned caller argument against the target owner hierarchy (using declared types first, plus batched type-checker inference when an ancestor owns the probed attribute) and stops withNeededInput.SOURCE_CHANGEnaming the offendingfile:linewhen a caller passes a supertype or outside instance.ForwardingFacadeDetector(detectors/_restated_facts.py:1047-1112):ForwardingFacadeDetector.restatespreviously checked onlyoverridden_declarations(ancestors), missingAfterSequence(AfterMessage).older()overridingWireCut.older()two hops down (toad/client/history.py:463,:507)._overrides_inheritedwith_participates_in_dispatch, excluding any member overridden by any descendant inindex.descendant_symbols(symbol)as polymorphic base dispatch.Evidence
src/toad/client/history.py:ForwardingFacadeDetectorfindings onWireCutdrop1 -> 0.tests/test_foreign_absence_branch.py,tests/test_move_method_to_class.py, andtests/test_restated_fact_detectors.py.REL_IMPORTS=0,TOTAL_TOUCHED_FINDINGS=0.