Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

Adds test coverage for com/google/android/play/core/integrity/model/StandardIntegrityErrorCode class from DEX CID bafybeicb3qajmwy6li7hche2nkucvytaxcyxhwhphmi73tgydjzmyoqoda.

Changes

  • Test Coverage: Added StandardIntegrityErrorCode to testCasesByCid in dalvikExecutableParserAgainstSmaliParser.test.ts

  • Parser Fix: Fixed ambiguity in smaliNumberParser where negative hex literals like -0x1 matched both hex and decimal parsers

    The issue occurred because the negative lookahead only checked for 0x, allowing JSON number parser to consume - while hex parser matched -0x1, causing "Multiple union child parsers succeeded" error.

    // Before: only excluded 0x prefix
    createNegativeLookaheadParser(createExactSequenceParser('0x'))
    
    // After: excludes both 0x and -0x prefixes
    createNegativeLookaheadParser(createUnionParser([
      createExactSequenceParser('0x'),
      createExactSequenceParser('-0x'),
    ]))

This fix enables parsing of annotation classes with negative hex field initializers (common in Android error code enums).

Original prompt

This section details on the original issue you should resolve

<issue_title>Add bafybeicb3qajmwy6li7hche2nkucvytaxcyxhwhphmi73tgydjzmyoqoda + com/google/android/play/core/integrity/model/StandardIntegrityErrorCode parseDexAgainstSmaliMacro test like others and make it pass</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 14, 2025
Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
Copilot AI changed the title [WIP] Add parseDexAgainstSmaliMacro test for StandardIntegrityErrorCode Add StandardIntegrityErrorCode test and fix negative hex literal parsing Nov 14, 2025
Copilot AI requested a review from futpib November 14, 2025 12:37
Copilot finished work on behalf of futpib November 14, 2025 12:37
@futpib futpib marked this pull request as ready for review November 14, 2025 13:13
@futpib futpib merged commit 7f83dfc into master Nov 14, 2025
4 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19364699035

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 26 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 94.179%

Files with Coverage Reduction New Missed Lines %
build/smaliParser.js 26 96.35%
Totals Coverage Status
Change from base Build 19362939928: 0.01%
Covered Lines: 7803
Relevant Lines: 8279

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 19364699156

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 26 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 94.179%

Files with Coverage Reduction New Missed Lines %
build/smaliParser.js 26 96.35%
Totals Coverage Status
Change from base Build 19362939928: 0.01%
Covered Lines: 7803
Relevant Lines: 8279

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants