Skip to content

fix: use exn.rp field as recipient for exchange message (#3) - #396

Open
lenkan wants to merge 2 commits into
WebOfTrust:mainfrom
lenkan:fix-exn-recipient
Open

fix: use exn.rp field as recipient for exchange message (#3)#396
lenkan wants to merge 2 commits into
WebOfTrust:mainfrom
lenkan:fix-exn-recipient

Conversation

@lenkan

@lenkan lenkan commented Nov 3, 2025

Copy link
Copy Markdown
Collaborator

All exchange messages now have the intended recipient in the payload, so the extra body parameter is confusing and could cause issues.

This PR removes the "rec" body parameter that previously specified a list of recipients of an exn message. This list had no correlation with the rp field in the exchange message payload.

This PR also removes the ipex multisig handlers, for no other reason that they weren't used in any of the signify integration tests, so to me it was unnecessary complexity. I do not see any reason to keep this feature as we already use the "/multisig/exn" from the client.

See discussions:

@codecov

codecov Bot commented Nov 6, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.76471% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.10%. Comparing base (f621ca4) to head (09c556a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/keria/app/agenting.py 75.00% 8 Missing ⚠️
src/keria/peer/exchanging.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #396      +/-   ##
==========================================
- Coverage   87.76%   86.10%   -1.66%     
==========================================
  Files          26       26              
  Lines        5826     5650     -176     
==========================================
- Hits         5113     4865     -248     
- Misses        713      785      +72     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kentbull

kentbull commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@lenkan will you rebase this on main? Also, is it ready for review?

@lenkan
lenkan force-pushed the fix-exn-recipient branch from d8cf00e to 41ade39 Compare July 14, 2026 13:53
@lenkan

lenkan commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@kentbull Rebased on current main and ready for review. We have been running this code for about 6 months now.

One note on the controversial removal of the multisig IPEX route handlers: no Signify code paths used them at the time. I did not want two different ways of achieving the same thing. The /multisig/exn endpoint provides the same capability, and that is what the Signify integration tests use.

@lenkan
lenkan marked this pull request as ready for review July 14, 2026 13:57
Exercise recipient resolution from exchange payloads so the removal of the separate rec parameter remains covered.
Comment thread src/keria/app/ipexing.py
op = IpexAdmitCollectionEnd.sendMultisigExn(
agent, hab, ked, sigs, atc, rec
)
op = IpexAdmitCollectionEnd.sendAdmit(agent, hab, ked, sigs)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Probably worth a refactor now or later to

if ked["r"] !== "/ipex/admit":
    raise falcon.HTTPBadRequest(
        description=f"invalid message route {route}"
    )

op = IpexAdmitCollectionEnd.sendAdmit(agent, hab, ked, sigs)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But really, I have been thinking that an even bigger refactor that would be nice is to drop all IPEX endpoints in favour of just /identifiers/{name}/exchanges, and be able to register Decks based on the route, so agent.grants.append(dict(said=ked["d"], pre=hab.pre)) could be called dynamically.

@kentbull

Copy link
Copy Markdown
Collaborator

@lenkan please fix conflicts.

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.

3 participants