Repository navigation
fix(payments): Stripe 入账事件归属检查与隔离测试(未验收) - #713
Merged
Merged
Conversation
LIghtJUNction
marked this pull request as ready for review
October 10, 2026 17:27
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
BI-05 范围
关联审计 PR #711。分支
fix/bi-05-payment-credit,起点为main@2f4164978cf27f6e0e605b0589fbe631aef2c441。只针对当前 main 的 Go 支付业务,不以 #675/#707 的微内核作为验收证据。提交内容
e6a4f9bf025e4f91e294f02396589aaa8252f091:新增apps/api-go/controller/topup_credit_isolation_test.go。使用内存 SQLite、模拟 Redis、Stripe SDK 构造的签名事件和真实 Stripe 回调/入账路径,验证异常回滚、重试、重复/并发事件、冻结报价、跨订单交易号以及金额、币种、环境、Connected Account 不匹配等情况。测试会比对订单与用户余额,并有有效回调的对照。619f915089f0a32d54402989ce66ae9d6138bada:在fulfillOrder的一次性充值路径核对 Stripe webhook 事件的livemode与配置的sk_test_/sk_live_/rk_test_/rk_live_环境;拒绝未配置的模式及 Connect account 事件。签名验证保留在原来的StripeWebhook。冲突错误按现有流程不入账,并保留记录供人工核对。未修改订阅分支、退款、价格换算或数据库结构。验证状态和风险(必须阅读)
未完成应用编译及业务测试,不得宣称支付链路已验收。 当前隔离运行环境仅有 Go 1.23.2,而项目
apps/api-go/go.mod需要 Go 1.25.1;缺少完整依赖,且无法从本地检出 GitHub 仓库。原测试交付包的新增 Go 文件已通过gofmt和 Go parser 语法检查;这不等于类型检查或运行成功。新修复通过 GitHub 差异检查,代码符合已有 Stripe Event 字段(Account、Livemode),未获得项目构建或真实支付证据。后续必须在没有真实网关凭证的隔离环境执行:
这些是待运行命令,不是成功日志。新测试只覆盖 Stripe 合成渠道;尚未覆盖真实 Stripe/ePay/Waffo/Pancake/Creem 端到端、到账查询和正式资金流水、多进程并发或未知提交结果的恢复。模拟回调不能证明真实支付平台行为;SQLite 不能证明生产数据库事务行为。
合并授权和操作边界
最初要求“不合并”,随后仓库所有者两次明确要求合并,本 PR 据后续授权进入合并流程。合并不代表支付业务验收通过。所有本分支提交均含
[skip ci];未主动触发远程 CI、真实扣款、发送通知、部署或发布。