Repository navigation
Avoid duplicate signer approvals for concurrent legacy DM renders - #675
Closed
leonacostaok wants to merge 1 commit into
Closed
leonacostaok wants to merge 1 commit into
leonacostaok wants to merge 1 commit into
Conversation
Collaborator
|
Fixed in https://gitea.coracle.social/coracle/welshman/pulls/68, this will be in the next release. Thanks for the report! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening a legacy DM can request the same signer decryption more than once while the first approval is still pending.
ensureMessagePlaintextuses Welshman'sPlaintext.ensure, which caches only completed results. Three concurrent calls against the installed 0.10.10 cache invoke the underlying decrypt three times before any resolves.Share the pending promise per signer, peer and ciphertext at the message boundary. Different accounts, peers and messages remain independent. Remove the promise on either success or rejection so retries work and this helper retains no completed plaintext. The existing persistent cache and signer policy remain unchanged.
Validation: all 12 unit tests pass, including three concurrent callers against the actual cache (including the nested cache used by the signer policy), scope isolation, rejection/retry and cleanup. ESLint passes for changed source files. Full Svelte typechecking is blocked by missing generated declarations for
nostr-signer-capacitor-pluginin an install with lifecycle scripts disabled.This reproduces a legacy-DM duplicate-approval race. It does not establish that every repeated prompt has this cause; separate NIP-17 unwrap stages are outside this fix.