Alidate supported modes - #101
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2139ed630
ℹ️ 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 err := validateSupportedModes(params.SupportedModes); err != nil { | ||
| return ChargeRequest{}, err | ||
| } |
There was a problem hiding this comment.
Remove the duplicate validator that fails the new test
For every invalid SupportedModes value, this earlier call returns tempo: unsupported mode ..., so execution never reaches validateChargeModes, while the newly added TestChargeRequestRejectsUnsupportedModes requires the exact error tempo: unsupported charge mode .... Consequently the package test suite fails consistently; use a single validator or align the error contract.
AGENTS.md reference: AGENTS.md:L130-L134
Useful? React with 👍 / 👎.
|
@cryptoryda -- plz fix conflict 🙇 |
Validate Tempo charge request modes
Summary
NormalizeChargeRequestWhy
Unsupported modes previously produced challenges that advertised no usable
credential flow. Rejecting them at request boundaries catches configuration and
wire-format errors before an unsatisfiable challenge is issued.
Testing