修复就是一个拉取请求。 Polylane来写,你来合并。
加入候补名单 github.com/coreplane/payments-api/pull/491
Cap retries on the checkout webhook worker #491
polylane Open polylane wants to merge 1 commit into
main from polylane/autofix/chat/k3x9f2-4e7d21a Conversation 1 Commits 1 Checks 1 Files changed 2
polylane bot commented 6 minutes ago ···
Retries on the checkout webhook worker were unbounded: a failing delivery re-queued itself forever and amplified load on payments-api. This caps delivery at 5 attempts with exponential backoff and dead-letters the payload after the last one.
What changed
worker/deliver.ts gains MAX_DELIVERY_ATTEMPTS = 5 and backoff between attempts; exhausted payloads land in checkout-webhooks-dlq instead of re-queueing.
Validation
npm test — 214 passed. A forced failing delivery stopped after 5 attempts and appeared in the dead-letter queue.
Root cause · Why it's safe · Out of scope
polylane added commit 4e7d21a Verified
Review required At least 1 approving review is required
ci / test Successful in 3m 12s Details
Review required Waiting on your review: Polylane never merges on its own
Merging is blocked
一个你不必自己写的修复。 以及信任它的理由。
-
像队友一样编写
在沙箱里、在分支上,遵循你的提交规范和你仓库的指引。
-
开启之前先检查
一次安全审查会搜寻正确的差异仍然搞坏部署的各种方式:加锁的迁移、混合版本导致的中断。
-
止步于你的审查
由你的审查和你的CI决定是否合并,仅此而已。
-
它从被拒中学习
未合并就关闭拉取请求,Polylane会弄清原因,并且不再重复。