fix: PyEval byte array register tracking, CAST_TYPE instruction names, type annotations (#889 #885 #872)#891
Closed
haeter525 wants to merge 6 commits intoev-flow:masterfrom
Closed
Conversation
- Update contains() docstring examples to use MethodObject instead of strings - Broaden CAST_TYPE exception handler to catch KeyError in addition to IndexError
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #891 +/- ##
=======================================
Coverage 81.31% 81.31%
=======================================
Files 80 80
Lines 6946 6946
=======================================
Hits 5648 5648
Misses 1298 1298
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
bears_object()now correctly returnsTruefor array types (Dalvik types starting with[, e.g.[Bfor byte arrays). Previously onlyL-prefixed object types were tracked, causing byte array registers to be treated as primitives and breaking Stage 5 data-flow analysis for rules involving byte arrays. Rule00015on the Ahmyth sample now correctly reaches 100% confidence (was 80%).int-longtoint-to-longformat to match actual Dalvik mnemonic names. Parser updated to use.split("-to-")instead of index-based splitting.contains()type annotation: Updated type hints fromlist[str]toList[MethodObject]with corrected docstring examples.KeyErrorin addition toIndexErrorto handle unexpected type_mapping lookups gracefully.Test Coverage
Pre-Landing Review
2 issues found — 2 auto-fixed:
tools.py:24Docstring examples used string literals instead ofMethodObject→ updated to match type annotationpyeval.py:671CAST_TYPEonly caughtIndexError, notKeyErrorfromtype_mappinglookup → broadened toexcept (IndexError, KeyError)Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Test plan
bears_object()returnsTruefor[Bbyte array typeint-to-long/float-to-doubleetc. cast instructions dispatch correctly🤖 Generated with Claude Code