Skip to content

Conversation

@jamshale
Copy link
Contributor

@jamshale jamshale commented Oct 24, 2025

This removes the v1 issuance protocols in favor of a plugin. See #3252 for original work.

The plugin PR openwallet-foundation/acapy-plugins#2288 uses this to re-enable v1 issuance support.

When this is finished and successful the same method will be used for the presentation v1 protocols.

@jamshale jamshale force-pushed the remove-issue-credential-v1 branch from 7ed3a9d to d30db20 Compare October 27, 2025 19:48
@jamshale jamshale marked this pull request as ready for review October 27, 2025 19:56
@jamshale jamshale marked this pull request as draft October 27, 2025 20:24
@jamshale jamshale force-pushed the remove-issue-credential-v1 branch from a5a7559 to dec3ab4 Compare October 27, 2025 23:05
@jamshale jamshale force-pushed the remove-issue-credential-v1 branch from 22b5cc4 to 92401d9 Compare November 20, 2025 23:27
@jamshale jamshale marked this pull request as ready for review November 21, 2025 22:59
@sonarqubecloud
Copy link

@jamshale jamshale requested a review from Copilot November 21, 2025 23:06
Copilot finished reviewing on behalf of jamshale November 21, 2025 23:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the v1 issuance protocols from ACA-Py core in favor of a plugin-based approach. The removal is part of a larger effort to modularize the codebase and allow v1 protocols to be optionally added via plugins when needed.

Key Changes:

  • Complete removal of v1.0 issue credential protocol implementation
  • Updates to tests and examples to use v2.0 protocols instead
  • Addition of event bus handling in v2.0 routes for credential revocation
  • Simplification of revocation manager by removing v1-specific logic

Reviewed changes

Copilot reviewed 56 out of 63 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scenarios/examples/connectionless/example.py Removed v1 credential issuance example function (icv1), keeping only v2
scenarios/examples/connectionless/docker-compose.yml Changed log level from debug to info for alice and bob agents
acapy_agent/utils/tests/test_tracing.py Updated imports and tests to use V20CredExRecord instead of V10CredentialExchange
acapy_agent/revocation/tests/test_manager.py Updated tests to use v2 models, removed v1-specific test cases
acapy_agent/revocation/manager.py Removed v1/v2 credential exchange state updates from set_cred_revoked_state method
acapy_agent/protocols/present_proof/v1_0/tests/test_manager.py Updated import to use v2 credential record for state constant
acapy_agent/protocols/out_of_band/v1_0/tests/test_manager.py Removed v1 credential offer tests and imports
acapy_agent/protocols/out_of_band/v1_0/manager.py Removed v1 credential exchange lookup, now only supports v2
acapy_agent/protocols/issue_credential/v2_0/tests/test_routes.py Added comprehensive tests for new event bus integration
acapy_agent/protocols/issue_credential/v2_0/routes.py Added register_events and cred_revoked functions for event handling
acapy_agent/protocols/issue_credential/v1_0/* Deleted entire v1.0 protocol directory including routes, handlers, managers, models, messages, and all tests
acapy_agent/core/tests/test_goal_code_registry.py Updated import to reference v2 CONTROLLERS instead of v1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

save_ex.assert_called_once()

assert ret_exchange.state == V10CredentialExchange.STATE_ABANDONED
assert ret_exchange.state == V20CredExRecord.STATE_ABANDONED
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect state constant used. This test is for present_proof v1.0, not issue_credential v2.0. The assertion should likely use V10PresentationExchange.STATE_ABANDONED instead of V20CredExRecord.STATE_ABANDONED.

Copilot uses AI. Check for mistakes.
cred_ex_record.state = V20CredExRecord.STATE_CREDENTIAL_REVOKED
await cred_ex_record.save(txn, reason="revoke credential")
await txn.commit()
except StorageNotFoundError:
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'except' clause does nothing but pass and there is no explanatory comment.

Copilot uses AI. Check for mistakes.
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.

1 participant