feat(add): idempotency key + single network retry - #5
Merged
Conversation
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.
What
motrix addnow generates a freshidempotencyKey(UUID) per invocation on all three variants (url/magnet/torrent)EXIT.NETWORK— fetch threw, the response may have been lost after delivery) the same request is retried exactly once with the same key; JSON-RPC errors never retry; no other command gains retryrpcCalladds an upgrade hint when a host rejects with-32602 InvalidParams(protocol drift: older Motrix rejecting the new field)@motrix/mdxpbumped^0.3.0→^0.5.0Contract: MDXP idempotency & retry contract (§8.5) — a keyed replay returns the first submission's task snapshot, so the single retry can never mint a duplicate task. Requires Motrix with
@motrix/mdxp@0.5.0schema formotrix add; older hosts reject loudly with the new upgrade hint.Verification
pnpm lint/pnpm typecheck/pnpm buildclean; 221/221 testsEXIT.NETWORK; JSON-RPC errors surface without retry;-32602hint preserves the original error asdataNote before next npm publish: bump package version (currently 0.4.0).