[codex] add deterministic mock E2E flow#179
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
223ef6e to
f8fd626
Compare
f8fd626 to
84a9e78
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
84a9e78 to
99c9345
Compare
|
@codex please review this PR deeply. Focus on the current diff against Scope:
Please look for correctness, security, CI reliability, docs/config drift, test gaps, and cross-service contract mismatches. Prioritize payment-flow details: EIP-712 parity, nonce/timestamp replay behavior, receipt signing/verification, cache/receipt storage behavior, env-var defaults, and secret handling. Return severity-ordered findings using:
Include file/line references and a final verdict: approve, approve with comments, or request changes. |
💡 Codex ReviewMicroAI-Paygate/gateway/internal/ai/provider.go Lines 26 to 27 in 99c9345 When MicroAI-Paygate/.github/workflows/e2e.yml Lines 70 to 73 in 99c9345 Now that the OpenRouter-secret skip is removed, every PR path that hits this job runs MicroAI-Paygate/docker-compose.yml Line 16 in 99c9345 Adding MicroAI-Paygate/tests/e2e.test.ts Lines 78 to 80 in 99c9345
ℹ️ 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
AI_PROVIDER=mocksupport for local and CI payment-flow runs.bun run stackandbun run test:e2eto the mock provider so the 402 challenge/sign/retry/receipt path runs without OpenRouter, Ollama, Redis, or secrets.Why
The E2E workflow should exercise the payment flow consistently in CI instead of depending on live model-provider credentials. Docs now also avoid implying Redis-backed verifier nonce storage exists today; verifier replay protection remains single-process memory until a shared nonce store is implemented.
CI fix
The E2E workflow dependency prep now runs Go and Rust commands from their service directories:
cd gateway && go mod downloadcd verifier && cargo fetchValidation
git diff --checkcd gateway && go test -v ./...cd gateway && go vet ./...cd sdk/typescript && bun run typecheckcd sdk/typescript && bun run testbun run test:e2e(cd gateway && go mod download) && (cd verifier && cargo fetch)