Skip to content

chore(deps): affinidi-messaging-sdk 0.19.10, so a refused socket says why - #253

Merged
stormer78 merged 1 commit into
mainfrom
deps/messaging-sdk-0.19.10
Aug 22, 2026
Merged

chore(deps): affinidi-messaging-sdk 0.19.10, so a refused socket says why#253
stormer78 merged 1 commit into
mainfrom
deps/messaging-sdk-0.19.10

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Floor affinidi-messaging-sdk 0.19.9 → 0.19.10 (affinidi/affinidi-tdk-rs#718). Manifest note and lockfile only; no code changes.

Why

Two instances of this app on the same persona reconnect-loop against each other and it presents as a network fault rather than as "you have this open twice". The cause is not the mediator's one-socket-per-DID rule — it is that nothing on either side ever said what happened.

  • Server half. WebSocketCommands::Close carried no reason, so the handler answered all three of its senders identically — the duplicate-channel problem report and "replaced by a newer connection". That includes a newcomer refused by the duel damper, whose own connection was never displaced: the exact inverse of true.
  • Client half. The sdk's websocket transport matched the close frame as Message::Close(_) and discarded it, logging WebSocket connection closed by server at debug. So even a correct reason on the wire changed nothing here.

#718 gives Close a CloseReason, maps each to its own problem-report code and close text, and surfaces the close code and reason at WARN in the sdk.

Compatibility

duplicate-channel is preserved verbatim for the genuinely-replaced case. This repo matches on it only in doc comments and openvtc-core/tests/didcomm_transport_e2e.rs, and those are unaffected — hence a floor bump with no code change.

The eviction policy is deliberately untouched upstream. Displacement is what triggers the mediator's spawn_inbox_redelivery, and this repo is not representative in pulling stored mail explicitly via message_pickup — refusing outright would silently drop the stored-mail re-cover for clients that don't.

Known gap

The mediator half of #718 is affinidi-messaging-mediator 0.18.21, and the newest affinidi-messaging-test-mediator (0.2.52) still embeds 0.18.20. The #[ignore]d transport e2e therefore still exercises the old close behaviour until a fixture carrying 0.18.21 publishes; the new reasons reach a live client only against a deployed mediator ≥ 0.18.21.

Verification

cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace all pass locally.

Closes the client-side half of OpenVTC/verifiable-trust-infrastructure#1028.

@stormer78
stormer78 requested a review from a team as a code owner August 22, 2026 13:15
… why

The transport matched the server's close frame as `Message::Close(_)` and threw
it away — `debug!("WebSocket connection closed by server")` — so every close
looked identical from here: the socket vanished and the reconnect loop went
again. Two instances of this app on one persona therefore duelled, and the user
was shown a transport error rather than "you have this open twice".

The mediator half was also lying. `WebSocketCommands::Close` carried no reason,
so all three of its senders got the same `duplicate-channel` problem report and
the same "replaced by a newer connection" close text — including a newcomer
*refused* by the duel damper, whose own connection was never displaced. That is
the inverse of what happened to it.

affinidi-tdk-rs #718 gives `Close` a reason, maps each to its own problem-report
code, and surfaces the close code and reason at WARN in the sdk.
`duplicate-channel` is preserved verbatim for the genuinely-replaced case, so
the places this repo matches on it are unaffected and no code change is needed
here — the floor and the manifest note are the change.

The eviction policy is deliberately untouched upstream: displacement is what
triggers the mediator's stored-mail redelivery, and this repo is not
representative in pulling explicitly via `message_pickup`. Raised from this side
as OpenVTC/verifiable-trust-infrastructure#1028.

Not yet observable in the e2e fixture: the mediator half is 0.18.21, and the
newest `affinidi-messaging-test-mediator` (0.2.52) still embeds 0.18.20. The
`#[ignore]`d transport e2e keeps asserting the old behaviour until a fixture
carrying 0.18.21 publishes.

fmt, clippy -D warnings, and `cargo test --workspace` pass.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 force-pushed the deps/messaging-sdk-0.19.10 branch from 0277585 to dd6eb20 Compare August 22, 2026 13:15
@stormer78
stormer78 merged commit b7878a1 into main Aug 22, 2026
14 checks passed
@stormer78
stormer78 deleted the deps/messaging-sdk-0.19.10 branch August 22, 2026 13:39
@affinidi-appsecurity-bot

Copy link
Copy Markdown

🛡️ AI Agentic Security Code Review — all clear. We checked this change and found nothing to report. Keep shipping secure code!

Note: for major, breaking, or feature-introducing changes, you can always request an in-depth review from the security team.

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