Add guarded fake payment lifecycle API#24
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 797d4aa220
ℹ️ 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".
| })((req, ctx) => { | ||
| return ctx.json({ | ||
| ok: true, | ||
| payments: ctx.db.listPayments(req.query), |
There was a problem hiding this comment.
Preserve the payment store across requests
When these endpoints run through the normal withRouteSpec middleware stack, withDb creates a fresh createDatabase() whenever the request context has no db, so this list call reads a new empty store rather than the payments created by earlier /payments/send requests. The payment tests inject a shared db in tests/fixtures/start-server.ts, which masks this production path; as a result /payments/list, /payments/get, /payments/complete, and /payments/cancel cannot observe prior sends unless the server is run with the test-only middleware.
Useful? React with 👍 / 👎.
|
Addressed the automated review finding in Additional verification after the fix:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
idempotency_keyhandling for sends409responses/claim #1
Tests