Skip to content

Remove legacy WPJ Account Authenticator IPC strategy from Common, Fixes AB#3571860#3077

Draft
Copilot wants to merge 2 commits intodevfrom
copilot/remove-legacy-wpj-authenticator-again
Draft

Remove legacy WPJ Account Authenticator IPC strategy from Common, Fixes AB#3571860#3077
Copilot wants to merge 2 commits intodevfrom
copilot/remove-legacy-wpj-authenticator-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

The legacy LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API IPC strategy and its associated telemetry attribute are no longer needed. This removes all references from Common as the first step — Broker must be updated separately after this lands.

Changes

  • IIpcStrategy.Type — Removed LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API enum value; enum now contains only BOUND_SERVICE, ACCOUNT_MANAGER_ADD_ACCOUNT, and CONTENT_PROVIDER
  • AndroidDeviceRegistrationClientController — Removed static import and the else if branch mapping the legacy type to AttributeName.legacy_account_manager_status
  • AttributeName — Removed legacy_account_manager_status constant and its Javadoc; must also be removed from the Broker repo's AttributeName.java
  • DeviceRegistrationIpcStrategiesProvider — Removed KDoc references to WpjLegacyAccountAuthenticatorStrategy and "append legacy strategy after calling super"
  • IpcStrategyWithBackupTests — Replaced LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API mock usages with ACCOUNT_MANAGER_ADD_ACCOUNT/BOUND_SERVICE to maintain diverse fallback-chain coverage
Original prompt

Objective

Remove all references to the legacy WPJ Account Authenticator IPC strategy from the Common module. This includes the LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API enum value, the legacy_account_manager_status telemetry attribute, the telemetry branch in the device registration controller, test substitutions, and a documentation comment referencing the legacy strategy.

Fixes AB#3571860

Context

The device registration system currently supports three IPC strategies: ContentProvider (primary), BoundService (fallback), and a legacy WPJ Account Authenticator strategy. The legacy strategy is no longer needed. Removing it from Common is the first step — Broker consumes these types and must be updated after this change lands.

After this change, IIpcStrategy.Type should only contain strategy types that are actively used. The telemetry attribute legacy_account_manager_status tracked whether the legacy path was taken and is no longer relevant.

Technical Requirements

  1. In common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/IIpcStrategy.kt:

    • Remove the LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API value from the IIpcStrategy.Type enum
  2. In common/src/main/java/com/microsoft/identity/deviceregistration/AndroidDeviceRegistrationClientController.java:

    • Remove the import for IIpcStrategy.Type.LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API
    • Remove the else if branch in the telemetry code that checks for LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API and sets AttributeName.legacy_account_manager_status
  3. In common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java:

    • Remove the legacy_account_manager_status constant
  4. In common/src/test/.../IpcStrategyWithBackupTests.kt:

    • Replace any usage of IIpcStrategy.Type.LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API with IIpcStrategy.Type.ACCOUNT_MANAGER_ADD_ACCOUNT (or another valid enum value) so the test continues to verify multi-strategy backup behavior with a valid type
  5. In common/src/main/java/com/microsoft/identity/deviceregistration/DeviceRegistrationIpcStrategiesProvider.kt:

    • Remove any KDoc/comment that references the legacy Account Authenticator strategy

Files to Modify

  • common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/IIpcStrategy.kt — Remove LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API enum value
  • common/src/main/java/com/microsoft/identity/deviceregistration/AndroidDeviceRegistrationClientController.java — Remove import and telemetry branch for the legacy strategy type
  • common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java — Remove legacy_account_manager_status constant
  • common/src/test/.../IpcStrategyWithBackupTests.kt — Replace LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API references with ACCOUNT_MANAGER_ADD_ACCOUNT
  • common/src/main/java/com/microsoft/identity/deviceregistration/DeviceRegistrationIpcStrategiesProvider.kt — Remove doc comment referencing legacy strategy

Acceptance Criteria

  • LEGACY_ACCOUNT_AUTHENTICATOR_FOR_WPJ_API no longer exists in IIpcStrategy.Type
  • legacy_account_manager_status no longer exists in AttributeName.java
  • AndroidDeviceRegistrationClientController has no reference to the legacy strategy type
  • IpcStrategyWithBackupTests compiles and passes with substitute enum values
  • DeviceRegistrationIpcStrategiesProvider KDoc has no mention of legacy Account Authenticator
  • No new lint warnings introduced
  • Compile check passes: ./gradlew :common:compileDebugKotlin and ./gradlew :common4j:compileJava
  • Unit tests pass: ./gradlew :common:testDebugUnitTest

Follow .github/copilot-instructions.md strictly.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

✅ Work item link check complete. Description contains link AB#3571860 to an Azure Boards work item.

@github-actions github-actions Bot changed the title [WIP] Remove legacy WPJ Account Authenticator IPC strategy [WIP] Remove legacy WPJ Account Authenticator IPC strategy, Fixes AB#3571860 Apr 8, 2026
Copilot AI changed the title [WIP] Remove legacy WPJ Account Authenticator IPC strategy, Fixes AB#3571860 Remove legacy WPJ Account Authenticator IPC strategy from Common Apr 8, 2026
Copilot AI requested a review from p3dr0rv April 8, 2026 20:32
@github-actions github-actions Bot changed the title Remove legacy WPJ Account Authenticator IPC strategy from Common Remove legacy WPJ Account Authenticator IPC strategy from Common, Fixes AB#3571860 Apr 8, 2026
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.

2 participants