Skip to content

fix(data-types): migrate sync to v3 signatures API - #175

Open
r0ny123 wants to merge 1 commit into
RevEngAI:mainfrom
r0ny123:fix/migrate-data-sync-to-v3
Open

fix(data-types): migrate sync to v3 signatures API#175
r0ny123 wants to merge 1 commit into
RevEngAI:mainfrom
r0ny123:fix/migrate-data-sync-to-v3

Conversation

@r0ny123

@r0ny123 r0ny123 commented Sep 8, 2026

Copy link
Copy Markdown

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

  • Add a small adapter over the bundled SDK client's raw request layer.
  • Fetch signatures in batches through GET /v3/functions/signatures.
  • Resolve the v3 type graph into the legacy models consumed by the existing IDA importer.
  • Update function headers through PUT /v3/analyses/{analysis_id}/functions/{function_id}/signature.
  • Treat has_signature=false as an unavailable signature rather than a reason to push an old data-type blob back to the service.
  • Skip stack-variable writes explicitly because the current v3 contract has no stack-variable update operation.
  • Add coverage for conversion, type-ID resolution, function updates, no-op paths, and API failures.

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 passed
  • ruff 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.py
  • python -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.py
  • git diff --check

The broader service tests require IDA's embedded runtime modules and were not runnable in the standalone checkout used for this change.

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.
@r0ny123
r0ny123 requested a review from a team as a code owner September 8, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate data-type synchronization off deprecated v2 endpoints

1 participant