fix: Canonical operation http.payment_request is not declared - #214
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e391a2903
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if original_origin != current_origin: | ||
| error = PaymentError("Refusing to send payment credential across redirect") |
There was a problem hiding this comment.
Preserve non-payment 402 responses after redirects
When a cross-origin redirect ends in an ordinary 402 without a valid, supported Payment challenge—for example, a Bearer-only or malformed WWW-Authenticate response—this check raises PaymentError and closes the response before challenge parsing. That regresses the transport's established behavior in test_returns_402_without_payment_header and test_returns_402_on_parse_error, where unmatched 402 responses are returned to the caller. Perform the origin rejection only after selecting a challenge that would actually produce a credential.
Useful? React with 👍 / 👎.
Motivation
Agricola found that
tempoxyz/pymppdiverges from the canonical implementation: fix: Canonical operationhttp.payment_requestis not declaredThe Agricola ticket #93 contains the audit evidence, affected SDKs, and remediation lifecycle.
Summary
capability:http.payment_requestin the target SDK's idioms.Key design considerations
agricola/agr-2026-001automation branch.Conformance-PR: tempoxyz/mpp-tools#133