fix(data-types): migrate sync to v3 signatures API - #175
Open
r0ny123 wants to merge 1 commit into
Open
Conversation
The plugin still calls deprecated v2 data-type operations while the current service exposes v3 signature endpoints. Add a compatibility adapter for the bundled SDK, preserve the existing IDA importer, update function headers through the v3 signature API, and skip unsupported stack-variable writes.
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.
Problem
The plugin still uses the deprecated v2 function-data-types operations for importing remote types and propagating local function changes. The current API contract exposes v3 signature operations instead, with analysis-scoped type identifiers and grouped type definitions. The old response models therefore cannot be used as a direct replacement.
Change
GET /v3/functions/signatures.PUT /v3/analyses/{analysis_id}/functions/{function_id}/signature.has_signature=falseas an unavailable signature rather than a reason to push an old data-type blob back to the service.The change is deliberately contained at the service boundary: the existing importer and the rest of the plugin can continue using their established legacy model objects while the bundled SDK remains compatible with the other plugin services.
Fixes #174.
Validation
pytest --confcutdir=tests/unit/data_types tests/unit/data_types/test_v3_adapter.py -q— 3 passedruff check reai_toolkit/app/services/data_types/data_types_service.py reai_toolkit/app/services/data_types/v3_data_types.py reai_toolkit/app/services/variable_sync/variable_sync_service.py tests/unit/data_types/test_service.py tests/unit/data_types/test_v3_adapter.py tests/unit/variable_sync/test_service.pypython -m py_compile reai_toolkit/app/services/data_types/data_types_service.py reai_toolkit/app/services/data_types/v3_data_types.py reai_toolkit/app/services/variable_sync/variable_sync_service.py tests/unit/data_types/test_service.py tests/unit/data_types/test_v3_adapter.py tests/unit/variable_sync/test_service.pygit diff --checkThe broader service tests require IDA's embedded runtime modules and were not runnable in the standalone checkout used for this change.